/* Gedeeld menu van alle publieke pagina's. Markup: theabbey/partials/menu.html.
   Alle klassen beginnen met am- zodat ze niet botsen met de css van een pagina. */
html { scroll-padding-top: 96px; }

header.am {
  position: sticky; top: 0; z-index: 20;
  display: block; padding: 0; margin: 0;
  background: #15100a;
  border-bottom: 1px solid rgba(237, 230, 220, .2);
  -webkit-backdrop-filter: none; backdrop-filter: none;
  font-family: "Source Serif 4", Georgia, serif;
  letter-spacing: normal;
}
.am *, .am *::before, .am *::after { box-sizing: border-box; }
.am a { text-decoration: none; }
/* Klikken in het menu selecteert geen tekst. */
.am { -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
.am ::selection { background: transparent; color: inherit; }
.am :focus-visible { outline: 2px solid #e9c07a; outline-offset: 3px; }

.am-balk {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 8px clamp(20px, 3.6vw, 64px);
}
.am-logo, header.am img.am-logo { display: block; height: 68px; width: auto; }
.am-links { display: flex; align-items: center; gap: clamp(18px, 2.2vw, 40px); margin: 0 auto 0 clamp(16px, 2.4vw, 44px); }
.am-links a, .am-keuze {
  font-family: "Source Serif 4", Georgia, serif; font-size: 16px; font-weight: 600; line-height: 1.2;
  letter-spacing: normal; color: #ede6dc; opacity: 1; text-transform: none; white-space: nowrap;
}
.am-links > a:hover, .am-keuze:hover { color: #e9c07a; }
.am-groep { position: relative; }
.am-keuze {
  display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 8px 0;
  background: none; border: 0; cursor: pointer;
}
.am-keuze svg { width: 10px; height: 10px; transition: transform .2s ease; }
.am-groep:hover .am-keuze svg, .am-groep:focus-within .am-keuze svg { transform: rotate(180deg); }
.am-paneel {
  position: absolute; top: 100%; left: -18px; min-width: 240px; padding: 10px;
  background: #1a140c; border: 1px solid rgba(237, 230, 220, .2); border-radius: 8px;
  visibility: hidden; opacity: 0; transform: translateY(4px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
}
.am-groep:hover .am-paneel, .am-groep:focus-within .am-paneel { visibility: visible; opacity: 1; transform: none; }
.am-paneel a { display: block; padding: 9px 10px; border-radius: 5px; }
.am-paneel a:hover { background: rgba(233, 192, 122, .14); color: #e9c07a; }

.am-acties { display: flex; gap: 14px; align-items: center; }
.am-knop {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 12px 20px; border: 1px solid #e9c07a; border-radius: 8px;
  background: #e9c07a; color: #1c1917;
  font-family: "Source Serif 4", Georgia, serif; font-size: 16px; font-weight: 600; line-height: 1.2;
  letter-spacing: normal; text-transform: none; white-space: nowrap;
  transition: background .2s ease, border-color .2s ease;
}
.am-knop:hover { background: #f3d39b; border-color: #f3d39b; color: #1c1917; }
.am-knop.am-lijn { background: transparent; border-color: rgba(237, 230, 220, .75); color: #ede6dc; }
.am-knop.am-lijn:hover { background: rgba(237, 230, 220, .12); border-color: #ede6dc; color: #ede6dc; }
.am-knop svg { width: 18px; height: 18px; flex: none; }

.am-burger {
  display: none; flex-direction: column; justify-content: center; align-items: center;
  gap: 5px; width: 40px; height: 40px; padding: 8px; background: none; border: 0; cursor: pointer;
}
.am-burger span { display: block; width: 22px; height: 2px; background: #ede6dc; transition: transform .3s, opacity .2s; }
.am-open .am-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.am-open .am-burger span:nth-child(2) { opacity: 0; }
.am-open .am-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobiel menu: volledig scherm met uitklapbare rubrieken. Markup in partials/menu.html. */
.am-mobiel {
  display: none; position: fixed; inset: 0; z-index: 1; overflow-y: auto; overscroll-behavior: contain;
  padding: 90px 22px 28px;
  background:
    linear-gradient(90deg, rgba(12, 9, 5, .86), rgba(12, 9, 5, .5) 58%, rgba(12, 9, 5, 0)),
    linear-gradient(0deg, #0c0905 12%, rgba(12, 9, 5, 0) 72%),
    #0c0905 url("menu/venster.jpg?v=1") right top / cover no-repeat;
}
.am-m-binnen { display: block; max-width: 520px; margin-inline: auto; }
.am-mobiel p.am-m-titel {
  display: flex; align-items: center; gap: 18px; margin: 0 0 14px; padding: 0;
  font-size: 14px; font-weight: 600; line-height: 1.2; letter-spacing: .16em; text-transform: uppercase; color: #ede6dc; opacity: 1;
}
.am-m-titel::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, #e9c07a, rgba(233, 192, 122, 0)); }
.am-m-rubriek {
  border: 1px solid rgba(233, 192, 122, .24); border-radius: 10px; background: rgba(24, 17, 10, .68); overflow: hidden;
}
.am-m-rubriek + .am-m-rubriek { margin-top: 10px; }
.am-m-rubriek.am-m-open { box-shadow: inset 3px 0 0 #e9c07a; }
.am-mobiel button.am-m-kop {
  display: flex; align-items: center; gap: 16px; width: 100%; min-height: 56px; margin: 0; padding: 12px 16px 12px 20px;
  border: 0; border-radius: 0; background: none; color: #f7efe2; cursor: pointer; text-align: left;
  font-family: "Source Serif 4", Georgia, serif; font-size: 21px; font-weight: 600; line-height: 1.2; letter-spacing: normal; text-transform: none;
}
.am-m-ico { flex: none; width: 26px; height: 26px; color: #e9c07a; }
.am-m-pijl { flex: none; width: 22px; height: 22px; margin-left: auto; color: #ede6dc; transition: transform .2s ease; }
.am-m-open .am-m-pijl { color: #e9c07a; transform: rotate(180deg); }
.am-mobiel a.am-m-los {
  display: flex; align-items: center; gap: 16px; min-height: 56px; margin-top: 10px; padding: 12px 16px 12px 20px;
  border: 1px solid rgba(233, 192, 122, .24); border-radius: 10px; background: rgba(24, 17, 10, .68); color: #f7efe2;
  font-size: 21px; font-weight: 600; line-height: 1.2;
}
.am-mobiel a.am-m-los:hover { color: #e9c07a; }
.am-m-lijst { display: grid; grid-template-rows: 0fr; visibility: hidden; transition: grid-template-rows .22s ease, visibility .22s; }
.am-m-open .am-m-lijst { grid-template-rows: 1fr; visibility: visible; }
.am-m-lijst > div { min-height: 0; overflow: hidden; padding-inline: 62px 26px; }
.am-mobiel .am-m-lijst a {
  display: block; padding: 12px 0; border-bottom: 1px solid rgba(237, 230, 220, .14);
  font-size: 17px; font-weight: 400; line-height: 1.25; color: #ede6dc;
}
.am-mobiel .am-m-lijst a:last-child { margin-bottom: 8px; border-bottom: 0; }
.am-mobiel .am-m-lijst a:hover { color: #e9c07a; }
.am-mobiel a.am-m-cta {
  display: block; margin-top: 24px; padding: 16px 20px; border-radius: 8px;
  background: linear-gradient(180deg, #f3cf8c, #e3ac55); color: #1c1917;
  font-size: 19px; font-weight: 700; line-height: 1.2; text-align: center;
}
.am-m-onder { display: flex; align-items: center; justify-content: center; margin-top: 18px; }
.am-mobiel .am-m-onder a {
  position: relative; padding: 6px 2px; color: #ede6dc; font-size: 16px; line-height: 1.25;
  text-decoration: underline; text-decoration-color: #e9c07a; text-underline-offset: 5px;
}
.am-mobiel .am-m-onder a + a { margin-left: 36px; }
.am-m-onder a + a::before { content: ""; position: absolute; top: 6px; left: -19px; width: 1px; height: 20px; background: rgba(237, 230, 220, .25); }
/* Laadlijn en gekozen link terwijl de volgende pagina laadt. */
.am-mobiel .am-m-lijst a.am-m-gekozen, .am-mobiel .am-m-onder a.am-m-gekozen, .am-mobiel a.am-m-los.am-m-gekozen { color: #e9c07a; }
.am-laden .am-balk::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 2px;
  background: #e9c07a; transform-origin: left; animation: am-laden 1.1s ease-in-out infinite;
}
@keyframes am-laden {
  0% { transform: translateX(-100%) scaleX(.4); }
  100% { transform: translateX(100%) scaleX(.4); }
}
@media (prefers-reduced-motion: reduce) { .am-laden .am-balk::after { animation: none; } }
/* Responsive: ankerlinks springen meteen, zonder scrollanimatie. */
@media (max-width: 1280px) { html { scroll-behavior: auto !important; } }
@media (max-width: 360px) {
  .am-mobiel { padding-inline: 14px; }
  .am-mobiel button.am-m-kop { gap: 12px; padding-inline: 14px 12px; font-size: 18px; }
  .am-mobiel a.am-m-los { gap: 12px; padding-inline: 14px 12px; font-size: 18px; }
  .am-m-lijst > div { padding-inline: 52px 18px; }
}
@media (prefers-reduced-motion: reduce) { .am-m-lijst, .am-m-pijl { transition: none; } }

@media (max-width: 1500px) {
  .am-balk { gap: 16px; padding-inline: 28px; }
  .am-links { gap: 20px; }
  .am-links a, .am-keuze { font-size: 15px; }
  .am-acties { gap: 10px; }
  .am-acties .am-knop { padding: 10px 13px; font-size: 15px; gap: 7px; }
}
@media (max-width: 1280px) {
  .am-links, .am-acties { display: none; }
  .am-burger { display: flex; }
  .am-open .am-mobiel { display: block; }
  .am-open .am-balk { position: relative; z-index: 2; background: linear-gradient(180deg, #0c0905 86%, rgba(12, 9, 5, 0)); }
  header.am.am-open, .am-over-beeld header.am.am-open { background: none; border-bottom-color: transparent; }
  .am-balk { padding-inline: 20px; }
  .am-logo, header.am img.am-logo { height: 62px; }
}

/* Community login: alleen het icoon, even hoog als de knop ernaast. */
.am-acties .am-knop.am-icoon { align-self: stretch; width: 46px; padding: 0; }
.am-knop.am-icoon svg { width: 20px; height: 20px; }
@media (max-width: 1500px) { .am-acties .am-knop.am-icoon { width: 40px; } }

/* Homepage: het menu ligt over het beeld tot je scrolt. */
.am-over-beeld header.am {
  position: fixed; inset: 0 0 auto;
  background: linear-gradient(180deg, rgba(12, 9, 5, .62), rgba(12, 9, 5, 0));
  border-bottom-color: transparent;
}
.am-over-beeld header.am.am-vast {
  background: rgba(18, 13, 8, .94);
  border-bottom-color: rgba(237, 230, 220, .2);
}
