/* ===== Header Styles ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(253, 250, 245, 0.95);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
  transition: all 0.3s ease;
}

.site-header.is-sticky {
  padding-top: 4px;
  padding-bottom: 4px;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 16px;
  height: 60px; /* Fixed height for vertical centering */
  max-width: 1152px;
  margin: 0 auto;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--foreground);
  flex-shrink: 0;
  transition: opacity 0.2s ease;
}

.site-logo:hover {
  opacity: 0.85;
}

.site-logo img {
  max-width: 140px;
  max-height: 50px; /* Prevent logo from stretching header */
  height: auto;
  width: auto;
  display: block;
  object-fit: contain;
}

.site-brand-text {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--foreground);
  line-height: 1;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.main-nav {
  display: none;
  gap: 24px;
  font-size: 15px;
  font-weight: 600;
}

.main-nav a {
  padding: 8px 0;
  color: var(--foreground);
  transition:
    color 0.2s ease,
    transform 0.2s ease;
  position: relative;
}

.main-nav a:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.2s ease;
}

.main-nav a:hover:after,
.main-nav a.current-menu-item:after {
  width: 100%;
}

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

@media (min-width: 768px) {
  .main-nav {
    display: flex;
  }
  .header-inner {
    padding: 0 24px;
  }
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  background: var(--muted);
  border-radius: 8px;
  color: var(--foreground);
  transition: all 0.2s ease;
}

.menu-toggle:hover {
  background: var(--border);
  transform: scale(1.05);
}

@media (min-width: 768px) {
  .menu-toggle {
    display: none;
  }
}

/* Mobile drawer */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
}

.drawer.open {
  display: block;
}

.drawer-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  transition: opacity 0.3s ease;
}

.drawer-panel {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 280px;
  background: var(--background);
  padding: 24px;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideIn {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}

.drawer h3 {
  margin: 0 0 20px;
  font-size: 18px;
  font-weight: 700;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}

.drawer a {
  display: block;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.drawer a:hover {
  background: var(--muted);
  color: var(--primary);
  transform: translateX(4px);
}

.drawer .section-label {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--muted-foreground);
  padding: 20px 16px 8px;
  font-weight: 700;
  letter-spacing: 0.05em;
}
