/**
 * Header schoolsites (Sketch 01 HOME, 1440 breed):
 *   achtergrond   beige (accent 20 %), loopt door in de Paginakop
 *   hoekvlak      rechtsboven 890 × 493, afgerond naar linksonder, verloop
 *                 naar oranje; steekt onder de header uit (achter de foto
 *                 van de Paginakop)
 *   logo          x 92, y 29, 211 × 217 (het logo van de school, Customizer)
 *   menu          y 47, Comfortaa Bold 14/17, pijltjes in de actiekleur
 *   knop          Kennismaken: actiekleur (magenta), 137 × 35, Bold 13/16
 *   submenu       witte kaart met organische bolletjes (actiekleur), actief
 *                 item in accent, oranje ringetje rechtsboven
 * De opbouw (logo links, menu + knop rechts) staat als standaard in
 * functions.php (kadence_theme_options_defaults).
 */

/* ============================================================
   1. ACHTERGROND EN HOEKVLAK
   ============================================================ */
/* Kadence geeft #masthead z-index 11; daarmee zou het hoekvlak (en de hele
   header) boven de foto van de Paginakop liggen. Zonder eigen stapellaag
   ligt het hoekvlak (1) onder de Paginakop-inhoud (2) en de header-inhoud
   met submenu's (3) erboven. */
#masthead {
    position: relative;
    z-index: auto;
    background: var(--cw-beige);
}

/* Hoekvlak: boven de beige band, onder de foto van de Paginakop */
#masthead::before {
    content: "";
    position: absolute;
    z-index: 1;
    top: 0;
    right: 0;
    width: var(--cw-header-hoek-breed);
    height: var(--cw-header-hoek-hoog);
    border-bottom-left-radius: 100% 100%;
    background: linear-gradient(170deg,
        color-mix(in srgb, var(--cw-accent) 12%, var(--cw-achtergrond)) 0%,
        color-mix(in srgb, var(--cw-accent) 30%, var(--cw-achtergrond)) 55%,
        color-mix(in srgb, var(--cw-accent) 55%, var(--cw-achtergrond)) 100%);
    pointer-events: none;
}

#masthead .site-header-wrap,
#masthead .site-header-inner-wrap {
    position: relative;
    z-index: 3;
    background: transparent;
}

#masthead .site-main-header-wrap .site-header-row-container-inner {
    background: transparent;
}

/* Inhoud van de header op de breedte van het design (93 px rand) */
#masthead .site-main-header-wrap .site-container {
    max-width: calc(var(--cw-content-breed) + 2 * var(--cw-rand));
    padding-left: var(--cw-rand);
    padding-right: var(--cw-rand);
}

/* ============================================================
   2. LOGO EN RIJ
   Logo groot linksboven; menu en knop bovenaan rechts.
   ============================================================ */
#masthead .site-main-header-wrap .site-header-row {
    align-items: flex-start;
    min-height: 0;
    padding-top: 29px;
    padding-bottom: 0;
}

#masthead .site-branding .custom-logo,
#masthead .site-branding img {
    width: var(--cw-logo-breed);
    max-width: 100%;
    height: auto;
    max-height: none;
}

#masthead .site-header-main-section-right {
    padding-top: 6px;
    align-items: center;
}

/* ============================================================
   3. HOOFDMENU
   ============================================================ */
#masthead .main-navigation .primary-menu-container > ul > li.menu-item > a {
    font-family: var(--cw-font-menu);
    font-size: var(--cw-menu-size);
    line-height: 17px;
    font-weight: 700;
    color: var(--cw-kleur-menu);
    padding: 8px 15px;
}

#masthead .main-navigation .primary-menu-container > ul > li.menu-item > a:hover,
#masthead .main-navigation .primary-menu-container > ul > li.current-menu-item > a,
#masthead .main-navigation .primary-menu-container > ul > li.current-menu-ancestor > a,
#masthead .main-navigation .primary-menu-container > ul > li.current-page-ancestor > a,
#masthead .main-navigation .primary-menu-container > ul > li.menu-item:focus-within > a {
    color: var(--cw-kleur-menu-actief);
}

/* Pijltje bij een submenu: actiekleur */
#masthead .main-navigation .primary-menu-container > ul > li.menu-item .dropdown-nav-toggle {
    color: var(--cw-actie);
}

/* ============================================================
   4. KNOP KENNISMAKEN (Kadence-headerknop)
   ============================================================ */
#masthead .header-button-wrap .header-button {
    min-height: 35px;
    margin-left: 15px;
    padding: 0 26px;
    border: 0;
    border-radius: 18px 0 18px 18px;
    background: var(--cw-actie);
    color: var(--cw-wit);
    font-family: var(--cw-font);
    font-size: 13px;
    line-height: 16px;
    font-weight: 700;
    box-shadow: none;
    display: inline-flex;
    align-items: center;
}

#masthead .header-button-wrap .header-button:hover,
#masthead .header-button-wrap .header-button:focus-visible {
    background: var(--cw-accent);
    color: var(--cw-wit);
}

/* ============================================================
   5. SUBMENU (artboard "Subnavigatie")
   ============================================================ */
#masthead .header-navigation .sub-menu {
    width: 280px;
    padding: 24px 20px 20px;
    background: var(--cw-achtergrond);
    border-radius: var(--cw-submenu-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .08);
    overflow: visible;
}

/* Oranje ringetje rechtsboven op de kaart (images/submenu-vorm.svg) */
#masthead .header-navigation .sub-menu::before {
    content: "";
    position: absolute;
    top: -26px;
    right: -18px;
    width: 52px;
    height: 52px;
    background: var(--cw-accent);
    -webkit-mask: url("../images/submenu-vorm.svg") center / contain no-repeat;
    mask: url("../images/submenu-vorm.svg") center / contain no-repeat;
    pointer-events: none;
}

#masthead .header-navigation .sub-menu li.menu-item > a {
    position: relative;
    width: 100%;
    padding: 4px 0 4px 26px;
    border: 0;
    background: transparent;
    font-family: var(--cw-font-menu);
    font-size: var(--cw-submenu-size);
    line-height: 22px;
    font-weight: 700;
    color: var(--cw-tekst);
}

/* Organisch bolletje voor elk item */
#masthead .header-navigation .sub-menu li.menu-item > a::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    width: 13px;
    height: 14px;
    background: var(--cw-actie);
    -webkit-mask: url("../images/bullet-1.svg") center / contain no-repeat;
    mask: url("../images/bullet-1.svg") center / contain no-repeat;
}

#masthead .header-navigation .sub-menu li.menu-item:nth-child(3n+2) > a::before {
    -webkit-mask-image: url("../images/bullet-3.svg");
    mask-image: url("../images/bullet-3.svg");
}

#masthead .header-navigation .sub-menu li.menu-item:nth-child(3n) > a::before {
    -webkit-mask-image: url("../images/bullet-5.svg");
    mask-image: url("../images/bullet-5.svg");
}

#masthead .header-navigation .sub-menu li.menu-item > a:hover,
#masthead .header-navigation .sub-menu li.current-menu-item > a {
    background: transparent;
    color: var(--cw-accent);
}

/* ============================================================
   6. KLEINERE SCHERMEN (geen design: zelf bepaald)
   ============================================================ */
@media (max-width: 1280px) {
    #masthead .site-branding .custom-logo,
    #masthead .site-branding img {
        width: 160px;
    }

    #masthead .main-navigation .primary-menu-container > ul > li.menu-item > a {
        padding-left: 10px;
        padding-right: 10px;
    }
}

/* Mobiele header: logo links (Customizer: 96 px), hamburger rechts */
#masthead .site-mobile-header-wrap .site-header-row-container-inner {
    background: transparent;
}

#masthead .site-mobile-header-wrap .site-header-row {
    min-height: 0;
    padding-top: 16px;
    padding-bottom: 12px;
}

#masthead .mobile-header-button-wrap .mobile-header-button {
    min-height: 32px;
    padding: 0 16px;
    border: 0;
    border-radius: 16px 0 16px 16px;
    background: var(--cw-actie);
    color: var(--cw-wit);
    font-family: var(--cw-font);
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
}

#masthead .mobile-toggle-open-container .menu-toggle-open {
    color: var(--cw-tekst);
    padding: 8px;
}

#masthead .mobile-toggle-open-container .menu-toggle-open:focus-visible {
    outline: 3px solid var(--cw-accent);
}

@media (max-width: 1024px) {
    #masthead::before {
        width: 70vw;
        height: 260px;
    }
}

/* Mobiel uitklapmenu */
#mobile-drawer .drawer-inner {
    background: var(--cw-beige);
    color: var(--cw-tekst);
}

#mobile-drawer .drawer-header .drawer-toggle,
#mobile-drawer .drawer-header .menu-toggle-close {
    color: var(--cw-tekst);
}

#mobile-drawer .mobile-navigation ul li .drawer-nav-drop-wrap > a,
#mobile-drawer .mobile-navigation ul li > a {
    font-family: var(--cw-font);
    font-size: 16px;
    font-weight: 700;
    color: var(--cw-tekst);
    border-color: color-mix(in srgb, var(--cw-accent) 25%, transparent);
}

#mobile-drawer .mobile-navigation ul li > a:hover,
#mobile-drawer .mobile-navigation ul li.current-menu-item > a {
    color: var(--cw-accent);
}

#mobile-drawer .mobile-navigation ul ul li > a {
    font-weight: 400;
    font-size: 15px;
}

#mobile-drawer .drawer-sub-toggle {
    color: var(--cw-actie);
}
