/* ===========================================================================
   FOOTER — komponentní soubor (konsolidace, roadmapa bod 2)
   ===========================================================================
   Cíl: jediný zdroj pro footer, načítaný POZDĚ (priorita 10003 ve functions.php,
   po audit-enqueue/ab-hero/page-scoped) → footer overridy vyhrávají POZICÍ,
   ne slepým !important → order-independent (bezpečné pro CSS agregaci).

   Sem se postupně (po fázích, s live testem) rozpouští footer pravidla z:
   - audit-fixes.css (~82 selektorů, base + tablet + mobil + homepage accordion)
   - custom.css (~44)
   - responsive.css (~12)
   - navigation.css (~3)

   Struktura souboru (pořadí = kaskáda uvnitř footer.css):
   1) BASE / DESKTOP  2) @max-1240 (container gutter)  3) @tablet 768–921
   4) @mobil ≤767.98 — base VŽDY první, media overridy pod ním (order-independent).
   =========================================================================== */

/* ===========================================================================
   1) FOOTER BASE / DESKTOP
   Konsolidace 2026-09-06 (batch A): přesunuto z custom.css (desktop base 715–855)
   + sloučen dřívější footer.css base (B6 grid, kontakty line-height, nav gap).
   Jediný zdroj pravdy pro desktop footer. Barvy/pattern/typografie/scroll-btn.
   Figma 1272:6068 (5 sloupců 222,4px, gutter 32; spodní lišta 1240px).
   =========================================================================== */
.site-footer {
    color: var(--text-negative-secondary, #D2D2D6);
    background: var(--background-dark, #022930);
    background-image: url(../img/footer-pattern.svg);
    background-size: cover;
}

.site-primary-footer-wrap {
    position: relative;
    max-width: var(--global-max-width);
    margin: 0 auto;
    padding: 0;
}

.site-primary-footer-wrap[data-section="section-primary-footer-builder"] .ast-builder-grid-row,
.site-primary-footer-wrap[data-section="section-primary-footer-builder"] .site-footer-section {
    justify-content: flex-start;
    align-items: self-start;
    padding-bottom: 20px;
}

/* Sloupcový gutter mřížky (Figma 32px). */
.site-primary-footer-wrap .ast-builder-footer-grid-columns {
    column-gap: var(--gap-desktop, 32px) !important;
}

.site-footer .widget {
    margin: 0;
}

/* Nadpisy sloupců */
.site-footer h3 {
    margin-bottom: 24px;
    color: var(--text-negative-primary, #FFFFFF) !important;
    font-size: 1rem;
    font-weight: 650;
    line-height: 160%;
    letter-spacing: 0;
}

/* Kontaktní text-widget (adresa/tel/email/IČO) + ikony vlevo */
.site-footer .textwidget {
    font-size: 0.75rem;
    font-weight: 450;
}

.site-footer .site-info-inner .widget_media_image {
    margin-bottom: 24px;
}

.site-footer .textwidget li {
    padding-left: 24px;
    margin-bottom: 16px;
    line-height: 1.6;   /* Figma 1.6 (dřív 26.4px ≈ poměr 2.2) */
    background-repeat: no-repeat;
    background-position: 0 50%;
}

li.adresa {
    background-image: url("data:image/svg+xml;utf8,<svg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'><path d='M8.00033 14.6668L7.48442 15.2112L8.00033 15.7001L8.51623 15.2112L8.00033 14.6668ZM12.5837 6.66683C12.5837 7.20594 12.3288 7.93544 11.8468 8.79152C11.3761 9.62749 10.7387 10.4983 10.0862 11.2969C9.43601 12.0926 8.78379 12.8009 8.29309 13.3112C8.04815 13.5658 7.84442 13.7701 7.7026 13.9101C7.63171 13.9801 7.57635 14.034 7.53911 14.07C7.52049 14.0879 7.5064 14.1015 7.49718 14.1103C7.49257 14.1147 7.48917 14.1179 7.48703 14.12C7.48596 14.121 7.4852 14.1217 7.48477 14.1221C7.48455 14.1223 7.48441 14.1225 7.48435 14.1225C7.48432 14.1226 7.48434 14.1225 7.48432 14.1225C7.48436 14.1225 7.48442 14.1225 8.00033 14.6668C8.51623 15.2112 8.51633 15.2111 8.51645 15.211C8.51652 15.2109 8.51665 15.2108 8.51679 15.2107C8.51705 15.2104 8.5174 15.2101 8.51783 15.2097C8.51868 15.2089 8.51986 15.2078 8.52135 15.2063C8.52434 15.2035 8.52859 15.1994 8.53407 15.1942C8.54503 15.1837 8.56089 15.1685 8.58134 15.1487C8.62222 15.1092 8.68144 15.0516 8.75639 14.9776C8.90623 14.8297 9.11917 14.6161 9.37422 14.3509C9.88352 13.8214 10.5646 13.082 11.2478 12.2459C11.9286 11.4127 12.6245 10.4676 13.1539 9.52742C13.6719 8.60736 14.0837 7.60048 14.0837 6.66683H12.5837ZM8.00033 14.6668C8.51623 14.1225 8.51629 14.1225 8.51633 14.1225C8.51631 14.1225 8.51633 14.1226 8.5163 14.1225C8.51624 14.1225 8.5161 14.1223 8.51588 14.1221C8.51545 14.1217 8.51469 14.121 8.51362 14.12C8.51148 14.1179 8.50808 14.1147 8.50347 14.1103C8.49425 14.1015 8.48016 14.0879 8.46154 14.07C8.4243 14.034 8.36894 13.9801 8.29805 13.9101C8.15623 13.7701 7.9525 13.5658 7.70756 13.3112C7.21686 12.8009 6.56464 12.0926 5.91444 11.2969C5.26192 10.4983 4.62453 9.62749 4.15386 8.79152C3.67188 7.93544 3.41699 7.20594 3.41699 6.66683H1.91699C1.91699 7.60048 2.32877 8.60736 2.84679 9.52742C3.37612 10.4676 4.07206 11.4127 4.75288 12.2459C5.43601 13.082 6.11713 13.8214 6.62643 14.3509C6.88148 14.6161 7.09442 14.8297 7.24427 14.9776C7.31921 15.0516 7.37843 15.1092 7.41931 15.1487C7.43976 15.1685 7.45562 15.1837 7.46658 15.1942C7.47206 15.1994 7.47631 15.2035 7.4793 15.2063C7.48079 15.2078 7.48197 15.2089 7.48282 15.2097C7.48325 15.2101 7.4836 15.2104 7.48386 15.2107C7.484 15.2108 7.48413 15.2109 7.4842 15.211C7.48432 15.2111 7.48442 15.2112 8.00033 14.6668ZM3.41699 6.66683C3.41699 4.13552 5.46902 2.0835 8.00033 2.0835V0.583496C4.64059 0.583496 1.91699 3.3071 1.91699 6.66683H3.41699ZM8.00033 2.0835C10.5316 2.0835 12.5837 4.13552 12.5837 6.66683H14.0837C14.0837 3.3071 11.3601 0.583496 8.00033 0.583496V2.0835ZM8.00033 8.0835C8.78273 8.0835 9.41699 7.44923 9.41699 6.66683H7.91699C7.91699 6.62081 7.9543 6.5835 8.00033 6.5835V8.0835ZM9.41699 6.66683C9.41699 5.88443 8.78273 5.25016 8.00033 5.25016V6.75016C7.9543 6.75016 7.91699 6.71285 7.91699 6.66683H9.41699ZM8.00033 5.25016C7.21792 5.25016 6.58366 5.88443 6.58366 6.66683H8.08366C8.08366 6.71285 8.04635 6.75016 8.00033 6.75016V5.25016ZM6.58366 6.66683C6.58366 7.44923 7.21792 8.0835 8.00033 8.0835V6.5835C8.04635 6.5835 8.08366 6.62081 8.08366 6.66683H6.58366Z' fill='%23D2D2D6'/></svg>");
}

li.telefon {
    background-image: url("data:image/svg+xml;utf8,<svg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'><g clip-path='url(%23clip0_3025_14772)'><path d='M12.0787 9.8015L9.33323 10.3335C7.47876 9.4027 6.33323 8.3335 5.66657 6.66683L6.17987 3.91343L5.20958 1.3335L3.39547 1.3335C2.26792 1.3335 1.38076 2.26592 1.59349 3.37322C1.96244 5.29368 2.85424 8.18784 4.9999 10.3335C7.25591 12.5895 10.3953 13.7098 12.4769 14.2379C13.6323 14.5311 14.6666 13.6243 14.6666 12.4323L14.6666 10.7876L12.0787 9.8015Z' stroke='%23D2D2D6' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></g><defs><clipPath id='clip0_3025_14772'><rect width='16' height='16' fill='white'/></clipPath></defs></svg>");
}

li.email {
    background-image: url("data:image/svg+xml;utf8,<svg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'><path d='M2 5.3335L7.55279 8.10989C7.83431 8.25065 8.16569 8.25065 8.44721 8.10989L14 5.3335M2 4.66683V11.3335C2 12.0699 2.53726 12.6668 3.2 12.6668H12.8C13.4627 12.6668 14 12.0699 14 11.3335V4.66683C14 3.93045 13.4627 3.3335 12.8 3.3335H3.2C2.53726 3.3335 2 3.93045 2 4.66683Z' stroke='%23D2D2D6' stroke-width='1.5' stroke-linecap='round'/></svg>");
}

li.ico {
    background-image: url("data:image/svg+xml;utf8,<svg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'><path d='M5.33366 6.66683L10.667 6.66683M5.33366 12.0002H10.667M5.33366 9.3335H8.00033M10.667 1.3335V3.60016C10.667 3.82108 10.8461 4.00016 11.067 4.00016H13.3337M2.66699 1.7335V14.2668C2.66699 14.4877 2.84608 14.6668 3.06699 14.6668H12.9337C13.1546 14.6668 13.3337 14.4877 13.3337 14.2668V3.83251C13.3337 3.72643 13.2915 3.62469 13.2165 3.54967L11.1175 1.45065C11.0425 1.37564 10.9407 1.3335 10.8346 1.3335H3.06699C2.84608 1.3335 2.66699 1.51258 2.66699 1.7335Z' stroke='%23D2D2D6' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>");
}

/* Menu odkazy ve footeru */
.site-footer a.menu-link {
    color: var(--text-negative-secondary, #D2D2D6);
    font-size: 0.75rem;
    font-weight: 450;
    line-height: 160%;
    letter-spacing: 0;
}

.site-footer .main-header-menu > .menu-item > .menu-link,
#astra-footer-menu > .menu-item > .menu-link {
    color: var(--text-negative-secondary, #D2D2D6);
    font-weight: 500;
    line-height: 160%;
    letter-spacing: 2%;
}

/* Navigační widget (sloupce s odkazy) — 8px rozestupy (Figma) */
.site-footer .widget_nav_menu ul {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.site-footer .widget_nav_menu ul li {
    margin-bottom: 0;
}

.footer-widget-area[data-section="section-footer-menu"] .astra-footer-horizontal-menu {
    justify-content: flex-start;
}

.ast-footer-language-switcher-element[data-section="section-fb-language-switcher"] {
    justify-content: right;
}

/* Spodní lišta (below-footer): legal odkazy + copyright */
.site-below-footer-wrap {
    padding: 0;
    border: none !important;
    color: var(--text-negative-secondary, #D2D2D6);
    font-size: 12px;
    font-weight: 500;
    line-height: 160%;
    letter-spacing: 2%;
}

.site-below-footer-wrap .ast-builder-footer-grid-columns,
.site-below-footer-inner-wrap {
    max-width: var(--global-max-width, 1240px) !important;
}

.site-below-footer-wrap[data-section="section-below-footer-builder"] .site-footer-section {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    padding: var(--padding-32) 0 0 0;
}

.site-below-footer-wrap .site-footer-section-1 {
    border-top: 1px solid var(--border-primary-transparent, #FFFFFF1F);
}

/* Scroll-to-top tlačítko (pravý horní roh primary footeru) */
.site-primary-footer-wrap .footer-scroll {
    content: '';
    display: block;
    position: absolute;
    right: 0;
    width: 40px;
    height: 40px;
    cursor: pointer;
    border: 1px solid var(--button-secondary-secondary-bglight-default, #008C9D52);
    border-radius: var(--radius-s);
    background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 12.5L10 7.5L15 12.5' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 20px 20px;
}

.site-primary-footer-wrap .footer-scroll:hover {
    background-color: var(--button-secondary-secondary-bglight-hover, #57FFF829);
    border-color: var(--button-secondary-secondary-bglight-default, #008C9D52);
}

/* ===========================================================================
   2) @max-1240 — container gutter (footer wraps 20px boky, scroll-btn odsazen)
   Přesunuto z responsive.css (@media max-width:1240px). Konsolidace 2026-09-06.
   =========================================================================== */
@media (max-width: 1240px) {
    .site-primary-footer-wrap,
    .site-below-footer-wrap {
        padding: 0 20px;
    }

    .ast-footer-copyright,
    .ast-footer-social-wrap,
    .site-footer-focus-item {
        width: inherit;
    }

    .site-primary-footer-wrap .footer-scroll {
        right: 20px;
    }
}

/* ---------------------------------------------------------------------------
   TABLET FOOTER (768–921px) — Figma 7014:36858
   Konsolidace footer fáze 2: přesunuto z audit-fixes.css (sekce 16).
   Kontaktní blok + sbalené navigační řádky (vertikální footer na tabletu).
   --------------------------------------------------------------------------- */
@media (min-width: 768px) and (max-width: 921.98px) {
    /* The tablet design is a vertical footer.  The previous two-column grid
       made the desktop widgets appear beside the contact information. */
    footer {
        padding: 0;
    }

    .site-primary-footer-wrap[data-section="section-primary-footer-builder"] {
        max-width: none;
        padding: 32px 32px 0;
    }

    /* Spodní lišta na tabletu = 32px boky (obsahový gutter), ne 20px z „@max-1240".
       (Dřív to drželo audit-fixes @608; teď explicitně zde, po @1240 bloku.) */
    .site-below-footer-wrap {
        padding-left: 32px;
        padding-right: 32px;
    }

    .site-primary-footer-wrap[data-section="section-primary-footer-builder"] .ast-builder-grid-row,
    .site-primary-footer-wrap[data-section="section-primary-footer-builder"] .site-footer-section {
        display: block !important;
        width: 100% !important;
    }

    .site-primary-footer-wrap[data-section="section-primary-footer-builder"] .footer-widget-area {
        width: 100% !important;
        margin: 0 !important;
    }

    /* Keep the logo/contact widget as one full-width block before the menu. */
    .site-primary-footer-wrap .footer-widget-area:first-child {
        padding-bottom: 24px;
    }

    /* Class is applied only to navigation widgets by custom.js.  This avoids
       collapsing the address and contact details in the first footer widget. */
    .site-primary-footer-wrap .footer-widget-area.gamin-footer-accordion {
        position: relative;
        margin: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.12);
    }

    .site-primary-footer-wrap .footer-widget-area.gamin-footer-accordion .widget_custom_html h3 {
        position: relative;
        /* flex + min-height = jednotná výška řádků a svislé vycentrování textu
           i badge (jako mobil). Dřív `display:block` → řádek se „Školení 46"
           měl jinou výšku (neostylovaný inline badge). */
        display: flex;
        align-items: center;
        gap: 8px;
        min-height: 64px;
        box-sizing: border-box;
        margin: 0;
        padding: 20px 44px 20px 0;
        color: var(--text-negative-primary, #fff) !important;
        font-size: 20px;
        font-weight: 650;
        line-height: 24px;
        cursor: pointer;
    }

    .site-primary-footer-wrap .footer-widget-area.gamin-footer-accordion .widget_custom_html h3::after {
        position: absolute;
        top: 50%;
        right: 4px;
        width: 10px;
        height: 10px;
        border-right: 2px solid currentColor;
        border-bottom: 2px solid currentColor;
        content: '';
        transform: translateY(-65%) rotate(45deg);
        transition: transform .2s ease;
    }

    .site-primary-footer-wrap .footer-widget-area.gamin-footer-accordion.is-open .widget_custom_html h3::after {
        transform: translateY(-35%) rotate(-135deg);
    }

    .site-primary-footer-wrap .footer-widget-area.gamin-footer-accordion .widget_nav_menu {
        padding: 0 0 20px;
    }

    .site-primary-footer-wrap .footer-widget-area.gamin-footer-accordion .widget_nav_menu ul {
        gap: 12px;
    }

    .site-primary-footer-wrap .footer-widget-area.gamin-footer-accordion .widget_nav_menu a {
        font-size: 16px;
        line-height: 24px;
    }

    /* Zarovnání vlevo (Figma 7014:36858) — bez tohoto dědí patička na tabletu
       centrování (mobil to má taky, ř. ~333). */
    .footer-widget-area .footer-widget-area-inner {
        text-align: left !important;
    }

    /* Badge počtu školení v accordion nadpisu (zelená pilulka jako mobil) — jinak
       neostylovaný inline badge rozhodí výšku řádku „Školení a semináře". */
    .site-primary-footer-wrap .gamin-footer-title-badge {
        display: inline-flex !important;
        flex: 0 0 auto !important;
        align-items: center !important;
        justify-content: center !important;
        min-width: 18px !important;
        height: 18px !important;
        padding: 0 6px !important;
        margin-left: 0 !important;
        border-radius: 999px !important;
        color: var(--badge-green-text, #166533) !important;
        background: var(--badge-green-fill, #BBF7D1) !important;
        font-size: 11px !important;
        font-weight: 700 !important;
        line-height: 18px !important;
        vertical-align: middle !important;
    }

    /* Zavřený řádek = jen výška nadpisu (64px) + dělicí čára. Astra/base dává
       accordionu i sekci padding-bottom + sekci margin-bottom → ~54px prázdna
       pod textem (řádky přerostlé). Nulujeme (jako mobil ř. ~533). */
    .site-primary-footer-wrap .site-footer-section:has(.gamin-footer-accordion) {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }
    .site-primary-footer-wrap .footer-widget-area.gamin-footer-accordion {
        padding-bottom: 0 !important;
    }

    /* Spodní lišta (Zásady / Cookies / …) zarovnaná VLEVO (Figma 7014:36858).
       Dřív: UL byl grid (~225px buňky) + LI mělo justify-content:center → odkazy
       vycentrované v buňkách a zalomené = centrovaný dojem. Přepínáme na levý
       flex-row s zalomením. */
    .site-below-footer-wrap ul.ast-nav-menu {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: flex-start !important;
        column-gap: 24px !important;
        row-gap: 8px !important;
        text-align: left !important;
    }
    .site-below-footer-wrap ul.ast-nav-menu > li {
        justify-content: flex-start !important;
        width: auto !important;
    }
}

/* ---------------------------------------------------------------------------
   MOBIL FOOTER (≤767.98px) — homepage accordion + above-footer (Figma 3953:*)
   Konsolidace footer batch 1 (region A): přesunuto z audit-fixes.css.
   --------------------------------------------------------------------------- */
@media (max-width: 767.98px) {
    /* --- Globální mobilní footer (všechny stránky) — konsolidace batch B 2026-09-06.
       Dedup z custom.css @767 ≡ responsive.css @768 (footer padding, grid 1 sloupec,
       footer menu). Jeden zdroj zde. --- */
    /* Footer full-width (padding jen vertikálně). Boční 16px gutter řeší vnitřní
       sekce (primary/below wrapy níže) — díky tomu je above-footer (CTA) full-width
       a gradient jde edge-to-edge (dřív footer padding 16 zužoval Astra obal → gradient
       měl 16px mezery vlevo/vpravo). */
    footer {
        padding: 32px 0;   /* homepage: footer#colophon padding-top:0 níže srovná horní hranu ke kartě */
    }

    /* CTA gradient přes footer NA CELOU ŠÍŘKU pro VŠECHNY stránky (Figma spec, stejné
       jako desktop). Wrap je teď full-width → gradient edge-to-edge; bílá karta uvnitř
       zůstává 16px od kraje (níže). */
    .site-above-footer-wrap[data-section="section-above-footer-builder"] {
        background-image: linear-gradient(180deg, #F7F7F7 48%, rgba(2, 41, 48, 0) 48%) !important;
        min-height: 218px !important;
    }
    .site-above-footer-wrap[data-section="section-above-footer-builder"] .poradit-box {
        margin-left: 16px !important;
        margin-right: 16px !important;
    }

    /* Footer widgety pod sebe (1 sloupec). Astra „mobile-full" to dělá až ≤544;
       v 545–767 to jinak spadne na tablet-5-equal (5 sloupců) / audit „1fr 1fr" (2). */
    footer .ast-builder-grid-row-container.ast-builder-grid-row-tablet-5-equal .ast-builder-grid-row {
        grid-template-columns: 1fr;
    }

    .footer-widget-area .footer-widget-area-inner {
        text-align: left !important;
    }

    #astra-footer-menu {
        display: flex;
        gap: 16px;
    }

    #astra-footer-menu .menu-item > a {
        padding: 0;
    }

    /* Mobile footer matches the mobile Figma footer: contact block stays open,
       navigation widgets are collapsed rows unless the JS toggles is-open. */
    .site-primary-footer-wrap .footer-widget-area.gamin-footer-accordion {
        position: relative;
        width: 100% !important;
        margin: 0 !important;
        border-top: 1px solid rgba(255, 255, 255, 0.12);
    }

    .site-primary-footer-wrap .footer-widget-area.gamin-footer-accordion .widget_custom_html h3 {
        position: relative;
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        min-height: 72px !important;
        margin: 0 !important;
        padding: 24px 44px 24px 0 !important;
        color: var(--text-negative-primary, #fff) !important;
        font-size: 18px !important;
        font-weight: 650 !important;
        line-height: 24px !important;
        cursor: pointer;
        box-sizing: border-box !important;
    }

    .site-primary-footer-wrap .footer-widget-area.gamin-footer-accordion .widget_custom_html h3::after {
        position: absolute;
        top: 50%;
        right: 4px;
        width: 10px;
        height: 10px;
        border-right: 2px solid currentColor;
        border-bottom: 2px solid currentColor;
        content: '';
        transform: translateY(-65%) rotate(45deg);
        transition: transform .2s ease;
    }

    .site-primary-footer-wrap .footer-widget-area.gamin-footer-accordion.is-open .widget_custom_html h3::after {
        transform: translateY(-35%) rotate(-135deg);
    }

    .site-primary-footer-wrap .footer-widget-area.gamin-footer-accordion .widget_nav_menu {
        padding: 0 0 20px !important;
    }

    .site-primary-footer-wrap .gamin-footer-title-badge {
        display: inline-flex !important;
        flex: 0 0 auto !important;
        align-items: center !important;
        justify-content: center !important;
        min-width: 18px !important;
        height: 18px !important;
        padding: 0 6px !important;
        margin-left: 0 !important;
        border-radius: 999px !important;
        color: var(--badge-green-text, #166533) !important;
        background: var(--badge-green-fill, #BBF7D1) !important;
        font-size: 11px !important;
        font-weight: 700 !important;
        line-height: 18px !important;
        vertical-align: middle !important;
    }

    /* Above-footer (CTA „poradit-box") na mobilu — CLEAN in-flow (jako desktop):
       Karta = normální box v toku; přesah přes hranici footeru dělá GRADIENT na
       wrapu (světlá horní půlka #F7F7F7 / spodní průhledná → prosvítá tmavý footer).
       Astra footer builder na mobilu sbaluje grid řádky (height:0) → vynutíme block
       flow + height:auto, ať sekce kartu obsáhne (dřív se to řešilo sbalením na 0
       + absolute kartou = hnízdo). Konsolidace poradit-box 2026-09-06. */
    body.home .site-above-footer-wrap[data-section="section-above-footer-builder"] {
        display: block !important;
        min-height: 0 !important;
        height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
        background-image: linear-gradient(180deg, #F7F7F7 48%, rgba(2, 41, 48, 0) 48%) !important;
    }

    body.home .site-above-footer-wrap[data-section="section-above-footer-builder"] .ast-builder-grid-row-container-inner,
    body.home .site-above-footer-wrap[data-section="section-above-footer-builder"] .site-above-footer-inner-wrap,
    body.home .site-above-footer-wrap[data-section="section-above-footer-builder"] .ast-builder-grid-row,
    body.home .site-above-footer-wrap[data-section="section-above-footer-builder"] .site-footer-section {
        display: block !important;
        min-height: 0 !important;
        height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
        background: transparent !important;
    }

    /* Footer bez horního paddingu → tmavá plocha navazuje přímo pod above-footer. */
    body.home footer#colophon {
        padding-top: 0 !important;
    }
}

/* Tablet (768–921) above-footer CTA — přesah karty přes tmavý footer (Figma 7089:42103).
   Přesun z audit-fixes §20 (konsolidace 2026-09-08). Above-footer na tabletu NENÍ sbalená
   (grid má reálnou výšku), takže wrap si tmavou spodní půlku maluje sám gradientem.
   !important drží i proti responsive.css `background-image:none` (@max-width:768). */
@media (min-width: 768px) and (max-width: 921.98px) {
    .site-above-footer-wrap[data-section="section-above-footer-builder"] {
        min-height: 188px !important;
        background: linear-gradient(to bottom, #f7f7f7 0 108px, #022930 108px 100%) !important;
    }

    /* Above-footer řádek je 2sloupcový grid (Astra footer builder) → karta dostala
       jen levou půlku (388px). Na mobilu Astra kolabuje na 1 sloupec, na tabletu ne.
       Druhý sloupec je prázdný → sjednocení na 1 sloupec kartu roztáhne na plnou
       šířku dle Figma 7168:48193 (na homepage i podstránkách). Přesun z audit-fixes
       §20 (konsolidace 2026-09-08). */
    .site-above-footer-wrap[data-section="section-above-footer-builder"] .ast-builder-footer-grid-columns {
        grid-template-columns: 1fr !important;
    }
}

/* ---------------------------------------------------------------------------
   MOBIL FOOTER (≤767.98px) — batch 1 region B (footer padding-top pod kartou)
   + region C (dělicí čáry accordion sekcí / dvojitá linka fix).
   --------------------------------------------------------------------------- */
@media (max-width: 767.98px) {
    /* Karta je teď in-flow v above-footer sekci (má reálnou výšku) → primary footer
       navazuje přirozeně; padding-top = jen normální mezera k logu (dřív 118px
       clearance pro absolute overhang, teď zbytečné). Boční 16px gutter (footer je
       teď full-width, gutter nese wrap) → obsah na 16px (šířka 343px, Figma 3953:38751). */
    body.home .site-primary-footer-wrap[data-section="section-primary-footer-builder"] {
        position: relative !important;
        padding-top: 40px !important;
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    /* Jedna dělicí čára na položku = jen border-top. border-bottom:0 ruší
       dvojitou čáru.
       POZOR: každá accordion sekce je JEDINÝ potomek vlastního obalu
       .site-footer-section, takže `.gamin-footer-accordion:last-child` platí na
       KAŽDOU sekci (ne jen poslední) → přidávalo to spodní čáru všude a vznikla
       dvojitá linka. Spodní hranu proto věšíme na poslední OBAL v gridu
       (.site-footer-section:last-child), jehož :last-child už funguje správně. */
    .site-primary-footer-wrap .footer-widget-area.gamin-footer-accordion {
        border-top: 1px solid rgba(255, 255, 255, 0.12) !important;
        border-bottom: 0 !important;
    }

    .site-primary-footer-wrap .site-footer-section:last-child .footer-widget-area.gamin-footer-accordion {
        border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
    }

    /* Položky menu na sebe navazují (Figma: 0 mezera). Obalové footer sekce mají
       margin-bottom:10px → u accordion sekcí ho nulujeme, aby čára seděla na
       společné hraně dvou položek, ne s 10px mezerou. */
    .site-primary-footer-wrap .site-footer-section:has(.gamin-footer-accordion) {
        margin-bottom: 0 !important;
    }

    .site-primary-footer-wrap .footer-widget-area.gamin-footer-accordion .widget_custom_html h3 {
        position: relative !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        min-height: 64px !important;
        padding: 20px 44px 20px 0 !important;
        color: #fff !important;
    }

    .site-primary-footer-wrap .footer-widget-area.gamin-footer-accordion .widget_custom_html h3::after {
        position: absolute !important;
        top: 50% !important;
        right: 4px !important;
        display: block !important;
        width: 12px !important;
        height: 12px !important;
        border-right: 2px solid #fff !important;
        border-bottom: 2px solid #fff !important;
        content: "" !important;
        opacity: 1 !important;
        transform: translateY(-65%) rotate(45deg) !important;
    }

    .site-primary-footer-wrap .footer-widget-area.gamin-footer-accordion.is-open .widget_custom_html h3::after {
        transform: translateY(-35%) rotate(-135deg) !important;
    }

    /* Boční 16px gutter pro obsah footeru (menu, adresa, legal). Footer je full-width
       (padding 0 výše), takže gutter nese primary+below wrap. Přebíjí Astra @max-1240
       „padding:0 20px". Above-footer (CTA) gutter NEMÁ → gradient full-width. */
    .site-primary-footer-wrap[data-section="section-primary-footer-builder"],
    .site-below-footer-wrap {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    /* Scroll-to-top: primary wrap je teď full-width s 16px paddingem → right:16px, aby
       tlačítko lícovalo s obsahem (R16). */
    .site-primary-footer-wrap .footer-scroll {
        right: 16px !important;
    }

    /* Čára navíc nad legal odkazy (below-footer oddělovač) — na mobilu ne (Figma nemá). */
    .site-below-footer-wrap .site-footer-below-section-1,
    .site-footer-below-section-1 {
        border-top: 0 !important;
    }
}

/* (base/desktop pravidla sloučena do sekce „1) FOOTER BASE / DESKTOP" nahoře —
   B6 grid, #5 kontakty line-height, #6 nav menu gap. Konsolidace 2026-09-06 batch A.) */
