/* ==================================================
   Zoeken — Stadsthema
================================================== */

/* ---------- Gedeeld zoekformulier ---------- */
.aow-zoek { position: relative; margin: 0; }
.aow-zoek__veld {
  display: flex; align-items: center;
  background: #fff;
  border: 2px solid #e7dbc2;
  border-radius: 999px;
  padding: 5px 5px 5px 18px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.aow-zoek__veld:focus-within {
  border-color: var(--brand, #b21010);
  box-shadow: 0 0 0 4px rgba(var(--brand-rgb,178,16,16), .12);
}
.aow-zoek__icoon {
  flex: 0 0 auto; width: 20px; height: 20px;
  fill: none; stroke: #8a7f6c; stroke-width: 2.2; stroke-linecap: round;
}
.aow-zoek input[type="search"] {
  flex: 1 1 auto; min-width: 0;
  margin: 0; padding: 12px 12px;
  border: 0 !important; outline: 0; background: transparent !important; box-shadow: none !important;
  font: inherit; font-size: 17px; color: #222;
  -webkit-appearance: none; appearance: none;
}
.aow-zoek input[type="search"]::placeholder { color: #9a917f; }
.aow-zoek input[type="search"]::-webkit-search-cancel-button { cursor: pointer; }
.aow-zoek__knop {
  flex: 0 0 auto;
  padding: 12px 22px;
  border: 0; border-radius: 999px;
  background: var(--brand, #b21010); color: #fff;
  font: inherit; font-size: 16px; font-weight: 700; line-height: 1.2;
  cursor: pointer; transition: background .15s ease;
}
.aow-zoek__knop:hover, .aow-zoek__knop:focus-visible { background: var(--brand-hover, #8e0d0d); }

/* Live suggesties */
.aow-zoek__suggesties {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 50;
  list-style: none; margin: 0; padding: 6px;
  background: #fff; border: 1px solid #e7dbc2; border-radius: 14px;
  box-shadow: 0 18px 40px -16px rgba(40, 20, 0, .35);
  text-align: left;
}
.aow-zoek__suggesties[hidden] { display: none; }
.aow-zoek__suggesties li { margin: 0; }
.aow-zoek__suggesties a {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 10px 12px; border-radius: 9px;
  color: #222 !important; text-decoration: none !important;
  font-size: 16px; line-height: 1.35;
}
.aow-zoek__suggesties li.is-active a,
.aow-zoek__suggesties a:hover { background: #fbf8f2; }
.aow-zoek__suggesties mark { background: none; color: var(--brand, #b21010); font-weight: 700; padding: 0; }
.aow-zoek__s-type {
  flex: 0 0 auto; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: #8a7f6c;
}
.aow-zoek__alle { border-top: 1px solid #f0e8d8; margin-top: 4px !important; padding-top: 4px; }
.aow-zoek__alle a { color: var(--brand, #b21010) !important; font-weight: 600; font-size: 15px; }

/* Snelknoppen */
.aow-zoek-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.aow-zoek-chips__label { font-size: 14px; font-weight: 600; margin-right: 2px; }
.aow-zoek-chip {
  display: inline-block; padding: 6px 14px;
  border-radius: 999px; border: 1px solid #e7dbc2; background: #fff;
  color: #443c32 !important; text-decoration: none !important;
  font-size: 14px; font-weight: 600; line-height: 1.3;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.aow-zoek-chip:hover, .aow-zoek-chip:focus-visible {
  border-color: var(--brand, #b21010); color: var(--brand, #b21010) !important;
}

/* ---------- 1) Hero op de homepage ---------- */
.home .page-hero {
  position: relative; z-index: 5;
  overflow: visible;                 /* suggesties mogen buiten de hero vallen */
  display: flex; align-items: center; justify-content: center;
  min-height: 360px;
  padding: 48px 24px 56px !important;
}
.home .page-hero .inside-page-hero { position: relative; z-index: 1; width: 100%; padding: 0 !important; }
.home .page-hero .inside-page-hero > p:empty,
.home .page-hero .inside-page-hero br { display: none; }

.aow-zoek-hero { position: relative; isolation: isolate; text-align: center; }
.aow-zoek-hero__inhoud { position: relative; max-width: 680px; margin: 0 auto; }
.aow-zoek-hero__titel {
  margin: 0 0 16px !important;
  font-size: clamp(24px, 1.8vw + 14px, 36px); font-weight: 700; line-height: 1.15;
}
.aow-zoek--hero input[type="search"] { font-size: 18px; padding: 14px 12px; }
.aow-zoek-hero .aow-zoek-chips { justify-content: center; }

/* 1a) Lichte variant (zonder foto) */
.aow-zoek-hero:not(.aow-zoek-hero--foto) .aow-zoek-hero__inhoud::before {
  content: ""; position: absolute; z-index: -1;
  inset: -40px -90px -36px;
  background: radial-gradient(closest-side, rgba(255,255,255,.96) 62%, rgba(255,255,255,0) 100%);
  pointer-events: none;
}
.aow-zoek-hero:not(.aow-zoek-hero--foto) .aow-zoek-hero__titel { color: var(--text, #222); }
.aow-zoek-hero:not(.aow-zoek-hero--foto) .aow-zoek__veld { border-color: #e7dbc2; box-shadow: 0 12px 30px -14px rgba(60,30,0,.35); }
.aow-zoek-hero:not(.aow-zoek-hero--foto) .aow-zoek-chips__label { color: #5b5246; }
.aow-zoek-hero:not(.aow-zoek-hero--foto) .aow-zoek-chip { background: #fff; border: 1px solid #e7dbc2; box-shadow: 0 2px 6px -3px rgba(60,30,0,.25); }

/* 1b) Fotovariant: de hero-component vult zelf het hele vlak */
.home .page-hero:has(.aow-zoek-hero--foto) {
  padding: 0 !important; min-height: 0;
  background-image: none !important; background-color: transparent !important;
}
.aow-zoek-hero--foto {
  width: 100%;
  min-height: clamp(340px, 38vw, 480px);
  display: flex; align-items: center; justify-content: center;
  padding: 56px 24px 72px;
}
.aow-zoek-hero__bg {
  position: absolute; inset: 0; z-index: -1;
  overflow: hidden; border-radius: 14px;     /* alleen de foto wordt afgerond/afgesneden, suggesties niet */
  background: #6b5a45;
}
.aow-zoek-hero__img { width: 100%; height: 100%; object-fit: cover; object-position: center 45%; display: block; }
.aow-zoek-hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at center, rgba(15,8,0,.30) 0%, rgba(15,8,0,0) 65%),
    linear-gradient(180deg, rgba(15,8,0,.10) 0%, rgba(15,8,0,.50) 100%);
}
.aow-zoek-hero--foto .aow-zoek-hero__titel { color: #fff; text-shadow: 0 2px 18px rgba(0,0,0,.5); }
.aow-zoek-hero--foto .aow-zoek__veld { border-color: transparent; box-shadow: 0 16px 40px -12px rgba(0,0,0,.5); }
.aow-zoek-hero--foto .aow-zoek-chips__label { color: #fff; text-shadow: 0 1px 8px rgba(0,0,0,.6); }
.aow-zoek-hero--foto .aow-zoek-chip { background: rgba(255,255,255,.92); border-color: transparent; }
.aow-zoek-hero--foto .aow-zoek-chip:hover { background: #fff; }
.aow-zoek-hero__plek {
  position: absolute; right: 16px; bottom: 12px; margin: 0 !important;
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 13px; font-weight: 600; color: #fff;
  text-shadow: 0 1px 6px rgba(0,0,0,.7);
}
.aow-zoek-hero__plek svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; }

/* ---------- 2) Vergrootglas in het menu + zoekscherm ---------- */
.aow-zoek-trigger-item { display: flex; align-items: stretch; }
.aow-zoek-trigger {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 56px; height: 100%; min-height: 56px; padding: 0 18px;
  background: transparent; border: 0; cursor: pointer; color: #fff;
  transition: background .15s ease;
}
.aow-zoek-trigger svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.aow-zoek-trigger:hover, .aow-zoek-trigger:focus-visible { background: rgba(0,0,0,.14); outline: none; }
/* Op mobiel staat "Zoeken" al in de mobiele header */
#mobile-header .aow-zoek-trigger-item { display: none; }

.aow-zoek-overlay {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(25, 15, 5, .55);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 10vh 16px 16px;
  opacity: 0; transition: opacity .18s ease;
}
.aow-zoek-overlay[hidden] { display: none; }
.aow-zoek-overlay.is-open { opacity: 1; }
.aow-zoek-overlay__paneel {
  position: relative; width: min(720px, 100%);
  background: #fbf8f2; border: 1px solid #e7dbc2; border-top: 4px solid var(--brand, #b21010);
  border-radius: 16px; padding: 26px 26px 22px;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.5);
  transform: translateY(-8px); transition: transform .18s ease;
}
.aow-zoek-overlay.is-open .aow-zoek-overlay__paneel { transform: none; }
.aow-zoek-overlay__titel {
  margin: 0 0 14px !important; padding-right: 40px;
  font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--brand, #b21010);
}
.aow-zoek-overlay__sluit {
  position: absolute; top: 14px; right: 14px;
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  background: #fff; border: 1px solid #e7dbc2; cursor: pointer; color: #443c32;
}
.aow-zoek-overlay__sluit svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.aow-zoek-overlay__sluit:hover { border-color: var(--brand, #b21010); color: var(--brand, #b21010); }
html.aow-zoek-open { overflow: hidden; }

/* ---------- 3) Zoekresultatenpagina ---------- */
.search .page-header { display: none; }          /* GP-kop vervangen door .aow-zoek-kop */

.aow-zoek-kop {
  margin-bottom: 24px; padding: 28px 30px;
  background: #fbf8f2; border: 1px solid #e7dbc2; border-left: 4px solid var(--brand, #b21010);
  border-radius: 14px;
}
.aow-zoek-kop__eyebrow {
  margin: 0 0 6px !important; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--brand, #b21010);
}
.aow-zoek-kop__titel { margin: 0 0 18px; font-size: clamp(24px, 1.6vw + 16px, 32px); line-height: 1.2; color: var(--text, #222); }
.aow-zoek-kop__tip { margin: 16px 0 0 !important; color: #5b5246; }

.search .site-main {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px;
}
.search .site-main > .aow-zoek-kop,
.search .site-main > .paging-navigation,
.search .site-main > .no-results,
.search .site-main > nav { grid-column: 1 / -1; }
.search .site-main > article { margin: 0 !important; }
.search .site-main > .no-results { display: none; }   /* eigen melding staat in de kop */

.search article .inside-article {
  height: 100%; padding: 0 !important; overflow: hidden;
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid #e7dbc2; border-radius: 14px;
  transition: box-shadow .2s ease, transform .2s ease;
}
.search article .inside-article:hover { box-shadow: 0 14px 34px -18px rgba(40,20,0,.45); transform: translateY(-2px); }
.search article .post-image { margin: 0 !important; order: -1; line-height: 0; }
.search article .post-image img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.search article .entry-header,
.search article .entry-summary { padding: 0 20px; }
.search article .entry-header { padding-top: 18px; }
.search article .entry-title { font-size: 20px !important; line-height: 1.3; margin: 0 0 8px; }
.search article .entry-title a { color: var(--text, #222); text-decoration: none; }
.search article .entry-title a:hover { color: var(--brand, #b21010); }
.search article .entry-summary { font-size: 16px; line-height: 1.6; color: #5b5246; padding-bottom: 20px; }
.search article .entry-summary p { margin: 0; font-size: inherit; }
.search article .entry-meta,
.search article footer.entry-meta { display: none; }

@media (max-width: 768px) {
  .home .page-hero { min-height: 0; padding: 28px 16px 36px !important; }
  .aow-zoek-hero:not(.aow-zoek-hero--foto) .aow-zoek-hero__inhoud::before { inset: -24px -16px -20px; }
  .aow-zoek-hero--foto { min-height: 320px; padding: 36px 16px 52px; }
  .aow-zoek-hero__bg { border-radius: 10px; }
  .aow-zoek-hero__plek { right: 12px; bottom: 10px; font-size: 12px; }
  .aow-zoek__knop { padding: 12px 16px; }
  .aow-zoek input[type="search"] { font-size: 16px; }   /* 16px voorkomt inzoomen op iOS */
  .aow-zoek--hero .aow-zoek__knop { display: none; }   /* toetsenbord heeft een zoekknop */
  .aow-zoek-chips__label { display: none; }
  .aow-zoek-kop { padding: 20px 18px; }
  .search .site-main { grid-template-columns: 1fr; gap: 16px; }
  .aow-zoek-overlay { padding-top: 12px; }
  .aow-zoek-overlay__paneel { padding: 22px 16px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .aow-zoek-overlay, .aow-zoek-overlay__paneel, .search article .inside-article { transition: none; }
}

/* GP's eigen navigatie-zoekfunctie uitschakelen: het vergrootglas van het thema vervangt die */
.main-navigation .menu-bar-item.search-item,
.main-navigation .navigation-search,
#sticky-navigation .menu-bar-item.search-item,
#sticky-navigation .navigation-search { display: none !important; }
.main-navigation.nav-search-active .main-nav,
.main-navigation .main-nav ul li a { opacity: 1 !important; }

/* Floats-opbouw (oudere GP-installaties): vergrootglas rechts in de balk */
.main-navigation .aow-zoek-trigger-item--float { float: right; display: block; position: relative; z-index: 2; }
.main-navigation .aow-zoek-trigger-item--float .aow-zoek-trigger { height: 60px; min-height: 60px; }
#mobile-header .aow-zoek-trigger-item--float,
.main-navigation.toggled .aow-zoek-trigger-item--float { display: none; }
@media (max-width: 1024px) {
  .main-navigation .aow-zoek-trigger-item--float .aow-zoek-trigger { height: 56px; min-height: 56px; }
}
/* In de sticky balk is .inside-navigation flex: daar naar rechts schuiven via order/margin */
.main-navigation .inside-navigation > .aow-zoek-trigger-item--float { order: 99; margin-left: auto; }
