/* ── GLOBAL THEME VARIABLES ── */
:root {
  --navy: #0B1229;
  --navy-mid: #141e38;
  --navy-light: #1e2d52;
  --blue: #2563EB;
  --blue-light: #3b82f6;
  --blue-glow: rgba(37, 99, 235, 0.25);
  --gold: #F59E0B;
  --white: #F8FAFF;
  --silver: #CBD5E1;
  --silver-dim: #64748B;
  --green: #10B981;
  --purple: #8B5CF6;
  --font: 'Inter', sans-serif;
  --headline-font: 'Montserrat', sans-serif;
}

/* ── BASE RESET & OVERFLOW FIX ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden; 
  width: 100vw;
  max-width: 100%;
  min-height: 100vh; /* Ensures HTML always spans full screen height */
}

body {
  font-family: var(--font);
  background: var(--navy);
  color: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
  width: 100%;
  
  /* CRITICAL FIX: Overrides the broken absolute positioning in features.css */
  position: relative !important; 
  
  /* STICKY FOOTER MAGIC: Forces the footer to the bottom of the screen */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* This tells the main content area to expand and push the footer down */
main {
  flex-grow: 1;
}

/* ── COMMON COMPONENTS ── */

/* Glass Cards */
.glass-card {
  background: rgba(20, 30, 56, 0.4);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(37, 99, 235, 0.15);
}

.ethereal-glow {
  position: absolute;
  width: 50vw;
  height: 50vw;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.12;
  z-index: -1;
  pointer-events: none; /* Stops it from stretching the screen */
}

/* Buttons */
.btn {
  padding: 10px 22px;
  border-radius: 8px;
  border: none;
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-ghost {
  background: transparent;
  color: var(--silver);
  border: 1px solid rgba(203, 213, 225, 0.25);
}

.btn-ghost:hover {
  border-color: var(--blue);
  color: var(--white);
}

.btn-primary {
  background: var(--blue);
  color: white;
  box-shadow: 0 0 20px var(--blue-glow);
}

.btn-primary:hover {
  background: var(--blue-light);
  box-shadow: 0 0 30px rgba(37, 99, 235, 0.45);
  transform: translateY(-1px);
}

.btn-lg {
  padding: 14px 32px;
  font-size: 1rem;
  border-radius: 10px;
}

.btn-gold {
  background: var(--gold);
  color: var(--navy);
  font-weight: 700;
}

.btn-gold:hover {
  background: #fbbf24;
  transform: translateY(-1px);
}

/* Utility Classes */
.accent { color: var(--blue-light); }
.gold { color: var(--gold); }
.blue { color: var(--blue-light); }
.up { color: var(--green); }

/* Reveal Animation */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.revealed {
  opacity: 1;
  transform: none;
}

/* ── NAV ── */
.site-nav,
nav.site-nav,
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(11, 18, 41, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(37, 99, 235, 0.15);
}

.nav-inner {
  padding: 14px 40px;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--white);
  text-decoration: none;
  letter-spacing: -0.5px;
  flex-shrink: 0;
  z-index: 1002;
}

.nav-logo-img {
  height: 36px;
  width: auto;
  display: block;
}

.nav-logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 900;
  color: white;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 38px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--silver);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  transition: color 0.2s;
  white-space: nowrap;
}

.nav-links a:hover {
  color: var(--white);
}

.nav-mobile-only {
  display: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 1002;
}

.nav-cta {
  display: flex;
  gap: 10px;
  align-items: center;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid rgba(203, 213, 225, 0.2);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  padding: 10px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  z-index: 1002;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 22px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.site-nav.is-open .nav-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-nav.is-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

.site-nav.is-open .nav-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 8, 20, 0.65);
  z-index: 998;
  backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

body.nav-open .nav-overlay {
  opacity: 1;
  visibility: visible;
}

body.nav-open {
  overflow: hidden;
}

/* ── FOOTER ── */
.site-footer,
footer.site-footer,
footer {
  background: var(--navy);
  border-top: 1px solid rgba(37, 99, 235, 0.1);
  padding: 64px 40px 28px;
  width: 100%;
}

.footer-top {
  max-width: 1280px;
  margin: 0 auto 48px;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
}

.footer-brand p {
  font-size: 0.9rem;
  color: var(--silver);
  line-height: 1.7;
  margin: 16px 0 20px;
  max-width: 360px;
}

.footer-logo {
  margin-bottom: 4px;
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-contact a {
  font-size: 0.85rem;
  color: var(--silver-dim);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-contact a:hover {
  color: var(--blue-light);
}

.footer-col h4 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--silver-dim);
  margin-bottom: 18px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
}

.footer-links a {
  font-size: 0.9rem;
  color: var(--silver);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--white);
}

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--silver-dim);
}

/* ═══════════════════════════════════════════════
   ── PERFECTLY ADJUSTED MEDIA QUERIES ──
   ═══════════════════════════════════════════════ */

/* ── TABLET / SMALL DESKTOP (Max 992px) ── */
@media (max-width: 992px) {
  .nav-inner {
    padding: 12px 24px;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-cta {
    display: none;
  }

  .nav-actions {
    margin-left: auto; /* Pushes hamburger strictly to the right */
  }

  /* Fixed Menu Drawer */
  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    width: min(320px, 85vw);
    height: 100vh;
    height: 100dvh;
    margin: 0;
    padding: 80px 24px 30px;
    background: #0d152c;
    border-left: 1px solid rgba(37, 99, 235, 0.2);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.4);
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    transform: translateX(105%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
    overflow-y: auto;
  }

  .site-nav.is-open .nav-links {
    transform: translateX(0);
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 1rem;
  }

  .nav-links a:hover {
    background: rgba(37, 99, 235, 0.1);
    color: var(--blue-light);
  }

  .nav-mobile-only {
    display: list-item;
  }

  .nav-mobile-only:nth-last-child(2) {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .nav-mobile-cta {
    background: var(--blue) !important;
    color: #fff !important;
    text-align: center;
    font-weight: 600 !important;
    box-shadow: 0 4px 15px var(--blue-glow);
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 32px 24px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .site-footer, footer {
    padding: 48px 24px 24px;
  }
}

/* ── MOBILE (Max 768px) ── */
@media (max-width: 768px) {
  .nav-inner {
    padding: 10px 16px;
  }

  .nav-logo-img {
    height: 32px;
  }

  .site-footer, footer {
    padding: 40px 16px 20px;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 32px;
  }

  .footer-brand {
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
}

/* ── SMALL MOBILE (Max 480px) ── */
@media (max-width: 480px) {
  .nav-inner {
    padding: 10px 15px; /* Safely contained inside the 100% width */
  }

  .nav-logo-img {
    height: 28px;
  }

  .nav-toggle {
    width: 40px;
    height: 40px;
    padding: 8px;
  }

  .nav-links {
    width: min(280px, 90vw);
    padding-top: 72px;
  }

  .btn-lg {
    padding: 12px 20px;
    font-size: 0.95rem;
  }

  .ethereal-glow {
    width: 90vw;
    height: 90vw;
    opacity: 0.08;
  }
}

/* ── CALENDAR APPOINTMENT MODAL ── */
.calendar-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.calendar-modal[hidden] {
  display: none !important;
}

.calendar-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 8, 20, 0.72);
  backdrop-filter: blur(4px);
}

.calendar-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(960px, 92vw);
  height: min(820px, 88vh);
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.calendar-modal-dialog iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.calendar-modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(11, 18, 41, 0.85);
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.calendar-modal-close:hover {
  background: #2563EB;
}

body.calendar-open {
  overflow: hidden;
}

@media (max-width: 768px) {
  .calendar-modal {
    padding: 12px;
  }

  .calendar-modal-dialog {
    width: 100%;
    height: 92vh;
    border-radius: 12px;
  }
}