/* ============================================================
   ASTROVASTU — RESPONSIVE STYLES
   ============================================================ */

/* ---- TABLET (< 1200px) ---- */
@media (max-width: 1200px) {
  :root { --section-py: 80px; }
  .container { padding: 0 40px; }
  .header-inner { padding: 0 40px; }
  h1, .h1 { font-size: 56px; }
  h2, .h2 { font-size: 44px; }
  .hero-inner { gap: 48px; }
  .about-grid { gap: 48px; }
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr; gap: 40px; }
  .footer-brand { grid-column: 1 / -1; }
  .process-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
}

/* ---- SMALL TABLET / LARGE MOBILE (< 1024px) ---- */
@media (max-width: 1024px) {
  /* Show mobile bottom nav, hide desktop WhatsApp float */
  .mobile-bottom-nav { display: flex !important; }
  .whatsapp-float { display: none !important; }
  /* Push page content up so footer clears the nav bar */
  body { padding-bottom: 64px; }

  .nav-menu { display: none; }
  .mobile-menu-btn { display: flex; }
  .header-cta .header-phone { display: none; }

  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { display: none; }
  .hero h1 { font-size: 48px; }
  .hero-desc { font-size: 18px; }

  .about-grid { grid-template-columns: 1fr; }
  .about-img-wrap { display: none; }

  .lead-grid { grid-template-columns: 1fr; gap: 48px; }

  .cat-grid { grid-template-columns: 1fr; gap: 24px; }
  .cat-card { height: 320px; }

  .trust-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
  .benefits-grid { grid-template-columns: repeat(2, 1fr); }

  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .testimonials-grid { grid-template-columns: 1fr; gap: 24px; }

  .process-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .step-connector { display: none; }
}

/* ---- MOBILE (< 768px) ---- */
@media (max-width: 768px) {
  :root { --section-py: 60px; }
  .container { padding: 0 20px; }
  .header-inner { padding: 0 14px; height: 72px; }
  .mobile-nav { top: 72px; } /* header shrinks to 72px at this breakpoint */

  /* Logo: constrain so it doesn't push CTA buttons off screen */
  .logo { gap: 10px; min-width: 0; flex-shrink: 1; }
  .logo-icon { width: 36px; height: 36px; font-size: 17px; flex-shrink: 0; }
  .logo-text .brand { font-size: 16px; }
  .logo-text .tagline { font-size: 9px; letter-spacing: 0.04em; }

  /* CTA: hide WhatsApp text button on small phones, keep Book Consultation */
  .header-cta { gap: 6px; }
  .header-cta .btn-outline { display: none; }
  .header-cta .btn-primary { font-size: 12px; padding: 8px 12px; white-space: nowrap; }

  h1, .h1 { font-size: 38px; }
  h2, .h2 { font-size: 32px; }
  h3, .h3 { font-size: 28px; }

  .section-header { margin-bottom: 40px; }
  .section-header h2 { font-size: 28px; }
  .section-header p { font-size: 16px; }

  .hero { padding-top: 72px; }
  .hero h1 { font-size: 34px; }
  .hero-ctas { flex-direction: column; gap: 12px; }
  .hero-ctas .btn { justify-content: center; width: 100%; }
  .hero-trust { flex-wrap: wrap; gap: 12px; }

  .trust-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .stat-number { font-size: 48px; }

  .services-grid { grid-template-columns: 1fr; }
  .benefits-grid { grid-template-columns: 1fr 1fr; }

  .form-row { grid-template-columns: 1fr; }

  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }

  .lead-form-box { padding: 32px 24px; }

  .page-hero { padding: 120px 0 60px; }
  .page-hero h1 { font-size: 36px; }

  .process-grid { grid-template-columns: 1fr; }

  .whatsapp-float { bottom: 20px; right: 20px; width: 52px; height: 52px; font-size: 24px; }
}

/* ---- SMALL MOBILE (< 480px) ---- */
@media (max-width: 480px) {
  h1, .h1 { font-size: 30px; }
  h2, .h2 { font-size: 26px; }
  .benefits-grid { grid-template-columns: 1fr; }
  .btn-lg { padding: 16px 32px; font-size: 16px; }
  .hero-trust { justify-content: center; }
}

/* ---- MOBILE NAV OVERLAY ---- */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
  z-index: 1001;
  position: relative;
}
.mobile-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
  border-radius: 2px;
}

/* Hamburger → X animation when menu is open */
.mobile-menu-btn.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.mobile-menu-btn.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.mobile-menu-btn.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Navigation Panel */
.mobile-nav {
  position: fixed;
  top: 84px; /* matches default header height (84px) — overridden at <768px below */
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(8,17,38,0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 1000;
  padding: 32px 24px;
  border-bottom: 1px solid var(--border-color);

  /* Animation properties */
  opacity: 0;
  visibility: hidden;
  transform: translateY(-20px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);

  /* Scrolling for long menus */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.mobile-nav.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Mobile Nav Links */
.mobile-nav a {
  display: block;
  color: rgba(255,255,255,0.85);
  font-size: 18px;
  font-weight: 500;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  transition: all 0.3s ease;
  position: relative;
  padding-left: 12px;
}

.mobile-nav a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 0;
  background: var(--gold);
  transition: height 0.3s ease;
  border-radius: 2px;
}

.mobile-nav a:hover,
.mobile-nav a.active {
  color: var(--gold);
  padding-left: 20px;
}

.mobile-nav a:hover::before,
.mobile-nav a.active::before {
  height: 24px;
}

/* Mobile Nav Buttons */
.mobile-nav .btn {
  margin-top: 20px;
  width: 100%;
  justify-content: center;
  font-size: 16px;
  padding: 16px 24px;
}

.mobile-nav .btn:first-of-type {
  margin-top: 32px;
}

/* Body Lock when menu is open */
body.mobile-nav-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
}
