/* ==========================================================================
   EverydayDigests — Premium Vedic Astrology Knowledge & Consultation Platform
   Design System & Styling
   Author: Acharya Shikha Sharma (everydaydigests.com)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;700;900&family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400&family=Outfit:wght@300;400;500;600;700&display=swap');

/* --- CSS Variables & Design Tokens --- */
:root {
  /* Golden-Brown Brand Palette */
  --gold-primary: #D4AF37;
  --gold-light: #F3E5AB;
  --gold-dark: #AA820A;
  --gold-glow: rgba(212, 175, 55, 0.25);

  --amber-brown: #8B5A2B;
  --velvet-brown: #2A1B0E;
  --deep-espresso: #1A1008;

  --parchment-bg: #FAF6EF;
  --card-bg-light: #FFFFFF;
  --surface-alt: #F4ECE1;

  --text-dark: #231911;
  --text-muted: #5C4D41;
  --text-light: #FAF6EF;

  --border-gold: rgba(212, 175, 55, 0.35);
  --border-light: rgba(139, 90, 43, 0.15);

  /* Typography */
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-num: 'Cinzel', serif;

  /* Elevation & Shadows */
  --shadow-sm: 0 4px 12px rgba(42, 27, 14, 0.06);
  --shadow-md: 0 8px 24px rgba(42, 27, 14, 0.1);
  --shadow-lg: 0 16px 40px rgba(42, 27, 14, 0.15);
  --shadow-gold: 0 10px 30px rgba(212, 175, 55, 0.3);

  /* Transitions & Layout */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --max-width: 1240px;
}

/* Dark Theme Variables */
[data-theme="dark"] {
  --parchment-bg: #120B06;
  --card-bg-light: #1C120B;
  --surface-alt: #261A10;

  --text-dark: #F7EFDF;
  --text-muted: #D1BEA8;
  --text-light: #FAF6EF;

  --border-gold: rgba(212, 175, 55, 0.4);
  --border-light: rgba(212, 175, 55, 0.15);

  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
}

/* --- Base & Reset --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--parchment-bg);
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
  -webkit-tap-highlight-color: transparent;
  padding: max(env(safe-area-inset-top), 0px) max(env(safe-area-inset-right), 0px) max(env(safe-area-inset-bottom), 0px) max(env(safe-area-inset-left), 0px);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-dark);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: 16px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  border-radius: 0;
}

input[type="date"],
input[type="time"],
input[type="email"],
input[type="tel"],
input[type="text"] {
  font-size: 16px;
}

/* Prevent iOS zoom on input focus */
@supports (-webkit-touch-callout: none) {
  input, textarea, select {
    font-size: 16px !important;
  }
}

/* --- Helper Container & Utilities --- */
.container {
  width: 90%;
  max-width: var(--max-width);
  margin: 0 auto;
}

.text-gold {
  color: var(--gold-primary);
}

.text-center {
  text-align: center;
}

.section-tag {
  display: inline-block;
  font-family: var(--font-num);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold-primary);
  background: rgba(212, 175, 55, 0.1);
  padding: 6px 16px;
  border-radius: 50px;
  border: 1px solid var(--border-gold);
  margin-bottom: 12px;
}

.section-title {
  font-size: 2.75rem;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.section-desc {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 40px auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn-gold {
  background: linear-gradient(135deg, #D4AF37 0%, #B8860B 100%);
  color: #1A1008;
  box-shadow: var(--shadow-gold);
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(212, 175, 55, 0.45);
  filter: brightness(1.05);
}

.btn-outline {
  background: transparent;
  color: var(--text-dark);
  border-color: var(--border-gold);
}

.btn-outline:hover {
  background: rgba(212, 175, 55, 0.1);
  border-color: var(--gold-primary);
}

.btn-whatsapp {
  background: #25D366;
  color: #FFF;
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(37, 211, 102, 0.45);
  background: #22BF5B;
}

/* --- Top Announcement Bar --- */
.top-bar {
  background: var(--velvet-brown);
  color: var(--gold-light);
  padding: 8px 0;
  font-size: 0.88rem;
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.top-info {
  display: flex;
  gap: 20px;
  align-items: center;
}

.top-info span {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* --- Header / Navigation --- */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(250, 246, 239, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition);
  padding-top: env(safe-area-inset-top);
}

[data-theme="dark"] .header {
  background: rgba(18, 11, 6, 0.92);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--gold-primary);
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.logo-text h2 {
  font-size: 1.5rem;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.logo-text p {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--amber-brown);
  letter-spacing: 1px;
  text-transform: uppercase;
}

[data-theme="dark"] .logo-text p {
  color: var(--gold-primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.nav-links a:hover, .nav-links a.active {
  color: var(--gold-primary);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gold-primary);
  transition: var(--transition);
}

.nav-links a:hover::after, .nav-links a.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.theme-toggle {
  background: transparent;
  border: 1px solid var(--border-gold);
  color: var(--text-dark);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.theme-toggle:hover {
  background: rgba(212, 175, 55, 0.15);
}

.menu-btn {
  display: none;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--text-dark);
  cursor: pointer;
}

/* --- Hero Section --- */
.hero {
  position: relative;
  padding: 90px 0 110px 0;
  background: radial-gradient(circle at 70% 30%, rgba(212, 175, 55, 0.12) 0%, transparent 60%),
              radial-gradient(circle at 10% 80%, rgba(139, 90, 43, 0.08) 0%, transparent 50%);
  overflow: hidden;
}

.insta-icon-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.insta-icon-svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  vertical-align: middle;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid var(--border-gold);
  padding: 8px 18px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--amber-brown);
  margin-bottom: 24px;
}

[data-theme="dark"] .hero-badge {
  color: var(--gold-light);
}

.hero-content h1 {
  font-size: 3.5rem;
  line-height: 1.15;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--text-dark) 0%, var(--amber-brown) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="dark"] .hero-content h1 {
  background: linear-gradient(135deg, #FFFFFF 0%, var(--gold-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-content p {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 36px;
  max-width: 600px;
}

.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding-top: 30px;
  border-top: 1px solid var(--border-light);
}

.stat-item h3 {
  font-family: var(--font-num);
  font-size: 2.2rem;
  color: var(--gold-primary);
}

.stat-item p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

.hero-card {
  background: var(--card-bg-light);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.hero-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-lg);
  padding: 1px;
  background: linear-gradient(135deg, var(--gold-primary), transparent 70%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.card-header {
  text-align: center;
  margin-bottom: 24px;
}

.card-header h3 {
  font-size: 1.8rem;
  margin-bottom: 6px;
}

.card-header p {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* --- About Acharya Shikha --- */
.about {
  padding: 100px 0;
  background: var(--surface-alt);
}

.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 60px;
  align-items: center;
}

.about-visual {
  position: relative;
}

.about-img-box {
  background: linear-gradient(135deg, var(--velvet-brown), var(--amber-brown));
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-gold);
}

.about-avatar {
  width: 100%;
  height: 520px;
  border-radius: var(--radius-md);
  background: #1A1008 url('astro_shikha.jpg') center 20%/cover no-repeat;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 24px;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.4);
}

.about-avatar-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26, 16, 8, 0.9) 0%, transparent 60%);
}

.avatar-caption {
  position: relative;
  z-index: 2;
  color: #FFF;
}

.avatar-caption h3 {
  color: var(--gold-light);
  font-size: 1.6rem;
}

.about-content h2 {
  font-size: 2.75rem;
  margin-bottom: 20px;
}

.about-content p {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 30px;
}

.pillar-item {
  background: var(--card-bg-light);
  padding: 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}

.pillar-item h4 {
  font-size: 1.2rem;
  color: var(--gold-primary);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* --- Free Kundli Generator --- */
.kundli-section {
  padding: 100px 0;
}

.kundli-wrapper {
  background: var(--card-bg-light);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 44px;
  box-shadow: var(--shadow-lg);
}

.kundli-form {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 30px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group.full-width {
  grid-column: span 3;
}

.form-group label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-dark);
}

.form-control {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background: var(--parchment-bg);
  color: var(--text-dark);
  outline: none;
  transition: var(--transition);
  font-size: 16px;
}

@media (max-width: 768px) {
  .form-control {
    padding: 16px 14px;
    font-size: 16px;
  }
}

.form-control:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

.kundli-result-box {
  display: none;
  margin-top: 40px;
  padding: 30px;
  background: var(--surface-alt);
  border-radius: var(--radius-md);
  border: 1px dashed var(--gold-primary);
  animation: fadeIn 0.5s ease;
}

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

.kundli-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 20px;
}

.kundli-stat-card {
  background: var(--card-bg-light);
  padding: 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  text-align: center;
}

.kundli-stat-card label {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 1px;
}

.kundli-stat-card p {
  font-family: var(--font-num);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--gold-primary);
  margin-top: 4px;
}

/* --- Services Grid --- */
.services {
  padding: 100px 0;
  background: var(--surface-alt);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.service-card {
  background: var(--card-bg-light);
  border-radius: var(--radius-md);
  padding: 32px;
  border: 1px solid var(--border-light);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.service-card:hover {
  transform: translateY(-6px);
  border-color: var(--gold-primary);
  box-shadow: var(--shadow-md);
}

.service-icon {
  width: 54px;
  height: 54px;
  background: rgba(212, 175, 55, 0.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-primary);
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.service-card h3 {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.service-card p {
  color: var(--text-muted);
  font-size: 0.98rem;
  margin-bottom: 24px;
}

/* --- Research Hub --- */
.research-hub {
  padding: 100px 0;
}

.tabs-header {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.tab-btn {
  padding: 12px 24px;
  border-radius: 50px;
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-dark);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.tab-btn.active, .tab-btn:hover {
  background: var(--gold-primary);
  color: #1A1008;
  border-color: var(--gold-primary);
}

.tab-content {
  display: none;
  background: var(--card-bg-light);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  padding: 40px;
  box-shadow: var(--shadow-md);
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

.research-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.research-item {
  padding: 20px;
  border-left: 3px solid var(--gold-primary);
  background: var(--parchment-bg);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.research-item h4 {
  font-size: 1.3rem;
  margin-bottom: 8px;
}

/* --- Learn & Blog Section --- */
.learn-blog {
  padding: 100px 0;
  background: var(--surface-alt);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-bottom: 60px;
}

.blog-card {
  background: var(--card-bg-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-light);
  transition: var(--transition);
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.blog-img {
  height: 200px;
  background-size: cover;
  background-position: center;
}

.blog-body {
  padding: 24px;
}

.blog-tag {
  font-size: 0.78rem;
  color: var(--gold-primary);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
  margin-bottom: 8px;
}

.blog-body h3 {
  font-size: 1.35rem;
  margin-bottom: 12px;
}

.reels-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 30px;
}

.reel-card {
  background: var(--velvet-brown);
  border-radius: var(--radius-md);
  padding: 20px;
  color: var(--gold-light);
  text-align: center;
  border: 1px solid var(--border-gold);
  position: relative;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.reel-icon {
  font-size: 2.5rem;
  color: var(--gold-primary);
  margin-bottom: auto;
  padding-top: 30px;
}

/* --- Premium Reports Store --- */
.reports-store {
  padding: 100px 0;
}

.reports-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.report-card {
  background: var(--card-bg-light);
  border-radius: var(--radius-md);
  padding: 32px;
  border: 1px solid var(--border-gold);
  box-shadow: var(--shadow-sm);
  position: relative;
}

.report-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--amber-brown);
  color: #FFF;
  font-size: 0.75rem;
  padding: 4px 12px;
  border-radius: 50px;
  font-weight: 600;
}

.report-card h3 {
  font-size: 1.6rem;
  margin-bottom: 12px;
}

.report-features {
  list-style: none;
  margin: 20px 0;
}

.report-features li {
  font-size: 0.92rem;
  color: var(--text-muted);
  padding: 6px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.report-features li::before {
  content: '✓';
  color: var(--gold-primary);
  font-weight: bold;
}

/* --- FAQ Accordion --- */
.faq-section {
  padding: 100px 0;
  background: var(--surface-alt);
}

.faq-container {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: var(--card-bg-light);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  margin-bottom: 16px;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  padding: 20px 24px;
  text-align: left;
  background: transparent;
  border: none;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-dark);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  padding: 0 24px;
  color: var(--text-muted);
}

.faq-item.active .faq-answer {
  padding: 0 24px 20px 24px;
  max-height: 300px;
}

.faq-item.active .faq-question span {
  transform: rotate(180deg);
}

/* --- Booking & Contact --- */
.booking-contact {
  padding: 100px 0;
}

.booking-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
}

.contact-info-card {
  background: var(--velvet-brown);
  color: var(--gold-light);
  border-radius: var(--radius-lg);
  padding: 44px;
  border: 1px solid var(--border-gold);
}

.contact-info-card h2 {
  color: #FFF;
  font-size: 2.4rem;
  margin-bottom: 16px;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
}

.info-icon {
  width: 46px;
  height: 46px;
  background: rgba(212, 175, 55, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-primary);
  font-size: 1.2rem;
}

/* --- Footer --- */
.footer {
  background: var(--deep-espresso);
  color: var(--text-light);
  padding: 80px 0 30px 0;
  border-top: 1px solid rgba(212, 175, 55, 0.2);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 60px;
}

.footer-col h4 {
  color: var(--gold-primary);
  font-size: 1.2rem;
  margin-bottom: 20px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: rgba(250, 246, 239, 0.7);
  font-size: 0.95rem;
  transition: var(--transition);
}

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

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.9rem;
  color: rgba(250, 246, 239, 0.5);
}

/* --- Modal Confirmation --- */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--card-bg-light);
  border-radius: var(--radius-lg);
  max-width: 540px;
  width: 100%;
  padding: 36px;
  border: 1px solid var(--border-gold);
  position: relative;
  box-shadow: var(--shadow-lg);
  animation: fadeIn 0.3s ease;
}

.close-modal {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--text-muted);
}

/* --- Responsive Media Queries --- */
@media (max-width: 1024px) {
  .hero-grid, .about-grid, .booking-grid {
    grid-template-columns: 1fr;
  }

  .services-grid, .reports-grid, .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .reels-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .hero-content h1 {
    font-size: 2.6rem;
  }

  .section-title {
    font-size: 2.2rem;
  }

  .section-desc {
    font-size: 1rem;
  }

  .container {
    width: 92%;
  }

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

  .form-group.full-width {
    grid-column: span 1;
  }

  .services-grid, .reports-grid, .blog-grid, .research-list, .kundli-grid {
    grid-template-columns: 1fr;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--card-bg-light);
    flex-direction: column;
    padding: 20px;
    box-shadow: var(--shadow-md);
    z-index: 999;
  }

  .nav-links.active {
    display: flex;
  }

  .menu-btn {
    display: block;
  }

  .top-bar {
    font-size: 0.78rem;
  }

  .top-info {
    gap: 12px;
    flex-wrap: wrap;
  }

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

  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .stat-item h3 {
    font-size: 1.8rem;
  }

  .panchang-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

/* --- Dynamic Location Autocomplete Dropdown --- */
.form-group.has-autocomplete {
  position: relative;
}

.location-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--card-bg-light);
  border: 1px solid var(--border-gold);
  border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  max-height: 260px;
  overflow-y: auto;
  z-index: 1500;
  box-shadow: var(--shadow-md);
  display: none;
}

.location-dropdown.active {
  display: block;
}

.location-item {
  padding: 10px 16px;
  font-size: 0.92rem;
  color: var(--text-dark);
  cursor: pointer;
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}

.location-item:last-child {
  border-bottom: none;
}

.location-item:hover, .location-item.highlighted {
  background: rgba(212, 175, 55, 0.15);
  color: var(--amber-brown);
}

[data-theme="dark"] .location-item:hover, [data-theme="dark"] .location-item.highlighted {
  color: var(--gold-light);
}

.location-item .loc-match {
  font-weight: 700;
  color: var(--gold-primary);
}

/* --- Daily Panchang Section --- */
.panchang-section {
  padding: 80px 0 20px 0;
}

.panchang-wrapper {
  background: linear-gradient(135deg, var(--surface-alt) 0%, var(--card-bg-light) 100%);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-lg);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.panchang-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 30px;
}

.panchang-card {
  background: var(--parchment-bg);
  padding: 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  transition: var(--transition);
}

.panchang-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold-primary);
  box-shadow: var(--shadow-md);
}

.panchang-card .panchang-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.panchang-card h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.panchang-card p {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-dark);
}

.panchang-card .panchang-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.panchang-rahu-alert {
  margin-top: 30px;
  padding: 12px 28px;
  background: rgba(139, 90, 43, 0.08);
  border-radius: 50px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: var(--transition);
}

.panchang-rahu-alert.active-alert {
  background: rgba(220, 53, 69, 0.1);
  color: #dc3545;
  border: 1px solid rgba(220, 53, 69, 0.2);
}

/* ==========================================================================
   Priority 1 UX Enhancements
   ========================================================================== */

/* --- Hero Grid Layout --- */
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 60px;
  align-items: center;
}

/* --- Scroll-Reveal Animations --- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s cubic-bezier(0.25, 0.8, 0.25, 1),
              transform 0.7s cubic-bezier(0.25, 0.8, 0.25, 1);
  will-change: opacity, transform;
}

.reveal.reveal--left {
  transform: translateX(-40px);
}

.reveal.reveal--right {
  transform: translateX(40px);
}

.reveal.revealed {
  opacity: 1;
  transform: translate(0, 0);
}

/* Staggered children */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s cubic-bezier(0.25, 0.8, 0.25, 1),
              transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.reveal-stagger.revealed > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger.revealed > *:nth-child(2) { transition-delay: 0.15s; }
.reveal-stagger.revealed > *:nth-child(3) { transition-delay: 0.25s; }
.reveal-stagger.revealed > *:nth-child(4) { transition-delay: 0.35s; }
.reveal-stagger.revealed > *:nth-child(5) { transition-delay: 0.45s; }
.reveal-stagger.revealed > *:nth-child(6) { transition-delay: 0.55s; }
.reveal-stagger.revealed > *:nth-child(7) { transition-delay: 0.60s; }
.reveal-stagger.revealed > *:nth-child(8) { transition-delay: 0.65s; }
.reveal-stagger.revealed > *:nth-child(9) { transition-delay: 0.70s; }
.reveal-stagger.revealed > * {
  opacity: 1;
  transform: translateY(0);
}

/* --- Scroll Progress Bar --- */
.scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold-primary), #FFD700);
  z-index: 1999;
  transition: width 0.1s linear;
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.6);
  pointer-events: none;
}

/* --- Floating WhatsApp Button --- */
.fab-whatsapp {
  position: fixed;
  bottom: calc(90px + max(env(safe-area-inset-bottom), 0px));
  right: max(24px, env(safe-area-inset-right));
  z-index: 1800;
  width: 58px;
  height: 58px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.5);
  cursor: pointer;
  text-decoration: none;
  opacity: 0;
  animation: fab-pop-in 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  animation-delay: 1.4s;
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
              box-shadow 0.3s ease;
  -webkit-user-select: none;
  user-select: none;
}

@keyframes fab-pop-in {
  from { opacity: 0; transform: scale(0.4) rotate(-15deg); }
  to   { opacity: 1; transform: scale(1)   rotate(0deg);  }
}

.fab-whatsapp:hover {
  transform: scale(1.12) rotate(6deg);
  box-shadow: 0 10px 32px rgba(37, 211, 102, 0.65);
}

.fab-whatsapp svg {
  width: 30px;
  height: 30px;
  fill: #FFF;
}

.fab-whatsapp::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(37, 211, 102, 0.5);
  animation: fab-pulse 2.4s ease-out infinite;
  pointer-events: none;
}

@keyframes fab-pulse {
  0%   { transform: scale(1);   opacity: 0.7; }
  70%  { transform: scale(1.4); opacity: 0;   }
  100% { transform: scale(1.4); opacity: 0;   }
}

.fab-whatsapp .fab-tooltip {
  position: absolute;
  right: 68px;
  background: var(--velvet-brown);
  color: var(--gold-light);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateX(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: var(--shadow-md);
}

.fab-whatsapp:hover .fab-tooltip {
  opacity: 1;
  transform: translateX(0);
}

/* --- Back-to-Top Button --- */
.back-to-top {
  position: fixed;
  bottom: calc(24px + max(env(safe-area-inset-bottom), 0px));
  right: max(24px, env(safe-area-inset-right));
  z-index: 1800;
  width: 46px;
  height: 46px;
  background: linear-gradient(135deg, var(--gold-primary), var(--amber-brown));
  color: var(--velvet-brown);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 900;
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.45);
  opacity: 0;
  transform: scale(0.6) translateY(12px);
  transition: opacity 0.35s ease,
              transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.3s ease;
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
}

.back-to-top.visible {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  transform: scale(1.12) translateY(-3px);
  box-shadow: 0 10px 28px rgba(212, 175, 55, 0.6);
}

/* --- Responsive fixes for Tablets (640px breakpoint) --- */
@media (max-width: 640px) {
  .container {
    width: 94%;
  }

  .top-bar {
    font-size: 0.72rem;
    padding: 6px 0;
  }

  .top-info span:last-child {
    display: none;
  }

  .logo-text h2 {
    font-size: 1.3rem;
  }

  .hero-content h1 {
    font-size: 2.2rem;
    line-height: 1.2;
  }

  .hero-content p {
    font-size: 1rem;
    margin-bottom: 24px;
  }

  .hero-stats {
    grid-template-columns: 1fr;
    border-top: none;
    padding-top: 0;
    margin-top: 20px;
    gap: 16px;
  }

  .stat-item h3 {
    font-size: 1.6rem;
  }

  .stat-item p {
    font-size: 0.85rem;
  }

  .section-title {
    font-size: 2rem;
    margin-bottom: 12px;
  }

  .section-desc {
    font-size: 0.95rem;
    margin-bottom: 32px;
  }

  .btn {
    padding: 11px 18px;
    font-size: 0.9rem;
  }

  .hero-badge {
    font-size: 0.75rem;
    padding: 6px 12px;
    gap: 6px;
  }

  .hero-cta {
    flex-direction: column;
    gap: 10px;
    margin-bottom: 28px;
  }

  .hero-card {
    padding: 28px;
  }

  .card-header h3 {
    font-size: 1.5rem;
  }

  .panchang-wrapper {
    padding: 32px 20px;
  }

  .panchang-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .kundli-wrapper {
    padding: 32px 20px;
  }

  .about-grid {
    gap: 30px;
  }

  .about-avatar {
    height: 400px;
  }

  .about-content h2 {
    font-size: 2.2rem;
  }

  section {
    padding: 70px 0;
  }

  .booking-grid {
    gap: 30px;
  }

  .contact-info-card {
    padding: 32px 24px;
  }

  .location-dropdown {
    max-height: min(260px, 40vh);
  }
}

/* --- Responsive fixes for FABs & Ultra-Small Phones --- */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .container {
    width: 96%;
  }

  .fab-whatsapp {
    width: 50px;
    height: 50px;
    bottom: 68px;
    right: 12px;
  }
  
  .back-to-top {
    width: 42px;
    height: 42px;
    bottom: 16px;
    right: 12px;
  }
  
  h1 {
    font-size: 2rem !important;
    line-height: 1.2 !important;
  }
  
  .section-title {
    font-size: 1.7rem !important;
  }

  .section-tag {
    font-size: 0.75rem;
    padding: 4px 12px;
  }
  
  .hero {
    padding: 50px 0 70px 0;
  }
  
  .hero-badge {
    font-size: 0.7rem;
    padding: 5px 10px;
    margin-bottom: 16px;
  }
  
  .btn {
    width: 100%;
    text-align: center;
    padding: 10px 16px;
    font-size: 0.88rem;
  }
  
  .hero-cta {
    flex-direction: column;
    gap: 8px;
    margin-bottom: 28px;
  }

  .panchang-wrapper {
    padding: 20px 16px;
  }

  .panchang-card {
    padding: 16px;
  }

  .panchang-card .panchang-icon {
    font-size: 1.6rem;
  }
  
  .kundli-wrapper {
    padding: 20px 16px;
  }

  .kundli-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .kundli-stat-card {
    padding: 12px;
  }

  .about-avatar {
    height: 320px;
  }

  .about-content h2 {
    font-size: 1.8rem;
  }

  .contact-info-card {
    padding: 20px 16px;
  }

  .contact-info-card h2 {
    font-size: 1.8rem;
  }
  
  .modal-content {
    padding: 20px 16px;
  }

  .modal-content h3 {
    font-size: 1.5rem;
  }

  .form-control {
    font-size: 16px;
  }

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

/* --- Ultra-Small Phones (360px and below) --- */
@media (max-width: 360px) {
  .container {
    width: 97%;
  }

  h1, h2 {
    font-size: 1.5rem !important;
  }

  h3 {
    font-size: 1.2rem;
  }

  .section-title {
    font-size: 1.5rem !important;
  }

  .section-desc {
    font-size: 0.9rem;
  }

  .btn {
    padding: 9px 14px;
    font-size: 0.82rem;
    gap: 6px;
  }

  .hero {
    padding: 40px 0 60px 0;
  }

  .hero-content p {
    font-size: 0.95rem;
  }

  .top-bar {
    font-size: 0.7rem;
    padding: 4px 0;
  }

  .logo-text h2 {
    font-size: 1.1rem;
  }

  .logo-text p {
    font-size: 0.65rem;
  }

  .fab-whatsapp {
    width: 45px;
    height: 45px;
    bottom: 60px;
    right: 10px;
  }

  .fab-whatsapp svg {
    width: 24px;
    height: 24px;
  }

  .back-to-top {
    width: 38px;
    height: 38px;
    bottom: 12px;
    right: 10px;
    font-size: 0.9rem;
  }

  .form-control {
    padding: 12px 10px;
    font-size: 16px;
  }

  .form-group label {
    font-size: 0.85rem;
  }

  .panchang-wrapper {
    padding: 16px 12px;
  }

  .panchang-card {
    padding: 12px;
  }

  .kundli-wrapper {
    padding: 16px 12px;
  }

  .contact-info-card {
    padding: 16px 12px;
  }

  .modal-content {
    padding: 16px 12px;
  }

  .service-card, .report-card {
    padding: 16px;
  }
}
