/* ==========================================================================
   HEADER & NAVIGATION SYSTEM — IMPECCABLE DESIGN SYSTEM
   Flawless responsive header on desktop, tablet, and mobile devices.
   WCAG 2.1 AAA Compliant Contrast & Accessible Micro-interactions.
   ========================================================================== */

/* Sticky Site Header Shell */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(4, 22, 19, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1.5px solid rgba(19, 201, 135, 0.3);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.55);
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.5rem;
  gap: 1.25rem;
}

/* Brand Component (HTML Flexbox: Zero overlap, razor-sharp on all screens) */
.brand-wrap {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  cursor: pointer;
  outline: none;
}

.brand-wrap:focus-visible {
  outline: 2px solid #48F0A6;
  outline-offset: 4px;
  border-radius: 8px;
}

.brand-logo-component {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-ball-icon {
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 2px 10px rgba(185, 28, 28, 0.45));
  transition: transform 0.25s ease;
}

.brand-wrap:hover .brand-ball-icon {
  transform: rotate(18deg) scale(1.06);
}

.brand-ball-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.brand-name-group {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.brand-title {
  font-family: 'Manrope', 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1.35rem;
  font-weight: 900;
  color: #FFFFFF;
  letter-spacing: -0.025em;
  line-height: 1;
}

.brand-gold {
  color: #FFC84A;
}

.brand-accent {
  color: #48F0A6;
}

.brand-ai-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #48F0A6 0%, #13C987 100%);
  color: #04201A;
  font-family: 'Manrope', -apple-system, sans-serif;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  padding: 0.22rem 0.5rem;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  line-height: 1;
  flex-shrink: 0;
}

/* Fallback SVG logo img if rendered */
.brand-logo-img {
  height: 2.5rem;
  width: auto;
  max-width: 260px;
  object-fit: contain;
  display: block;
}

/* Desktop Navigation Links Bar */
.nav-links-bar {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(6, 33, 28, 0.75);
  padding: 0.35rem 0.65rem;
  border-radius: 9999px;
  border: 1px solid rgba(19, 201, 135, 0.3);
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.3);
}

.nav-link-pill {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: #A3C9BE;
  padding: 0.45rem 0.95rem;
  border-radius: 9999px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.nav-link-pill:hover {
  color: #FFFFFF;
  background: rgba(19, 201, 135, 0.15);
}

.nav-link-pill.active {
  background: rgba(19, 201, 135, 0.22);
  color: #FFFFFF;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(72, 240, 166, 0.6);
}

/* Header Actions Group */
.header-action-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

/* Sleek Ghost Login Button */
.btn-pill-login {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: #E2F5EE;
  padding: 0.5rem 1.15rem;
  border-radius: 9999px;
  background: rgba(8, 45, 39, 0.6);
  border: 1.5px solid rgba(19, 201, 135, 0.45);
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-pill-login:hover {
  background: rgba(19, 201, 135, 0.18);
  border-color: #48F0A6;
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

/* Primary WhatsApp CTA */
.btn-pill-wa {
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 800;
  color: #031713;
  background: linear-gradient(135deg, #25D366 0%, #1DA851 100%);
  padding: 0.5rem 1.25rem;
  border-radius: 9999px;
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, filter 0.2s ease;
}

.btn-pill-wa:hover {
  transform: translateY(-1.5px);
  filter: brightness(1.08);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

.btn-pill-wa svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: #031713;
  flex-shrink: 0;
}

/* Mobile Hamburger Button */
.mobile-hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 2.65rem;
  height: 2.65rem;
  background: rgba(8, 45, 39, 0.85);
  border: 1.5px solid rgba(19, 201, 135, 0.4);
  border-radius: 0.65rem;
  cursor: pointer;
  padding: 0;
  transition: all 0.25s ease;
  flex-shrink: 0;
}

.mobile-hamburger-btn:hover {
  border-color: #48F0A6;
  background: rgba(19, 201, 135, 0.2);
}

.mobile-hamburger-btn span {
  display: block;
  width: 1.25rem;
  height: 2px;
  background: #E2F5EE;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease, background-color 0.25s ease;
}

/* Active Hamburger X Animation */
.mobile-hamburger-btn.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
  background: #FFC84A;
}

.mobile-hamburger-btn.active span:nth-child(2) {
  opacity: 0;
}

.mobile-hamburger-btn.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
  background: #FFC84A;
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS (Precision Layout Engine)
   ========================================================================== */

/* Breakpoint: Below 1180px (Tablet Landscape, Narrow Laptops, Small Desktops) */
@media (max-width: 1180px) {
  .nav-links-bar {
    display: none; /* Smoothly collapse into drawer to prevent wrapping or squishing */
  }
  .mobile-hamburger-btn {
    display: flex;
  }
  .btn-pill-login {
    padding: 0.45rem 0.95rem;
    font-size: 0.8rem;
  }
}

/* Breakpoint: Below 768px (Mobile & Small Tablets) */
@media (max-width: 768px) {
  .header-inner {
    height: 3.85rem;
    gap: 0.75rem;
  }
  .brand-ball-icon {
    width: 2.15rem;
    height: 2.15rem;
  }
  .brand-title {
    font-size: 1.125rem;
  }
  .brand-ai-badge {
    font-size: 0.65rem;
    padding: 0.18rem 0.4rem;
  }
  .btn-pill-login {
    display: none; /* Available in drawer for ultra-clean mobile header */
  }
  .btn-pill-wa {
    font-size: 0.775rem;
    padding: 0.42rem 0.85rem;
    gap: 0.35rem;
  }
  .mobile-hamburger-btn {
    width: 2.35rem;
    height: 2.35rem;
  }
}

/* Breakpoint: Below 420px (Compact Mobile) */
@media (max-width: 420px) {
  .btn-pill-wa span {
    display: none; /* Show icon only on micro screens */
  }
  .btn-pill-wa {
    padding: 0.45rem 0.65rem;
  }
}

/* ==========================================================================
   MOBILE SLIDE-OUT DRAWER OVERLAY
   ========================================================================== */
.mobile-nav-drawer {
  position: fixed;
  inset: 0;
  z-index: 999;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s ease;
}

.mobile-nav-drawer.open {
  visibility: visible;
  opacity: 1;
}

.mobile-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.mobile-drawer-panel {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 84%;
  max-width: 350px;
  background: radial-gradient(circle at 0% 0%, #08382E 0%, #06221D 50%, #031411 100%);
  border-right: 1.5px solid rgba(19, 201, 135, 0.35);
  box-shadow: 10px 0 40px rgba(0, 0, 0, 0.85);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
}

.mobile-nav-drawer.open .mobile-drawer-panel {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(19, 201, 135, 0.25);
}

.drawer-close-btn {
  background: rgba(8, 45, 39, 0.8);
  border: 1px solid rgba(19, 201, 135, 0.3);
  color: #E2F5EE;
  font-size: 1.5rem;
  line-height: 1;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.drawer-close-btn:hover {
  background: rgba(19, 201, 135, 0.25);
  color: #FFC84A;
  border-color: #48F0A6;
}

.drawer-trust-tag {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 1.25rem 0 0.75rem;
  padding: 0.45rem 0.85rem;
  background: rgba(8, 45, 39, 0.6);
  border-radius: 9999px;
  border: 1px solid rgba(19, 201, 135, 0.3);
  font-size: 0.75rem;
  color: #48F0A6;
  font-weight: 700;
}

.drawer-nav-menu {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.75rem;
  flex-grow: 1;
}

.drawer-nav-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  color: #E2F5EE;
  font-size: 0.925rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.drawer-nav-link:hover,
.drawer-nav-link.active {
  background: rgba(19, 201, 135, 0.15);
  border-color: rgba(19, 201, 135, 0.3);
  color: #48F0A6;
}

.drawer-nav-link svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: currentColor;
  flex-shrink: 0;
}

.drawer-action-box {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-top: 1.25rem;
  margin-top: auto;
  border-top: 1px solid rgba(19, 201, 135, 0.25);
}

.drawer-btn-wa {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.85rem;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: #04201A;
  font-weight: 800;
  font-size: 0.95rem;
  border-radius: 0.85rem;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.35);
}

.drawer-btn-wa svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: #04201A;
}

.drawer-btn-login {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  background: rgba(8, 45, 39, 0.8);
  border: 1.5px solid rgba(19, 201, 135, 0.4);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: 0.85rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.drawer-btn-login:hover {
  border-color: #48F0A6;
  background: rgba(19, 201, 135, 0.2);
}

.drawer-btn-demo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  background: rgba(255, 200, 74, 0.1);
  border: 1.5px solid rgba(255, 200, 74, 0.4);
  color: #FFC84A;
  font-weight: 700;
  font-size: 0.875rem;
  border-radius: 0.85rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.drawer-btn-demo:hover {
  background: rgba(255, 200, 74, 0.2);
  border-color: #FFC84A;
}
