:root {
  --an-primary: #111827; /* Very dark grey/blue - Excellent contrast on white */
  --an-accent: #1d4ed8;  /* Darkened from #2563eb to exceed 4.5:1 ratio */
  --an-bg-muted: #f9fafb;
  --an-border: #e5e7eb;
  /* Darkened from #4b5563 to #374151 to guarantee >4.5:1 ratio even on small text */
  --an-text-secondary: #374151; 
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: #374151; /* Dark grey base color - Passes AA */
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--an-primary);
  font-weight: 700;
  letter-spacing: -0.025em;
}

/* Accessibility: Override Bootstrap's text-secondary */
.text-secondary {
  color: var(--an-text-secondary) !important;
}

/* Accessibility: Override Bootstrap's text-muted to ensure it passes AA */
.text-muted {
  color: #6b7280 !important; /* This is grey-500. If this flags, change to var(--an-text-secondary) */
}

/* --- Accessibility Focus States --- */
:focus-visible {
  outline: 2px solid var(--an-accent);
  outline-offset: 4px;
}

/* Custom Navbar */
body .navbar {
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0,0,0,0.05);
  transition: all 0.3s ease;
}

body .navbar.navbar-scrolled {
  background-color: rgba(255, 255, 255, 0.98);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.navbar-brand {
  line-height: 1.1;
}

.navbar-brand small {
  color: var(--an-text-secondary); /* Updated variable */
  font-weight: 400;
  font-size: 0.8rem;
  display: block;
}

.nav-link {
  font-weight: 500;
  color: var(--an-text-secondary); /* Darker for accessibility */
  font-size: 0.95rem;
  padding: 0.5rem 1rem !important;
  transition: color 0.2s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--an-primary);
}

/* Buttons */
.btn {
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
}

.btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.3);
  outline: none;
}

.btn-dark {
  background-color: var(--an-primary);
  border-color: var(--an-primary);
}

.btn-dark:hover {
  background-color: #000;
  transform: translateY(-1px);
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

@media (min-width: 768px) {
  .w-md-auto {
    width: auto !important;
  }
}

/* Layout Spacing */
.an-hero {
  padding: 8rem 0 5rem;
}

.an-section {
  padding: 6rem 0;
}

.an-section-muted {
  background-color: var(--an-bg-muted);
}

/* Hero Card */
.hero-card {
  border: 1px solid var(--an-border);
  box-shadow:
    0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
  border-radius: 1rem;
  background: white;
  transition: transform 0.3s ease;
}

.hero-card:hover {
  transform: translateY(-2px);
}

/* Typography Visuals */
.an-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--an-text-secondary); /* Fixed contrast */
  background: #f3f4f6;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 1.5rem;
}

.an-price {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--an-primary);
  line-height: 1;
}

.an-list-icon {
  color: var(--an-primary);
  margin-right: 0.75rem;
  flex-shrink: 0;
}

/* Process Steps */
.step-card {
  height: 100%;
  padding: 2rem;
  border: 1px solid var(--an-border);
  border-radius: 0.75rem;
  background: white;
  transition: border-color 0.3s;
}

.step-card:hover {
  border-color: #9ca3af;
}

.step-number {
  width: 3rem;
  height: 3rem;
  background: var(--an-primary);
  color: white;
  border-radius: 0.75rem; /* Squircle */
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
}

/* Footer */
.an-footer {
  border-top: 1px solid var(--an-border);
  padding: 4rem 0;
  font-size: 0.9rem;
}

/* Utilities */
.text-balance {
  text-wrap: balance; /* Makes headlines look better */
}

/* Animations */
@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

@keyframes drawerSlideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================================
   Booking Page Styles
   ========================================= */
body.booking-page {
  background-color: #f9fafb;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.booking-container {
  flex-grow: 1;
  display: flex;
  align-items: center;
  padding: 2rem 0;
}

.booking-card {
  background: white;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--an-border);
}

.booking-sidebar {
  background-color: #111827; /* Dark sidebar */
  color: white;
  padding: 3rem;
  height: 100%;
}

.booking-main {
  padding: 3rem;
}

/* Form Controls specific to booking to ensure they look polished */
.booking-main .form-control, 
.booking-main .form-select {
  padding: 0.75rem 1rem;
  border-color: #e5e7eb;
  border-radius: 0.5rem;
}

.booking-main .form-control:focus, 
.booking-main .form-select:focus {
  border-color: var(--an-accent);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.booking-main .form-label {
  font-weight: 500;
  font-size: 0.9rem;
  color: #374151;
  margin-bottom: 0.5rem;
}

/* Custom Pill Selector Styles */
.goal-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Hide the actual checkbox input */
.btn-check {
  position: absolute;
  clip: rect(0,0,0,0);
  pointer-events: none;
}

/* The visual label that acts as the button */
.btn-pill-check {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem; /* Reduced padding for sleeker look */
  font-size: 0.875rem; /* Reduced font size (14px) for better balance */
  font-weight: 500;
  color: #111827; /* Dark text */
  background-color: #fff;
  border: 1px solid #111827; /* Black border */
  border-radius: 999px; /* Pill shape */
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  user-select: none;
}

.btn-pill-check:hover {
  background-color: #f3f4f6; /* Light grey hover */
}

/* Selected State */
.btn-check:checked + .btn-pill-check {
  background-color: #111827; /* Black background */
  color: #ffffff; /* White text */
  border-color: #111827;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Focus State for accessibility */
.btn-check:focus + .btn-pill-check {
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2); /* Blue ring */
}

/* Trust badges in sidebar */
.trust-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  opacity: 0.9;
  font-size: 0.95rem;
}

/* Mobile Fixes */
@media (max-width: 991px) {
  /* Tighter Vertical Rhythm */
  .an-hero {
    padding-top: 6rem;
    padding-bottom: 3rem;
    text-align: left;
  }

  .an-section {
    padding: 4rem 0;
  }

  .an-footer {
    padding: 3rem 0;
  }

  .hero-card {
    margin-top: 2rem;
  }

  /* Booking Page Mobile Overrides */
  .booking-sidebar {
    padding: 2rem;
  }
  .booking-main {
    padding: 2rem;
  }

  /* --- Improved Mobile Menu --- */
  
  .navbar-toggler {
    border: none;
    padding: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .navbar-toggler:focus {
    box-shadow: none;
    outline: none;
  }

  /* Hamburger to "X" Animation Logic (CSS ONLY) */
  .navbar-toggler .navbar-toggler-icon {
    background-image: none !important;
  }

  .navbar-toggler .navbar-toggler-icon {
    position: relative;
    width: 24px;
    height: 2px;
    background-color: var(--an-primary);
    transition: background-color 0.3s ease-in-out;
    display: block;
    margin: 0 auto;
  }

  .navbar-toggler .navbar-toggler-icon::before,
  .navbar-toggler .navbar-toggler-icon::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: var(--an-primary);
    left: 0;
    transition: transform 0.3s ease-in-out, top 0.3s ease-in-out;
  }

  .navbar-toggler .navbar-toggler-icon::before {
    top: -7px;
  }

  .navbar-toggler .navbar-toggler-icon::after {
    top: 7px;
  }

  .navbar-toggler[aria-expanded="true"] .navbar-toggler-icon {
    background-color: transparent;
  }

  .navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::before {
    top: 0;
    transform: rotate(45deg);
  }

  .navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::after {
    top: 0;
    transform: rotate(-45deg);
  }

  /* Full Screen Drawer Logic */
  .navbar-collapse {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100vw;
    height: calc(100dvh - 100%);
    
    background: #ffffff;
    border-top: 1px solid var(--an-border);
    box-shadow: none !important;
    
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
  }

  .navbar-collapse.show {
    animation: drawerSlideIn 0.3s ease-out forwards;
  }

  .navbar-collapse.collapsing {
    height: calc(100dvh - 100%) !important;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100vw;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    background: #ffffff;
    border-top: 1px solid var(--an-border);
    transition: none !important;
    opacity: 0;
  }

  .navbar-nav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    width: 100%;
    flex-grow: 1; 
  }

  .nav-item {
    width: 100%;
    border-bottom: 1px solid #f3f4f6;
  }
  
  .nav-item:last-child {
    border-bottom: none;
  }

  .nav-link {
    padding: 1rem 0 !important;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--an-primary); /* Ensure high contrast for menu links */
  }

  /* CTA Positioning */
  .nav-cta {
    margin-top: auto !important;
    width: 100%;
    padding-bottom: 2rem;
    padding-top: 1rem;
  }

  .nav-cta .btn {
    width: 100%;
    display: block;
    justify-content: center;
    padding: 1rem;
    font-size: 1.1rem;
  }
}

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  position: relative;
}