/* style.css - Arkusz stylów dla AIO-IPTV.pl - WERSJA MOBILE FIX */

/* 1. PODSTAWY */
html, body {
    max-width: 100vw;
    overflow-x: hidden;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Noto Sans", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background-color: #061526;
    color: #b0b8c4;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    }

/* 2. NAGŁÓWEK I TOPBAR */
header {
    text-align: center;
    padding: 40px 20px 20px;
    background: #0c243a;
    border-bottom: 1px solid #1b4668;
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5);
    transition: transform 0.3s ease;
}

.topbar {
    background: #0c243a;
    border-bottom: 1px solid #1b4668;
    padding: 10px 0;
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 15px;
}

/* LOGO */
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #c9d1d9;
}
.brand img { height: 40px; width: auto; }
.brand .name { font-weight: bold; font-size: 1.2rem; color: #3ba7ff; line-height: 1.2; }
.brand .tag { font-size: 0.75rem; color: #8b949e; display: block; }

/* PRZYCISKI W NAGŁÓWKU */
.pill {
    display: inline-flex;
    flex-direction: column;
    padding: 6px 14px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 0.8rem;
    line-height: 1.3;
}
.pill-accent {
    background: rgba(56, 139, 253, 0.15);
    border: 1px solid rgba(56, 139, 253, 0.4);
    color: #3ba7ff;
}

.icon-btn {
    background: transparent;
    border: none;
    color: #c9d1d9;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 3. NAWIGACJA */
.nav {
    background: #0c243a;
    border-bottom: 1px solid #1b4668;
}
.nav-inner {
    display: flex;
    gap: 20px;
    padding: 10px 0;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.nav-inner::-webkit-scrollbar { display: none; }

.nav-inner a {
    color: #8b949e;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
}
.nav-inner a.active, .nav-inner a:hover { color: #3ba7ff; }

/* 4. LAYOUT I KARTY */
.container {
    max-width: 1500px;
    margin: 40px auto;
    padding: 0 20px;
    width: 100%;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.hero-card {
    background: #133553;
    border: 1px solid #1b4668;
    border-radius: 12px;
    padding: 24px;
}
.hero-card h1 { margin-top: 0; color: #3ba7ff; font-size: 1.8rem; }

.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s;
    background: #133553;
    color: #c9d1d9;
    border: 1px solid #1b4668;
    cursor: pointer;
}
.btn.primary { background: #238636; border-color: #238636; color: #fff; }
.btn:hover { background: #1b4668; color: #fff; }

/* KPI */
.kpi { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kpi .k { background: rgba(33, 38, 45, 0.5); padding: 12px; border-radius: 8px; border: 1px solid #1b4668; }
.kpi .t { font-size: 0.75rem; color: #8b949e; text-transform: uppercase; }
.kpi .v { font-size: 1.1rem; font-weight: bold; color: #e6edf3; }

/* GRID GŁÓWNY */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.card {
    background-color: #0f2d47;
    border: 1px solid #1b4668;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
}
.card h3 { margin-top: 0; color: #c9d1d9; }

/* 5. STOPKA */
.site-footer {
    background: #0c243a;
    border-top: 1px solid #1b4668;
    padding: 40px 0 20px;
    margin-top: 40px;
    font-size: 0.9rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 30px;
}
.footer-title { color: #c9d1d9; font-weight: bold; margin-bottom: 15px; }
.footer-link { display: block; color: #8b949e; text-decoration: none; margin-bottom: 8px; }
.footer-bottom {
    border-top: 1px solid #1b4668;
    margin-top: 30px;
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    color: #6e7681;
}

/* Inne elementy pomocnicze z oryginału */
.search-container { margin-bottom: 10px; text-align: center; }
#searchBox { width: 100%; max-width: 600px; padding: 12px 20px; border-radius: 25px; border: 2px solid #1b4668; background: #0c243a; color: #fff; }
.notif-panel { display: none; position: absolute; right: 0; top: 100%; background: #161b22; border: 1px solid #1b4668; z-index: 100; width: 300px; }
.notif-panel.open { display: block; }

/* ========================================= */
/* MEDIA QUERIES - MOBILE FIXES & REORDERING */
/* ========================================= */

@media (max-width: 900px) {
    /* 1. Ukrywamy duży przycisk aktualizacji na mobile */
    .topbar .pill-accent { display: none; }
    
    /* 2. Zmiana układu Hero i Stopki na kolumnowy */
    .hero-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }

    /* 3. REORDERING NAGŁÓWKA (Ikony lewo, Logo prawo) */
    .topbar-inner {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        /* Ważne: usuwamy space-between, bo użyjemy margin-left:auto */
        justify-content: flex-start;
    }

    /* Ukrywamy spacer, bo psułby układ */
    .topbar-inner .spacer { display: none; }

    /* Ustawiamy kolejność (order) */
    
    /* Przycisk Menu (Hamburger) - Pierwszy z lewej */
    #navToggle {
        order: 1;
        margin-right: 5px; /* lekki odstęp od dzwonka */
    }

    /* Dzwonek (Powiadomienia) - Drugi z lewej */
    .notif {
        order: 2;
    }

    /* Logo - Trzecie (Przesunięte na prawo) */
    .brand {
        order: 3;
        margin-left: auto; /* To wypycha logo maksymalnie do prawej */
    }
}

@media (max-width: 600px) {
    .container { padding: 0 15px; }
    .brand .name { font-size: 1.1rem; }
    .hero-card h1 { font-size: 1.4rem; }
    .kpi { grid-template-columns: 1fr 1fr; }
    .grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .footer-bottom { flex-direction: column; text-align: center; gap: 10px; }
    
    /* Reklamy */
    .banner-desktop { display: none; }
    .banner-mobile { display: block; margin: 0 auto; max-width: 100%; }
}

.banner-desktop { display: block; width: 100%; height: auto; }
.banner-mobile { display: none; }
