/* ==========================================================================
   header.css : gold top strip, logo bar, main navigation + mega menu,
   language switcher, search modal, mobile offcanvas
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #fff;
}

/* ------------------------------ top strip ------------------------------- */
.topbar {
  background: var(--gold);
  color: #fff;
  font-size: 13px;
  min-height: 30px;
}
.topbar__inner,
.mainbar__inner {
  max-width: 1400px;
  padding-inline: 22px;
}
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 30px;
  flex-wrap: nowrap;
}
.topbar__links {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 4px 11px;
  padding: 4px 0;
  overflow: hidden;
  font-size: 12px;
}
.topbar__links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  line-height: 1.6;
  white-space: nowrap;
}
.topbar__links a:hover { color: #f3e7d3; }
.topbar__links .ico { font-size: 14px; opacity: .95; }

.topbar__tools {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
}

/* language dropdown */
.lang {
  position: relative;
}
.lang__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 700;
}
.lang__btn:hover { color: #f3e7d3; }
.lang__menu {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 4px);
  min-width: 96px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 6px 22px rgba(0, 0, 0, .18);
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: .2s ease;
  z-index: 20;
}
.lang.is-open .lang__menu { opacity: 1; visibility: visible; transform: none; }
.lang__menu a {
  display: block;
  padding: 6px 12px;
  color: var(--dark);
  font-weight: 700;
  border-radius: 3px;
}
.lang__menu a:hover,
.lang__menu a.is-active { background: var(--gray); color: var(--gold-dark); }

.search-toggle {
  color: #fff;
  display: inline-flex;
  align-items: center;
  padding: 5px 8px;
  font-size: 16px;
}
.search-toggle:hover { color: #f3e7d3; }

/* ------------------------------ main bar -------------------------------- */
.mainbar {
  background-color: #fff;
  background-image: url(../img/brand/barheader.png);
  background-repeat: repeat-x;
  background-position: center;
  background-size: contain;
  border-bottom: 1px solid var(--border);
  transition: box-shadow .25s ease;
}
.mainbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 84px;
}
.brand { flex: none; }
.brand img { width: 178px; height: auto; }

/* On desktop, keep the menu close to the logo instead of spreading it to the
   far edge of a wide screen. Mobile/tablet keep the toggle button at the
   opposite edge (space-between), unchanged. */
@media (min-width: 1025px) {
  .mainbar__inner { justify-content: flex-start; gap: 46px; }
}

/* --------------------------- main navigation ---------------------------- */
.mainnav__list {
  display: flex;
  align-items: stretch;
  gap: 2px;
  font-family: var(--font-accent);
}
.mainnav__list > li { position: relative; }
.mainnav__list > li > a {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 84px;
  padding-inline: 12px;
  color: #000;
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
}
.mainnav__list > li > a::after {
  content: "";
  position: absolute;
  inset-inline: 14px;
  bottom: 22px;
  height: 2px;
  background: var(--menu-hover);
  transform: scaleX(0);
  transition: transform .25s ease;
}
.mainnav__list > li > a:hover,
.mainnav__list > li:hover > a,
.mainnav__list > li.is-current > a { color: var(--green); }
.mainnav__list > li > a:hover::after,
.mainnav__list > li:hover > a::after,
.mainnav__list > li.is-current > a::after { transform: scaleX(1); }
.caret { font-size: 11px; opacity: .7; }

/* mega menu */
.mega {
  position: absolute;
  inset-inline-start: 0;
  top: 100%;
  background: #fff;
  border-top: 3px solid var(--gold);
  box-shadow: 0 14px 30px rgba(0, 0, 0, .14);
  padding: 18px 22px;
  min-width: 300px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: .22s ease;
  z-index: 30;
}
.mainnav__list > li:hover > .mega,
.mainnav__list > li:focus-within > .mega { opacity: 1; visibility: visible; transform: none; }
.mega--2 { width: 620px; }
.mega--3 { width: 860px; }
.mega ul {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px 26px;
}
.mega--2 ul { grid-template-columns: repeat(2, 1fr); }
.mega--3 ul { grid-template-columns: repeat(3, 1fr); }
.mega a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  color: var(--dark);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  border-radius: 4px;
  line-height: 1.45;
}
.mega a:hover { background: #f6f8f7; color: var(--green); padding-inline-start: 14px; }
.mega .ico { color: var(--gold); font-size: 16px; flex: none; }

/* nav toggle (hamburger) */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  color: var(--dark);
}
.nav-toggle svg { width: 26px; height: 26px; }

/* ------------------------------ search modal ---------------------------- */
.search-modal__dialog {
  max-width: 560px;
  padding: 26px;
}
.search-form {
  display: flex;
  gap: 8px;
  margin: 0;
}
.search-form input[type="search"] {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-family: inherit;
  font-size: 15px;
  color: var(--dark);
  outline: none;
}
.search-form input[type="search"]:focus { border-color: var(--gold); }
.search-form button {
  background: var(--gold-2);
  color: #fff;
  border-radius: var(--radius);
  padding: 0 20px;
  font-weight: 700;
}
.search-form button:hover { background: var(--green-hover); }

/* -------------------------------- sticky -------------------------------- */
.site-header.is-stuck .topbar {
  max-height: 0;
  min-height: 0;
  overflow: hidden;
  opacity: 0;
}
.topbar {
  max-height: 60px;
  transition: max-height .3s ease, opacity .3s ease;
}
.site-header.is-stuck .mainbar { box-shadow: 0 4px 16px rgba(0, 0, 0, .1); }

/* ------------------------------- offcanvas ------------------------------ */
.is-locked { overflow: hidden; }
.nav-close { display: none; align-items: center; justify-content: center; }
.nav-backdrop { display: none; }
