/* Fikoviny.cz — global modern header */
:root {
    --fik-header-green: #2eb67d;
    --fik-header-green-dark: #17835a;
    --fik-header-ink: #1c2533;
    --fik-header-muted: #6e7888;
    --fik-header-line: rgba(23, 34, 50, .08);
    --fik-header-shadow: 0 10px 32px rgba(25, 33, 49, .07);
}

#header.ct-header {
    position: relative;
    z-index: 50;
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid var(--fik-header-line);
    box-shadow: var(--fik-header-shadow);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

#header .ct-container {
    width: min(1280px, calc(100% - 40px));
    max-width: 1280px;
    margin-inline: auto;
}

#header [data-row="middle"] {
    min-height: 78px;
}

#header [data-column="start"],
#header [data-column="end"],
#header [data-items="primary"] {
    display: flex;
    align-items: center;
}

#header [data-column="end"] {
    justify-content: flex-end;
}

/* Branding */
#header .site-branding {
    display: flex;
    align-items: center;
    gap: 13px;
}

#header .site-logo-container {
    display: inline-flex;
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
}

#header .site-logo-container:hover {
    transform: translateY(-1px) rotate(-1deg);
    box-shadow: 0 8px 20px rgba(25, 33, 49, .10);
}

#header .site-logo-container img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
}

#header .site-title-container {
    display: flex;
    align-items: center;
}

#header .site-title,
#header .site-title a {
    color: var(--fik-header-ink) !important;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1;
}

#header .site-title a:hover {
    color: var(--fik-header-green-dark) !important;
}

/* Desktop navigation */
#header [data-device="desktop"] [data-column="end"] [data-items="primary"] {
    gap: 10px;
}

#header #header-menu-1 .menu {
    display: flex;
    align-items: center;
    gap: 4px;
}

#header #header-menu-1 .menu > li {
    position: relative;
}

#header #header-menu-1 .menu > li > .ct-menu-link {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 38px;
    padding: 0 13px !important;
    border-radius: 999px;
    color: #3f4443 !important;
    font-family: 'Inter', 'Open Sans', sans-serif;
    font-size: 14px;
    font-weight: 650;
    line-height: 1;
    text-decoration: none;
    transition: color .2s ease, background .2s ease, box-shadow .2s ease, transform .2s ease;
}

#header #header-menu-1 .menu > li > .ct-menu-link:hover,
#header #header-menu-1 .menu > li:hover > .ct-menu-link {
    color: #33a370 !important;
    background: linear-gradient(135deg, rgba(255,255,255,.94), rgba(247,249,248,.92) 52%, rgba(62,175,124,.18));
    box-shadow: 0 6px 16px rgba(56,72,67,.08), inset 0 1px 0 rgba(255,255,255,.82);
    transform: translateY(-1px);
}

#header #header-menu-1 .menu > li.current-menu-item > .ct-menu-link,
#header #header-menu-1 .menu > li.current-menu-parent > .ct-menu-link,
#header #header-menu-1 .menu > li.current-post-parent > .ct-menu-link,
#header #header-menu-1 .menu > li.current-post-ancestor > .ct-menu-link,
#header #header-menu-1 .menu > li.current-menu-ancestor > .ct-menu-link {
    color: #33a370 !important;
    background: #f4f7f6;
    box-shadow: inset 0 0 0 1px rgba(62,175,124,.24);
}

#header #header-menu-1 .ct-toggle-dropdown-desktop {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 3px;
    color: currentColor;
    opacity: .72;
}

#header #header-menu-1 .ct-toggle-dropdown-desktop svg,
#header #header-menu-1 .ct-toggle-dropdown-desktop svg path {
    fill: currentColor !important;
}

#header #header-menu-1 .sub-menu {
    min-width: 220px;
    padding: 8px !important;
    border: 1px solid rgba(117,122,121,.18) !important;
    border-radius: 18px !important;
    background: linear-gradient(135deg, rgba(255,255,255,.97), rgba(245,248,247,.94)) !important;
    box-shadow: 0 18px 38px rgba(47,62,57,.13), inset 0 1px 0 rgba(255,255,255,.82) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

#header #header-menu-1 .sub-menu .ct-menu-link {
    display: flex;
    align-items: center;
    min-height: 40px;
    padding: 10px 12px !important;
    border-radius: 12px;
    color: #3f4443 !important;
    font-family: 'Inter', 'Open Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    transition: color .2s ease, background .2s ease, transform .2s ease;
}

#header #header-menu-1 .sub-menu .ct-menu-link:hover {
    color: #33a370 !important;
    background: rgba(62,175,124,.10);
    transform: translateX(2px);
}

#header #header-menu-1 .sub-menu .current-menu-item > .ct-menu-link,
#header #header-menu-1 .sub-menu .current-menu-parent > .ct-menu-link,
#header #header-menu-1 .sub-menu .current-post-parent > .ct-menu-link {
    color: #33a370 !important;
    background: rgba(62,175,124,.13);
}

/* Search */
#header .ct-header-search {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0 !important;
    border: 1px solid var(--fik-header-line);
    border-radius: 50%;
    background: #fff;
    color: var(--fik-header-ink) !important;
    box-shadow: 0 7px 20px rgba(25, 33, 49, .05);
    transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

#header .ct-header-search:hover {
    color: var(--fik-header-green-dark) !important;
    background: rgba(46, 182, 125, .08);
    border-color: rgba(46, 182, 125, .24);
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(25, 33, 49, .09);
}

#header .ct-header-search .ct-icon {
    width: 19px;
    height: 19px;
    fill: currentColor;
}

/* Mobile */
#header [data-device="mobile"] [data-row="middle"] {
    min-height: 72px;
}

#header [data-device="mobile"] .ct-container {
    width: min(100%, calc(100% - 28px));
}

#header [data-device="mobile"] [data-column="end"] [data-items="primary"] {
    gap: 8px;
}

#header [data-device="mobile"] .site-branding {
    gap: 11px;
}

#header [data-device="mobile"] .site-logo-container {
    width: 46px;
    height: 46px;
    border-radius: 13px;
}

#header [data-device="mobile"] .site-title,
#header [data-device="mobile"] .site-title a {
    font-size: 16px;
}

#header [data-device="mobile"] .ct-header-search,
#header [data-device="mobile"] .ct-header-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0 !important;
    border: 1px solid var(--fik-header-line);
    border-radius: 14px;
    background: #fff;
    color: var(--fik-header-ink) !important;
    box-shadow: 0 6px 18px rgba(25, 33, 49, .05);
    transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease;
}

#header [data-device="mobile"] .ct-header-search:hover,
#header [data-device="mobile"] .ct-header-trigger:hover {
    color: var(--fik-header-green-dark) !important;
    background: rgba(46, 182, 125, .08);
    border-color: rgba(46, 182, 125, .24);
    transform: translateY(-1px);
}

#header [data-device="mobile"] .ct-header-trigger .ct-icon {
    width: 19px;
    height: 15px;
}

#header [data-device="mobile"] .ct-header-trigger .ct-icon rect {
    fill: currentColor;
}

@media (max-width: 480px) {
    #header [data-device="mobile"] .ct-container {
        width: min(100%, calc(100% - 22px));
    }

    #header [data-device="mobile"] .site-logo-container {
        width: 44px;
        height: 44px;
    }

    #header [data-device="mobile"] .ct-header-search,
    #header [data-device="mobile"] .ct-header-trigger {
        width: 40px;
        height: 40px;
        border-radius: 13px;
    }
}

/* WordPress admin bar coexistence */
body.admin-bar #header.ct-header {
    z-index: 900;
}

/* === Modern header v3: floating global shell === */
#header.ct-header {
    background: transparent !important;
    border-bottom: 0 !important;
    box-shadow: none !important;
    padding: 10px 0;
}

#header [data-row="middle"] {
    min-height: auto !important;
    background: transparent !important;
    box-shadow: none !important;
    border: 0 !important;
}

#header [data-row="middle"] > .ct-container {
    min-height: 64px;
    padding: 8px 12px 8px 14px;
    border: 1px solid rgba(25, 33, 49, .07);
    border-radius: 22px;
    background: rgba(255, 255, 255, .92);
    box-shadow:
        0 14px 38px rgba(25, 33, 49, .09),
        inset 0 1px 0 rgba(255, 255, 255, .82);
    backdrop-filter: blur(18px) saturate(145%);
    -webkit-backdrop-filter: blur(18px) saturate(145%);
}

#header .site-logo-container {
    width: 46px;
    height: 46px;
    border-radius: 13px;
    box-shadow: 0 8px 22px rgba(25, 33, 49, .08);
}

#header .site-title,
#header .site-title a {
    font-size: 16px;
    font-weight: 850;
    color: #2a3442 !important;
}

#header [data-device="desktop"] [data-column="end"] [data-items="primary"] {
    gap: 8px;
}

#header #header-menu-1 .menu {
    gap: 3px;
}

#header #header-menu-1 .menu > li > .ct-menu-link {
    min-height: 42px;
    padding: 0 15px !important;
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 720;
}

#header #header-menu-1 .menu > li > .ct-menu-link:hover,
#header #header-menu-1 .menu > li:hover > .ct-menu-link {
    color: var(--fik-header-green-dark) !important;
    background: rgba(46, 182, 125, .09) !important;
    border-color: rgba(46, 182, 125, .14);
    box-shadow: none !important;
    transform: none;
}

#header #header-menu-1 .menu > li.current-menu-item > .ct-menu-link,
#header #header-menu-1 .menu > li.current-menu-parent > .ct-menu-link,
#header #header-menu-1 .menu > li.current-post-parent > .ct-menu-link,
#header #header-menu-1 .menu > li.current-post-ancestor > .ct-menu-link,
#header #header-menu-1 .menu > li.current-menu-ancestor > .ct-menu-link {
    color: var(--fik-header-green-dark) !important;
    background: rgba(46, 182, 125, .11) !important;
    border-color: rgba(46, 182, 125, .18);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.55) !important;
}

#header #header-menu-1 .sub-menu {
    margin-top: 10px !important;
    min-width: 236px;
    padding: 9px !important;
    border: 1px solid rgba(25, 33, 49, .08) !important;
    border-radius: 20px !important;
    background: rgba(255, 255, 255, .96) !important;
    box-shadow:
        0 22px 56px rgba(25, 33, 49, .15),
        inset 0 1px 0 rgba(255,255,255,.9) !important;
    backdrop-filter: blur(18px) saturate(145%);
    -webkit-backdrop-filter: blur(18px) saturate(145%);
}

#header #header-menu-1 .sub-menu::before {
    content: "";
    position: absolute;
    top: -7px;
    left: 26px;
    width: 14px;
    height: 14px;
    background: rgba(255,255,255,.96);
    border-left: 1px solid rgba(25,33,49,.07);
    border-top: 1px solid rgba(25,33,49,.07);
    transform: rotate(45deg);
}

#header #header-menu-1 .sub-menu .ct-menu-link {
    position: relative;
    min-height: 42px;
    padding: 10px 13px !important;
    border-radius: 13px;
    font-size: 14px;
    font-weight: 650;
}

#header #header-menu-1 .sub-menu .ct-menu-link:hover {
    background: rgba(46,182,125,.09) !important;
    transform: none;
}

#header .ct-header-search {
    width: 44px;
    height: 44px;
    border-radius: 15px;
    background: #f6f8fb;
    border-color: rgba(25,33,49,.06);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.75);
}

#header .ct-header-search:hover {
    background: rgba(46,182,125,.10);
    border-color: rgba(46,182,125,.17);
    box-shadow: none;
}

/* Mobile floating shell */
#header [data-device="mobile"] [data-row="middle"] > .ct-container {
    min-height: 62px;
    padding: 7px 8px 7px 11px;
    border-radius: 19px;
}

#header [data-device="mobile"] .site-logo-container {
    width: 44px;
    height: 44px;
    border-radius: 12px;
}

#header [data-device="mobile"] .site-title,
#header [data-device="mobile"] .site-title a {
    font-size: 15px;
    font-weight: 820;
}

#header [data-device="mobile"] .ct-header-search,
#header [data-device="mobile"] .ct-header-trigger {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background: #f6f8fb;
    border-color: rgba(25,33,49,.06);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}

@media (max-width: 480px) {
    #header.ct-header {
        padding: 8px 0;
    }

    #header [data-device="mobile"] .ct-container {
        width: min(100%, calc(100% - 16px));
    }

    #header [data-device="mobile"] [data-row="middle"] > .ct-container {
        min-height: 58px;
        border-radius: 17px;
    }
}

/* === Modern header v5: unified page backdrop + branding spacing === */
#header.ct-header {
    background:
        radial-gradient(circle at 4% 2%, rgba(82, 116, 255, .10), transparent 27%),
        radial-gradient(circle at 96% 3%, rgba(255, 108, 146, .09), transparent 28%),
        linear-gradient(180deg, #fbfcff 0%, #f7f8fc 100%) !important;
}

#header [data-row="middle"] > .ct-container {
    padding-left: 22px;
}

#header .site-branding {
    gap: 8px;
}

#header [data-device="mobile"] [data-row="middle"] > .ct-container {
    padding-left: 16px;
}

#header [data-device="mobile"] .site-branding {
    gap: 8px;
}

@media (max-width: 480px) {
    #header [data-device="mobile"] [data-row="middle"] > .ct-container {
        padding-left: 14px;
    }
}

/* === Modern header v6: true continuous page background === */
/* Homepage owns one continuous background from the very top of the page. */
body.home,
body.home #main-container,
body.home .site-main {
    background:
        radial-gradient(circle at 4% 2%, rgba(82, 116, 255, .11), transparent 27%),
        radial-gradient(circle at 96% 3%, rgba(255, 108, 146, .10), transparent 28%),
        linear-gradient(180deg, #fbfcff 0%, #f5f7fc 32%, #f3f6fb 100%) !important;
}

/* The header itself must not paint its own backdrop. */
body.home #header.ct-header,
body.home #header [data-device],
body.home #header [data-row="middle"] {
    background: transparent !important;
}

/* Keep the floating navigation card opaque/glass above that shared backdrop. */
body.home #header [data-row="middle"] > .ct-container {
    background: rgba(255, 255, 255, .92) !important;
}

/* Avoid a second homepage background layer starting below the header. */
body.home .fik-home {
    background: transparent !important;
}

/* === Modern header v7: one continuous backdrop, no seams === */
body.home {
    background:
        radial-gradient(circle at 4% 2%, rgba(82, 116, 255, .11), transparent 27%),
        radial-gradient(circle at 96% 3%, rgba(255, 108, 146, .10), transparent 28%),
        linear-gradient(180deg, #fbfcff 0%, #f5f7fc 32%, #f3f6fb 100%) !important;
    background-attachment: scroll !important;
}

body.home #main-container,
body.home .site-main,
body.home #header.ct-header,
body.home #header [data-device],
body.home #header [data-row="middle"],
body.home .fik-home {
    background: transparent !important;
    background-image: none !important;
}

body.home #main-container,
body.home .site-main {
    box-shadow: none !important;
    border: 0 !important;
}

/* Only the floating header card paints white/glass. */
body.home #header [data-row="middle"] > .ct-container {
    background: rgba(255, 255, 255, .92) !important;
}

/* === Modern header v8: truly single homepage backdrop === */
/* Detect the custom homepage directly instead of relying on WordPress body classes. */
body:has(.fik-home) {
    background:
        radial-gradient(circle at 4% 2%, rgba(82, 116, 255, .11), transparent 27%),
        radial-gradient(circle at 96% 3%, rgba(255, 108, 146, .10), transparent 28%),
        linear-gradient(180deg, #fbfcff 0%, #f5f7fc 32%, #f3f6fb 100%) !important;
    background-attachment: fixed !important;
}

/* No structural layer is allowed to paint a second backdrop on the homepage. */
body:has(.fik-home) #header.ct-header,
body:has(.fik-home) #header [data-device],
body:has(.fik-home) #header [data-row="middle"],
body:has(.fik-home) #main-container,
body:has(.fik-home) .site-main,
body:has(.fik-home) main#main,
body:has(.fik-home) .fik-home {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none;
}

/* The floating navigation card is intentionally the only painted header surface. */
body:has(.fik-home) #header [data-row="middle"] > .ct-container {
    background: rgba(255, 255, 255, .92) !important;
    background-image: none !important;
}

/* === Modern header v9: one genuinely continuous backdrop === */
body:has(.fik-home) {
    background:
        radial-gradient(circle at 4% 2%, rgba(82, 116, 255, .11), transparent 27%),
        radial-gradient(circle at 96% 3%, rgba(255, 108, 146, .10), transparent 28%),
        linear-gradient(180deg, #fbfcff 0%, #f5f7fc 32%, #f3f6fb 100%) !important;
    background-attachment: scroll !important;
}

body:has(.fik-home) #header.ct-header,
body:has(.fik-home) #header [data-device],
body:has(.fik-home) #header [data-row="middle"],
body:has(.fik-home) #main-container,
body:has(.fik-home) .site-main,
body:has(.fik-home) main#main,
body:has(.fik-home) .fik-home {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
}

body:has(.fik-home) #header [data-row="middle"] > .ct-container {
    background: rgba(255, 255, 255, .92) !important;
    background-image: none !important;
}

/* === Modern header v24: balanced spacing + article backdrop === */
/* Keep the floating panel visually balanced: same inner space on both sides. */
#header [data-device="desktop"] [data-row="middle"] > .ct-container {
    padding-left: 22px !important;
    padding-right: 22px !important;
}

#header [data-device="mobile"] [data-row="middle"] > .ct-container {
    padding-left: 16px !important;
    padding-right: 16px !important;
}

@media (max-width: 480px) {
    #header [data-device="mobile"] [data-row="middle"] > .ct-container {
        padding-left: 14px !important;
        padding-right: 14px !important;
    }
}

/* Give individual articles the same soft page backdrop as the homepage. */
body.single-post {
    background:
        radial-gradient(circle at 4% 2%, rgba(82, 116, 255, .11), transparent 27%),
        radial-gradient(circle at 96% 3%, rgba(255, 108, 146, .10), transparent 28%),
        linear-gradient(180deg, #fbfcff 0%, #f5f7fc 32%, #f3f6fb 100%) !important;
    background-attachment: fixed !important;
}

/* Structural layers stay transparent so the page backdrop can continue behind them. */
body.single-post #header.ct-header,
body.single-post #header [data-device],
body.single-post #header [data-row="middle"],
body.single-post #main-container,
body.single-post .site-main,
body.single-post main#main {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
}

/* Keep the floating navigation itself as the intentional white/glass surface. */
body.single-post #header [data-row="middle"] > .ct-container {
    background: rgba(255, 255, 255, .92) !important;
    background-image: none !important;
}

/* === v25: align single-post content width with floating header/homepage === */
body.single-post .site-main > .hero-section > .ct-container,
body.single-post .site-main > .ct-container,
body.single-post .site-main > .ct-container-full,
body.single-post main#main > .ct-container,
body.single-post main#main > .ct-container-full {
    width: min(1280px, calc(100% - 40px)) !important;
    max-width: 1280px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

body.single-post .site-main > .ct-container-full > .ct-container,
body.single-post main#main > .ct-container-full > .ct-container {
    width: 100% !important;
    max-width: none !important;
}

@media (max-width: 768px) {
    body.single-post .site-main > .hero-section > .ct-container,
    body.single-post .site-main > .ct-container,
    body.single-post .site-main > .ct-container-full,
    body.single-post main#main > .ct-container,
    body.single-post main#main > .ct-container-full {
        width: min(100%, calc(100% - 28px)) !important;
    }
}

/* === v26: safer desktop dropdown hover path === */
#header #header-menu-1 .menu > li.menu-item-has-children {
    padding-bottom: 14px;
    margin-bottom: -14px;
}

#header #header-menu-1 .menu > li.menu-item-has-children::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% - 2px);
    height: 18px;
    background: transparent;
    z-index: 20;
}

#header #header-menu-1 .sub-menu {
    margin-top: 6px !important;
}

#header #header-menu-1 .sub-menu::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -16px;
    height: 18px;
    background: transparent;
}
