/* ═══════════════════════════════════════════
   HEADER — Premium Sticky Navigation
   ═══════════════════════════════════════════ */

/* ── Variables ── */
:root {
  --header-h: 72px;
  --header-bg: rgba(255, 255, 255, 0.92);
  --header-border: rgba(0, 0, 0, 0.06);
  --primary: #ee7c2b;
  --primary-dk: #d46a1e;
  --primary-lt: rgba(238, 124, 43, 0.08);
  --ink: #1a1a1a;
  --ink-2: #444;
  --muted: #888;
  --font-logo: 'Playfair Display', Georgia, serif;
  --font-body: 'Work Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Header Shell ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--header-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--header-border);
  transition: box-shadow 0.3s var(--ease), background 0.3s var(--ease);
}
.site-header.scrolled {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 2.5rem);
  height: var(--header-h);
  gap: 1.5rem;
}

/* ═══════════════════════════════════════════
   LOGO
   ═══════════════════════════════════════════ */
.header-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 0;
  transition: opacity 0.2s var(--ease);
}
.header-logo:hover { opacity: 0.85; }

.header-logo__icon {
  display: flex;
  flex-shrink: 0;
  background: transparent;
  transition: transform 0.35s var(--ease);
}
.header-logo:hover .header-logo__icon {
  transform: rotate(-6deg) scale(1.05);
}


.header-logo__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.header-logo__name {
  font-family: var(--font-logo);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.header-logo__icon  {
    width: 50px;
    height: 50px;
  }
.header-logo__tagline {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 1px;
}

/* ═══════════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════════ */
.header-nav {
  display: flex;
  align-items: center;
}

.header-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.header-menu li a {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.9rem;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-2);
  text-decoration: none;
  border-radius: 0.5rem;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
  position: relative;
}

.header-menu li a:hover {
  color: var(--primary);
  background: var(--primary-lt);
}

/* Active item */
.header-menu li.current-menu-item > a,
.header-menu li.current_page_item > a,
.header-menu li.current-menu-ancestor > a {
  color: var(--primary);
  background: var(--primary-lt);
}
.header-menu li.current-menu-item > a::after,
.header-menu li.current_page_item > a::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 2.5px;
  background: var(--primary);
  border-radius: 3px;
}

/* ═══════════════════════════════════════════
   RIGHT ACTIONS
   ═══════════════════════════════════════════ */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

/* Search toggle button */
.header-search-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  border-radius: 50%;
  color: var(--ink-2);
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
  position: relative;
}
.header-search-toggle:hover {
  color: var(--primary);
  background: var(--primary-lt);
}
.header-search-toggle__close {
  display: none;
}
.header-search-toggle[aria-expanded="true"] .header-search-toggle__open { display: none; }
.header-search-toggle[aria-expanded="true"] .header-search-toggle__close { display: block; }

/* Subscribe CTA */
.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.2rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  background: var(--primary);
  border: none;
  border-radius: 0.6rem;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.25s var(--ease), transform 0.2s var(--ease), box-shadow 0.25s var(--ease);
  box-shadow: 0 2px 10px rgba(238, 124, 43, 0.2);
}
.header-cta:hover {
  background: var(--primary-dk);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(238, 124, 43, 0.3);
}
.header-cta:active {
  transform: translateY(0);
}
.header-cta svg {
  transition: transform 0.2s var(--ease);
}
.header-cta:hover svg {
  transform: translateX(3px);
}

/* ═══════════════════════════════════════════
   HAMBURGER (Mobile)
   ═══════════════════════════════════════════ */
.header-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 0.5rem;
  transition: background 0.2s;
}
.header-hamburger:hover {
  background: var(--primary-lt);
}

.header-hamburger__bar {
  display: block;
  width: 22px;
  height: 2.5px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.35s var(--ease), opacity 0.25s var(--ease), background 0.2s;
}
.header-hamburger__bar:nth-child(1) { margin-bottom: 5px; }
.header-hamburger__bar:nth-child(3) { margin-top: 5px; }

/* Active hamburger → X */
.header-hamburger[aria-expanded="true"] .header-hamburger__bar:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
  background: var(--primary);
}
.header-hamburger[aria-expanded="true"] .header-hamburger__bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.header-hamburger[aria-expanded="true"] .header-hamburger__bar:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
  background: var(--primary);
}

/* ═══════════════════════════════════════════
   EXPANDABLE SEARCH BAR
   ═══════════════════════════════════════════ */
.header-search {
  max-height: 0;
  overflow: hidden;
  background: #fafafa;
  border-top: 1px solid transparent;
  transition: max-height 0.4s var(--ease), border-color 0.3s, padding 0.4s var(--ease);
}
.header-search.open {
  max-height: 90px;
  border-top-color: var(--header-border);
  padding: 0.75rem 0;
}

.header-search__form {
  display: flex;
  align-items: center;
  max-width: 600px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 2.5rem);
  gap: 0.5rem;
}

.header-search__input {
  flex: 1;
  padding: 0.65rem 1rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid #ddd;
  border-radius: 0.6rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.header-search__input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(238, 124, 43, 0.1);
}
.header-search__input::placeholder {
  color: var(--muted);
  font-weight: 400;
}

.header-search__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 0.6rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s, transform 0.15s;
}
.header-search__submit:hover {
  background: var(--primary-dk);
  transform: scale(1.05);
}

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */

/* ── Tablet (≤ 960px) ── */
@media (max-width: 960px) {
  .header-inner {
    height: 64px;
    gap: 1rem;
  }
  .header-cta {
    display: none; /* CTA hidden on tablet, save space */
  }
  .header-hamburger {
    display: flex;
  }

  /* Nav becomes a slide-down panel */
  .header-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--header-border);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.45s var(--ease);
  }
  .header-nav.open {
    max-height: 420px;
  }

  .header-menu {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.75rem 1.25rem;
  }
  .header-menu li a {
    padding: 0.85rem 1rem;
    font-size: 1rem;
    border-radius: 0.6rem;
  }
  .header-menu li.current-menu-item > a::after,
  .header-menu li.current_page_item > a::after {
    display: none;
  }
}

/* ── Mobile (≤ 480px) ── */
@media (max-width: 480px) {
  .header-inner {
    height: 56px;
    padding: 0 1rem;
  }
  .header-logo__icon  {
    width: 28px;
    height: 28px;
  }
  .header-logo__name {
    font-size: 1.1rem;
  }
  .header-logo__tagline {
    display: none;
  }
  .header-search__form {
    padding: 0 1rem;
  }
}

/* ── Skip link ── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--primary);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 9999;
  font-weight: 600;
}
.skip-link:focus {
  top: 0;
}
