/*
Theme Name: Rozgrywki LZPS
Description: Dedykowany, ultralekki motyw dla Lubuskiego Związku Piłki Siatkowej.
Author: Twój Główny Programista AI
Version: 1.0
Text Domain: lzps
*/

/* --- Reset i podstawy --- */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f4f4f9; /* Lekkie szare tło, żeby białe tabele się odcinały */
    color: #333;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* --- Responsywne Tabele dla Twoich Shortcode'ów --- */
/* Zadbaj, by wtyczka generowała tabele owinięte w diva z tą klasą, lub dodajmy to przez JS */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* Płynne przewijanie na iOS */
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px; /* Wymuszenie szerokości, żeby uaktywnić scroll na małych ekranach */
}

th {
    background-color: #e53935; /* Kolor czerwony - do zmiany na barwy LZPS */
    color: white;
    text-align: left;
    padding: 12px 15px;
    font-weight: 600;
}

td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
}

tr:hover {
    background-color: #f9f9f9; /* Podświetlenie wiersza drużyny po najechaniu */
}

/* --- STRONA GŁÓWNA --- */

/* Sekcja Na Żywo */
.hero-live-section {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%); /* Ciemne tło dla kontrastu */
    color: white;
    padding: 40px 0;
    margin-top: -30px; /* Niweluje margines z headera */
    margin-bottom: 40px;
    border-bottom: 4px solid #e53935; /* Akcent LZPS */
}

.live-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.live-header h2 {
    margin: 0;
    font-size: 24px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Pulsująca kropka "LIVE" */
.pulsing-dot {
    width: 12px;
    height: 12px;
    background-color: #ff3b30;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(255, 59, 48, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 59, 48, 0); }
}

.live-matches-container {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 8px;
}

/* Sekcja Kafelków Lig */
.section-title {
    font-size: 22px;
    margin-bottom: 20px;
    color: #333;
    border-left: 4px solid #e53935;
    padding-left: 10px;
}

.leagues-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Automatyczna siatka, super na mobile! */
    gap: 20px;
    margin-bottom: 60px;
}

.league-card {
    display: flex;
    align-items: center;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.league-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.league-icon {
    font-size: 28px;
    margin-right: 15px;
}

.league-card h3 {
    margin: 0;
    font-size: 18px;
    flex-grow: 1;
}

.card-arrow {
    color: #e53935;
    font-weight: bold;
    font-size: 20px;
}

/* --- HEADER I MENU GŁÓWNE --- */
.site-header {
    background-color: #ffffff;
    border-bottom: 2px solid #e53935;
    padding: 15px 0;
    margin-bottom: 30px;
    position: relative;
    z-index: 100;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* --- NOWE LOGO TEKSTOWE: Rozgrywki LZPS --- */
.site-branding .branding-link {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    /* Układa tytuł i podtytuł jeden pod drugim */
    justify-content: center;
}

.site-branding .branding-title {
    color: #1a1a2e;
    /* Bardzo ciemny granat/szary */
    font-weight: 800;
    font-size: 22px;
    line-height: 1.1;
    text-transform: uppercase;
}

.site-branding .lzps-green {
    color: #2e7d32;
    /* Ładny, sportowy odcień zieleni (Forest Green) */
}

.site-branding .branding-subtitle {
    color: #888888;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: none;
    /* Ta linijka naprawia problem! */
    margin-top: 3px;
}
}
.site-footer {
    background-color: #333;
    color: #fff;
    padding: 20px 0;
    margin-top: 50px;
    text-align: center;
    font-size: 14px;
}

/* Wygląd Menu na komputerze */
.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 20px;
}

.main-navigation a {
    text-decoration: none;
    color: #333;
    font-weight: 600;
    transition: color 0.2s ease;
}

.main-navigation a:hover {
    color: #e53935;
}

.no-menu-msg {
    margin: 0;
    font-size: 14px;
    color: #666;
}

/* Przycisk Hamburger (ukryty na PC) */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.hamburger-box {
    width: 30px;
    height: 24px;
    display: inline-block;
    position: relative;
}

.hamburger-inner, 
.hamburger-inner::before, 
.hamburger-inner::after {
    width: 30px;
    height: 3px;
    background-color: #333;
    position: absolute;
    border-radius: 4px;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.hamburger-inner { top: 50%; transform: translateY(-50%); }
.hamburger-inner::before { content: ""; top: -10px; left: 0; }
.hamburger-inner::after { content: ""; bottom: -10px; left: 0; }


/* --- MAGIA TELEFONÓW (max-width: 768px) --- */
@media (max-width: 768px) {
    .menu-toggle {
        display: block; /* Pokazujemy hamburgera na telefonach */
    }

    .main-navigation {
        display: none; /* Ukrywamy standardowe menu */
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #ffffff;
        border-bottom: 2px solid #e53935;
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
    }

    /* Klasa dodawana przez nasz JS w footerze */
    .main-navigation.is-active {
        display: block; 
    }

    .main-navigation ul {
        flex-direction: column; /* Linki w kolumnie, nie w wierszu */
        gap: 0;
    }

    .main-navigation li {
        border-top: 1px solid #f4f4f9;
    }

    .main-navigation a {
        display: block;
        padding: 15px 20px;
        font-size: 16px;
    }

    /* Animacja transformacji hamburgera w znak X */
    .menu-toggle.is-active .hamburger-inner { background-color: transparent; }
    .menu-toggle.is-active .hamburger-inner::before { transform: translateY(10px) rotate(45deg); }
    .menu-toggle.is-active .hamburger-inner::after { transform: translateY(-10px) rotate(-45deg); }
}
/* ==========================================================================
   POPRAWKI PREMIUM DLA WIDOKU KOMPUTEROWEGO (DESKTOP)
   ========================================================================== */
@media (min-width: 769px) {

    /* 1. Nagłówek strony - ograniczamy szerokość, żeby logo i menu nie były na skrajach monitora */
    .header-container {
        max-width: 1000px;
        margin: 0 auto;
    }

    /* 2. Wygląd podstron z ligami (Tabele i Terminarze) */
    .page-header h1 {
        text-align: center;
        font-size: 32px;
        margin-bottom: 30px;
        color: #1a1a2e;
    }

    .page-content {
        /* Zamknięcie treści w eleganckiej "karcie" na środku ekranu */
        max-width: 850px;
        margin: 0 auto;
        background: #ffffff;
        padding: 40px;
        border-radius: 12px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
        /* Miękki, nowoczesny cień */
    }

    /* 3. Poprawki samych tabel wypluwanych przez wtyczkę na komputerze */
    .table-responsive {
        box-shadow: none;
        /* Usuwamy podwójny cień (karta ma już swój) */
        border: 1px solid #eaeaea;
    }

    table {
        font-size: 16px;
        /* Nieco większa czcionka na komputerze */
    }

    th {
        padding: 16px 20px;
        /* Więcej "oddechu" w nagłówkach */
    }

    td {
        padding: 16px 20px;
    }

    /* 4. Poprawki Strony Głównej - Sekcja "Na Żywo" */
    .hero-live-section {
        padding: 60px 0;
    }

    .live-header {
        max-width: 850px;
        margin: 0 auto 25px auto;
        justify-content: center;
        /* Wyśrodkowanie napisu "Dzisiaj na parkietach" */
    }

    .live-matches-container {
        /* Wyniki na żywo również zamykamy w eleganckim, węższym oknie */
        max-width: 850px;
        margin: 0 auto;
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.15);
        backdrop-filter: blur(10px);
        padding: 40px;
        border-radius: 16px;
    }

    /* 5. Poprawki Strony Głównej - Siatka Lig (Kafelki) */
    .section-title {
        text-align: center;
        border-left: none;
        padding-left: 0;
        font-size: 28px;
        margin-bottom: 40px;
        position: relative;
    }

    /* Ozdobna linia pod tytułem "Wybierz rozgrywki" na komputerze */
    .section-title::after {
        content: '';
        display: block;
        width: 60px;
        height: 4px;
        background-color: #e53935;
        margin: 15px auto 0 auto;
        border-radius: 2px;
    }

    .leagues-grid {
        /* Sztywny podział na maksymalnie 3 kafelki w jednym rzędzie */
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
        max-width: 1000px;
        margin: 0 auto 80px auto;
    }

    .league-card {
        padding: 30px 25px;
        display: flex;
        flex-direction: column;
        /* Układamy ikonę nad tekstem na PC */
        text-align: center;
        gap: 15px;
    }

    .league-icon {
        margin-right: 0;
        font-size: 40px;
        /* Większa piłka na komputerze */
    }

    .card-arrow {
        display: none;
        /* Ukrywamy strzałkę z mobile, żeby było czyściej */
    }
}