/* ============================================================
   1. CORE THEME & VARIABLES
   ============================================================ */
:root {
  --bg-white: #ffffff;
  --bg-alt: #fbfaf8;
  --border-light: rgba(0, 0, 0, 0.08);
  --text-dark: #121214;
  --text-muted: #55555e;
  --primary-red: #e62b4a;
  --primary-dark: #1f2226;
  --font-heading: 'Poppins', sans-serif;
  --font-body: 'Inter', sans-serif;
  --slow-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

html {
  background-color: #ffffff;
}

body {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.4s var(--slow-ease), transform 0.4s var(--slow-ease);
}

body.is-ready {
  opacity: 1;
  transform: translateY(0);
}

body.is-exiting {
  opacity: 0;
  transform: translateY(-6px);
}

/* ============================================================
   2. DESKTOP HEADER NAVIGATION
   ============================================================ */
header {
  position: sticky;
  top: 0;
  z-index: 10000;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-light);
  width: 100%;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  position: relative;
}

.brand-logo-wrap {
  display: flex;
  align-items: center;
  z-index: 10002;
  text-decoration: none;
}

.brand-logo-img {
  height: 42px;
  width: auto;
  object-fit: contain;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 32px;
}

nav.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

nav.nav-links a {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  text-decoration: none;
  display: inline-block;
  transition: color 0.25s ease;
}

nav.nav-links a:hover {
  color: var(--text-dark);
}

@media (min-width: 861px) {
  nav.nav-links a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 100%;
    height: 2px;
    background-color: var(--primary-red);
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s var(--slow-ease);
    border-radius: 2px;
  }

  nav.nav-links a:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
  }
}

.nav-btn {
  padding: 10px 24px;
  background: var(--primary-dark);
  color: #fff !important;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.3s ease, transform 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-btn:hover {
  background: var(--primary-red);
  transform: translateY(-2px);
}

/* ============================================================
   3. MOBILE HAMBURGER BUTTON (3 LINES)
   ============================================================ */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 42px;
  height: 42px;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid var(--border-light);
  border-radius: 50%;
  cursor: pointer;
  z-index: 10003;
  padding: 0;
  gap: 5px;
  transition: all 0.3s ease;
  -webkit-tap-highlight-color: transparent;
  pointer-events: auto !important;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background-color: var(--primary-dark);
  border-radius: 2px;
  transition: transform 0.3s var(--slow-ease), opacity 0.2s ease, background-color 0.3s ease;
}

.menu-toggle.open {
  background-color: var(--primary-dark);
}

.menu-toggle.open span {
  background-color: #ffffff;
}

.menu-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle.open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ============================================================
   4. MOBILE FROSTED GLASS DROPDOWN MENU
   ============================================================ */
@media (max-width: 860px) {
  .menu-toggle {
    display: flex !important;
  }

  .nav-right {
    display: none;
    position: absolute;
    top: 85px;
    right: 16px;
    width: 240px;
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    flex-direction: column;
    align-items: stretch;
    padding: 16px 18px;
    gap: 12px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.12);
    z-index: 99999 !important;
  }

  .nav-right.active {
    display: flex !important;
    animation: menuSlideDown 0.25s ease forwards;
  }

  @keyframes menuSlideDown {
    from {
      opacity: 0;
      transform: translateY(-8px) scale(0.96);
    }
    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }

  nav.nav-links {
    display: flex !important;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    width: 100%;
  }

  nav.nav-links a {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2226;
    width: 100%;
    padding: 8px 12px;
    border-radius: 8px;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
  }

  nav.nav-links a:hover,
  nav.nav-links a:active {
    background-color: rgba(230, 43, 74, 0.08);
    color: var(--primary-red);
  }

  .nav-btn {
    width: 100%;
    text-align: center;
    padding: 11px 0;
    font-size: 0.88rem;
    border-radius: 8px;
    margin-top: 4px;
    display: block !important;
  }
}