/* =========================================================
   Weverij Museum Menu - front-end styles
   All selectors are namespaced with .wvm- / wrapped inside
   .wvm-menu-wrapper so this cannot clash with theme styles.
   ========================================================= */

.wvm-menu-wrapper{
  --wvm-bg: #2a2928;
  --wvm-orange: #c76a3f;
  --wvm-cream: #faf5e0;
  --wvm-cream-dark: #e6dcc0;
  --wvm-maroon: #660033;
  --wvm-blue: #8ec7e0;
  --wvm-blue-dark: #6fb0cc;
  --wvm-fg-muted: #9a9895;
  --wvm-s: 9px;
  --wvm-notch: var(--wvm-s);
  font-family: "Funnel Display", sans-serif;
  position: relative;
}

.wvm-menu-wrapper,
.wvm-menu-wrapper *{
  box-sizing: border-box;
}

.wvm-menu-wrapper a{ text-decoration: none; }
.wvm-menu-wrapper button{ font-family: inherit; cursor: pointer; border: none; }

/* ===== Navbar ===== */
.wvm-navbar{
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: nowrap;
}

/* ===== Logo ===== */
.wvm-logo{
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.wvm-logo-img{
  height: var( --wvm-logo-height, 56px ) !important;
  width: auto !important;
  max-width: none !important;
  display: block;
}

/* ===== Nav pill (pixel-notched ribbon) =====
   Two layers on purpose:
   - .wvm-nav-pill-outer is the actual flex item inside .wvm-navbar.
     Its height gets locked by JS to the pill's CLOSED height, so it
     always reports a constant size to the navbar's alignment - opening
     a dropdown can never shift the logo/right-controls, because as
     far as the navbar's flex layout is concerned this box never
     changes size.
   - .wvm-nav-pill-wrap sizes itself naturally to whatever is actually
     inside it (including an open dropdown) and is allowed to overflow
     past the outer layer's locked box - this is what lets the pill
     and its corner chips genuinely extend/grow as designed. */
.wvm-nav-pill-outer{
  flex: 0 1 auto;
  width: 48%;
  max-width: 640px;
  min-width: 280px;
  overflow: visible;
}

.wvm-nav-pill-wrap{
  position: relative;
  display: flex;
}

.wvm-chip{
  position: absolute;
  width: var(--wvm-notch);
  height: var(--wvm-notch);
  background: var(--wvm-cream);
  z-index: 0;
}
.wvm-chip-tl{ top: var(--wvm-notch); left: var(--wvm-notch); }
.wvm-chip-tr{ top: var(--wvm-notch); right: var(--wvm-notch); }
.wvm-chip-bl{ bottom: var(--wvm-notch); left: var(--wvm-notch); }
.wvm-chip-br{ bottom: var(--wvm-notch); right: var(--wvm-notch); }

.wvm-nav-pill{
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  background: var(--wvm-cream);
  padding: 28px 44px;
  clip-path: polygon(
    calc(var(--wvm-notch) * 3) 0,
    calc(100% - var(--wvm-notch) * 3) 0,
    calc(100% - var(--wvm-notch) * 3) calc(var(--wvm-notch) * 2),
    calc(100% - var(--wvm-notch) * 2) calc(var(--wvm-notch) * 2),
    calc(100% - var(--wvm-notch) * 2) calc(var(--wvm-notch) * 3),
    100% calc(var(--wvm-notch) * 3),
    100% calc(100% - var(--wvm-notch) * 3),
    calc(100% - var(--wvm-notch) * 2) calc(100% - var(--wvm-notch) * 3),
    calc(100% - var(--wvm-notch) * 2) calc(100% - var(--wvm-notch) * 2),
    calc(100% - var(--wvm-notch) * 3) calc(100% - var(--wvm-notch) * 2),
    calc(100% - var(--wvm-notch) * 3) 100%,
    calc(var(--wvm-notch) * 3) 100%,
    calc(var(--wvm-notch) * 3) calc(100% - var(--wvm-notch) * 2),
    calc(var(--wvm-notch) * 2) calc(100% - var(--wvm-notch) * 2),
    calc(var(--wvm-notch) * 2) calc(100% - var(--wvm-notch) * 3),
    0 calc(100% - var(--wvm-notch) * 3),
    0 calc(var(--wvm-notch) * 3),
    calc(var(--wvm-notch) * 2) calc(var(--wvm-notch) * 3),
    calc(var(--wvm-notch) * 2) calc(var(--wvm-notch) * 2),
    calc(var(--wvm-notch) * 3) calc(var(--wvm-notch) * 2)
  );
}

.wvm-nav-top-row{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  row-gap: 14px;
  column-gap: clamp(28px, 4vw, 56px);
  width: 100%;
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.wvm-nav-item{ position: relative; }

/* ===== Inline search (takes over the menu-item row) =====
   .wvm-nav-row-stack holds the menu row and the search row on top of
   each other so they can cross-fade in place, over the pill's own
   background, instead of the search opening as a separate floating
   box. The menu row (normal flow) is what actually gives the stack
   its height; the search row matches it exactly via inset:0, so
   toggling search never resizes or shifts the pill. */
.wvm-nav-row-stack{
  position: relative;
  width: 100%;
}

.wvm-nav-row-stack.wvm-search-active .wvm-nav-top-row{
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
}

.wvm-nav-search-row{
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.wvm-nav-row-stack.wvm-search-active .wvm-nav-search-row{
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.wvm-inline-search-icon{
  width: 20px;
  height: 20px;
  stroke: var(--wvm-maroon);
  flex-shrink: 0;
}

.wvm-inline-search-form{
  flex: 1 1 auto;
  min-width: 0;
}

.wvm-inline-search-input{
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 2px solid var(--wvm-cream-dark);
  color: var(--wvm-maroon);
  font-family: inherit;
  font-weight: 700;
  font-size: clamp(15px, 0.9vw + 11px, 17px);
  padding: 4px 2px 8px;
  transition: border-color 0.15s ease;
}
.wvm-inline-search-input::placeholder{
  color: var(--wvm-fg-muted);
  font-weight: 400;
}
.wvm-inline-search-input:focus-visible{
  outline: none;
  border-bottom-color: var(--wvm-maroon);
}

.wvm-inline-search-close{
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  background: transparent;
  opacity: 0.7;
  transition: opacity 0.15s ease;
}
.wvm-inline-search-close svg{
  width: 16px;
  height: 16px;
  stroke: var(--wvm-maroon);
}
.wvm-inline-search-close:hover,
.wvm-inline-search-close:focus-visible{
  opacity: 1;
}

/* ===== Dropdown submenu =====
   In normal flow inside .wvm-nav-pill on purpose: opening it makes the
   pill's own box (and its clip-path notches) genuinely grow taller,
   which is the extending look the design calls for. See .wvm-navbar
   below for how the rest of the header avoids shifting when this
   happens. */
.wvm-submenu-panel{
  display: flex;
  flex-direction: column;
  align-self: flex-start;
  gap: 14px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  margin-top: 0;
  transition: max-height 0.3s ease, opacity 0.22s ease, margin-top 0.3s ease;
}

.wvm-submenu-panel.wvm-open{
  max-height: 320px;
  opacity: 1;
  margin-top: 26px;
}

.wvm-submenu-link{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  color: var(--wvm-maroon);
  font-weight: 400;
  font-size: 16px;
}

.wvm-submenu-link .wvm-arrow{
  display: inline-flex;
  align-items: center;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.wvm-arrow img{
  display: block;
  width: 14px;
  height: auto;
}

.wvm-submenu-link:hover,
.wvm-submenu-link:focus-visible{
  font-weight: 700;
  text-decoration: underline;
}

.wvm-submenu-link:hover .wvm-arrow,
.wvm-submenu-link:focus-visible .wvm-arrow{
  opacity: 1;
  transform: translateX(0);
}

.wvm-nav-link{
  color: var(--wvm-maroon);
  font-weight: 700;
  font-size: clamp(15px, 0.9vw + 11px, 17px);
  letter-spacing: 0.3px;
  position: relative;
  padding: 4px 2px;
  white-space: nowrap;
}

.wvm-nav-link::after{
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -3px;
  height: 3px;
  background: var(--wvm-maroon);
  transition: right 0.18s steps(4);
}

.wvm-nav-link:hover::after,
.wvm-nav-link:focus-visible::after{
  right: 0;
}

.wvm-nav-link:focus-visible{
  outline: 2px dashed var(--wvm-maroon);
  outline-offset: 4px;
}

/* ===== Right controls ===== */
.wvm-right-controls{
  display: flex;
  align-items: center;
  gap: 18px;
  flex-shrink: 0;
}

/* ---- Search ---- */
.wvm-search-wrap{
  position: relative;
}

.wvm-search-toggle{
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: transparent;
  color: var(--wvm-cream);
  opacity: 0.9;
  transition: opacity 0.15s ease;
}
.wvm-search-toggle svg{
  width: 19px;
  height: 19px;
  stroke: var(--wvm-cream);
}
.wvm-search-toggle:hover,
.wvm-search-toggle:focus-visible,
.wvm-search-toggle.wvm-active{
  opacity: 1;
}

/* Plain square dropdown - no notched/pixel-card styling here. */
.wvm-lang-panel{
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 50;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}
.wvm-lang-panel.wvm-open{
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.wvm-lang-panel-inner{
  background: var(--wvm-cream);
  border: 1px solid var(--wvm-cream-dark);
  box-shadow: 0 10px 24px rgba(0,0,0,0.28);
}

/* ---- Language selector (dropdown) ---- */
.wvm-lang-wrap{
  position: relative;
}

.wvm-lang-selector{
  display: flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  color: var(--wvm-cream);
  font-weight: 700;
  font-size: 14px;
}

.wvm-lang-selector svg{
  width: 18px;
  height: 18px;
  stroke: var(--wvm-cream);
}

.wvm-lang-chevron{
  width: 12px !important;
  height: 12px !important;
  margin-left: 1px;
  transition: transform 0.2s ease;
}
.wvm-lang-selector[aria-expanded="true"] .wvm-lang-chevron{
  transform: rotate(180deg);
}

.wvm-lang-selector:hover,
.wvm-lang-selector:focus-visible{
  opacity: 0.85;
}

.wvm-lang-panel-inner{
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 168px;
  padding: 14px 16px;
}

.wvm-lang-dropdown-option{
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  color: var(--wvm-maroon);
  font-weight: 400;
  font-size: 14px;
  padding: 8px 4px;
}
.wvm-lang-dropdown-option:hover,
.wvm-lang-dropdown-option:focus-visible{
  text-decoration: underline;
}
.wvm-lang-dropdown-option.wvm-active{
  font-weight: 700;
}

.wvm-contact-btn{
  display: inline-block;
  background: var(--wvm-blue);
  color: var(--wvm-maroon);
  font-weight: 700;
  font-size: 15px;
  padding: 14px 26px;
  letter-spacing: 0.3px;
  transition: background 0.15s ease, transform 0.1s ease;
}

.wvm-contact-btn:hover,
.wvm-contact-btn:focus-visible{
  background: var(--wvm-blue-dark);
  transform: translateY(-1px);
}

.wvm-contact-btn:active{
  transform: translateY(0);
}

/* ===== Mobile ===== */
.wvm-menu-toggle{
  display: none;
  width: 52px;
  height: 52px;
  padding: 0;
  background: var(--wvm-blue);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-shrink: 0;
  position: relative;
  z-index: 201;
}

.wvm-menu-toggle .wvm-bar{
  width: 24px;
  height: 3px;
  background: var(--wvm-maroon);
  transition: transform 0.2s ease, opacity 0.15s ease;
}

.wvm-menu-toggle.wvm-open .wvm-bar:nth-child(1){ transform: translateY(9px) rotate(45deg); }
.wvm-menu-toggle.wvm-open .wvm-bar:nth-child(2){ opacity: 0; }
.wvm-menu-toggle.wvm-open .wvm-bar:nth-child(3){ transform: translateY(-9px) rotate(-45deg); }

/* While the mobile overlay is open, pin the close ("X") button to a fixed
   spot in the viewport corner. Left in normal flow it can end up sitting
   at whatever scroll position the page was at, drifting over the menu
   list - fixed positioning guarantees it always sits clear of the list
   (which itself starts 96px from the top, see .wvm-mobile-panel). */
.wvm-menu-toggle.wvm-open{
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 210;
}

@media (max-width: 1024px){
  .wvm-navbar{
    position: relative;
    flex-wrap: nowrap;
  }
  .wvm-right-controls{ display: none; }
  .wvm-nav-pill-outer{ display: none; }
  .wvm-logo{ min-width: 0; }
  .wvm-menu-toggle{ display: flex; margin-left: auto !important; }
  .wvm-logo-img{ height: var( --wvm-mobile-logo-height, 28px ) !important; }
}

/* ===== Mobile full-screen menu overlay ===== */
.wvm-mobile-overlay{
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: #faf5e0;
  border: 10px solid #8cc8e6;
  z-index: 200;
  overflow: hidden;
}
.wvm-mobile-overlay.wvm-open{ display: block; }
@media (min-width: 1025px){
  .wvm-mobile-overlay{ display: none !important; }
}

.wvm-mobile-panel{
  position: absolute;
  top: 96px;
  left: 20px;
  right: 20px;
  bottom: 96px;
  z-index: 2;
  padding: 30px 24px 26px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.wvm-mobile-panel::-webkit-scrollbar{
  display: none;
}

.wvm-accordion-item{
  border-bottom: 1px solid var(--wvm-maroon);
  padding: 16px 0;
}
.wvm-accordion-item:first-child{ padding-top: 0; }

.wvm-accordion-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  color: var(--wvm-maroon);
  font-weight: 700;
  font-size: 18px;
  padding: 4px 0;
  text-align: left;
}

.wvm-accordion-header .wvm-chevron{
  width: 16px;
  height: 16px;
  stroke: var(--wvm-maroon);
  stroke-width: 2.5;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}
.wvm-accordion-item.wvm-open .wvm-chevron{ transform: rotate(180deg); }

.wvm-accordion-body{
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 0;
  transition: max-height 0.3s ease, opacity 0.22s ease, margin-top 0.3s ease;
}
.wvm-accordion-item.wvm-open .wvm-accordion-body{
  max-height: 400px;
  opacity: 1;
  margin-top: 14px;
}

.wvm-mobile-sub-link{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  color: var(--wvm-maroon);
  font-size: 15px;
  font-weight: 400;
}
.wvm-mobile-sub-link .wvm-arrow{
  display: inline-flex;
  align-items: center;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.wvm-mobile-sub-link:hover, .wvm-mobile-sub-link:focus-visible, .wvm-mobile-sub-link.wvm-active{
  font-weight: 700;
  text-decoration: underline;
}
.wvm-mobile-sub-link:hover .wvm-arrow, .wvm-mobile-sub-link:focus-visible .wvm-arrow, .wvm-mobile-sub-link.wvm-active .wvm-arrow{
  opacity: 1;
  transform: translateX(0);
}

.wvm-lang-label{
  display: flex;
  align-items: center;
  gap: 8px;
}
.wvm-lang-label svg{ width: 18px; height: 18px; stroke: var(--wvm-maroon); stroke-width: 2; }

.wvm-mobile-contact-btn{
  display: block;
  width: fit-content;
  margin: 28px auto 4px;
  background: var(--wvm-blue);
  color: var(--wvm-maroon);
  font-weight: 700;
  font-size: 15px;
  padding: 16px 42px;
  letter-spacing: 0.3px;
}
