/* ============================================================
   HEADER — IAC Mirror
   Sticky, white/cream bg, logo + nav + Partner Portal
============================================================ */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1005;
  background: var(--white);
  border-bottom: 1px solid var(--outline-var);
  transition: box-shadow 0.3s ease, background 0.3s ease;
}

.site-header.scrolled {
  box-shadow: 0 2px 20px rgba(0, 73, 34, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  height: 72px;
}

/* ============================================================
   LOGO
============================================================ */
.site-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}

.site-logo svg,
.site-logo img {
  height: 40px;
  width: auto;
}

.site-logo__text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.site-logo__text strong {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.01em;
}

.site-logo__text span {
  font-family: var(--sans);
  font-size: 0.6rem;
  font-weight: 500;
  color: var(--on-surface-var);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ============================================================
   DESKTOP NAV
============================================================ */
.site-nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--on-surface);
  border-radius: 2px;
  transition: color 0.2s ease, background 0.2s ease;
  white-space: nowrap;
  text-decoration: none;
}

.nav-link:hover,
.nav-item.current .nav-link {
  color: var(--primary);
}

.nav-chevron {
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

.nav-item:hover .nav-chevron {
  transform: rotate(180deg);
}

/* ============================================================
   MEGA MENU
============================================================ */
.mega-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--white);
  border: 1px solid var(--outline-var);
  border-top: 2px solid var(--primary);
  border-radius: 0 0 var(--r-md) var(--r-md);
  box-shadow: 0 8px 32px rgba(0, 73, 34, 0.1);
  min-width: 580px;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(8px);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
  z-index: 200;
}

.nav-item:hover .mega-menu,
.nav-item:focus-within .mega-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.mega-menu__inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
}

.mega-menu__label {
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--on-surface-var);
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--outline-var);
}

.mega-menu__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mega-menu__list a {
  display: block;
  padding: 6px 8px;
  font-family: var(--sans);
  font-size: 0.88rem;
  color: var(--on-surface-var);
  border-radius: var(--r-sm);
  transition: background 0.18s ease, color 0.18s ease;
  text-decoration: none;
}

.mega-menu__list a:hover {
  background: var(--leaf-tint);
  color: var(--primary);
}

/* ============================================================
   HEADER ACTIONS
============================================================ */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.header-search-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  color: var(--on-surface-var);
  transition: color 0.2s ease, background 0.2s ease;
  border: none;
  background: none;
  cursor: pointer;
}

.header-search-btn:hover {
  color: var(--primary);
  background: var(--leaf-tint);
}

.header-cta {
  white-space: nowrap;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  border: none;
  background: none;
  padding: 4px;
  border-radius: var(--r-sm);
}

.hamburger__bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--on-surface);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger.is-active .hamburger__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger.is-active .hamburger__bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.hamburger.is-active .hamburger__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ============================================================
   SEARCH BAR
============================================================ */
.header-search-bar {
  background: var(--surface-low);
  border-top: 1px solid var(--outline-var);
  padding: 14px 0;
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0;
}

.header-search-bar.is-open {
  max-height: 80px;
  padding: 14px 0;
}

.header-search-form {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--white);
  border: 1px solid var(--outline-var);
  border-radius: var(--r-sm);
  overflow: hidden;
  max-width: 640px;
}

.header-search-form input {
  flex: 1;
  padding: 10px 16px;
  border: none;
  outline: none;
  font-size: 0.92rem;
  background: transparent;
  color: var(--on-surface);
}

.header-search-form button {
  padding: 10px 14px;
  color: var(--on-surface-var);
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: color 0.2s ease;
}

.header-search-form button:hover {
  color: var(--primary);
}

/* ============================================================
   BREADCRUMB (from breadcrumb.php)
============================================================ */
.breadcrumb {
  padding: 14px 0;
  border-bottom: 1px solid var(--outline-var);
  background: var(--white);
}

.breadcrumb__list {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  list-style: none;
  font-family: var(--sans);
  font-size: 0.8rem;
}

.breadcrumb__link {
  color: var(--on-surface-var);
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumb__link:hover {
  color: var(--primary);
}

.breadcrumb__item--sep {
  color: var(--outline);
  font-size: 0.7rem;
}

.breadcrumb__item--current {
  color: var(--primary);
  font-weight: 600;
}

/* ============================================================
   MOBILE OVERLAY
============================================================ */
.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1008;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

/* ============================================================
   MOBILE MENU DRAWER
============================================================ */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: min(360px, 90vw);
  height: 100vh;
  background: var(--white);
  z-index: 1010;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  transition: right 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: -8px 0 40px rgba(0, 73, 34, 0.15);
}

.mobile-menu.is-open {
  right: 0;
}

.mobile-menu__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--outline-var);
  flex-shrink: 0;
}

.mobile-logo svg,
.mobile-logo img {
  height: 32px;
  width: auto;
}

.mobile-logo__text {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
}

.mobile-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  background: none;
  color: var(--on-surface-var);
  cursor: pointer;
  border-radius: var(--r-sm);
  transition: color 0.2s ease, background 0.2s ease;
}

.mobile-close:hover {
  color: var(--primary);
  background: var(--leaf-tint);
}

/* Mobile nav list */
.mobile-nav {
  flex: 1;
  padding: 16px 0;
  list-style: none;
}

.mobile-nav__item {
  border-bottom: 1px solid var(--surface-high);
}

.mobile-nav__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--on-surface);
  text-decoration: none;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.mobile-nav__link:hover {
  color: var(--primary);
  background: var(--surface-low);
}

.mobile-nav__chevron {
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

.mobile-nav__toggle[aria-expanded="true"] .mobile-nav__chevron {
  transform: rotate(180deg);
}

/* Mobile submenu */
.mobile-subnav {
  list-style: none;
  background: var(--surface-low);
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease;
}

.mobile-subnav.is-open {
  max-height: 400px;
}

.mobile-subnav a {
  display: block;
  padding: 12px 24px 12px 40px;
  font-family: var(--sans);
  font-size: 0.88rem;
  color: var(--on-surface-var);
  text-decoration: none;
  transition: color 0.2s ease;
}

.mobile-subnav a:hover {
  color: var(--primary);
}

/* Mobile footer actions */
.mobile-menu__footer {
  padding: 24px;
  border-top: 1px solid var(--outline-var);
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex-shrink: 0;
}

.mobile-menu__footer .btn {
  width: 100%;
  justify-content: center;
}

.mobile-contact {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-contact a {
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--on-surface-var);
  text-decoration: none;
  transition: color 0.2s ease;
}

.mobile-contact a:hover {
  color: var(--primary);
}

/* ============================================================
   RESPONSIVE — Show hamburger on mobile/tablet
============================================================ */
@media (max-width: 1024px) {
  .site-nav { display: none; }
  .header-cta { display: none; }
  .hamburger { display: flex; }
}

@media (max-width: 768px) {
  .header-inner { gap: 16px; }
  .header-search-btn { display: none; }
}

/* ============================================================
   PAGE CONTENT PADDING — accounts for fixed header
============================================================ */
#page-content {
  padding-top: 72px;
}
