/* ==========================================================================
   Cleopatra Groningen — Custom CSS (fixed)
   TYPO3/Bootstrap 3 + Superfish. Dark mode = html.cleo-dark class.
   This file is the SINGLE source of truth for all styling. The head script
   only toggles the class, injects the toggle button and rebuilds the
   signed-in user area — it no longer injects any CSS of its own.
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. Fonts
   -------------------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Alegreya+Sans:wght@400;700&family=Open+Sans:ital,wght@0,300;0,400;0,600;0,700;1,300&display=swap');

/* --------------------------------------------------------------------------
   1. Base / body (light mode)
   -------------------------------------------------------------------------- */
html, body { height: 100%; }

body {
    display: flex;
    flex-direction: column;
    font-family: 'Open Sans', sans-serif;
    font-weight: 300;
}

#content { flex: 1 0 auto; }

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: 'Alegreya Sans', 'Open Sans', sans-serif;
    font-weight: 700;
}

strong { font-weight: 600; }

blockquote {
    border-left: 4px solid #fac905;
    padding-left: 16px;
    color: #555;
    font-size: 15px;
    font-weight: 300;
    font-style: italic;
}

a { color: #33A1FD; }

/* --------------------------------------------------------------------------
   2. Buttons
   -------------------------------------------------------------------------- */
.button, a.button {
    background-color: #ecb604;
    border: none;
    color: #000;
    padding: 15px 32px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 20px;
    font-family: 'Alegreya Sans', 'Open Sans', sans-serif;
    border-radius: 10px;
}

.button:hover, a.button:hover { background-color: #feefb4; }

/* --------------------------------------------------------------------------
   3. Header & navigation (light mode)
   -------------------------------------------------------------------------- */
/* Header top bar: solid yellow, edge-to-edge, no dark gaps from .container padding */
header {
    background-color: #fac905 !important;
    background-image: none !important;
    border: none !important;
    box-shadow: none !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: none !important;
}
/* Kill the .container side padding so yellow runs edge-to-edge.
   Spacing is restored as margin on the inner rows, so the colored
   background (yellow / dark) shows through the gap. */
header > .container {
    padding-left: 0 !important;
    padding-right: 0 !important;
    max-width: none !important;
    width: 100% !important;
}
header > .container > .header-nav-top,
header > .container > .header-nav {
    margin-left: 15px;
    margin-right: 15px;
}
/* The top strip (Inloggen row) and the logo/nav row stay yellow.
   overflow:visible lets dropdown submenus float above page content
   instead of being clipped by the main CSS's overflow-y:auto. */
header .header-nav-top,
header .header-nav {
    background-color: #fac905 !important;
    overflow: visible !important;
}

header .login > p { padding: 3px 0; }

header .login > p > a {
    font-family: 'Alegreya Sans', 'Open Sans', sans-serif;
    letter-spacing: 1px;
    color: #fff;
}

header .navbar-header { margin: 1em 0 1em 15px; }

.navbar-brand,
.header-logo .navbar-brand h1 {
    font-family: 'Alegreya Sans', sans-serif;
    font-weight: 700;
    color: #000;
}

/* Logo: a bit bigger than the template default, at EVERY breakpoint.
   The template's main.css sizes the logo per breakpoint (75×24 ≤991px,
   120×38.4 ≤1535px, 150×48 >1535px). Mirror all three here so the size
   is consistent on every page; each is ~10% bigger than before. */
header .container .header-nav .header-logo .navbar-brand { width: 165px; height: 52.8px; }
header .container .header-nav .header-logo a h1 { max-width: 165px; max-height: 52.8px; margin-bottom: 12px; }

/* Tablet / mid-size desktop (template default 120×38.4) */
@media (max-width: 1535px) {
    header .container .header-nav .header-logo .navbar-brand { width: 132px; height: 42.2px; }
    header .container .header-nav .header-logo a h1 { max-width: 132px; max-height: 42.2px; margin-bottom: 12px; }
}

/* Mobile (template default 75×24) */
@media (max-width: 991px) {
    header .container .header-nav .header-logo .navbar-brand { width: 82px; height: 26.4px; }
    header .container .header-nav .header-logo a h1 { max-width: 82px; max-height: 26.4px; margin-bottom: 12px; }
}

/* Widescreen: use the larger -lg asset so it stays crisp */
@media (min-width: 1200px) {
    header .navbar-brand h1 { background-image: url('https://congressus-cleopatra-groningen.s3-eu-west-1.amazonaws.com/template/742/logo-cleopatra-groningen-lg.png') !important; }
}

#menu { margin-bottom: 0 !important; }

/* Top-level menu links */
.sf-menu > li {
    padding: 0 .2em;
    border: none;
}

.sf-menu > li:last-of-type { border: none !important; }

.sf-menu > li > a {
    color: #000;
    border-radius: 3px;
    display: block;
    text-transform: none;
    font-family: 'Alegreya Sans', 'Open Sans', sans-serif;
    font-weight: 700;
    font-size: 1.2em;
    padding: .4em .7em;
    margin: .3em 0;
    transition: background-color .1s;
}

.sf-menu > li > a:hover,
.sf-menu > li.active > a {
    background-color: #feefb4;
    color: #000;
}

/* Special menu items */
.sf-menu > li a[href="/preipop"] {
    color: #32ae70;
    background-color: #674574;
    transition: background-color .1s;
}
.sf-menu > li a[href="/preipop"]:hover { background-color: #4a1c5b; }

.sf-menu > li a[href="/word-lid"] {
    color: #fff;
    background-color: #a314d7;
}
.sf-menu > li a[href="/word-lid"]:hover {
    margin: .1em 0 .5em 0;
    box-shadow: 0 .2em #880db5;
}
.sf-menu > li a[href="/word-lid"]:active {
    margin: .2em 0 .4em 0;
    box-shadow: 0 .1em #60a810;
}

/* Dropdown submenus (nested panels only) */
.sf-menu ul { box-shadow: none; }

.sf-menu > li > ul { border: none; }

.sf-menu > li > ul li {
    border: none;
    border-radius: 3px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

.sf-menu > li > ul li a {
    display: block;
    padding: 10px 18px;
    font-size: 14px;
    color: #333;
    text-decoration: none;
}

.sf-menu > li > ul li a:hover {
    color: #000;
    background-color: #feefb4;
}

.sf-menu > li > ul > li > ul { margin-left: .3em; }
.sf-menu > li > ul > li > ul > li > a:first-of-type { margin-top: 0 !important; }

/* Dropdown panels must float above page content on every page */
header .navbar-collapse .sf-menu ul {
    z-index: 1050 !important;
}

.sf-menu.sf-arrows .sf-with-ul { padding-right: 1.9em; }
.sf-arrows .sf-with-ul:after { right: 0.8em; }

/* --------------------------------------------------------------------------
   4. Content area
   -------------------------------------------------------------------------- */
#content > .container {
    background-color: #fff;
    padding-top: 3vh;
}

section#content > .container > .row {
    margin-left: -15px;
    margin-right: -15px;
}

/* Webshop page: hide the sidebar column */
.webpage-37888 .col-md-3 { width: 0 !important; }
.webpage-37888 .col-md-9 { width: 100% !important; }
.webpage-37888 .container { margin-left: 0; margin-right: 0; }

.spacer {
    border-bottom: 1px solid #E5E7EB;
    margin-top: 24px;
    margin-bottom: 24px;
}

/* --------------------------------------------------------------------------
   5. Carousel (homepage)
   -------------------------------------------------------------------------- */
#carousel-homepage .carousel-inner,
#carousel-homepage .item { height: 300px !important; }

.carousel-indicators li { border-radius: 50%; }
.carousel-indicators .active { background-color: #fac905; border-color: #fac905; }

.c-arrow-button {
    background-color: transparent;
    border: 0;
    background-repeat: no-repeat;
    height: 32px;
    width: 32px;
    cursor: pointer;
}
.c-arrow-button--left {
    background-image: url("https://www.cleopatra-groningen.nl/_media/1636817/7c4a32b4c49c4be6a66bfe94b4f748f4");
}
.c-arrow-button--right {
    background-image: url("https://www.cleopatra-groningen.nl/_media/1636816/b3b4525f0a674f4fa8a8298999d71c0a");
}

.c-page-indicator {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    box-shadow: inset 0 0 3px 1px rgba(0, 0, 0, 0.18);
}
[data-currentpage="0"] > [data-page-indicator="0"],
[data-currentpage="1"] > [data-page-indicator="1"],
[data-currentpage="2"] > [data-page-indicator="2"] {
    box-shadow: 0 0 1px 1px rgba(0, 0, 0, 0.18);
    background-color: #fac905;
}

/* --------------------------------------------------------------------------
   6. Quicklinks
   -------------------------------------------------------------------------- */
.c-quicklink {
    max-width: 150px;
    width: 100%;
    height: 98px;
    position: relative;
    display: block;
    overflow: hidden;
    background-color: black;
    border-radius: 10px;
}

@media (min-width: 1100px) { .c-quicklink { max-width: 200px; height: 113px; } }
@media (min-width: 1200px) { .c-quicklink { max-width: 250px; height: 141px; } }
@media (min-width: 1300px) { .c-quicklink { max-width: 300px; height: 169px; } }

.c-quicklink__image {
    height: 100%;
    width: 100%;
    text-align: center;
    opacity: 0.6;
    transition: opacity 0.2s;
    background-position: center;
    background-size: 100%;
}
.c-quicklink:hover .c-quicklink__image { opacity: 0.4; }

.c-quicklink__text {
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    top: 0;
    position: absolute;
    left: 0;
    height: 100%;
    width: 100%;
    font-size: 20px;
    line-height: 1.1;
    text-align: center;
    font-family: 'Alegreya Sans', 'Open Sans', sans-serif;
}

.ps-l-quicklink {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    max-width: 930px;
    position: relative;
    top: -16px;
    margin: 0 auto;
}
@media (min-width: 1200px) { .ps-l-quicklink { max-width: 100%; } }
.ps-l-quicklink > * { margin-top: 16px; }

.l-hor-gap-s > * + * { margin-left: 8px; }
.l-hor-gap-m > * + * { margin-left: 16px; }

/* --------------------------------------------------------------------------
   7. Date badges & event headlines (light mode)
   -------------------------------------------------------------------------- */
dt.date {
    border-radius: 3px;
    overflow: hidden;
    font-family: 'Alegreya Sans', sans-serif;
}

dt.date a { background-color: #fac905 !important; }
dt.date a div { color: #000 !important; }
dl.headlines dt.date div:last-child { line-height: 13px; }

/* Homepage events list: on phones/tablets all 12 events sit in ONE row
   (date badges only) instead of stacking into 12 rows. The col-md-4 column
   is full-width here, so a 12-column grid puts every badge side-by-side. */
@media (max-width: 991px) {
    .paragraph-events-view {
        display: grid;
        grid-template-columns: repeat(12, 1fr);
        gap: 6px;
        align-items: start;
    }
    .paragraph-events-view > h3,
    .paragraph-events-view > .clearfix {
        grid-column: 1 / -1;
    }
    .paragraph-events-view > dl.headlines {
        margin-bottom: 0;
        min-width: 0;
    }
    /* Date badge fills its cell */
    .paragraph-events-view dl.headlines dt.date a {
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
        padding: 3px;
        box-sizing: border-box;
    }
    .paragraph-events-view dl.headlines dt.date div:first-child {
        font-size: 22px;
        line-height: 20px;
    }
    .paragraph-events-view dl.headlines dt.date div:last-child {
        font-size: 12px;
        line-height: 12px;
    }
    /* Event title below the badge, small */
    .paragraph-events-view dl.headlines dd {
        margin-left: 0;
        margin-top: 4px;
        text-align: center;
    }
    .paragraph-events-view dl.headlines dd a {
        font-size: 11px;
        line-height: 13px !important;
        white-space: normal;
        word-break: break-word;
    }
    .paragraph-events-view dl.headlines dd ul {
        display: none;
    }
}

/* --------------------------------------------------------------------------
   8. Footer (light mode)
   -------------------------------------------------------------------------- */
footer {
    background-color: #eee;
    color: #000;
}

footer a { color: #33A1FD; }
footer a:hover { color: #33A1FD; text-decoration: underline; }

footer dl.headlines.headlines-footer dd * { color: #000 !important; }

footer .col-xs-12.col-sm-4 { margin-bottom: 1em; }

footer .headline {
    background-color: #fac905;
    border-radius: 3px;
    border-bottom: none;
    padding: .4em .7em;
    margin: 0 0 1em 0;
}
footer .headline > h3 { color: #000; border-bottom: none; padding: 0; }

footer ul.social-icons li a { border-radius: 3px; }

#copyright {
    border-top: none !important;
    background-color: #222 !important;
}

/* --------------------------------------------------------------------------
   9. Signed-in header user area (desktop): [ name ] [ Uitloggen ] [ toggle ]
   The head script replaces the template's <div class="login"><p>…</p></div>
   with <span class="cleo-userarea"> containing .c-username, .c-logout and
   the .cleo-theme-toggle button. Pinned here so page CSS can't decide.
   -------------------------------------------------------------------------- */
.cleo-userarea, #cleo-userarea {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 3px 0;
    margin: 0;
    font-family: 'Alegreya Sans', 'Open Sans', sans-serif;
    font-size: 16px;
    letter-spacing: 1px;
    color: #000;
    background: transparent;
}

.cleo-userarea a, #cleo-userarea a {
    display: inline-block;
    font-family: 'Alegreya Sans', 'Open Sans', sans-serif !important;
    font-size: 16px !important;
    letter-spacing: 1px !important;
    color: #000 !important;
    text-decoration: none !important;
    white-space: nowrap;
    background: transparent;
}

.cleo-userarea .c-username, #cleo-userarea .c-username { font-weight: 700; margin-right: 12px; }
.cleo-userarea .c-logout, #cleo-userarea .c-logout { font-weight: 500; margin-right: 4px; }

.cleo-userarea a:hover, #cleo-userarea a:hover {
    color: #000 !important;
    text-decoration: underline !important;
}

/* --------------------------------------------------------------------------
   10. Dark mode toggle button (sun/moon inline SVG)
   -------------------------------------------------------------------------- */
.cleo-theme-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    margin-left: 8px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, .22);
    color: #000;
    cursor: pointer;
    transition: background-color .15s;
}
.cleo-theme-toggle svg { display: block; flex: none; }
.cleo-theme-toggle:hover { background-color: rgba(0, 0, 0, .38); }

/* --------------------------------------------------------------------------
   11. Mobile (≤767px) — light mode
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {
    header ul.sf-menu > li a { padding: .4em .7em; }

    /* Bootstrap 3 leaves 15px side padding on the collapsed navbar — zero it */
    .navbar-responsive-collapse.in {
        padding-right: 0 !important;
        padding-left: 0 !important;
    }

    /* The logo/hamburger row and the nav row are separate on mobile: any
       leftover space around the nav must be yellow, not a gap. */
    .header-nav { background-color: #fac905; }

    /* Drawer user card: dark like the menu links above, white text */
    .top-mobile {
        background-color: #1e1e24;
        padding: 8px 12px;
        overflow: visible;
        border-radius: 8px;
        border: 1px solid rgba(255, 255, 255, .08);
    }

    .top-mobile .cleo-userarea,
    .top-mobile #cleo-userarea,
    .top-mobile .cleo-userarea a {
        color: #fff !important;
    }
    .top-mobile .cleo-theme-toggle svg { color: #fff !important; }

    /* Divider above the user section */
    .top-mobile::before {
        content: "";
        display: block;
        width: 100%;
        height: 1px;
        margin: 8px 0 12px 0;
        background-color: rgba(0, 0, 0, .25);
    }

    /* Vertical stack: name / Uitloggen / toggle */
    .top-mobile .cleo-userarea,
    .top-mobile #cleo-userarea {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        padding: 0 4px;
        width: 100%;
    }

    .top-mobile .cleo-userarea a.c-username,
    .top-mobile #cleo-userarea a.c-username {
        font-weight: 700 !important;
    }
    .top-mobile .cleo-userarea a.c-logout,
    .top-mobile #cleo-userarea a.c-logout {
        font-weight: 400 !important;
    }

    /* Full-width tap-friendly toggle row */
    .top-mobile .cleo-theme-toggle {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        width: 100%;
        height: 44px;
        margin: 6px 0 0 0;
        padding: 0 12px;
        box-sizing: border-box;
        border-radius: 22px;
        background-color: rgba(0, 0, 0, .12);
    }
    .top-mobile .cleo-theme-toggle:hover { background-color: rgba(0, 0, 0, .30); }
    .top-mobile .cleo-theme-toggle:active { background-color: rgba(0, 0, 0, .45); }

    .paragraph-blogs-view hr { display: none; }
}

/* --------------------------------------------------------------------------
   12. Blogs
   -------------------------------------------------------------------------- */
.paragraph-blogs-view { line-height: 1.5; }
.paragraph-blogs-view .blog-entry + .blog-entry {
    border-top: 1px solid #e5e5e5;
    padding-top: 16px;
    margin-top: 16px;
}

ul.typeahead.dropdown-menu > li.active * { color: #fac905 !important; }

/* ==========================================================================
   DARK MODE (html.cleo-dark)
   Palette: body #18181b / text #F3F4F6 / content card #232329 /
   footer #1f1f24 / muted #9CA3AF / elevated #26262c / borders #3f3f46 /
   links #38BDF8 / yellow accent stays #fac905 (black text on it)
   ========================================================================== */

/* --- Surfaces & base text --- */
html.cleo-dark body { background-color: #18181b; color: #F3F4F6; }
html.cleo-dark #content > .container { background-color: #232329; }
html.cleo-dark footer { background-color: #1f1f24; color: #9CA3AF; }

html.cleo-dark .text-muted,
html.cleo-dark .text-muted a,
html.cleo-dark time { color: #9CA3AF; }

/* --- Links --- */
html.cleo-dark a { color: #38BDF8; }
html.cleo-dark footer a { color: #38BDF8; }
html.cleo-dark .text-muted a { color: #38BDF8; }

/* --- Event / blog headlines --- */
html.cleo-dark dl.headlines dd a { color: #F3F4F6; }
html.cleo-dark dl.headlines dd a:hover { color: #38BDF8; text-decoration: underline; }

html.cleo-dark footer dl.headlines.headlines-footer dd,
html.cleo-dark footer dl.headlines.headlines-footer dd a { color: #F3F4F6; }
html.cleo-dark footer dl.headlines.headlines-footer dd a:hover { color: #38BDF8; text-decoration: underline; }
html.cleo-dark footer dl.headlines.headlines-footer dd .text-muted,
html.cleo-dark footer dl.headlines.headlines-footer dd time { color: #9CA3AF; }

/* --- Tables, forms, panels --- */
html.cleo-dark .table, html.cleo-dark .table td, html.cleo-dark .table th {
    background-color: #26262c !important;
    color: #F3F4F6;
}
html.cleo-dark .form-control { background-color: #26262c; color: #F3F4F6; border-color: #3f3f46; }
html.cleo-dark .dropdown-menu, html.cleo-dark .panel, html.cleo-dark .well {
    background-color: #26262c; color: #F3F4F6;
}
html.cleo-dark .btn-default { background-color: #26262c; color: #F3F4F6; border-color: #3f3f46; }

/* --- Yellow accents stay bright yellow with black text (no glare) --- */
html.cleo-dark dt.date a,
html.cleo-dark footer .headline {
    background-color: #fac905 !important;
    color: #000 !important;
}

/* --- Page title banner / sub headers: darker purple --- */
html.cleo-dark #content .content-header,
html.cleo-dark .content-header,
html.cleo-dark .content-header-background,
html.cleo-dark .content-header.content-header-background {
    background: #260a38 !important;
    background-color: #260a38 !important;
    background-image: none !important;
}
html.cleo-dark .sub-header,
html.cleo-dark .page-header,
html.cleo-dark .hero,
html.cleo-dark section.header,
html.cleo-dark div[class*="banner"] {
    background-color: #260a38 !important;
}

/* --- Side menu (#submenu) links yellow --- */
html.cleo-dark #submenu a,
html.cleo-dark #submenu li a,
html.cleo-dark #submenu li.active > a,
html.cleo-dark #submenu ul a { color: #fac905 !important; }
html.cleo-dark #submenu a:hover,
html.cleo-dark #submenu li a:hover { color: #feefb4 !important; }

/* --- Script-tagged blue links & gold boxes become yellow --- */
html.cleo-dark a.cleo-link-yellow { color: #fac905 !important; }
html.cleo-dark a.cleo-link-yellow:hover { color: #feefb4 !important; }
html.cleo-dark .cleo-yellow-fix { background-color: #fac905 !important; }

/* --- Blog / headline links (were blue) become yellow --- */
html.cleo-dark dl.headlines a,
html.cleo-dark dl.headlines dt a,
html.cleo-dark dl.headlines dd a,
html.cleo-dark a[href*="/blogs/"] { color: #fac905 !important; }
html.cleo-dark dl.headlines a:hover,
html.cleo-dark a[href*="/blogs/"]:hover { color: #feefb4 !important; }

/* --- Footer headlines --- */
html.cleo-dark footer dl.headlines.headlines-footer dd,
html.cleo-dark footer dl.headlines.headlines-footer dd *,
html.cleo-dark footer dl.headlines.headlines-footer dd a { color: #FFFFFF !important; }
html.cleo-dark footer dl.headlines.headlines-footer dd a:hover,
html.cleo-dark footer dl.headlines.headlines-footer dt a:hover {
    color: #fac905 !important;
    text-decoration: underline !important;
}

/* --- Signed-in user area: black on the yellow bar (both modes) --- */
html.cleo-dark .cleo-userarea,
html.cleo-dark #cleo-userarea,
html.cleo-dark .cleo-userarea *,
html.cleo-dark #cleo-userarea * { color: #000 !important; }

/* --- Copyright bar stays near-black --- */
html.cleo-dark #copyright { background-color: #18181b !important; color: #9CA3AF; }

/* ==========================================================================
   DARK MODE — HEADER
   Structure (live DOM):
     header > .container
       .header-nav-top > .row > .col-xs-12.text-right > .login
       .header-nav
         .header-logo.navbar-header   (hamburger + logo)
         nav.header-menu.navbar-collapse.collapse
           ul#menu.sf-menu
           .top-mobile > .login        (mobile user card)

    Desktop: the whole nav bar stays YELLOW (like light mode). Only the
             active page link and hover state get a dark background with
             white text. Nested dropdowns stay dark for readability.
    Mobile:  the collapsed drawer is position:absolute over the whole header;
             the bar stays yellow, active items get dark bg + white text,
             and .top-mobile is the dark rounded user card.
   ========================================================================== */

/* --- A. Header stays YELLOW in dark mode (same as light mode) ---
   NOTE: .top-mobile is deliberately NOT yellow here — the mobile user card
   is dark with white text in both modes (see section 11 + section C below). */
html.cleo-dark .header-logo {
    background-color: #fac905 !important;
}

html.cleo-dark .header-logo .navbar-brand,
html.cleo-dark .header-logo .navbar-brand h1 { color: #000 !important; }

html.cleo-dark .navbar-toggle { border-color: rgba(0, 0, 0, .3) !important; }
html.cleo-dark .navbar-toggle .icon-bar { background-color: #000 !important; }
html.cleo-dark .navbar-toggle:hover,
html.cleo-dark .navbar-toggle:focus { background-color: rgba(0, 0, 0, .15); }

/* --- B. Nav bar stays yellow; only active/hover items get dark bg --- */
html.cleo-dark .header-menu,
html.cleo-dark nav.navbar-collapse,
html.cleo-dark .sf-menu {
    background-color: transparent !important;
}

/* Top-level links: black on yellow (like light mode) */
html.cleo-dark .sf-menu > li > a {
    color: #000 !important;
    background-color: transparent !important;
}
/* Active page + hover: dark background, white text */
html.cleo-dark .sf-menu > li > a:hover,
html.cleo-dark .sf-menu > li.active > a {
    color: #fff !important;
    background-color: #18181b !important;
}

/* Special menu items: keep their brand backgrounds in dark mode too, so the
   active/hover rule above can't turn the purple/preipop buttons dark. */
html.cleo-dark .sf-menu > li a[href="/preipop"] {
    color: #32ae70 !important;
    background-color: #674574 !important;
}
html.cleo-dark .sf-menu > li a[href="/preipop"]:hover {
    background-color: #4a1c5b !important;
}
html.cleo-dark .sf-menu > li a[href="/word-lid"] {
    color: #fff !important;
    background-color: #a314d7 !important;
}

/* Nested submenu panels (Vereniging, Mijn Cleopatra children):
   dark background, yellow text. */
html.cleo-dark .sf-menu ul ul {
    background-color: #18181b !important;
    border-top-color: #fac905;
}
html.cleo-dark .sf-menu li ul li a {
    background-color: #18181b !important;
    color: #fac905 !important;
}
html.cleo-dark .sf-menu li ul li a:hover,
html.cleo-dark .sf-menu li ul li.active > a {
    color: #fff !important;
    background-color: #26262c !important;
}

/* --- C. Mobile drawer (≤767px): whole drawer dark, nav buttons yellow --- */
@media (max-width: 767px) {
    /* The collapsed drawer covers the whole header — make it all dark,
       overriding the yellow header/logo rules from section A. */
    html.cleo-dark .navbar-collapse.in,
    html.cleo-dark .navbar-collapse.in > .container,
    html.cleo-dark .navbar-collapse.in > .row {
        background-color: #18181b !important;
        background: #18181b !important;
    }

    /* Logo row inside the open drawer is dark too (logo image still visible). */
    html.cleo-dark .navbar-collapse.in .navbar-header,
    html.cleo-dark .navbar-collapse.in .header-logo {
        background-color: #18181b !important;
    }

    /* Menu list itself is transparent so the dark drawer shows through. */
    html.cleo-dark .navbar-collapse.in .sf-menu {
        background-color: transparent !important;
    }

    /* Individual nav buttons: yellow background, white text. */
    html.cleo-dark .navbar-collapse.in .sf-menu > li > a {
        background-color: #fac905 !important;
        color: #fff !important;
        border-radius: 4px;
    }

    /* Active item + hover: slightly darker yellow for feedback. */
    html.cleo-dark .navbar-collapse.in .sf-menu > li.active > a,
    html.cleo-dark .navbar-collapse.in .sf-menu > li > a:hover {
        background-color: #e0b400 !important;
        color: #fff !important;
    }

    /* Nested submenu items (Vereniging, Mijn Cleopatra children):
       dark background, yellow text. */
    html.cleo-dark .navbar-collapse.in .sf-menu li ul li a {
        background-color: #18181b !important;
        color: #fac905 !important;
    }
    html.cleo-dark .navbar-collapse.in .sf-menu li ul li a:hover,
    html.cleo-dark .navbar-collapse.in .sf-menu li ul li.active > a {
        background-color: #26262c !important;
        color: #fff !important;
    }

    /* User card matches the dark menu links above it — white text.
       Section A no longer forces this yellow, so the light-mode base rule
       (section 11) already paints it dark; this block only needs to keep
       the text/icon colors white in case any other sheet re-colors them. */
    html.cleo-dark .top-mobile {
        background-color: #1e1e24 !important;
        border-radius: 8px !important;
        border: 1px solid rgba(255, 255, 255, .08) !important;
    }

    html.cleo-dark .top-mobile .cleo-userarea,
    html.cleo-dark .top-mobile #cleo-userarea,
    html.cleo-dark .top-mobile .cleo-userarea a { color: #fff !important; }

    html.cleo-dark .top-mobile .cleo-theme-toggle svg { color: #fff !important; }

    html.cleo-dark .top-mobile::before { background-color: rgba(255, 255, 255, .18); }
}