/* -- Hoofdmenu met mega menu's (sw_nav.html) -- */
/* Desktop vanaf 1200px: witte balk met uitklappanelen. Daaronder: hamburger + inschuifmenu. */

.swn {
  /* StudyWorks semantic tokens (Light) */
  --text-primary: #111827;     /* text/primary */
  --text-secondary: #4B5563;   /* text/secondary */
  --text-brand: #F17435;       /* text/brand */
  --bg-surface-brand: #FFF3EE; /* bg-surface/brand */
  --bg-hover: #F3F4F6;
  --border: #E5E7EB;
  --btn-bg: #3450BF;           /* button/primary/bg */
  --btn-bg-hover: #4362D2;     /* button/primary/bg-hover */
  --gap-panel: 12px;           /* ruimte tussen balk en uitklappaneel */
  --bar-pad: 12px;             /* verticale padding van de witte balk */
  position: relative;
  z-index: 20;
  max-width: 1140px;
  margin: 0 auto;
  font-family: "Source Sans 3", "Source Sans Pro", sans-serif;
}
.swn *, .swn *::before, .swn *::after { box-sizing: border-box; }
.swn ul { margin: 0; padding: 0; list-style: none; }
.swn p { margin: 0; }
.swn a { text-decoration: none; }

/* Bovenste regel: telefoon + inloggen (wit op oranje) */
.swn__top {
  display: flex;
  justify-content: flex-end;
  gap: 28px;
  max-height: 40px;
  margin-bottom: 14px !important;
  overflow: hidden;
  transition: max-height .2s ease, opacity .2s ease, margin .2s ease;
}
/* Vastgezet menu: na scrollen klapt deze regel weg, alleen de balk blijft staan */
.swn.is-scrolled .swn__top {
  max-height: 0;
  margin-bottom: 0 !important;
  opacity: 0;
  visibility: hidden;
}
.swn__sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.swn__top a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 500;
  color: #FFFFFF;
}
.swn__top a:hover { text-decoration: underline; }
.swn__top a:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 3px; border-radius: 4px; }
.swn__top li:first-child a { position: relative; }
.swn__top li:first-child a::after { /* groen bolletje: bereikbaar */
  content: "";
  position: absolute;
  top: 0;
  left: 12px;
  width: 7px;
  height: 7px;
  border-radius: 9999px;
  background: #22C55E;
  box-shadow: 0 0 0 1.5px #F17435;
}
.swn.is-closed .swn__top li:first-child a::after { background: #EF4444; } /* buiten openingstijden */

/* Breedte gelijk aan werkenbijstudyworks.nl: 1140px gecentreerd, minimaal 10px tot de schermrand.
   De hero (.vh-hero) heeft zelf 25px padding, dus het menu mag daar tot 15px buiten vallen. */
.vh-hero > .swn:not(.is-stuck) { margin-inline: max(-15px, calc((100% - 1140px) / 2)); }

/* Vastgezet menu (data-swn-sticky, zie sw-nav.js) */
.swn.is-stuck {
  position: fixed;
  z-index: 50;
  top: 12px;
  left: 10px;
  right: 10px;
  margin: 0 auto;
}
/* Ankerlinks (bv. "Solliciteer direct") niet onder het vaste menu laten vallen */
html:has(.swn[data-swn-sticky]) { scroll-padding-top: 110px; }

/* Witte balk */
.swn__bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: var(--bar-pad) 14px var(--bar-pad) 28px;
  border-radius: 14px;
  background: #FFFFFF;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
}
.swn__logo { flex: 0 0 auto; display: block; }
.swn__logo img { display: block; width: auto; height: 38px; }
.swn__logo:focus-visible { outline: 3px solid var(--btn-bg); outline-offset: 4px; border-radius: 4px; }

.swn__drawer { flex: 1; display: flex; align-items: center; align-self: stretch; min-width: 0; }
.swn__drawerHead, .swn__drawerFoot, .swn__burger, .swn__backdrop { display: none; }

.swn__menu { flex: 1; display: flex; align-items: center; align-self: stretch; gap: 4px; }
.swn__item--small { position: relative; align-self: stretch; display: flex; align-items: center; } /* klein dropdownpaneel hangt onder het item zelf */

.swn__trigger,
.swn__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 10px 14px;
  border: 0;
  border-radius: 8px;
  background: none;
  font-family: inherit;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-primary);
  cursor: pointer;
  transition: background .2s, color .2s;
}
.swn__trigger:hover,
.swn__link:hover { color: var(--text-brand); }
.swn__trigger:focus-visible,
.swn__link:focus-visible { outline: 3px solid var(--btn-bg); outline-offset: 2px; }
.swn__chevron { flex: 0 0 auto; transition: transform .2s; }
.swn__item.is-open > .swn__trigger { background: var(--bg-hover); color: var(--text-brand); }
.swn__item.is-open > .swn__trigger .swn__chevron { transform: rotate(180deg); }

/* Solliciteren */
.swn__apply {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 9999px;
  background: var(--btn-bg);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.25;
  color: #FFFFFF !important;
  white-space: nowrap;
  transition: background .2s;
}
.swn__apply:hover { background: var(--btn-bg-hover); }
.swn__apply:focus-visible { outline: 3px solid var(--btn-bg); outline-offset: 3px; }

/* Uitklappaneel (mega menu): even breed als de balk, hangt eronder */
.swn__panel {
  position: absolute;
  top: calc(100% + var(--gap-panel));
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  padding: 36px 40px;
  border-radius: 14px;
  background: #FFFFFF;
  box-shadow: 0 20px 40px rgba(0, 0, 0, .12);
  text-align: left;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
}
.swn__panel::before { /* brug over de ruimte tussen balk en paneel, zodat hover niet wegvalt */
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: var(--gap-panel);
}
.swn__item.is-open > .swn__panel {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition: opacity .18s ease, transform .18s ease, visibility 0s;
}

.swn__main { padding-right: 48px; border-right: 1px solid var(--border); }
.swn__eyebrow { margin-bottom: 4px !important; font-size: 14px; font-weight: 600; color: var(--text-brand); }
.swn__title { font-size: 26px; font-weight: 600; line-height: 1.25; color: var(--text-primary); }
.swn__cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  margin-top: 28px;
}
.swn__colTitle { margin-bottom: 14px !important; font-size: 13px; font-weight: 700; color: var(--text-primary); }
.swn__col li + li { margin-top: 12px; }
.swn__col a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  line-height: 1.4;
  color: var(--text-primary);
}
.swn__col a:hover { text-decoration: underline; text-underline-offset: 3px; }
.swn__col a:focus-visible,
.swn__panel--small a:focus-visible { outline: 3px solid var(--btn-bg); outline-offset: 2px; border-radius: 4px; }
.swn__jobs { font-weight: 700; }
.swn__count {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 9999px;
  background: var(--text-primary);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  color: #FFFFFF;
}

/* Uitgelichte kaart rechts in het paneel */
.swn__feature {
  display: flex;
  flex-direction: column;
  padding-left: 48px;
}
.swn__feature--app { align-items: center; justify-content: center; text-align: center; }
.swn__featureEyebrow { margin-bottom: 4px !important; font-size: 13px; font-weight: 600; color: var(--text-brand); }
.swn__featureTitle { margin-bottom: 16px !important; font-size: 18px; font-weight: 600; line-height: 1.35; color: var(--text-primary); }
.swn__featureText { margin: -8px 0 20px !important; font-size: 14px; line-height: 1.6; color: var(--text-secondary); }
.swn__featureBtn {
  display: inline-block;
  padding: 11px 30px;
  border: 1.5px solid var(--btn-bg);
  border-radius: 9999px;
  background: #FFFFFF;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  color: var(--btn-bg);
  transition: background .2s;
}
.swn__featureBtn:hover { background: #EFF2FA; }
.swn__featureBtn:focus-visible { outline: 3px solid var(--btn-bg); outline-offset: 3px; }

/* Telefoon-mockup met app-screenshot, oranje cirkel en app-icoon */
.swn__phoneMock {
  position: relative;
  width: 190px;
  height: 172px;
  margin-bottom: 14px;
}
.swn__phoneMock::before {
  content: "";
  position: absolute;
  top: 0;
  right: 6px;
  width: 112px;
  height: 112px;
  border-radius: 9999px;
  background: #FAD9C2;
}
.swn__phoneMock > img {
  position: absolute;
  top: 6px;
  left: 30px;
  width: 80px;
  height: 162px;
  object-fit: cover;
  object-position: top;
  border: 4px solid #1F2937;
  border-radius: 16px;
  background: #1F2937;
  box-shadow: 0 10px 20px rgba(0, 0, 0, .18);
}
.swn__appIcon {
  position: absolute;
  right: 22px;
  bottom: 14px;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(to bottom right, #E66A2F 0%, #F17435 55%, #FAA739 100%);
  box-shadow: 0 8px 16px rgba(0, 0, 0, .15);
}
.swn__appIcon img { display: block; width: 34px; height: 34px; }
/* Witte variant met gekleurd beeldmerk (StudyWorks-app, kinderopvang) */
.swn__appIcon--light { background: #FFFFFF; box-shadow: 0 8px 18px rgba(0, 0, 0, .14); }
.swn__appIcon--light img { width: 38px; height: 38px; }

/* Foto-variant (Voor de klas) */
.swn__feature--photo .swn__photo {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  margin-bottom: 16px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 8px 16px rgba(0, 0, 0, .10);
}
.swn__feature--photo .swn__featureBtn { width: 100%; }

/* Klein dropdownpaneel (Over ons): onder het item, op dezelfde hoogte als de mega panelen */
.swn__panel--small {
  top: calc(100% + var(--bar-pad) + var(--gap-panel));
  left: 0;
  right: auto;
  display: block;
  min-width: 240px;
  padding: 10px;
}
.swn__panel--small::before { height: calc(var(--bar-pad) + var(--gap-panel)); }
.swn__panel--small a {
  display: block;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 16px;
  color: var(--text-primary);
}
.swn__panel--small a:hover { background: var(--bg-hover); color: var(--text-brand); }

/* Smallere desktops: iets compacter */
@media (min-width: 1200px) and (max-width: 1279px) {
  .swn__bar { gap: 16px; padding-left: 20px; }
  .swn__trigger, .swn__link { padding: 10px 10px; font-size: 16px; }
  .swn__apply--bar { padding: 12px 22px; }
}

/* -- Mobiel en tablet: hamburger + inschuifmenu -- */
@media (max-width: 1199px) {
  .swn__top { display: none; }
  .swn__bar { gap: 12px; padding: 10px 10px 10px 16px; border-radius: 12px; }
  .swn__logo img { height: 30px; }
  .swn__apply--bar { margin-left: auto; padding: 10px 18px; font-size: 15px; }

  .swn__burger {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: none;
    color: var(--text-primary);
    cursor: pointer;
  }
  .swn__burger:focus-visible { outline: 3px solid var(--btn-bg); outline-offset: 2px; }

  .swn__drawer {
    position: fixed;
    z-index: 1001;
    top: 0;
    right: 0;
    bottom: 0;
    flex-direction: column;
    align-items: stretch;
    width: min(420px, 100%);
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #FFFFFF;
    box-shadow: -10px 0 30px rgba(0, 0, 0, .15);
    visibility: hidden;
    transform: translateX(100%);
    transition: transform .25s ease, visibility 0s linear .25s;
  }
  .swn.is-drawer-open .swn__drawer {
    visibility: visible;
    transform: none;
    transition: transform .25s ease, visibility 0s;
  }
  .swn__backdrop:not([hidden]) {
    display: block;
    position: fixed;
    z-index: 1000;
    inset: 0;
    background: rgba(17, 24, 39, .5);
  }

  .swn__drawerHead {
    position: sticky;
    z-index: 1;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 12px 14px 20px;
    border-bottom: 1px solid var(--border);
    background: #FFFFFF;
  }
  .swn__drawerHead img { display: block; width: auto; height: 28px; }
  .swn__close {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: none;
    color: var(--text-primary);
    cursor: pointer;
  }
  .swn__close:focus-visible { outline: 3px solid var(--btn-bg); outline-offset: 2px; }

  .swn .swn__menu { flex: 0 0 auto; flex-direction: column; align-items: stretch; align-self: auto; gap: 0; padding: 8px 20px; }
  .swn__item--small { display: block; }
  .swn__item { border-bottom: 1px solid var(--border); }
  .swn__item--small { position: static; }
  .swn__trigger,
  .swn__link {
    justify-content: space-between;
    width: 100%;
    padding: 16px 4px;
    border-radius: 0;
    font-size: 18px;
  }
  .swn__item.is-open > .swn__trigger { background: none; }

  /* Panelen worden uitklapbare secties */
  .swn__panel,
  .swn__panel--small {
    position: static;
    display: none;
    min-width: 0;
    padding: 0 4px 20px;
    border-radius: 0;
    box-shadow: none;
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: none;
  }
  .swn__panel::before { display: none; }
  .swn__item.is-open > .swn__panel { display: block; }

  .swn__main { padding: 0; border: 0; }
  .swn__eyebrow, .swn__title { display: none; }
  .swn__cols { grid-template-columns: 1fr; gap: 20px; margin-top: 0; }
  .swn__colTitle {
    margin-bottom: 4px !important;
    font-size: 12px;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--text-secondary);
  }
  .swn__col li + li { margin-top: 0; }
  .swn__col a { padding: 8px 0; }

  /* Uitgelichte kaart: compact blok zonder grote afbeelding */
  .swn__feature {
    align-items: flex-start;
    margin-top: 20px;
    padding: 16px;
    border-radius: 12px;
    background: var(--bg-surface-brand);
    text-align: left;
  }
  .swn__feature--app { align-items: flex-start; text-align: left; }
  .swn__phoneMock, .swn__photo, .swn__featureEyebrow, .swn__featureText { display: none !important; }
  .swn__featureTitle { margin-bottom: 12px !important; font-size: 16px; }
  .swn__featureBtn { padding: 9px 22px; font-size: 15px; }
  .swn__feature--photo .swn__featureBtn { width: auto; }

  .swn__panel--small a { padding: 10px 0; }
  .swn__panel--small a:hover { background: none; }

  .swn__drawerFoot {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 28px;
    margin-top: auto;
    padding: 24px 20px 96px; /* onderin ruimte zodat de chatknop niets afdekt */
  }
  .swn__apply--block { display: block; flex-basis: 100%; margin-bottom: 8px; text-align: center; }
  .swn__footLink { padding: 8px 0; font-size: 16px; font-weight: 600; color: var(--text-primary); }
  .swn__footLink:hover { color: var(--text-brand); }
}

@media (max-width: 400px) {
  .swn__logo img { height: 26px; }
  .swn__apply--bar { padding: 9px 14px; font-size: 14px; }
}

/* -- Bescherming tegen algemene knop- en linkstijlen --
   Vaste kleuren voor knoppen en links in hover/focus, met een extra .swn in de selector
   zodat algemene stijlen (bv. button:hover) er niet overheen komen. */
.swn .swn__trigger,
.swn .swn__burger,
.swn .swn__close {
  border: 0;
  box-shadow: none;
  text-transform: none;
  letter-spacing: normal;
  white-space: nowrap;
}
.swn .swn__trigger:hover,
.swn .swn__trigger:focus { background: none; color: var(--text-brand); }
.swn .swn__item.is-open > .swn__trigger,
.swn .swn__item.is-open > .swn__trigger:hover,
.swn .swn__item.is-open > .swn__trigger:focus { background: var(--bg-hover); color: var(--text-brand); }
.swn .swn__burger:hover,
.swn .swn__burger:focus,
.swn .swn__close:hover,
.swn .swn__close:focus { background: none; color: var(--text-primary); }
.swn .swn__col a,
.swn .swn__panel--small a,
.swn .swn__link,
.swn .swn__footLink { color: var(--text-primary); }
.swn .swn__panel--small a:hover,
.swn .swn__link:hover,
.swn .swn__footLink:hover { color: var(--text-brand); }
.swn .swn__col a:hover { color: var(--text-primary); } /* mega menu-links onderstrepen bij hover, niet verkleuren */
.swn .swn__top a,
.swn .swn__top a:hover { color: #FFFFFF; }
.swn .swn__featureBtn,
.swn .swn__featureBtn:hover { color: var(--btn-bg); }
.swn img { max-width: none; }
@media (max-width: 1199px) {
  .swn .swn__item.is-open > .swn__trigger,
  .swn .swn__item.is-open > .swn__trigger:hover,
  .swn .swn__item.is-open > .swn__trigger:focus { background: none; }
}

/* Scrollen van de pagina blokkeren terwijl het mobiele menu open is */
html.swn-lock { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .swn__panel, .swn__drawer, .swn__chevron, .swn__trigger, .swn__link, .swn__top { transition: none !important; }
}
