/* =========================================================
   ISTIKA — SHARED RESPONSIVE NAVBAR
   Single source of truth for the site navigation.
========================================================= */

.header {
  position: sticky;
  top: 0;
  width: 100%;
  padding: 0 var(--side, clamp(18px, 4.2vw, 82px));
  box-sizing: border-box;
  background: rgba(243, 240, 231, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 10000;
}

.nav-wrap {
  width: 100%;
  min-height: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  box-sizing: border-box;
  border-bottom: 1px solid var(--border, rgba(7, 58, 46, 0.18));
}

.brand-logo {
  display: flex !important;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  min-width: 0;
  text-decoration: none;
}

.brand-symbol {
  width: 28px !important;
  height: 28px !important;
  flex: 0 0 28px;
  object-fit: contain;
}

.brand-name {
  font-size: 25px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.18em;
  white-space: nowrap;
}

.desktop-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(14px, 1.8vw, 34px);
  min-width: 0;
}

.desktop-nav a {
  position: relative;
  font-size: 13px;
  white-space: nowrap;
  text-decoration: none;
  color: inherit;
}

.desktop-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -7px;
  width: 0;
  height: 1px;
  background: var(--orange, #c96d49);
  transition: width 0.25s ease;
}

.desktop-nav a:hover::after,
.desktop-nav a.active::after {
  width: 100%;
}

.menu-btn {
  display: none;
  position: relative;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  margin-left: auto;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  z-index: 10002;
}

.menu-btn span {
  position: absolute;
  left: 10px;
  width: 25px;
  height: 1.5px;
  background: var(--green, #073a2e);
  transition: top 0.25s ease, transform 0.25s ease;
}

.menu-btn span:first-child { top: 17px; }
.menu-btn span:last-child { top: 27px; }

.menu-btn.active span:first-child {
  top: 22px;
  transform: rotate(45deg);
}

.menu-btn.active span:last-child {
  top: 22px;
  transform: rotate(-45deg);
}

/* Closed mobile menu: keep it in the DOM but completely non-interactive. */
.mobile-menu {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 80px;
  width: 100%;
  box-sizing: border-box;
  padding: 22px var(--side, 24px) 30px;
  background: rgba(243, 240, 231, 0.99);
  color: var(--green, #073a2e);
  border-bottom: 1px solid var(--border, rgba(7, 58, 46, 0.18));
  z-index: 10001;
}

.mobile-menu nav {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
}

.mobile-menu a {
  display: block;
  width: 100%;
  padding: 15px 0;
  border-bottom: 1px solid var(--border, rgba(7, 58, 46, 0.12));
  font-size: 15px;
  line-height: 1.3;
}

.mobile-menu.open {
  display: block;
}

#site-header {
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 10000;
}

#site-header > .header {
  position: relative;
}

@media (max-width: 1100px) {
  .desktop-nav { gap: 15px; }
  .desktop-nav a { font-size: 11px; }
  .brand-name { font-size: 22px; }
}

@media (max-width: 768px) {
  /* Use fixed positioning on mobile for consistent behavior across
     Chrome and Edge. Sticky can be affected by horizontal overflow
     containers differently between browsers. */
  #site-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 10000 !important;
  }

  .header {
    position: relative;
    width: 100%;
    padding: 0 16px;
  }

  .nav-wrap {
    height: 68px;
    min-height: 68px;
  }

  /* Keep page content below the fixed mobile navbar. */
  body {
    padding-top: 68px;
  }

  .desktop-nav {
    display: none;
  }

  .menu-btn {
    display: block;
  }

  .brand-symbol {
    width: 25px !important;
    height: 25px !important;
    flex-basis: 25px;
  }

  .brand-name {
    font-size: 21px;
  }

  /* Explicitly override the legacy common.css mobile-menu rules. */
  .mobile-menu {
    display: block !important;
    position: absolute !important;
    top: 68px !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: calc(100dvh - 68px) !important;
    padding: 14px 16px 28px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    background: rgba(243, 240, 231, 0.99) !important;
    color: var(--green, #073a2e) !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translateX(0) !important;
    transition: opacity 0.2s ease, visibility 0.2s ease !important;
  }

  .mobile-menu.open {
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: translateX(0) !important;
  }
}

@media (min-width: 769px) {
  .mobile-menu {
    display: none !important;
  }
}

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}
