/**
 * Plik: 2-header.css
 * System: CKM (Czysty kod, zero legacy, zero !important)
 */

/* 1. KONTENER GŁÓWNY */
html, body {
    overflow-x: hidden;
}
body.ckm-body-no-scroll { /* Zamrażam scrolowanie tła */
    overflow: hidden;
}

.ckm-header {
    position: relative;
    background: var(--ckm-white, #ffffff);
    border-bottom: 1px solid #eeeeee;
    width: 100%;
    z-index: 9990;
}
/* Kontrola skryptu przyklejającego Header (uwzględnienie paska 36px) */
.ckm-header.is-sticky, 
.ckm-header.sticky, 
.ckm-header[style*="position: fixed"] {
    top: 36px !important;
}

/* Wersja dla zalogowanego admina (Top Bar + Pasek WP) */
body.admin-bar .ckm-header.is-sticky, 
body.admin-bar .ckm-header.sticky, 
body.admin-bar .ckm-header[style*="position: fixed"] {
    top: 68px !important; 
}

@media screen and (max-width: 782px) {
    body.admin-bar .ckm-header.is-sticky, 
    body.admin-bar .ckm-header.sticky,
    body.admin-bar .ckm-header[style*="position: fixed"] {
        top: 82px !important; 
    }
}
.ckm-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 40px;
    padding-bottom: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 40px;
    padding-right: 40px;
}

/* 2. LOGOTYP I TYTUŁ */
.ckm-logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.ckm-logo-img,
.custom-logo-link img {
    height: 65px;
    width: auto;
    display: block;
}

.ckm-logo-text {
    display: flex;
    flex-direction: column;
    line-height: 0.99;
    gap: 0;
}

.ckm-logo-text a {
    text-decoration: none;
    color: var(--ckm-green-dark);
    display: block;
}

.ckm-title-main {
    font-size: 30px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.ckm-title-sub {
    font-size: 22px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding-top: 5px;
	margin-top: -3px;
}

.ckm-mobile-menu-brand { 
	display: none !important; 
}

/* 3. MENU DESKTOP */
.ckm-main-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 30px;
}

.ckm-main-menu > li {
    position: relative;
}

.ckm-main-menu a {
    text-decoration: none;
    color: var(--ckm-green-dark);
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase !important;
    display: block;
    position: relative;
    transition: color 0.3s ease;
}

/* Linia pod menu (hover) */
.ckm-main-menu > li > a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--ckm-green);
    transition: width 0.3s ease;
}

.ckm-main-menu > li > a:hover {
    color: var(--ckm-green);
}

.ckm-main-menu > li > a:hover::after {
    width: 100%;
}

/* ==========================================================================
   4. PODMENU (SUB-MENU) - CLASSIC ELEGANCE & GRID MEGA MENU (v12.0)
   PRO-Comment: Wracamy do stabilnego, pionowego układu.
   Poziom 3 (Wnuki) zamieniony w 2-kolumnową siatkę, by pomieścić 20 drużyn
   bez zajmowania całego ekranu w pionie. Pancerne mosty na kursor.
   ========================================================================== */
@media (min-width: 981px) {
    
    /* Główne elementy menu trzymają swoje własne dropdowny */
    .ckm-main-menu > li {
        position: relative !important; 
    }

    /* Reset kropek i formatowania list */
    .ckm-main-menu ul, .ckm-main-menu li {
        list-style: none !important;
        margin: 0; padding: 0;
    }
    .ckm-main-menu li::before { display: none !important; content: none !important; }

    /* MOSTEK POZIOM 1 */
    .ckm-main-menu > li > a::after {
        content: ''; position: absolute; bottom: -20px; left: 0; width: 100%; height: 20px; background: transparent; z-index: 9999;
    }

    /* 1. POZIOM 2: KLASYCZNY, ELEGANCKI DROPDOWN PIONOWY */
    .ckm-main-menu > li > .sub-menu {
        position: absolute;
        top: 100%; 
        left: 0;
        background: #ffffff;
        min-width: 240px; /* Przyjemna, stabilna szerokość */
        display: flex;
        flex-direction: column;
        border-radius: 0 0 8px 8px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.08); 
        border-top: 3px solid var(--ckm-green);
        
        opacity: 0;
        visibility: hidden;
        transform: translateY(10px);
        transition: all 0.2s ease;
        z-index: 10000;
    }

    .ckm-main-menu > li:hover > .sub-menu {
        opacity: 1; visibility: visible; transform: translateY(0);
    }

    /* Wygląd linków poziomu 2 (np. DRUŻYNY) */
    .ckm-main-menu > li > .sub-menu > li {
        position: relative; /* Trzyma wnuki! */
        border-bottom: 1px solid #f4f7f5;
    }
    .ckm-main-menu > li > .sub-menu > li:last-child {
        border-bottom: none;
    }

    .ckm-main-menu > li > .sub-menu > li > a {
        padding: 8px 20px;
        font-size: 13px;
        font-weight: 700;
        text-transform: uppercase;
        color: #111111;
        display: block;
        transition: 0.2s ease;
    }
    /* PRO Detal: Zaokrąglenie hovera dla ostatniego elementu, by nie wystawał poza kontener */
    .ckm-main-menu > li > .sub-menu > li:last-child > a {
        border-radius: 0 0 8px 8px;
    }

    .ckm-main-menu > li > .sub-menu > li > a:hover {
        color: var(--ckm-green);
        background: #f8fbf9;
        padding-left: 25px; /* PRO Detal: Lekkie przesunięcie tekstu przy najechaniu */
    }

    /* MOSTEK POZIOM 2 -> 3 (Łapie myszkę zjeżdżającą w prawo) */
    .ckm-main-menu > li > .sub-menu > li > .sub-menu::before {
        content: ''; position: absolute; top: 0; left: -25px; width: 25px; height: 100%; background: transparent;
    }

    /* 2. POZIOM 3: WNUKI JAKO 2-KOLUMNOWA SIATKA (GRID) */
    .ckm-main-menu > li > .sub-menu > li > .sub-menu {
        position: absolute;
        top: -3px; /* Równa z górną krawędzią ojca */
        left: 100%; /* Wyskakuje w prawo */
        background: #ffffff;
        width: 450px; /* SZEROKI PANEL! */
        
        /* MAGIA: Dzielimy 20 drużyn na dwie kolumny */
        display: grid;
        grid-template-columns: 1fr 1fr; 
        gap: 5px 15px; /* Odstępy w pionie i poziomie */
        
        padding: 15px;
        border-radius: 0 8px 8px 8px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.12);
        border-top: 3px solid var(--ckm-green);
        border-left: 1px solid #f0f0f0;
        
        opacity: 0;
        visibility: hidden;
        transform: translateX(10px);
        transition: all 0.2s ease;
        z-index: 10001;
    }

    .ckm-main-menu > li > .sub-menu > li:hover > .sub-menu {
        opacity: 1; visibility: visible; transform: translateX(0);
    }

    /* Wygląd drużyn w kolumnach */
    .ckm-main-menu > li > .sub-menu > li > .sub-menu > li > a {
        padding: 8px 12px;
        font-size: 12px;
        font-weight: 600;
        color: #444444;
        text-transform: uppercase;
        display: block;
        border-radius: 4px;
        transition: 0.2s ease;
    }

    .ckm-main-menu > li > .sub-menu > li > .sub-menu > li > a:hover {
        color: var(--ckm-green);
        background-color: #f4f7f5;
    }
}


/* 5. PRZYCISK HAMBURGERA */
.ckm-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    -webkit-appearance: none !important; /* Blokada stylów Androida/iOS */
    appearance: none !important;
    cursor: pointer;
    padding: 10px;
    z-index: 9996;
    touch-action: manipulation; /* Poprawia reakcję na dotyk na telefonach */
}

.ckm-hamburger-line {
    display: block !important;
    width: 30px !important;
    height: 3px !important;
    background-color: var(--ckm-green-dark) !important;
    border: none !important;
    border-radius: 2px !important;
    margin: 0 !important;
}

/* 6. RESPONSIVE DESIGN & MOBILE MENU */
/**
 * SNIPPET 0.3.4 - Ultimate Mobile Menu Fix (980px Breakpoint & Z-Index Nuke)
 */

/* Zabezpieczenie przed rozpychaniem strony w poziomie */
html, body {
    overflow-x: hidden;
}



/* ZMIENIONY PUNKT ZAŁAMANIA - Zgodnie z analizą F12 */
@media (max-width: 980px) {
    
    .ckm-header-inner {
        padding-left: 20px;
        padding-right: 20px;
    }

    /* KONTENER MENU -> SZUFLADA (Nad widżetem meczowym!) */
    .ckm-nav-section {
        position: fixed;
        top: 0;
        right: -100%;
        width: 320px;
        max-width: 85vw;
        height: 100vh;
        background-color: var(--ckm-white, #ffffff);
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        padding: 20px 30px;
        box-shadow: -10px 0 30px rgba(0,0,0,0.1);
        transition: right 0.4s ease-in-out;
        z-index: 100000 !important; /* Totalna dominacja nad widżetem */
        overflow-y: auto;
    }
    
    .ckm-nav-section.nav-active {
        right: 0;
    }

    /* HAMBURGER -> NAD SZUFLADĄ */
    .ckm-menu-toggle {
        display: flex !important;
        z-index: 100001 !important; /* Przycisk zamykania najwyżej */
    }

    /* --- LOGIKA PODMENU W SZUFLADZIE (PRO UX) --- */
    .ckm-main-menu {
        flex-direction: column;
        width: 100%;
    }

    .ckm-main-menu .sub-menu {
        position: static !important;
        box-shadow: none !important;
        transform: none !important;
        background: transparent !important;
        padding-left: 15px; 
        border-left: 2px solid var(--ckm-green, #00a859);
        display: none; /* Domyślnie SCHOWANE (Standard PRO) */
        margin-top: 10px;
    }

    /* Na mobile hover działa jak pierwsze dotknięcie (tap). 
       Kibic dotyka "Klub" -> rozwija się podmenu. Dotyka linku w podmenu -> przechodzi na stronę */
    .ckm-main-menu li:hover > .sub-menu,
    .ckm-main-menu li:active > .sub-menu,
    .ckm-main-menu li:focus-within > .sub-menu {
        display: block;
    }

    /* Zapobiega psuciu się linków w szufladzie */
    .ckm-main-menu li {
        width: 100%;
        display: block;
    }

    .ckm-main-menu a {
        display: block;
        padding: 12px 0;
    }
}

/* ==========================================================================
   7. OVERLAY (Tło zamykające menu mobilne)
   ========================================================================== */
.ckm-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6); /* Eleganckie, kinowe przyciemnienie */
    z-index: 9989 !important; /* Idealnie POD menu (100000), ale NAD stroną */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    cursor: pointer; /* Podpowiada, że można to kliknąć */
    -webkit-backdrop-filter: blur(3px); /* PRO detal: rozmycie tła na iOS */
    backdrop-filter: blur(3px);
}

.ckm-menu-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

/* ==========================================================================
   0.2.x CKM STICKY TOP BAR (v1.1 - Hotfix dla WP Admin i nazw klubów)
   ========================================================================== */

/* 1. Odepchnięcie głownego Headera DOKŁADNIE o wysokość naszego Top Baru (36px) */
.ckm-header {
    margin-top: 36px !important;
}

/* 2. Gdy scrollujesz w dół i header staje się "pływający" - usuwamy margines, bo trzyma go parametr "top" */
.ckm-header.is-sticky, 
.ckm-header.sticky, 
.ckm-header[style*="position: fixed"] {
    margin-top: 0 !important;
    top: 36px !important;
}

/* 3. Wersja z otwartym paskiem WordPressa (zalogowany Admin) */
body.admin-bar .ckm-header.is-sticky, 
body.admin-bar .ckm-header.sticky, 
body.admin-bar .ckm-header[style*="position: fixed"] {
    margin-top: 0 !important;
    top: 68px !important; /* 36px Top Bar + 32px systemowy pasek WP */
}

@media screen and (max-width: 782px) {
    body.admin-bar .ckm-header.is-sticky, 
    body.admin-bar .ckm-header.sticky,
    body.admin-bar .ckm-header[style*="position: fixed"] {
        top: 82px !important; /* Na mobile pasek WP jest grubszy */
    }
}

/* FIX DLA ZALOGOWANEGO ADMINISTRATORA (Tylko pozycja Top Baru) */
body.admin-bar .ckm-top-bar {
    top: 32px; 
}
@media screen and (max-width: 782px) {
    body.admin-bar .ckm-top-bar { top: 46px; } 
}
/* UWAGA: Usunęliśmy nadpisywanie padding-top dla body. Wystarczy globalne 36px! */

.ckm-top-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 36px;
    background-color: #0a110d;
    color: #ffffff;
    z-index: 9998; /* Ustawione PONIŻEJ dropdownów paska WP Admin (99999) */
    border-bottom: 2px solid #00a859;
    font-family: 'Inter', sans-serif;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.ckm-top-bar-inner {
    max-width: 1300px;
    margin: 0 auto;
    width: 100%;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

/* LEWA STRONA - LICZNIK */
.ckm-tb-countdown {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.ckm-tb-label {
    color: #9aa5a0;
}

.ckm-tb-match-title {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease;
    max-width: 400px; /* ZWIĘKSZONO! Miejsce na dłuuugie nazwy rywali */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ckm-tb-match-title:hover {
    color: #00a859;
}

#ckm-countdown-timer {
    display: flex;
    align-items: center;
    gap: 2px;
    background: #18281f;
    padding: 2px 8px;
    border-radius: 4px;
    color: #00a859;
    font-weight: 900;
}

#ckm-countdown-timer small {
    color: #9aa5a0;
    font-size: 9px;
    margin-right: 3px;
    font-weight: 500;
    text-transform: lowercase; /* Małe litery dla d. godz. min. sek. */
}

/* PRAWA STRONA - SOCIALE I SZUKAJKA */
.ckm-tb-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.ckm-tb-socials {
    display: flex;
    gap: 14px; /* Zwiększony odstęp między ikonami */
    align-items: center;
}

.ckm-tb-socials a {
    color: #9aa5a0;
    display: flex;
    align-items: center;
    transition: color 0.3s ease, transform 0.2s ease;
}

.ckm-tb-socials a:hover {
    color: #00a859;
    transform: translateY(-1px);
}

.ckm-tb-search-form {
    display: flex;
    align-items: center;
    background: #18281f;
    border-radius: 4px;
    padding: 0 6px;
    height: 24px;
    border: 1px solid #233a2d;
    transition: border-color 0.3s ease;
}

.ckm-tb-search-form:focus-within {
    border-color: #00a859;
}

.ckm-tb-search-input {
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 11px;
    width: 100px;
    padding: 0 5px;
    font-family: inherit;
    outline: none;
}

.ckm-tb-search-input::placeholder {
    color: #55625c;
}

.ckm-tb-search-btn {
    background: transparent;
    border: none;
    color: #9aa5a0;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.ckm-tb-search-btn:hover {
    color: #00a859;
}

/* ==========================================================================
   0.4.5 CKM SEARCH RESULTS STYLES (Hero, Filters, Badges)
   ========================================================================== */

/* 1. Autorski Hero dla Wyszukiwarki */
.ckm-search-hero {
    position: relative;
    width: 100%;
    min-height: 250px;
    background-color: #0a110d;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.ckm-search-hero-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(10,17,13,1) 0%, rgba(0,168,89,0.3) 100%);
    z-index: 1;
}

.ckm-search-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 40px 20px;
}

.ckm-search-hero-content h1 {
    color: #ffffff;
    font-size: 32px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0 0 10px 0;
}

.ckm-search-hero-content p {
    color: #00a859;
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}

.ckm-search-hero-content p span {
    color: #ffffff;
}

/* 2. Pasek Filtrów (Kategorie) */
.ckm-search-filters-box {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px 25px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 20px;
    border-left: 5px solid #00a859;
}

.ckm-filters-label {
    font-size: 13px;
    font-weight: 800;
    color: #111;
    text-transform: uppercase;
    white-space: nowrap;
}

.ckm-filters-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ckm-f-btn {
    display: inline-block;
    background: #f4f7f5;
    color: #55625c;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none !important;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.ckm-f-btn:hover {
    background: #e2e8e5;
    color: #111;
}

.ckm-f-btn.active {
    background: #00a859;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(0,168,89,0.3);
}

/* 3. Plakietka typu wpisu i brak foto */
.ckm-news-thumb {
    position: relative; /* Trzyma plakietkę wewnątrz zdjęcia */
}

.ckm-result-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 4px;
    z-index: 5;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.ckm-search-placeholder {
    width: 100%;
    height: 200px;
    background: #111;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ckm-search-placeholder span {
    color: #333;
    font-size: 60px;
    font-weight: 900;
}

/* 4. Ekran braku wyników */
.ckm-search-empty {
    background: #ffffff;
    border-radius: 12px;
    padding: 50px 30px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    margin-bottom: 40px;
}

.ckm-search-empty h2 {
    color: #00a859;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 15px;
}

/* RWD */
@media (max-width: 768px) {
    .ckm-search-hero { min-height: 200px; }
    .ckm-search-hero-content h1 { font-size: 24px; }
    .ckm-search-filters-box { flex-direction: column; align-items: flex-start; gap: 15px; }
}

/* MOBILE RWD */
@media (max-width: 768px) {
    .ckm-tb-label { display: none; }
    .ckm-tb-match-title { max-width: 140px; } /* Delikatnie poszerzono na komórce */
    .ckm-hide-mobile { display: none !important; }
    .ckm-tb-socials { display: none; }
    .ckm-tb-search-input { width: 60px; }
}



@media (max-width: 768px) {
    .ckm-menu-toggle {
        display: flex;
    }
    
    .ckm-nav-section {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        height: 100vh;
        background: var(--ckm-white, #ffffff);
        padding: 40px 30px 40px; /* Zmniejszyłem boczne paddingi dla lepszego widoku */
        box-shadow: -10px 0 30px rgba(0,0,0,0.1);
        transition: 0.4s ease;
        z-index: 9995;
        overflow-y: auto;
    }
    
    .ckm-nav-section.nav-active {
        right: 0;
    }
    
	/* Wygląd mini-logo na mobile */
    .ckm-mobile-menu-brand {
        display: flex !important;
        align-items: flex-end;
        gap: 10px;
		padding-top: 40px;
        padding-bottom: 8px;
        margin-bottom: 25px;
        position: relative;
		text-decoration: none;
    }

	.ckm-mobile-menu-brand::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 70%; /*  długością linii */
        height: 2px;
        background-color: var(--ckm-green);
    }
    .ckm-mobile-menu-brand img {
        height: 45px;
        width: auto;
		display: block;
    }

    .ckm-mobile-menu-brand span {
        font-size: 16px;
        font-weight: 900;
        color: var(--ckm-green-dark);
        letter-spacing: 1px;
		line-height: 1.2;
        margin-bottom: 2px;
    }

   /* GĘSTSZE I RÓWNE MENU */
    .ckm-main-menu { flex-direction: column; align-items: flex-start; gap: 0px; width: 100%; }
    .ckm-main-menu > li { width: 100%; border-bottom: 1px solid #f0f0f0; }
    
    /* JEDNAKOWE odstępy dla rodziców, dzieci i wnuków (12px z góry i z dołu) */
    .ckm-main-menu a,
    .ckm-main-menu .sub-menu a { 
        padding: 10px 0; 
        display: block; 
        width: 100%; 
    }
}