@import url("https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@300;400;500;600&display=swap");

/*
 * MARKER: YCA-SITE-HEADER-CSS-49H
 *
 * Eigen standalone stylesheet voor de Yogacentrum site-header.
 * Vormgeving komt uit Vormgeving > Menu via CSS-variabelen.
 */

body:has(.yca-site-header) .wp-site-blocks > header.wp-block-template-part,
body:has(.yca-site-header) .wp-site-blocks > .wp-block-template-part:first-child {
    display: none;
}

body:has(.yca-site-header) {
    background: var(--yca-menu-bg, #f3e7cd);
}

body:has(.yca-site-header) .wp-site-blocks,
body:has(.yca-site-header) .wp-site-blocks > main,
body:has(.yca-site-header) main.wp-block-group,
body:has(.yca-site-header) main,
body:has(.yca-site-header) .wp-block-post-content,
body:has(.yca-site-header) .entry-content {
    margin-top: 0 !important;
    margin-block-start: 0 !important;
    padding-top: 0 !important;
    padding-block-start: 0 !important;
}

/*
 * Twenty Twenty-Five plaatst shortcode-content vaak in een Group/Content-blok
 * met layout-spacing of top-padding. Omdat de header visueel de site-header
 * vervangt, maken we alleen de containers die de YCA-header bevatten vlak.
 */
body:has(.yca-site-header) .wp-block-group:has(.yca-site-header),
body:has(.yca-site-header) .wp-block-post-content:has(.yca-site-header),
body:has(.yca-site-header) .entry-content:has(.yca-site-header),
body:has(.yca-site-header) .wp-block-shortcode:has(.yca-site-header) {
    margin-top: 0 !important;
    margin-block-start: 0 !important;
    padding-top: 0 !important;
    padding-block-start: 0 !important;
}

body:has(.yca-site-header) .wp-site-blocks > main > :first-child,
body:has(.yca-site-header) .wp-block-post-content > :first-child,
body:has(.yca-site-header) .entry-content > :first-child,
body:has(.yca-site-header) .wp-block-group:has(.yca-site-header) > :first-child,
body:has(.yca-site-header) .wp-block-shortcode:has(.yca-site-header) > :first-child {
    margin-top: 0 !important;
    margin-block-start: 0 !important;
}

.yca-site-header {
    position: sticky;
    top: 0;
    z-index: 999;
    width: 100%;
    background: var(--yca-menu-bg, #f3e7cd);
    border-bottom: 1px solid color-mix(in srgb, var(--yca-menu-border, #e6d9bd) 70%, transparent);
    margin-top: 0 !important;
    transform: translateY(0);
    box-shadow: 0 12px 32px rgba(63, 55, 66, 0.08);
    transition: background-color 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

body.admin-bar .yca-site-header {
    top: 32px;
}

.yca-site-header.is-scrolled {
    background: color-mix(in srgb, var(--yca-menu-bg-scrolled, #f3e7cd) 82%, transparent);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom-color: color-mix(in srgb, var(--yca-menu-border, #e6d9bd) 90%, transparent);
    box-shadow: 0 16px 40px rgba(63, 55, 66, 0.11);
}

.yca-site-header-inner {
    max-width: 1280px;
    margin: 0 auto;
    min-height: 92px;
    padding: 10px clamp(18px, 4vw, 48px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(18px, 4vw, 56px);
}

.yca-site-header-logo-link {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    text-decoration: none;
}

.yca-site-header-logo {
    display: block;
    width: clamp(185px, 18vw, var(--yca-menu-logo-width, 250px));
    max-width: var(--yca-menu-logo-width, 250px);
    height: auto;
}

.yca-site-header-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: clamp(18px, 2.4vw, 36px);
    font-family: var(--yca-menu-font, "Source Sans 3", system-ui, sans-serif);
}

.yca-site-header-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--yca-menu-text, #725771);
    text-decoration: none;
    font-size: clamp(16px, 1.25vw, var(--yca-menu-size, 18px));
    font-weight: var(--yca-menu-weight, 400);
    line-height: 1;
    letter-spacing: 0;
    -webkit-font-smoothing: antialiased;
    text-rendering: geometricPrecision;
}

.yca-site-header-logo-link:focus,
.yca-site-header-logo-link:focus-visible,
.yca-site-header-link:focus,
.yca-site-header-link:focus-visible,
.yca-site-header-toggle:focus,
.yca-site-header-toggle:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

.yca-site-header-link::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 2px;
    background: var(--yca-menu-active, #725771);
    transform: scaleX(0);
    transform-origin: center;
    opacity: 0.75;
    transition: transform 160ms ease;
}

.yca-site-header-link:hover,
.yca-site-header-link.is-active {
    color: var(--yca-menu-active, #725771);
}

.yca-site-header-link:hover::after,
.yca-site-header-link.is-active::after {
    transform: scaleX(1);
}

.yca-site-header-toggle {
    display: none;
    align-items: center;
    gap: 10px;
    border: 0;
    border-radius: 999px;
    padding: 10px 14px;
    background: var(--yca-menu-active, #725771);
    color: #fff;
    font: inherit;
    font-weight: 400;
    cursor: pointer;
}

.yca-site-header-toggle-lines,
.yca-site-header-toggle-lines::before,
.yca-site-header-toggle-lines::after {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
}

.yca-site-header-toggle-lines {
    position: relative;
}

.yca-site-header-toggle-lines::before,
.yca-site-header-toggle-lines::after {
    content: '';
    position: absolute;
    left: 0;
}

.yca-site-header-toggle-lines::before { top: -6px; }
.yca-site-header-toggle-lines::after { top: 6px; }

@media (max-width: 900px) {
    body.admin-bar .yca-site-header {
        top: 46px;
    }

    .yca-site-header-inner {
        min-height: 76px;
        padding-left: 14px;
        padding-right: 14px;
    }

    .yca-site-header-logo {
        width: min(var(--yca-menu-logo-width, 210px), 58vw);
    }

    .yca-site-header-toggle {
        display: inline-flex;
    }

    .yca-site-header-nav {
        position: absolute;
        left: 12px;
        right: 12px;
        top: calc(100% + 8px);
        display: grid;
        gap: 6px;
        padding: 14px;
        border-radius: 18px;
        background: color-mix(in srgb, var(--yca-menu-bg, #f3e7cd) 96%, transparent);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
        box-shadow: 0 18px 40px rgba(63, 55, 66, 0.14);
        transform: translateY(-8px);
        opacity: 0;
        pointer-events: none;
        transition: opacity 160ms ease, transform 160ms ease;
    }

    .yca-site-header.is-menu-open .yca-site-header-nav {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    .yca-site-header-link {
        justify-content: center;
        min-height: 48px;
        font-size: var(--yca-menu-size, 18px);
    }
}

@media (max-width: 782px) {
    body.admin-bar .yca-site-header {
        top: 46px;
    }
}
