/* ==========================================================================
   CKM FRONT PAGE ENGINE (v4.5) - SMART FLOW SYSTEM (CLEAN & OPTIMIZED)
   PRO-Comment: Wbudowano style ze snippeta (Sekcja 3). Usunięto !important.
   Zintegrowano Grid w widżecie meczowym. Pancerna blokada RWD dla logotypów.
   ========================================================================== */

/* --- 1. SEKCJE GŁÓWNE --- */
body .ckm-front-page-engine {
    width: 100%;
    overflow-x: hidden;
    background: #f4f7f5;
}

body .ckm-section-block {
    max-width: 1200px;
    margin: 80px auto;
    padding: 0 20px;
    width: 100%;
}

body .ckm-section-heading {
    font-size: 32px;
    font-weight: 900;
    text-transform: uppercase;
    color: #0d2818;
    margin-bottom: 40px;
    text-align: center;
    letter-spacing: 1px;
}

/* --- 2. CKM HERO ENGINE --- */
body .ckm-home-hero-wrapper {
    position: relative;
    width: 100vw;
    left: 50%; right: 50%;
    margin-left: -50vw; margin-right: -50vw;
    isolation: isolate;
}

/* Magia Smart Flow - delikatny margines jako oddech dla kolejnej sekcji */
body .ckm-hero-standard,
body .ckm-hero-tall,
body .ckm-hero-academy { 
    margin-bottom: 20px; 
} 

body .ckm-hero-home-variant {
    height: 480px; 
    margin-bottom: 0; 
}

body .ckm-hero-home-variant .ckm-hero-title-sub {
    color: #00a859;
    font-size: clamp(14px, 3vw, 20px);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-top: 5px;
    display: block;
}

/* Widżet wraca do normalnego układu i rozpycha stronę */
body .ckm-hero-widget-slot {
    position: relative; 
    z-index: 999;
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: -80px; /*wysokość wejścia widzetu na hero */
}

body .ckm-home-hero-wrapper + section {
    margin-top: 0;
}

/* --- 3. CKM WIDŻET MECZOWY (Zintegrowany ze snippeta - Grid Layout) --- */
body .ckm-match-widget {
    background: #fff;
    max-width: 900px;
    width: 100%;
    margin: 20px auto;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    border: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body .ckm-match-widget.upcoming-overlap { 
    position: relative; 
    z-index: 999; 
    margin-top: -120px; 
    margin-bottom: 50px; 
}

body .ckm-match-widget .widget-header-label { 
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; 
    font-size: 17px; 
    font-weight: 900; 
    text-transform: uppercase; 
    color: #000; 
    letter-spacing: 10px; 
    margin-right: -10px;
    margin-bottom: 15px; 
    display: block; 
    text-align: center;
}

body .ckm-match-widget .venue-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    color: #999;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: -15px;
}

body .ckm-match-widget .venue-name {
    display: block;
    font-size: 14px;
    font-weight: 900;
    color: #0e1a18;
    text-transform: uppercase;
}

body .ckm-match-widget .match-league { 
    font-size: 14px; 
    font-weight: 900; 
    text-transform: uppercase; 
    color: #00a859; 
    display: block; 
    margin-top: 5px; 
}

body .ckm-match-widget .match-date { 
    font-size: 12px; 
    color: #888; 
    font-weight: 700; 
    margin-bottom: 20px; 
    display: block; 
}

body .ckm-match-widget .match-teams-score { 
    display: grid; 
    grid-template-columns: 1fr 130px 1fr; 
    column-gap: 30px;
    align-items: center; 
    width: 100%; 
    max-width: 850px; 
    margin: 10px 0; 
}

body .ckm-match-widget .team-box { 
    display: flex; 
    align-items: center; 
    gap: 15px; 
    text-decoration: none; 
    transition: transform 0.3s; 
}

body .ckm-match-widget .team-box.home { justify-content: flex-end; }
body .ckm-match-widget .team-box.away { justify-content: flex-start; }

body .ckm-match-widget .team-name { 
    font-weight: 900; 
    text-transform: uppercase; 
    font-size: 17px; 
    color: #111; 
}

body .ckm-match-widget .team-logo { 
    width: 95px; 
    height: 95px; 
    object-fit: contain; 
    flex-shrink: 0; 
}

body .ckm-match-widget .team-box:hover { transform: scale(1.05); }
body .ckm-match-widget .team-box:hover .team-name { color: #00a859; }

body .ckm-match-widget .match-score { 
    background: #0e1a18; 
    color: #fff; 
    padding: 12px 0; 
    border-radius: 8px; 
    font-weight: 900; 
    font-size: 32px; 
    line-height: 1; 
    width: 120px; 
    text-decoration: none; 
    text-align: center; 
    justify-self: center; 
    transition: transform 0.3s; 
}

body .ckm-match-widget .match-score:hover { 
    transform: scale(1.1); 
    background: #0e1a18; 
}

body .ckm-match-widget .match-score.is-vs,
body .ckm-match-widget .match-score.is-vs:visited { 
    font-size: 24px; 
    letter-spacing: 2px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    text-decoration: none; 
    color: #fff;
}

body .ckm-match-widget .v-link { 
    text-decoration: none; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    margin-top: 20px; 
}

body .ckm-match-widget .v-n { 
    font-size: 14px; 
    font-weight: 900; 
    color: #111; 
    text-transform: uppercase; 
}

body .ckm-match-widget .v-a { 
    font-size: 11px; 
    color: #777; 
    margin-top: 2px; 
    font-weight: 400; 
}

body .ckm-match-widget .v-link:hover .v-n { color: #00a859; }

body .ckm-match-widget .ckm-btn-more { 
    display: inline-block; 
    margin-top: 30px; 
    border: 2px solid #00a859; 
    color: #00a859; 
    background: transparent;
    padding: 8px 30px; 
    border-radius: 50px; 
    font-weight: 900; 
    font-size: 12px; 
    text-decoration: none; 
    transition: 0.3s; 
}

body .ckm-match-widget .ckm-btn-more:hover { 
    background: #00a859; 
    color: #fff; 
}

body .ckm-match-widget img[src=""],
body .ckm-match-widget img:not([src]) {
    display: none;
}

/* Zachowanie obsługi venue-info dla drugiego widgetu (jeśli generuje starą strukturę) */
body .ckm-match-widget .match-venue-info {
    width: 100%;
    margin-top: 10px;
    padding-top: 5px;
    border-top: 1px solid #eee;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* --- 4. AKADEMIA - WIDŻET Z CERTYFIKATEM PZPN --- */
body .academy-logos-row { 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    gap: 40px; 
    margin: 20px 0; 
    width: 100%;
    flex-wrap: wrap; 
}

body .academy-logo-item {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    height: auto; 
    max-height: none; 
    overflow: visible;
}

body .academy-logo-item img { 
    height: 180px;
    max-height: none; 
    width: auto; 
    max-width: none; 
    object-fit: contain; 
}

/* --- 5. AKADEMIA - CARD UI --- */
body .ckm-academy-cards-section {
    background: #f4f7f5;
}

body .ckm-academy-intro { 
    text-align: center; 
    max-width: 800px; 
    margin: 0 auto 50px auto; 
}

body .ckm-academy-intro p { 
    font-size: 18px; 
    color: #555; 
    line-height: 1.6; 
}

body .ckm-features-grid {
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 30px; 
}

body .ckm-feature-box {
    background: #ffffff;
    border-radius: 12px;
    padding: 30px 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.02);
    display: flex;
    flex-direction: column;
}

body .ckm-feature-box:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,168,89,0.1);
    border-color: rgba(0,168,89,0.2);
}

body .ckm-feature-box h3 {
    font-size: 18px; 
    font-weight: 900; 
    color: #0d2818; 
    margin-bottom: 12px;
    text-transform: uppercase;
    position: relative;
    padding-left: 15px; 
}

body .ckm-feature-box h3::before {
    content: ''; 
    position: absolute; 
    left: 0; 
    top: 5px; 
    height: 15px; 
    width: 4px; 
    background: #00a859; 
    border-radius: 2px;
}

body .ckm-feature-box p { 
    color: #666; 
    font-size: 14px; 
    line-height: 1.6; 
    margin: 0;
}

/* --- 6. NEWSLETTER --- */
body .ckm-section-newsletter {
    padding: 60px 20px;
    margin: 60px 0;
}

body .ckm-newsletter-card {
    background: #ffffff;
    max-width: 800px;
    margin: 0 auto;
    padding: 40px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

body .ckm-newsletter-card h2 { 
    font-size: 28px; 
    font-weight: 900; 
    color: #0d2818; 
    margin-bottom: 10px; 
    text-transform: uppercase;
}

body .ckm-newsletter-card p { 
    color: #666; 
    margin-bottom: 25px; 
}

body .ckm-btn-solid {
    background: #00a859; 
    color: #fff; 
    padding: 12px 35px; 
    border-radius: 30px;
    text-decoration: none; 
    font-weight: 800; 
    display: inline-block; 
    transition: 0.3s;
}

body .ckm-btn-solid:hover { 
    background: #0d2818; 
}

/* --- 7. TABELA PRO --- */
body .ckm-home-table-wrapper {
    max-width: 900px; 
    margin: 0 auto;
}

body .ckm-home-table-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.02);
    overflow: hidden;
}

body .ckm-ht-table { width: 100%; border-collapse: collapse; }
body .ckm-ht-table th { padding: 15px; text-align: center; font-size: 11px; color: #888; text-transform: uppercase; border-bottom: 2px solid #f0f0f0; }
body .ckm-ht-table td { padding: 12px 15px; text-align: center; border-bottom: 1px solid #f9f9f9; color: #333; }
body .ckm-ht-table th.ht-name, 
body .ckm-ht-table td.ht-name { text-align: left; }

body .ht-pos { width: 40px; font-weight: 900; color: #999; }
body .ht-stat { width: 60px; font-size: 12px; }
body .ht-pts { width: 60px; font-weight: 900; font-size: 14px; color: #111; }

body .ht-team-box { display: flex; align-items: center; gap: 12px; }
body .ht-team-box img { width: 25px; height: 25px; object-fit: contain; }
body .ht-team-box span { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }

body .ht-row-concordia { background: #f0fdf4; }
body .ht-row-concordia .ht-pos, 
body .ht-row-concordia .ht-pts { color: #00a859; }
body .ht-row-concordia .ht-team-box span { color: #00a859; font-weight: 900; }

body .ht-footer { padding: 15px; background: #fafafa; text-align: center; }
body .ht-footer a { font-size: 11px; font-weight: 800; color: #111; text-decoration: none; text-transform: uppercase; letter-spacing: 1px; transition: 0.2s; }
body .ht-footer a:hover { color: #00a859; }

/* --- 8. STREFA KIBICA (KAFELKI) --- */
body .ckm-front-shop-grid,
body .ckm-shop-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

body .ckm-product-card {
    display: block; 
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
}

body .ckm-product-card:hover {
    transform: translateY(-10px); 
}

body .ckm-product-img-box img {
    transition: transform 0.4s ease;
}

body .ckm-product-card:hover .ckm-product-img-box img {
    transform: scale(1.08); 
}

body .ckm-product-card:hover .ckm-product-img-box {
    border-color: #00a859;
    box-shadow: 0 15px 30px rgba(0, 168, 89, 0.15);
}

/* --- 9. PZPN UI BADGE --- */
body .ckm-hero-pzpn-ui-badge {
    position: absolute;
    bottom: 40px; 
    right: 40px; 
    z-index: 50;
    background: rgba(255, 255, 255, 0.96); 
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-left: 6px solid #00a859; 
    border-radius: 12px;
    padding: 16px 25px; 
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

body .ckm-hero-pzpn-ui-badge:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
}

body .ckm-hero-pzpn-ui-badge img {
    max-height: 75px; 
    width: auto;
}

body .ckm-pzpn-ui-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
}

body .ckm-pzpn-ui-text span:nth-child(1) {
    font-size: 10px;
    color: #55625c; 
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 800;
    line-height: 1;
}

body .ckm-pzpn-ui-text span:nth-child(2) {
    font-size: 15px; 
    color: #111111; 
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1;
}

/* --- 10. SPONSORZY --- */
body .sponsors-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    align-items: center;
    padding: 40px 0;
}

body .sponsor-item img {
    max-height: 60px;
    height: auto;
    filter: grayscale(100%); 
    transition: 0.3s;
    opacity: 0.7;
}

body .sponsor-item img:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}

body .sponsors-pyramid {
    text-align: center;
    padding: 40px 0;
}

body .sponsor-category-label {
    font-size: 14px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    font-weight: 700;
}

body .sponsor-section {
    margin-bottom: 60px;
}

body .section-sponsor-tytularny .sponsor-item img {
    max-width: 300px;
}

body .section-sponsor-glowny .sponsor-item img {
    max-width: 300px;
}

body .section-partner-medialny .sponsor-item img {
    max-width: 220px;
}

body .section-partner-techniczny .sponsor-item img,
body .section-partnerzy .sponsor-item img {
    max-width: 150px;
}

body .concordia-sponsors-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 50px;
}

body .sponsor-item img {
    height: auto;
    filter: grayscale(100%);
    opacity: 0.8;
    transition: all 0.3s ease;
}

body .sponsor-item:hover img {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.05);
}

/* --- 11. RWD (RESPONSYWNOŚĆ) --- */

@media screen and (max-width: 980px) {
    body .ckm-hero-pzpn-ui-badge { bottom: 20px; right: 20px; padding: 12px 18px; }
    body .ckm-hero-pzpn-ui-badge img { max-height: 55px; }
}

@media screen and (max-width: 950px) {
    body .ckm-front-shop-grid,
    body .ckm-shop-grid { grid-template-columns: repeat(2, 1fr); }
    body .ckm-hero-home-variant { height: 400px; }
    body .ckm-features-grid { grid-template-columns: repeat(2, 1fr); }
}

@media screen and (max-width: 768px) {
    /* Main Layout */
    body .ckm-hero-home-variant { height: 350px; }
    body .ckm-hero-standard, 
    body .ckm-hero-tall, 
    body .ckm-hero-academy { margin-bottom: 20px; }
    body .ckm-hero-widget-slot { margin-top: -120px; }
    body .academy-logo-item img { height: 150px; }
    body .ckm-features-grid { grid-template-columns: 1fr; gap: 20px; }
    body .ckm-front-shop-grid,
    body .ckm-shop-grid { grid-template-columns: 1fr; }
    body .hide-mob { display: none; }
    body .ckm-shop-section { padding: 40px 20px; }
    body .ckm-shop-disclaimer { font-size: 12px; padding: 15px; }

    /* Match Widget */
    body .ckm-match-widget {
        padding: 15px 10px;
        max-width: 95%;
    }
    body .ckm-match-widget .match-teams-score { 
        grid-template-columns: 1fr 80px 1fr; 
    }
    body .ckm-match-widget .team-name { 
        font-size: 10px; 
        white-space: normal; 
        line-height: 1; 
        max-width: 75px; 
    }
    body .ckm-match-widget .team-logo { 
        width: 40px; 
        height: 40px; 
        min-width: 40px;
        min-height: 40px;
        flex-shrink: 0;
    }
    body .ckm-match-widget .match-score { 
        width: 75px; 
        font-size: 18px; 
    }
}

@media screen and (max-width: 600px) {
    /* Match Widget - PANCERNA BLOKADA LOGOTYPÓW PRZED ZGNIATANIEM */
    body .ckm-match-widget .match-teams-score { 
        display: flex; /* Zmieniamy na flex by zespoły ułożyć pod sobą w telefonie */
        gap: 5px; 
        justify-content: space-around; 
    }
    body .ckm-match-widget .team-box { 
        flex-direction: column; 
        gap: 5px; 
        text-align: center; 
        flex: 1; 
        min-width: 0; /* Zabezpiecza grid przed wypychaniem tekstu */
    }
    body .ckm-match-widget .team-box.home,
    body .ckm-match-widget .team-box.away { 
        justify-content: center; 
    }
    body .ckm-match-widget .team-name { 
        font-size: 21px; /* Twoje sztywne 21px */
        max-width: 100%; 
        white-space: normal; 
        line-height: 1.1; 
        word-wrap: break-word; /* Zmusza za długi tekst do wejścia w nową linię */
    }
    body .ckm-match-widget .team-logo { 
        width: 90px; /* Twoje sztywne 90px */
        height: 90px; 
        min-width: 90px; /* Twarda blokada przed zgnieceniem przez Flexbox */
        min-height: 90px; 
        flex-shrink: 0; /* Całkowity zakaz kompresji na małym ekranie */
    }
    body .ckm-match-widget .match-score { 
        min-width: 60px; 
        width: auto;
        padding: 5px 10px; 
        font-size: 20px; 
        flex-shrink: 0; 
    }
}

@media screen and (max-width: 480px) {
    body .ckm-hero-pzpn-ui-badge { bottom: auto; top: 20px; right: 15px; padding: 8px 12px; gap: 10px; }
    body .ckm-hero-pzpn-ui-badge img { max-height: 40px; } 
    body .ckm-pzpn-ui-text span:nth-child(1) { font-size: 8px; }
    body .ckm-pzpn-ui-text span:nth-child(2) { font-size: 11px; }
}

