/**
 * Header styles, Vestelli design: a white box with the logo on the left, the see-through navy bar on the right.
 * Markup: blocks/site-header/render.php, the menus: inc/menu-walker.php, scripts: assets/js/{mobile-menu,header-search,
 * header-scroll}.js. The breakpoint rules (desktop / compact header) and --ab-header-h are printed inline by
 * an_header_responsive_css() (inc/header.php); this file holds everything that does not depend on the breakpoint.
 *
 * Desktop (90px, scrolls with the page): the main menu (14px; the links fill the bar's height, the cyan fill on hover
 * comes from site.css), a chevron button beside the items that have a panel, then the search button,
 * the language button ("FI" + chevron, opens a short list of links) and the white contact button (44px).
 * Compact (fixed, 72px): the logo, the search button, the contact button and the menu button; the menu opens as a navy
 * panel from the right (rows of at least 48px, 44 x 44 chevron buttons, the languages and the contact button at its end).
 * Sizes after the Avalon standard (2026-10-08); the colours, the fonts and the logo stay Vestelli's.
 *
 * Cascade note: site.css (loaded after this file) gives every <button> an accent background, 6px 12px padding and an
 * #00aee8 hover through :where() rules; every button here sets its padding and a transparent background itself,
 * also for :hover, :focus and [aria-expanded="true"].
 *
 * @package Vestelli
 */

/* ---------------------------------------------------------------- the bar */

.vestelli-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  width: 100%;
  padding: 0;
  font-family: 'Oxygen', 'Helvetica Neue', Arial, sans-serif;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease-in-out;
}

.admin-bar .vestelli-header {
  top: var(--wp-admin--admin-bar--height, 32px);
}

/* hidden while scrolling down (compact header only, assets/js/header-scroll.js); no transform otherwise, so that the
   fixed menu panel inside the header is placed in the window */
.vestelli-header.header-hidden {
  transform: translateY(-100%);
}

/* the white box behind the logo and the see-through navy right of it, both to the window's edges (under the content:
   the header is a stacking context of its own) */
.vestelli-header::before,
.vestelli-header::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: -1;
  pointer-events: none;
}

.vestelli-header::before {
  left: 0;
  width: max(12.5%, calc(50% - 540px));
  background: #fff;
}

.vestelli-header::after {
  right: 0;
  left: max(12.5%, calc(50% - 540px));
  margin-left: -1px; /* overlap: no subpixel seam */
  background: rgba(var(--va-brand-rgb), 0.9);
}

.vestelli-header-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0;
}

.vestelli-header-inner {
  display: flex;
  align-items: stretch;
  width: 100%;
  min-height: var(--ab-header-h, 90px);
}

/* prevent a horizontal scroll from the header's full-width layers */
body.header-design-vestelli {
  overflow-x: hidden;
}

/* ---------------------------------------------------------------- logo (the white box) */

.vestelli-header-logo-section {
  display: flex;
  flex: 0 0 12.5%;
  align-items: center;
  justify-content: flex-start;
  box-sizing: border-box;
  min-width: 160px;
  max-width: 172px;
  padding: 12px 12px 12px 8px;
}

.vestelli-logo-link {
  display: flex;
  align-items: center;
  min-height: 44px;
  color: inherit;
  text-decoration: none;
}

.vestelli-logo-link:focus-visible {
  outline: 2px solid var(--va-brand-color);
  outline-offset: 2px;
}

.vestelli-custom-logo {
  display: block;
  width: auto;
  height: auto;
  max-height: 48px;
}

.vestelli-logo-text {
  font-family: 'Cormorant Garamond', 'Georgia', serif;
  font-size: 28px;
  font-style: italic;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: var(--va-brand-color);
}

/* ---------------------------------------------------------------- the navy side: menu and controls */

.vestelli-header-nav-section {
  display: flex;
  flex: 1 1 auto;
  align-items: stretch;
  min-width: 0;
  padding: 0 32px 0 24px;
}

.vestelli-header-main-row {
  display: flex;
  align-items: stretch;
  flex-wrap: nowrap;
  gap: 16px;
  width: 100%;
  min-width: 0;
}

.vestelli-header-extras {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

/* the plain icon and text controls: no box, no background; 44px hit areas; hover = colour; focus = accent outline */
.vestelli-header .vestelli-search-toggle,
.vestelli-header .vestelli-lang-toggle,
.vestelli-header .mobile-menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-sizing: border-box;
  min-width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: rgba(255, 255, 255, 0.88);
  font-family: inherit;
  line-height: 1;
  text-shadow: none;
  cursor: pointer;
  transition: color 0.2s ease;
}

.vestelli-header .vestelli-search-toggle:hover,
.vestelli-header .vestelli-search-toggle:focus,
.vestelli-header .vestelli-search-toggle:active,
.vestelli-header .vestelli-search-toggle[aria-expanded="true"],
.vestelli-header .vestelli-lang-toggle:hover,
.vestelli-header .vestelli-lang-toggle:focus,
.vestelli-header .vestelli-lang-toggle:active,
.vestelli-header .vestelli-lang-toggle[aria-expanded="true"],
.vestelli-header .mobile-menu-toggle:hover,
.vestelli-header .mobile-menu-toggle:focus,
.vestelli-header .mobile-menu-toggle:active,
.vestelli-header .mobile-menu-toggle[aria-expanded="true"] {
  background: transparent;
  box-shadow: none;
  color: #fff;
}

/* hover (and the open language list): the accent colour, nothing else */
.vestelli-header .vestelli-search-toggle:hover,
.vestelli-header .vestelli-lang-toggle:hover,
.vestelli-header .vestelli-lang-toggle[aria-expanded="true"],
.vestelli-header .mobile-menu-toggle:hover {
  color: var(--va-accent-color);
}

.vestelli-header .vestelli-search-toggle:focus-visible,
.vestelli-header .vestelli-lang-toggle:focus-visible,
.vestelli-header .mobile-menu-toggle:focus-visible {
  outline: 2px solid var(--va-accent-color);
  outline-offset: 2px;
}

.vestelli-header .vestelli-search-toggle {
  width: 44px;
}

.vestelli-search-toggle svg {
  display: block;
  flex: none;
  width: 20px;
  height: 20px;
}

/* ---------------------------------------------------------------- the language menu: "FI" + chevron, a list of links */

.vestelli-language-switcher {
  position: relative;
  flex-shrink: 0;
}

.vestelli-header .vestelli-lang-toggle {
  gap: 6px;
  padding: 0 6px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.vestelli-lang-toggle .va-chevron {
  flex: none;
  transition: transform 0.2s ease;
}

.vestelli-lang-toggle[aria-expanded="true"] .va-chevron {
  transform: rotate(180deg);
}

/* the list hangs from the header's lower edge, like the menu panels */
.vestelli-lang-list {
  position: absolute;
  top: calc(100% + (var(--ab-header-h, 90px) - 44px) / 2);
  right: 0;
  z-index: 3;
  box-sizing: border-box;
  min-width: 180px;
  margin: 0;
  padding: 8px 0;
  list-style: none;
  background-color: rgba(var(--va-brand-rgb), 0.98);
  border-top: 2px solid rgba(var(--va-accent-rgb), 0.25);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.vestelli-lang-list[hidden] {
  display: none;
}

.vestelli-lang-list li {
  margin: 0;
}

.vestelli-lang-list a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  color: rgba(255, 255, 255, 0.95);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.3;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.vestelli-lang-list a:hover,
.vestelli-lang-list a:focus {
  background-color: rgba(255, 255, 255, 0.08);
  color: #fff;
  text-decoration: none;
}

.vestelli-lang-list a[aria-current] {
  font-weight: 700;
  box-shadow: inset 3px 0 0 var(--va-accent-color);
}

.vestelli-lang-list a:focus-visible {
  outline: 2px solid var(--va-accent-color);
  outline-offset: -2px;
}

/* ---------------------------------------------------------------- the contact button (white) */

.vestelli-cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-sizing: border-box;
  height: 44px;
  margin-left: 8px;
  padding: 0 22px;
  border: 0;
  border-radius: 0;
  background-color: #fff;
  color: var(--va-brand-color);
  font-family: 'Oxygen', 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.5px;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background-color 0.3s ease;
}

.vestelli-cta-button span {
  display: inline-block;
  transition: transform 0.3s ease;
}

/* the arrow that slides in on hover (Vestelli) */
.vestelli-cta-button::after {
  content: '\203A';
  display: inline-block;
  width: 14px;
  margin-left: 2px;
  margin-right: -16px;
  font-size: 18px;
  line-height: 12px;
  opacity: 0;
  transform: translate(-8px, -1px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.vestelli-cta-button:hover,
.vestelli-cta-button:focus {
  background-color: rgba(255, 255, 255, 0.88);
  color: var(--va-brand-color);
  text-decoration: none !important;
}

.vestelli-cta-button:hover span {
  transform: translateX(-8px);
}

.vestelli-cta-button:hover::after {
  opacity: 1;
  transform: translate(0, -1px);
}

.vestelli-cta-button:focus-visible {
  outline: 2px solid var(--va-accent-color);
  outline-offset: 2px;
}

/* compact header: a narrower button beside the menu button, still a 44px tap target (hidden on the narrowest phones:
   the panel has it) */
@media (max-width: 768px) {
  .vestelli-cta-button {
    height: var(--ab-tap, 44px);
    margin-left: 4px;
    padding: 0 12px;
    font-size: 13px;
    letter-spacing: 0.3px;
  }
}

@media (max-width: 359px) {
  .vestelli-cta-button {
    display: none;
  }
}

/* ---------------------------------------------------------------- the main menu (desktop) */

.vestelli-header-nav {
  display: flex;
  flex: 1 1 auto;
  align-items: stretch;
  justify-content: flex-end;
  min-width: 0;
}

.vestelli-main-menu {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  justify-content: flex-end;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.vestelli-main-menu > li {
  position: relative;
  display: flex;
  flex-shrink: 0;
  align-items: stretch;
  margin: 0;
}

/* the full-width panel hangs from the header itself */
.vestelli-main-menu > li.has-mega {
  position: static;
}

/* the contact page is the white button beside the menu: its menu item is not repeated on desktops (nor in the panel,
   whose own contact button follows the languages) */
.vestelli-main-menu > li.menu-item--cta-duplicate,
.mobile-main-menu > li.menu-item--cta-duplicate {
  display: none;
}

/* the items' text (site.css makes the links as tall as the bar and gives them the cyan fill on hover) */
.vestelli-main-menu > li > a,
.vestelli-header .vestelli-main-menu .submenu-toggle--label {
  display: flex;
  align-items: center;
  padding: 0 14px;
  color: #fff;
  font-family: 'Oxygen', 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.5px;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}

.vestelli-main-menu > li.has-panel > a {
  padding-right: 2px;
}

/* the item, its chevron and its open panel share the cyan fill */
.vestelli-header .vestelli-main-menu > li:hover > a,
.vestelli-header .vestelli-main-menu > li:hover > .submenu-toggle,
.vestelli-header .vestelli-main-menu > li.is-open > a,
.vestelli-header .vestelli-main-menu > li.is-open > .submenu-toggle {
  background-color: #00adee;
  color: #fff;
  opacity: 1;
}

.vestelli-header .vestelli-main-menu > li > a:focus-visible,
.vestelli-header .vestelli-main-menu > li > .submenu-toggle:focus-visible {
  outline: 2px solid #fff;
  outline-offset: -6px;
}

/* the chevron button beside an item with a panel (the disclosure: aria-expanded, assets/js/mobile-menu.js) */
.vestelli-header .vestelli-main-menu .submenu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  box-sizing: border-box;
  width: 30px;
  min-height: 44px;
  margin: 0;
  padding: 0 10px 0 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.vestelli-header .vestelli-main-menu .submenu-toggle:focus,
.vestelli-header .vestelli-main-menu .submenu-toggle:active {
  background: transparent;
}

.vestelli-header .vestelli-main-menu .submenu-toggle--label {
  width: auto;
  gap: 6px;
  padding: 0 14px;
}

.vestelli-main-menu .va-chevron {
  flex: none;
  transition: transform 0.2s ease;
}

.vestelli-main-menu > li.is-open > .submenu-toggle .va-chevron,
.vestelli-main-menu:not(.js-menu) > li:is(:hover, :focus-within) > .submenu-toggle .va-chevron {
  transform: rotate(180deg);
}

/* the panels: closed = hidden (also from the keyboard: nothing inside a closed panel takes the focus) */
.vestelli-main-menu .submenu-panel {
  position: absolute;
  top: 100%;
  z-index: 2;
  box-sizing: border-box;
  margin: 0;
  list-style: none;
  background-color: rgba(var(--va-brand-rgb), 0.98);
  border-top: 2px solid rgba(var(--va-accent-rgb), 0.25);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  /* the see-through navy of the bar, but the page's text behind it is blurred (not readable through the menu) */
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
}

/* open: the item's .is-open (the script: hover, the chevron button, the keyboard focus); without the script,
   hovering or focusing the item */
.vestelli-main-menu > li.is-open > .submenu-panel,
.vestelli-main-menu:not(.js-menu) > li:is(:hover, :focus-within) > .submenu-panel {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s;
}

.vestelli-main-menu .submenu-panel ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.vestelli-main-menu .submenu-panel li {
  margin: 0;
}

.vestelli-main-menu .submenu-panel a {
  color: rgba(255, 255, 255, 0.95);
  text-decoration: none;
  text-transform: none;
}

.vestelli-main-menu .submenu-panel a:focus-visible {
  outline: 2px solid var(--va-accent-color);
  outline-offset: 2px;
}

.vestelli-main-menu .submenu-panel a[aria-current="page"] {
  font-weight: 700;
}

/* a list (Kokemuksia): a panel below its item */
.vestelli-main-menu .submenu-panel--list {
  left: 0;
  min-width: 260px;
  padding: 8px 0;
}

.vestelli-main-menu .submenu-panel--list li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.vestelli-main-menu .submenu-panel--list li:last-child {
  border-bottom: 0;
}

.vestelli-main-menu .submenu-panel--list a {
  display: block;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0.2px;
  transition: background-color 0.2s ease, padding-left 0.2s ease;
}

.vestelli-main-menu .submenu-panel--list a:hover,
.vestelli-main-menu .submenu-panel--list a:focus {
  background-color: rgba(255, 255, 255, 0.08);
  color: #fff;
  padding-left: 24px;
}

.vestelli-main-menu .submenu-panel--list a:focus-visible {
  outline-offset: -2px;
}

.vestelli-main-menu .submenu-panel--list .sub-sub-menu {
  padding-left: 16px;
}

/* the full-width panel (Tuotteet): a column per group on the page's content width */
.vestelli-main-menu .submenu-panel--mega {
  left: 0;
  right: 0;
  max-height: calc(100vh - var(--ab-header-h, 90px) - 24px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.vestelli-main-menu .submenu-panel > .mega-menu {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 32px 48px;
  max-width: calc(var(--wp--style--global--content-size, 1310px) + 2 * var(--ab-gutter, 40px));
  margin: 0 auto;
  padding: 40px var(--ab-gutter, 40px) 48px;
}

/* the group's title (a link, or a plain heading when the group has no page: "Muut"); two lines of room, so that the
   groups' links start on one line */
.vestelli-main-menu .mega-menu .mega-heading {
  display: block;
  min-height: calc(2 * 1.3em);
  margin: 0 0 6px;
  padding: 0 0 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0;
}

.vestelli-main-menu .mega-menu a.mega-heading:hover {
  color: var(--va-accent-color);
}

.vestelli-main-menu .mega-menu .sub-sub-menu a {
  display: block;
  padding: 8px 0;
  color: #fff;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.4;
  transition: transform 0.25s ease, color 0.2s ease;
}

.vestelli-main-menu .mega-menu .sub-sub-menu a:hover {
  color: var(--va-accent-color);
  transform: translateX(6px);
}

/* placeholders: no navigation, no hover decoration */
.avalon-mega-no-link {
  cursor: default;
}

/* ---------------------------------------------------------------- the menu button (compact header) */

.vestelli-header .mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 44px;
}

.hamburger-line {
  display: block;
  width: 28px;
  height: 3px;
  border-radius: 999px;
  background-color: currentColor;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

/* the open panel covers the button (the panel has its own close button) */
.vestelli-header .mobile-menu-toggle.active {
  visibility: hidden;
}

/* ---------------------------------------------------------------- the menu panel (compact header) */

/* the dimmed page and the navy panel from the right */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10050;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  background-color: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease, visibility 0s;
}

.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 10060;
  box-sizing: border-box;
  width: min(92vw, 420px);
  height: 100vh;
  height: 100dvh;
  padding: 0 0 env(safe-area-inset-bottom, 0px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  /* a row reached with the keyboard scrolls into view below the sticky top row, not under it */
  scroll-padding-top: var(--ab-header-h, 72px);
  background-color: var(--va-brand-color);
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
  font-family: 'Oxygen', 'Helvetica Neue', Arial, sans-serif;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-overlay.active .mobile-menu {
  transform: none;
}

.mobile-menu::-webkit-scrollbar {
  width: 6px;
}

.mobile-menu::-webkit-scrollbar-thumb {
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.25);
}

/* the panel's top row: its close button where the menu button was; it stays at the top while a long panel (groups
   open) scrolls under it (opaque, above the rows' chevrons and focus outlines) */
.mobile-menu-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  box-sizing: border-box;
  min-height: var(--ab-header-h, 72px);
  padding: 0 8px 0 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background-color: var(--va-brand-color);
}

.mobile-menu .mobile-menu-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #fff;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.mobile-menu .mobile-menu-close:hover,
.mobile-menu .mobile-menu-close:focus,
.mobile-menu .mobile-menu-close:active {
  background: transparent;
  color: #fff;
}

.mobile-menu .mobile-menu-close:hover {
  transform: rotate(90deg);
}

.mobile-menu .mobile-menu-close svg {
  display: block;
  width: 24px;
  height: 24px;
}

.mobile-menu :is(a, button):focus-visible {
  outline: 2px solid var(--va-accent-color);
  outline-offset: -2px;
}

/* the menu: rows of at least 48px (the link itself is the tap target), the levels indented */
.mobile-main-menu,
.mobile-main-menu .sub-menu {
  margin: 0;
  padding: 0;
  list-style: none;
}

.mobile-main-menu {
  padding: 8px 0;
}

.mobile-main-menu li {
  margin: 0;
}

.mobile-main-menu > li + li {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-main-menu .sub-menu > li + li {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.mobile-menu-item-wrapper {
  display: flex;
  align-items: stretch;
  gap: 4px;
  padding: 0 8px 0 var(--va-indent, 20px);
}

@media (hover: hover) {
  .mobile-menu-item-wrapper:hover {
    background-color: rgba(255, 255, 255, 0.06);
  }
}

.mobile-level-2 {
  --va-indent: 36px;
}

.mobile-level-3 {
  --va-indent: 52px;
}

.mobile-menu .mobile-menu-link {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  box-sizing: border-box;
  min-width: 0;
  min-height: 48px;
  margin: 0;
  padding: 12px 0;
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.35;
  text-align: left;
  text-decoration: none;
  text-transform: none;
}

.mobile-menu .mobile-level-1 > .mobile-menu-item-wrapper .mobile-menu-link {
  min-height: 52px;
  font-size: 17px;
  font-weight: 700;
}

.mobile-menu .mobile-level-3 > .mobile-menu-item-wrapper .mobile-menu-link {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.88);
}

.mobile-menu a.mobile-menu-link:hover,
.mobile-menu a.mobile-menu-link:focus,
.mobile-menu a.mobile-menu-link:active {
  color: #fff;
}

.mobile-menu a.mobile-menu-link[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--va-accent-color);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

/* the groups: hidden until opened (display: their links are not in the Tab order while closed) */
.mobile-main-menu .sub-menu {
  display: none;
  background-color: rgba(0, 0, 0, 0.18);
}

.mobile-main-menu .sub-menu.active {
  display: block;
}

.mobile-main-menu .sub-menu .sub-menu {
  background-color: rgba(0, 0, 0, 0.12);
}

/* the chevron button beside an item with a group: 44 x 44px */
.mobile-menu .mobile-submenu-toggle {
  display: inline-flex;
  flex: 0 0 44px;
  align-items: center;
  align-self: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
}

/* a placeholder item with a group ("Muut"): the whole row is the button, its chevron where the others' are */
.mobile-menu .mobile-submenu-label {
  justify-content: space-between;
  gap: 12px;
  padding-right: 15px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
}

.mobile-menu .mobile-submenu-toggle:hover,
.mobile-menu .mobile-submenu-toggle:focus,
.mobile-menu .mobile-submenu-toggle:active,
.mobile-menu .mobile-submenu-label:hover,
.mobile-menu .mobile-submenu-label:focus,
.mobile-menu .mobile-submenu-label:active {
  background: transparent;
  color: #fff;
}

.mobile-menu .va-chevron {
  flex: none;
  transition: transform 0.2s ease;
}

.mobile-menu [aria-expanded="true"] > .va-chevron {
  transform: rotate(180deg);
}

/* the panel's end: the languages and the contact button */
.mobile-menu-footer {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 8px;
  padding: 20px 20px 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.mobile-language-switcher {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mobile-language-switcher li {
  margin: 0;
}

.mobile-menu .mobile-language-switcher a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 4px;
  border-radius: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  font-size: 15px;
  font-weight: 400;
  text-decoration: none;
}

.mobile-menu .mobile-language-switcher a:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 6px;
}

.mobile-menu .mobile-language-switcher a.current-lang {
  color: #fff;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--va-accent-color);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

/* the contact button: the accent colour (navy text: white on the accent is below 3:1) */
.mobile-menu .mobile-cta-button {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 48px;
  padding: 12px 24px;
  border: 0;
  border-radius: var(--va-button-radius, 0);
  background-color: var(--va-accent-color);
  color: var(--va-brand-color);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.mobile-menu .mobile-cta-button:hover,
.mobile-menu .mobile-cta-button:focus {
  background-color: var(--va-accent-color-hover, #00aee8);
  color: var(--va-brand-color);
  text-decoration: none;
}

.mobile-menu .mobile-cta-button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* ---------------------------------------------------------------- the search dialog (printed after </header>) */

.vestelli-search-overlay {
  position: fixed;
  inset: 0;
  z-index: 10020;
}

.vestelli-search-overlay[hidden] {
  display: none;
}

.vestelli-search-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.vestelli-search-overlay-panel {
  position: absolute;
  top: calc(var(--ab-header-h, 72px) + 16px);
  left: 50%;
  box-sizing: border-box;
  width: min(calc(100% - 2 * var(--ab-gutter, 20px)), 680px);
  padding: 16px 72px 16px 16px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
  font-family: 'Oxygen', 'Helvetica Neue', Arial, sans-serif;
  transform: translateX(-50%);
}

.admin-bar .vestelli-search-overlay-panel {
  top: calc(var(--ab-header-h, 72px) + 16px + var(--wp-admin--admin-bar--height, 0px));
}

.vestelli-header-search-overlay-form {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.vestelli-header-search-overlay-form input[type="search"] {
  flex: 1 1 auto;
  box-sizing: border-box;
  width: auto;
  min-width: 0;
  height: 48px;
  margin: 0;
  padding: 0 14px;
  border: 1px solid rgba(var(--va-brand-rgb), 0.55);
  border-radius: 4px;
  background: #fff;
  color: var(--va-brand-color);
  font-family: inherit;
  font-size: 16px;
  line-height: 1.3;
}

.vestelli-header-search-overlay-form input[type="search"]:focus {
  border-color: var(--va-brand-color);
  outline: 2px solid var(--va-brand-color);
  outline-offset: 2px;
  box-shadow: none;
}

.vestelli-header-search-overlay-form .vestelli-search-submit {
  flex-shrink: 0;
  height: 48px;
  margin: 0;
  padding: 0 20px;
  border: 0;
  border-radius: 4px;
  background: var(--va-brand-color);
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.vestelli-header-search-overlay-form .vestelli-search-submit:hover,
.vestelli-header-search-overlay-form .vestelli-search-submit:focus {
  background: var(--va-brand-color-hover, #34437a);
  color: #fff;
}

.vestelli-header-search-overlay-form .vestelli-search-submit:focus-visible,
.vestelli-search-overlay .vestelli-search-overlay-close:focus-visible {
  outline: 2px solid var(--va-brand-color);
  outline-offset: 2px;
}

.vestelli-search-overlay .vestelli-search-overlay-close {
  position: absolute;
  top: 18px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  box-shadow: none;
  color: var(--va-brand-color);
  cursor: pointer;
}

.vestelli-search-overlay .vestelli-search-overlay-close:hover,
.vestelli-search-overlay .vestelli-search-overlay-close:focus {
  background: rgba(var(--va-brand-rgb), 0.08);
  color: var(--va-brand-color);
}

.vestelli-search-overlay-close svg {
  display: block;
  pointer-events: none;
}

@media (max-width: 480px) {
  .vestelli-search-overlay-panel {
    padding: 12px 60px 12px 12px;
  }

  .vestelli-search-overlay .vestelli-search-overlay-close {
    top: 14px;
    right: 8px;
  }

  .vestelli-header-search-overlay-form .vestelli-search-submit {
    padding: 0 14px;
  }
}

/* ---------------------------------------------------------------- the cart (option, off) */

.vestelli-cart-link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  color: #fff;
  text-decoration: none;
}

.vestelli-cart-link svg {
  width: 20px;
  height: 20px;
}

.vestelli-cart-count,
.mobile-cart-count {
  position: absolute;
  top: 2px;
  right: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background-color: var(--va-accent-color);
  color: var(--va-brand-color);
  font-size: 11px;
  font-weight: 700;
}

.mobile-header-cart {
  display: flex;
  justify-content: center;
}

.mobile-cart-link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 48px;
  color: #fff;
  text-decoration: none;
}

.mobile-cart-link svg {
  width: 28px;
  height: 28px;
}

/* ---------------------------------------------------------------- utilities, motion */

/* text for screen readers only */
.va-sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  .vestelli-header,
  .vestelli-main-menu .submenu-panel,
  .mobile-menu-overlay,
  .mobile-menu,
  .va-chevron,
  .vestelli-cta-button span,
  .vestelli-cta-button::after,
  .vestelli-main-menu .mega-menu .sub-sub-menu a {
    transition: none !important;
  }

  .vestelli-main-menu .submenu-panel {
    transform: none;
  }
}

/* The breakpoint rules are printed by an_header_responsive_css() (inc/header.php, option va_header_mobile_breakpoint). */
