/* ============================================================================
   BRUYST — NAVIGATIE + MEDEDELINGENBALK
   ----------------------------------------------------------------------------
   Deze header is eigen HTML (template-parts/bruyst-nav.php) en dus niet met
   Elementor te stylen. Alles wat je hier zou willen bijstellen staat daarom in
   het blok "INSTELKNOPPEN" hieronder — daaronder hoef je normaal niet te komen.

   Regels van dit bestand:
     - GEEN font-family. De header erft het lettertype van Elementor.
     - GEEN losse hex-kleuren. Kleuren komen uit --bruyst-* (zie inc/config.php).
     - Iconen zijn inline SVG, geen icon-font. Voorkomt conflicten met Elementor.
     - !important staat er waar Hello/Elementor anders overheen gaat.
   ============================================================================ */


/* ============================================================
   INSTELKNOPPEN — hier stel je de header af
   ============================================================ */
.bruyst-header {
  --bar-h:            56px;    /* hoogte van de menupil en de teal balk */
  --bruyst-nav-radius: 10px;   /* afronding van menu- en iconenbalk — gelijk
                                  aan --bruyst-knop-radius van de knoppen  */
  --menu-fs:          17px;    /* lettergrootte hoofdmenu               */
  --submenu-fs:       17px;    /* lettergrootte dropdown                */
  --cta-fs:           16px;    /* lettergrootte "werken bij"-knop       */
  --logo-h:           75px;    /* logohoogte bovenaan de pagina         */
  --logo-h-scroll:    46px;    /* logohoogte na scrollen                */
  --header-padding:   26px 20px;
  --header-max:       1340px;
  --pill-bg:          #fff;
  --radius-dropdown:  22px;
}


/* ============================================================
   1. Topbar — de vaste balk bovenaan
   ============================================================ */
.bruyst-topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
}


/* ============================================================
   2. Mededelingenbalk
   De kleuren worden per pagina inline gezet vanuit de instellingen;
   de waarden hieronder zijn alleen het vangnet.
   ============================================================ */
.bruyst-announce {
  position: relative;
  background: var(--bruyst-secondary);
  color: #fff;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  padding: 10px 46px;
  max-height: 80px;
  overflow: hidden;
  transition: max-height .3s ease, padding .3s ease;
}

.bruyst-announce,
.bruyst-announce a { color: #fff !important; }
.bruyst-announce a { text-decoration: underline; }

.bruyst-announce__label {
  background: rgba(0,0,0,.15);
  padding: 2px 8px;
  border-radius: 4px;
  margin-right: 8px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.bruyst-announce-close {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  background: none !important;
  border: none;
  color: #fff !important;
  cursor: pointer;
  display: inline-flex;
  padding: 4px;
  opacity: .85;
  line-height: 0;
  -webkit-appearance: none;
          appearance: none;
}
.bruyst-announce-close:hover  { opacity: 1; }
.bruyst-announce-close svg    { width: 16px; height: 16px; fill: currentColor; }
.bruyst-announce.is-hidden    { display: none; }

.bruyst-topbar.scrolled .bruyst-announce {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
}


/* ============================================================
   3. Header
   ============================================================ */
.bruyst-header {
  position: relative;
  z-index: 2;
  padding: var(--header-padding);
  background: transparent;
  transition: background .25s ease, box-shadow .25s ease, padding .25s ease;
}
.bruyst-header * { box-sizing: border-box; }

.bruyst-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: var(--header-max);
  margin: 0 auto;
}


/* --- Logo --- */
.bruyst-logo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  flex: none;
}
.bruyst-logo .custom-logo-link { display: block; line-height: 0; }
.bruyst-logo .custom-logo      { display: block; height: var(--logo-h); width: auto; transition: height .25s ease; }

/* Vangnet-logo, alleen zichtbaar als er geen logo is ingesteld. */
.bruyst-logo-fallback { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; text-decoration: none; }
.bruyst-logo svg      { width: 74px; height: auto; display: block; margin-left: 5px; transition: width .25s ease; }
.bruyst-logo span     { font-size: 38px; font-weight: 800; color: var(--bruyst-primary) !important; line-height: .85; letter-spacing: -.5px; transition: font-size .25s ease; }


/* --- Menupil --- */
.bruyst-nav       { position: relative; display: flex; align-items: center; }
.bruyst-menu-wrap { display: flex; align-items: center; }

.bruyst-menu {
  list-style: none;
  margin: 0;
  padding: 0 36px;
  display: flex;
  align-items: stretch;
  gap: 28px;
  background: var(--pill-bg);
  border-radius: var(--bruyst-nav-radius);
  height: var(--bar-h);
  position: relative;
  z-index: 2;
  transition: background .25s ease, padding .25s ease;
}

.bruyst-menu li        { position: relative; list-style: none; margin: 0 !important; padding: 0 !important; }
.bruyst-menu > li      { display: flex; align-items: center; }
.bruyst-menu > li > a  { position: relative; }

.bruyst-menu a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 !important;
  line-height: 1 !important;
  text-decoration: none;
  color: var(--bruyst-primary) !important;
  font-weight: 600;
  font-size: var(--menu-fs);
  white-space: nowrap;
  transition: color .15s;
}

/* Actief of geopend → streepje eronder */
.bruyst-menu > li:hover > a::before,
.bruyst-menu > li.current-menu-item > a::before,
.bruyst-menu > li.current-menu-parent > a::before {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -9px;
  height: 3px;
  border-radius: 2px;
  background: var(--bruyst-secondary);
}

/* Items met dropdown: streepje stopt vóór het pijltje */
.bruyst-menu > li.menu-item-has-children:hover > a::before,
.bruyst-menu > li.menu-item-has-children.current-menu-parent > a::before,
.bruyst-menu > li.menu-item-has-children.current-menu-item > a::before { right: 20px; }

/* Pijltje */
.bruyst-menu .menu-item-has-children > a::after {
  content: "";
  display: inline-block;
  width: 7px; height: 7px;
  margin-left: 7px;
  border-right: 2.5px solid currentColor;
  border-bottom: 2.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform .2s ease;
}
.bruyst-menu > li:hover > a::after { transform: translateY(1px) rotate(-135deg); }


/* --- Dropdown --- */
.bruyst-menu .sub-menu {
  list-style: none;
  margin: 0;
  padding: 16px 14px;
  position: absolute;
  top: calc(100% + 14px);
  left: -8px;
  min-width: 258px;
  display: none;
  flex-direction: column;
  gap: 2px;
  background: #fff !important;
  border-radius: var(--radius-dropdown);
  box-shadow: 0 24px 56px rgba(21,20,62,.16);
  z-index: 60;
}
/* Onzichtbare brug, zodat de muis van menu naar dropdown kan. */
.bruyst-menu .sub-menu::before { content: ""; position: absolute; top: -18px; left: 0; right: 0; height: 18px; }
.bruyst-menu li:hover > .sub-menu { display: flex; }
.bruyst-menu .sub-menu li { width: 100%; }

.bruyst-menu .sub-menu a {
  display: block;
  padding: 13px 26px;
  border-radius: 12px;
  font-size: var(--submenu-fs);
  font-weight: 700;
  line-height: 1.25 !important;
  white-space: nowrap;
  color: var(--bruyst-primary) !important;
  transition: background .12s;
}
.bruyst-menu .sub-menu a:hover { background: var(--bruyst-wolk) !important; color: var(--bruyst-primary) !important; }


/* --- CTA-knop + iconen (de teal staaf rechts) --- */
.bruyst-actions {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: stretch;
  height: var(--bar-h);
  background: var(--bruyst-teal-light);
  border-radius: 0 var(--bruyst-nav-radius) var(--bruyst-nav-radius) 0;
  margin-left: -30px;
}

.bruyst-cta {
  display: inline-flex;
  align-items: center;
  background: var(--bruyst-teal-light);
  color: #fff !important;
  font-weight: 600;
  font-size: var(--cta-fs);
  padding: 0 32px 0 40px;
  border-radius: 0 var(--bruyst-nav-radius) var(--bruyst-nav-radius) 0;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s;
}
.bruyst-cta:hover { background: var(--bruyst-accent-dark); }

.bruyst-icons        { display: flex; align-items: center; gap: 22px; margin-left: auto; padding: 0 26px; }
/* Staat de CTA-knop uit (tekstveld leeg), dan zijn de iconen het eerste kind
   van .bruyst-actions. Die balk schuift 30px onder de witte menu-pill
   (margin-left: -30px hierboven) — normaal vangt de knop dat op met zijn
   eigen padding. Zonder knop doen we dat hier: 30px overlap + 26px zichtbaar,
   gelijk aan de rechterkant. */
.bruyst-actions > .bruyst-icons:first-child { padding-left: 56px; }
/* --bruyst-icoon-kleur wordt per link gezet vanuit het CMS
   (Bruyst → Instellingen → Header-iconen); zonder keuze geldt wit. */
.bruyst-icons a      { display: inline-flex; align-items: center; color: var(--bruyst-icoon-kleur, #fff) !important; text-decoration: none; transition: opacity .15s; }
.bruyst-icons a:hover{ opacity: .75; }
.bruyst-icons svg    { height: 19px; width: auto; display: block; fill: currentColor; }
/* Icoon uit de Dashicons-galerij — zelfde maat als de SVG's, kleurt mee. */
.bruyst-icons .dashicons { font-size: 20px; width: 20px; height: 20px; line-height: 1; }
/* Eigen icoon uit de Icon Picker dat als afbeelding komt (PNG of externe URL):
   zelfde maat als de SVG's. Meekleuren met de header kan een <img> niet —
   daarom raden we in het CMS een SVG-upload aan. */
.bruyst-icons img    { height: 19px; width: auto; display: block; }

.bruyst-toggle { display: none; border: none; cursor: pointer; padding: 0; -webkit-appearance: none; appearance: none; }


/* ============================================================
   4. Gescrolld — witte balk
   ============================================================ */
.bruyst-topbar.scrolled .bruyst-header       { background: #fff; box-shadow: 0 6px 24px rgba(21,20,62,.08); padding-top: 14px; padding-bottom: 14px; }
.bruyst-topbar.scrolled .bruyst-logo .custom-logo { height: var(--logo-h-scroll); }
.bruyst-topbar.scrolled .bruyst-logo span    { font-size: 30px; }
.bruyst-topbar.scrolled .bruyst-logo svg     { width: 60px; }
.bruyst-topbar.scrolled .bruyst-menu         { background: transparent; padding: 0; }
.bruyst-topbar.scrolled .bruyst-actions      { margin-left: 22px; border-radius: var(--bruyst-nav-radius); }
/* Gescrold staat de balk los van de menupil: dan is er geen overlap meer om
   op te vangen, dus links dezelfde 26px als rechts — anders hangt er een
   leeg gat naast het eerste icoon. */
.bruyst-topbar.scrolled .bruyst-actions > .bruyst-icons:first-child { padding-left: 26px; }
.bruyst-topbar.scrolled .bruyst-cta          { border-radius: var(--bruyst-nav-radius); padding: 0 30px; }


/* ============================================================
   5. Mobiel — hamburger onder 1200px
   ============================================================ */
@media (max-width: 1199px) {

  .bruyst-announce { font-size: 13px; padding: 9px 40px; }

  .bruyst-header .bruyst-nav .bruyst-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 48px !important;
    height: 48px !important;
    min-width: 0 !important;
    flex: none;
    padding: 0 !important;
    background: var(--bruyst-secondary) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 14px !important;
    box-shadow: none !important;
    line-height: 0 !important;
    transition: filter .15s;
  }
  .bruyst-header .bruyst-nav .bruyst-toggle:hover { filter: brightness(.9); }
  .bruyst-header .bruyst-nav .bruyst-toggle svg {
    width: 22px !important; height: 22px !important;
    display: block !important; fill: #fff !important; stroke: none !important;
  }

  .bruyst-menu-wrap {
    display: none;
    position: absolute;
    top: calc(100% + 14px);
    right: 0; left: auto;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    background: #fff;
    border-radius: 20px;
    padding: 18px;
    min-width: 280px;
    box-shadow: 0 18px 44px rgba(21,20,62,.16);
    z-index: 50;
  }
  .bruyst-header.is-open .bruyst-menu-wrap { display: flex; }

  .bruyst-menu       { flex-direction: column; align-items: stretch; gap: 2px; padding: 0; background: transparent; border-radius: 0; height: auto; }
  .bruyst-menu > li  { display: block; }
  .bruyst-menu a     { display: flex; align-items: center; padding: 12px 14px !important; line-height: 1.2 !important; border-radius: 10px; }
  .bruyst-menu a:hover { background: var(--bruyst-wolk); color: var(--bruyst-primary) !important; }

  .bruyst-menu > li:hover > a::before,
  .bruyst-menu > li.current-menu-item > a::before { display: none; }

  .bruyst-menu .menu-item-has-children > a::after { margin-left: auto; }
  .bruyst-menu > li:hover > a::after { transform: translateY(-2px) rotate(45deg); }

  .bruyst-menu .sub-menu         { position: static; display: flex; background: transparent !important; box-shadow: none; border-radius: 0; padding: 0 0 4px 14px; min-width: 0; left: auto; top: auto; }
  .bruyst-menu .sub-menu::before { display: none; }
  .bruyst-menu .sub-menu a       { padding: 9px 14px; font-size: 15px; }

  .bruyst-actions { flex-direction: column; align-items: stretch; margin-left: 0; background: transparent; border-radius: 0; gap: 10px; height: auto; }
  .bruyst-cta     { justify-content: center; height: 52px; padding: 0; border-radius: var(--bruyst-nav-radius); font-size: 17px; }
  .bruyst-icons   { justify-content: center; height: 52px; padding: 0; gap: 34px; background: var(--bruyst-teal-light); border-radius: var(--bruyst-nav-radius); margin-left: 0; }
  /* Mobiel is de balk een eigen pill met gecentreerde iconen — de
     desktop-compensatie voor de ontbrekende CTA-knop moet hier weer uit. */
  .bruyst-actions > .bruyst-icons:first-child { padding-left: 0; }
}


/* ============================================================
   6. Losse onderdelen die met de header meereizen
   ============================================================ */

/* Top melding via [bruyst_top_melding] */
.bruyst-top-melding {
  width: 100%;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
  box-sizing: border-box;
}

.bruyst-top-melding__label {
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .05em;
  background: rgba(0,0,0,.15);
  padding: 2px 8px;
  border-radius: 4px;
  flex-shrink: 0;
}

@media (max-width: 767px) {
  .bruyst-top-melding { flex-direction: column; gap: 4px; padding: 8px 16px; font-size: 13px; }
}

/* Sticky CTA via [bruyst_sticky_cta] */
.bruyst-sticky-cta {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%) rotate(180deg);
  writing-mode: vertical-rl;
  z-index: 99;
  padding: 22px 12px;
  border-radius: 0 0 10px 10px;
  color: #fff !important;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: filter .15s;
}
.bruyst-sticky-cta:hover { filter: brightness(.92); }

@media (max-width: 767px) {
  .bruyst-sticky-cta { display: none; }
}
