/* =================================================================
   WEDDING THEME — CUSTOM OVERRIDES & LAYOUT FIXES
   ================================================================= */

/* 1. Header Container & Navbar Reset */
header#header, #header {
  position: sticky !important;
  top: 0 !important;
  z-index: 1000 !important;
  background: rgba(253, 251, 247, 0.98) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border-bottom: 1px solid rgba(192, 139, 116, 0.3) !important;
  box-shadow: 0 4px 16px rgba(44, 38, 35, 0.06) !important;
  padding: 0.6rem 0 !important;
  height: auto !important;
  min-height: 64px !important;
}

#header .container {
  max-width: 1140px !important;
  margin: 0 auto !important;
  padding: 0 1.5rem !important;
}

#header .navbar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  gap: 1.5rem !important;
  flex-wrap: nowrap !important;
}

/* 2. Logo Branding & Image Size Constraints */
#header .logo-brand {
  display: flex !important;
  align-items: center !important;
  gap: 0.75rem !important;
  text-decoration: none !important;
  flex-shrink: 0 !important;
}

#header .logo-brand img,
#header .logo img,
#header img.logo {
  height: 42px !important;
  max-height: 42px !important;
  width: auto !important;
  max-width: 42px !important;
  object-fit: contain !important;
  margin: 0 !important;
  padding: 0 !important;
  display: block !important;
  float: none !important;
  filter: none !important; /* Remove old Quark invert/brightness filters */
}

#header .logo-text {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  line-height: 1.15 !important;
}

#header .logo-names {
  font-family: 'Cormorant Garamond', Georgia, serif !important;
  font-size: 1.25rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  color: #2c2623 !important;
  white-space: nowrap !important;
}

#header .logo-sub {
  font-family: 'Cormorant Garamond', Georgia, serif !important;
  font-size: 0.95rem !important;
  font-style: italic !important;
  color: #c08b74 !important;
  white-space: nowrap !important;
}

/* 3. Desktop Navigation & Precise Active Underline Alignment */
#header .desktop-menu {
  display: flex !important;
  align-items: center !important;
}

#header .desktop-menu ul {
  display: flex !important;
  align-items: center !important;
  flex-direction: row !important;
  gap: 1.75rem !important; /* Spacing handled cleanly via flex gap */
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

#header .desktop-menu ul li {
  display: inline-block !important;
  margin: 0 !important;
  padding: 0 !important;
  position: relative !important;
}

#header .desktop-menu ul li a {
  display: inline-block !important;
  font-family: 'Cormorant Garamond', Georgia, serif !important;
  font-size: 1.1rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  color: #2c2623 !important;
  padding: 0.4rem 0 !important; /* Zero horizontal padding so underline matches text width exactly */
  margin: 0 !important;
  text-decoration: none !important;
  background: transparent !important;
  border: none !important;
  white-space: nowrap !important;
  transition: color 0.25s ease !important;
  position: relative !important;
}

/* Underline starts and ends exactly under text */
#header .desktop-menu ul li a::after {
  content: '' !important;
  position: absolute !important;
  bottom: -4px !important;
  left: 0 !important;
  width: 100% !important;
  height: 2px !important;
  background: #c08b74 !important;
  transform: scaleX(0) !important;
  transform-origin: center !important;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
  border-radius: 2px !important;
}

#header .desktop-menu ul li a:hover::after,
#header .desktop-menu ul li a.active::after,
#header .desktop-menu ul li a.active-page::after {
  transform: scaleX(1) !important;
}

#header .desktop-menu ul li a:hover,
#header .desktop-menu ul li a.active,
#header .desktop-menu ul li a.active-page {
  color: #c08b74 !important;
  background: transparent !important;
}

/* 4. User Login / Logout Action Buttons */
.header-actions {
  display: flex !important;
  align-items: center !important;
  gap: 0.75rem !important;
  flex-shrink: 0 !important;
}

.btn-auth,
#header .header-actions .btn-auth {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  padding: 0.45rem 1.15rem !important;
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  font-size: 0.88rem !important;
  font-weight: 600 !important;
  color: #ffffff !important;
  background: #5a6b59 !important; /* Sage Dark - High Contrast */
  border: 1px solid #4a5b49 !important;
  border-radius: 9999px !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  box-shadow: 0 2px 8px rgba(90, 107, 89, 0.25) !important;
  transition: all 0.25s ease !important;
}

.btn-auth:hover,
#header .header-actions .btn-auth:hover {
  background: #c08b74 !important;
  border-color: #a66e58 !important;
  color: #ffffff !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(192, 139, 116, 0.3) !important;
}

/* Mobile Hamburger Toggle Button */
.mobile-toggle,
#header .mobile-toggle {
  display: none !important;
  align-items: center !important;
  justify-content: center !important;
  background: #edf2ed !important;
  border: 1px solid #b8c7b7 !important;
  color: #2c2623 !important;
  font-size: 1.5rem !important;
  padding: 0.4rem 0.75rem !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

.mobile-toggle:hover {
  background: #7e917d !important;
  color: #ffffff !important;
}

/* 5. Mobile Full-Screen Menu Drawer */
.mobile-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(253, 251, 247, 0.98) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  z-index: 999999 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  opacity: 0 !important;
  visibility: hidden !important;
  transition: all 0.3s ease !important;
}

.mobile-overlay.active {
  opacity: 1 !important;
  visibility: visible !important;
}

.mobile-close {
  position: absolute !important;
  top: 1.5rem !important;
  right: 1.5rem !important;
  font-size: 2.8rem !important;
  background: none !important;
  border: none !important;
  color: #2c2623 !important;
  cursor: pointer !important;
  line-height: 1 !important;
  padding: 0.5rem !important;
}

.mobile-menu-links {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  text-align: center !important;
}

.mobile-menu-links li {
  margin: 1.5rem 0 !important;
}

.mobile-menu-links a {
  font-family: 'Cormorant Garamond', Georgia, serif !important;
  font-size: 1.8rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  color: #2c2623 !important;
  text-decoration: none !important;
  transition: color 0.25s ease !important;
}

.mobile-menu-links a:hover,
.mobile-menu-links a.active {
  color: #c08b74 !important;
}

/* 6. Media Queries for Responsive Screens (< 900px) */
@media (max-width: 900px) {
  #header .desktop-menu {
    display: none !important;
  }
  
  .mobile-toggle,
  #header .mobile-toggle {
    display: flex !important;
  }
  
  #header .header-actions .btn-auth,
  .header-actions .btn-auth {
    display: none !important; /* Hide top header bar auth button on mobile */
  }

  .mobile-overlay .btn-auth {
    display: inline-flex !important; /* Ensure auth button displays inside mobile menu drawer */
  }

  .logo-names {
    font-size: 1.05rem !important;
  }

  .logo-sub {
    font-size: 0.8rem !important;
  }

  .hero-title {
    font-size: 2.4rem !important;
  }
}
