/* ==========================================================================
   ASTRO GOUR — PREMIUM SPIRITUAL LUXURY MASTER STYLESHEET
   Brand: ASTRO GOUR (Dr. Gour Bhattacharya)
   Aesthetic: Luxury Spiritual Editorial + Modern Vedic Astrology
   Colors: Warm Ivory, Soft Cream, Champagne, Muted Gold, Deep Burgundy
   Typography: Cinzel, Playfair Display, Marcellus, Plus Jakarta Sans, Noto Sans Bengali
   Responsive Engine: Fluid clamp() Mobile-First (320px iPhone Mini to 1440px+ Desktop)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;600;700;800;900&family=Marcellus&family=Playfair+Display:ital,wght@0,500;0,600;0,700;0,800;1,400;1,600&family=Noto+Sans+Bengali:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Canvas & Backgrounds (Warm, Luminous, Serene) */
  --bg-ivory: #FDFBF7;
  --bg-cream: #FAF6EE;
  --bg-champagne: #F3EBD9;
  --bg-parchment: #EFE8D8;
  --bg-white: #FFFFFF;
  --bg-celestial-soft: #F0F4F8;

  /* Typographic & Neutral Colors */
  --text-primary: #1F1916;
  /* Deep Espresso / Ink: Maximum legibility & warmth */
  --text-secondary: #4A3E38;
  /* Soft Charcoal Brown */
  --text-muted: #7A6D65;
  /* Muted Silt */
  --text-light: #FDFBF7;
  /* Luminous Ivory for dark accent badges/footer */

  /* Regal Vedic Accents */
  --gold-primary: #C59B27;
  /* Antique Muted Gold */
  --gold-light: #E8CF7C;
  /* Soft Champagne Gold */
  --gold-dark: #967417;
  /* Burnished Bronze Gold */
  --gold-soft-bg: rgba(197, 155, 39, 0.08);
  --gold-border: rgba(197, 155, 39, 0.25);
  --gold-border-strong: rgba(197, 155, 39, 0.6);

  --burgundy-primary: #6B1426;
  /* Deep Sacred Burgundy / Sindoor */
  --burgundy-hover: #540D1D;
  --burgundy-soft: rgba(107, 20, 38, 0.06);

  --plum-accent: #4A1D2F;
  /* Soft Royal Plum */

  /* Conversion Colors */
  --whatsapp-green: #25D366;
  --whatsapp-dark: #1EBE5D;
  --whatsapp-soft-bg: #EAF9F0;

  --call-blue: #1D4ED8;
  --call-blue-hover: #1E40AF;

  /* Luxury Light Surface Accents (Warm Cream, Parchment & Crisp White) */
  --surface-cream: #FAF6EE;
  --surface-parchment: #F4EFE6;
  --surface-card: #FFFFFF;
  --surface-border-gold: rgba(197, 155, 39, 0.25);

  /* Spacing Scale */
  --space-3xs: 0.25rem;
  --space-2xs: 0.5rem;
  --space-xs: 0.75rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4.5rem;
  --space-3xl: 6rem;

  /* iOS Safe Area Insets (iPhone Mini, iPhone 15/16/17, Notch, Dynamic Island, Home Bar) */
  --sat: env(safe-area-inset-top, 0px);
  --sar: env(safe-area-inset-right, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
}

/* ==========================================================================
   1. RESPONSIVE FOUNDATION & OVERFLOW CONTAINMENT
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-ivory);
  color: var(--text-primary);
  overflow-x: hidden;
  max-width: 100vw;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-ivory);
  color: var(--text-primary);
  overflow-x: hidden;
  max-width: 100vw;
  margin: 0;
  padding: 0;
  padding-left: var(--sal);
  padding-right: var(--sar);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}

/* Prevent horizontal overflow on all text elements */
p,
h1,
h2,
h3,
h4,
h5,
h6,
span,
a,
li,
blockquote,
dt,
dd {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* Fluid Responsive Media (Images, Videos, Embeds) */
img,
video,
iframe,
embed,
object {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ==========================================================================
   16:9 ASPECT RATIO ENGINE (Guaranteed 16:9 across all browsers and devices)
   ========================================================================== */
.aspect-video,
.aspect-16-9,
.service-ratio-16-9,
[data-aspect="16:9"] {
  aspect-ratio: 16 / 9 !important;
  width: 100% !important;
  position: relative !important;
}

.aspect-video>img,
.aspect-16-9>img,
.service-ratio-16-9>img,
[data-aspect="16:9"]>img {
  aspect-ratio: 16 / 9 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
}

/* ==========================================================================
   2. FLUID TYPOGRAPHY WITH RESPONSIVE CLAMP() (320px to 1440px+)
   ========================================================================== */
.clamp-hero-title {
  font-size: clamp(1.75rem, 5.2vw + 0.4rem, 3.5rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.clamp-h1 {
  font-size: clamp(1.45rem, 3.5vw + 0.35rem, 2.65rem);
  line-height: 1.2;
}

.clamp-h2 {
  font-size: clamp(1.2rem, 2.4vw + 0.3rem, 2.15rem);
  line-height: 1.25;
}

.clamp-h3 {
  font-size: clamp(1.05rem, 1.6vw + 0.25rem, 1.45rem);
  line-height: 1.35;
}

.clamp-h4 {
  font-size: clamp(0.95rem, 1.1vw + 0.2rem, 1.2rem);
  line-height: 1.4;
}

.clamp-body {
  font-size: clamp(0.9rem, 0.4vw + 0.75rem, 1.05rem);
  line-height: 1.65;
}

.clamp-caption {
  font-size: clamp(0.75rem, 0.25vw + 0.65rem, 0.875rem);
  line-height: 1.45;
}

/* Font Families */
.font-cinzel {
  font-family: 'Cinzel', serif;
}
/* Editorial Capitalized Heading Typography */
.font-heading {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  letter-spacing: -0.015em;
}


.font-marcellus {
  font-family: 'Marcellus', 'Cinzel', serif;
}

.font-playfair {
  font-family: 'Playfair Display', Georgia, serif;
}

.font-jakarta {
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.font-bengali {
  font-family: 'Noto Sans Bengali', sans-serif;
  line-height: 1.65;
}

/* Editorial Gold Gradients */
.text-gold-gradient {
  background: linear-gradient(135deg, #967417 0%, #C59B27 50%, #75570D 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gold-light-gradient {
  background: linear-gradient(135deg, #C59B27 0%, #E8CF7C 50%, #B8860B 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.bg-gold-gradient {
  background: linear-gradient(135deg, #C59B27 0%, #E8CF7C 50%, #967417 100%);
  color: #1F1916;
}

.bg-gold-gradient:hover {
  background: linear-gradient(135deg, #E8CF7C 0%, #C59B27 100%);
}

.bg-burgundy-gradient {
  background: linear-gradient(135deg, #6B1426 0%, #871A31 100%);
  color: #FDFBF7;
}

.bg-emerald-gradient {
  background: linear-gradient(135deg, #25D366 0%, #1EBE5D 100%);
  color: #FFFFFF;
}

/* ==========================================================================
   3. LUXURY CARDS & GLASSMORPHISM (WARM & LUMINOUS)
   ========================================================================== */
.card-luxury {
  background: #FFFFFF;
  border: 1px solid var(--gold-border);
  box-shadow: 0 4px 20px -2px rgba(31, 25, 22, 0.05);
  border-radius: 1rem;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-luxury:hover {
  border-color: var(--gold-border-strong);
  box-shadow: 0 12px 30px -4px rgba(197, 155, 39, 0.15), 0 4px 12px -2px rgba(31, 25, 22, 0.04);
  transform: translateY(-3px);
}

.card-champagne {
  background: linear-gradient(180deg, #FAF6EE 0%, #F3EBD9 100%);
  border: 1px solid rgba(197, 155, 39, 0.3);
  box-shadow: 0 4px 18px rgba(31, 25, 22, 0.04);
  border-radius: 1rem;
  transition: all 0.3s ease;
}

.card-champagne:hover {
  border-color: var(--gold-primary);
  box-shadow: 0 10px 28px rgba(197, 155, 39, 0.16);
  transform: translateY(-3px);
}

.card-dark-luxury,
.card-light-luxury {
  background: #FAF6EE;
  border: 1px solid rgba(197, 155, 39, 0.3);
  box-shadow: 0 4px 20px rgba(31, 25, 22, 0.05);
  border-radius: 1rem;
  color: var(--text-primary);
}

.luxury-footer {
  background: linear-gradient(180deg, #111728 0%, #0A0F1D 100%);
  border-top: 2px solid rgba(197, 155, 39, 0.45);
  color: #E2E8F0;
}

.luxury-footer p,
.luxury-footer li,
.luxury-footer span {
  color: #CBD5E1;
}

.luxury-footer a:not(.btn-touch) {
  color: #E2E8F0;
}

.luxury-footer a:not(.btn-touch):hover {
  color: #E8CF7C;
}

.luxury-footer .bg-white {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(197, 155, 39, 0.35) !important;
  color: #F8FAFC !important;
}

.luxury-footer .text-\[\#1F1916\] {
  color: #F8FAFC !important;
}

.luxury-footer .text-\[\#4A3E38\] {
  color: #CBD5E1 !important;
}

.luxury-footer .text-\[\#7A6D65\] {
  color: #94A3B8 !important;
}

.luxury-footer .border-\[\#C59B27\]\/20,
.luxury-footer .border-\[\#C59B27\]\/30 {
  border-color: rgba(197, 155, 39, 0.3) !important;
}

.luxury-footer img[src*="astrogour-logo"] {
  filter: drop-shadow(0 2px 8px rgba(197, 155, 39, 0.35));
}

.luxury-footer .bg-\[\#FAF6EE\] {
  background: rgba(197, 155, 39, 0.12) !important;
  color: #E8CF7C !important;
}

/* ==========================================================================
   4. HEADER & TOP BARS (SAFE AREA AWARE)
   ========================================================================== */
.luxury-navbar {
  background: linear-gradient(135deg, #021a05 0%, #042409 50%, #021a05 100%) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 2px solid rgba(197, 155, 39, 0.4) !important;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.35);
  transition: all 0.3s ease;
}

.luxury-navbar.scrolled {
  background: #021d04 !important;
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.55);
  border-bottom-color: rgba(197, 155, 39, 0.6) !important;
}

/* Nav links styling on dark emerald header */
.luxury-navbar .desktop-nav>a,
.luxury-navbar .desktop-nav>div>a {
  color: #FDFBF7 !important;
}

.luxury-navbar .desktop-nav>a:hover,
.luxury-navbar .desktop-nav>div>a:hover {
  color: #E8CF7C !important;
}

.luxury-navbar .desktop-nav a.border-b-2,
.luxury-navbar .desktop-nav a.active-nav,
.luxury-navbar .desktop-nav div.active-nav>a {
  color: #E8CF7C !important;
  border-bottom-color: #C59B27 !important;
}

/* Mobile Hamburger on dark navbar */
.luxury-navbar #mobileMenuBtn {
  color: #E8CF7C !important;
}

/* Desktop Navigation Link Protection (Zero 2-line wraps) */
.desktop-nav a,
.desktop-nav span {
  white-space: nowrap !important;
}


/* Subtle Celestial Watermark Orbit */
.celestial-watermark {
  position: absolute;
  pointer-events: none;
  opacity: 0.07;
  z-index: 0;
  max-width: 90vw;
  max-height: 90vw;
  overflow: hidden;
}

@keyframes spinSlow {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes spinSlowReverse {
  from {
    transform: rotate(360deg);
  }

  to {
    transform: rotate(0deg);
  }
}

.animate-spin-celestial {
  animation: spinSlow 90s linear infinite;
}

.animate-spin-celestial-reverse {
  animation: spinSlowReverse 110s linear infinite;
}

/* ==========================================================================
   5. BUTTONS, TOUCH TARGETS & TOUCH UX (>= 44px)
   ========================================================================== */
.btn-touch {
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  font-weight: 600;
  transition: all 0.25s ease;
  touch-action: manipulation;
  text-decoration: none;
  white-space: nowrap !important;
}

@media (min-width: 640px) {
  .btn-touch {
    min-height: 48px;
  }
}

.btn-whatsapp {
  background: linear-gradient(135deg, #25D366 0%, #1EBE5D 100%);
  color: #FFFFFF !important;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
  background: linear-gradient(135deg, #1EBE5D 0%, #179E4D 100%);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45);
  transform: translateY(-2px);
}

.btn-regal {
  background: var(--burgundy-primary);
  color: #FDFBF7 !important;
  border: 1px solid rgba(197, 155, 39, 0.4);
  box-shadow: 0 4px 14px rgba(107, 20, 38, 0.25);
}

.btn-regal:hover {
  background: var(--burgundy-hover);
  border-color: var(--gold-primary);
  box-shadow: 0 6px 20px rgba(107, 20, 38, 0.35);
  transform: translateY(-2px);
}

.btn-gold-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1.5px solid var(--gold-primary);
}

.btn-gold-outline:hover {
  background: var(--gold-primary);
  color: #FDFBF7 !important;
  box-shadow: 0 4px 16px rgba(197, 155, 39, 0.3);
  transform: translateY(-2px);
}

.btn-gold-outline-light {
  background: rgba(255, 255, 255, 0.12);
  color: #FFFFFF !important;
  border: 1.5px solid #E8CF7C;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.btn-gold-outline-light span {
  color: #FFFFFF !important;
}

.btn-gold-outline-light:hover {
  background: #C59B27;
  color: #1F1916 !important;
  border-color: #E8CF7C;
  box-shadow: 0 4px 18px rgba(232, 207, 124, 0.4);
  transform: translateY(-2px);
}

.btn-gold-outline-light:hover span {
  color: #1F1916 !important;
}

/* ==========================================================================
   6. MOBILE STICKY BOTTOM ACTION BAR & SAFE AREAS
   ========================================================================== */
.mobile-bottom-bar {
  display: none !important;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: rgba(253, 251, 247, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(197, 155, 39, 0.3);
  padding-top: 10px;
  padding-left: max(16px, env(safe-area-inset-left, 16px));
  padding-right: max(16px, env(safe-area-inset-right, 16px));
  padding-bottom: max(12px, env(safe-area-inset-bottom, 12px));
  box-shadow: 0 -4px 20px rgba(31, 25, 22, 0.08);
}

@media (max-width: 768px) {
  .mobile-bottom-bar {
    display: flex !important;
    gap: 12px;
  }

  body {
    padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
    /* Clearance for sticky bar */
  }

  #backToTopBtn {
    bottom: calc(84px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

@media (min-width: 769px) {
  .mobile-bottom-bar {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  body {
    padding-bottom: 0 !important;
  }

  #backToTopBtn {
    bottom: 2rem !important;
  }
}

/* ==========================================================================
   7. TOUCH-FRIENDLY SWIPEABLE HORIZONTAL CONTAINERS & PILLS
   ========================================================================== */
.touch-scroll-carousel,
.scroll-pills-container {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  gap: 0.5rem;
  padding: 4px 2px 8px 2px;
}

.touch-scroll-carousel::-webkit-scrollbar,
.scroll-pills-container::-webkit-scrollbar {
  display: none;
}

.touch-scroll-carousel>* {
  scroll-snap-align: start;
  flex-shrink: 0;
}

.scroll-pills-container .filter-pill {
  flex-shrink: 0;
  scroll-snap-align: start;
}

.filter-pill {
  padding: 8px 18px;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.25s ease;
  border: 1px solid rgba(197, 155, 39, 0.3);
  background: #FFFFFF;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
}

.filter-pill:hover,
.filter-pill.active {
  background: linear-gradient(135deg, #C59B27 0%, #967417 100%);
  color: #FDFBF7;
  border-color: #C59B27;
  box-shadow: 0 2px 10px rgba(197, 155, 39, 0.3);
}

/* ==========================================================================
   8. GRADE TOGGLE CONTAINER (RESPONSIVE FLUID DESIGN)
   ========================================================================== */
.grade-toggle-container {
  display: inline-flex;
  max-width: 100%;
  background: #FFFFFF;
  border: 1.5px solid rgba(197, 155, 39, 0.4);
  border-radius: 9999px;
  padding: 4px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.04);
}

.grade-toggle-btn {
  padding: 8px 20px;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.25s ease;
  cursor: pointer;
  white-space: nowrap;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
}

.grade-toggle-btn.active {
  background: linear-gradient(135deg, #C59B27 0%, #967417 100%);
  color: #FDFBF7;
  box-shadow: 0 2px 8px rgba(197, 155, 39, 0.35);
}

@media (max-width: 480px) {
  .grade-toggle-container {
    width: 100%;
    display: flex;
  }

  .grade-toggle-btn {
    flex: 1;
    padding: 7px 10px;
    font-size: 0.78rem;
    min-height: 44px;
    text-align: center;
  }
}

/* ==========================================================================
   9. MOBILE NAVIGATION DRAWER & ACCORDIONS (SAFE AREA COMPATIBLE)
   ========================================================================== */
#mobileDrawer {
  padding-top: max(1rem, env(safe-area-inset-top, 1rem));
  padding-bottom: max(1.5rem, env(safe-area-inset-bottom, 1.5rem));
  padding-right: max(1rem, env(safe-area-inset-right, 1rem));
  -webkit-overflow-scrolling: touch;
}

#mobileDrawer nav a {
  min-height: 44px;
  display: flex;
  align-items: center;
  touch-action: manipulation;
}

#mobileMenuBtn,
#mobileMenuCloseBtn,
.close-verification-modal {
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
}

@media (min-width: 1280px) {
  #mobileMenuBtn {
    display: none !important;
  }
}


.faq-accordion-header {
  min-height: 48px;
  touch-action: manipulation;
}

/* ==========================================================================
   10. FORM INPUTS & IOS SAFARI AUTO-ZOOM PREVENTION
   ========================================================================== */
@media (max-width: 768px) {

  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="date"],
  input[type="number"],
  input[type="search"],
  select,
  textarea {
    font-size: 16px !important;
    /* Prevents auto-zoom on iOS Safari */
    min-height: 46px;
  }
}

/* Ornamental Dividers */
.ornamental-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 1.5rem 0;
  color: var(--gold-primary);
}

.ornamental-divider::before,
.ornamental-divider::after {
  content: "";
  height: 1px;
  width: 60px;
  background: linear-gradient(90deg, transparent, rgba(197, 155, 39, 0.6), transparent);
}

/* Accessibility Focus States */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--gold-primary);
  outline-offset: 3px;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {

  *,
  ::before,
  ::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   GLOBAL SERVED COUNTRIES MARQUEE ENGINE
   ========================================================================== */
@keyframes flagMarquee {
  0% {
    transform: translate3d(0, 0, 0);
  }

  100% {
    transform: translate3d(-50%, 0, 0);
  }
}

.flag-marquee-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}

.flag-marquee-track {
  display: flex;
  width: max-content;
  gap: 1rem;
  animation: flagMarquee 38s linear infinite;
  will-change: transform;
}

.flag-marquee-track:hover {
  animation-play-state: paused;
}

.country-flag-card {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1.1rem;
  background: #FFFFFF;
  border: 1px solid rgba(197, 155, 39, 0.35);
  border-radius: 9999px;
  box-shadow: 0 4px 14px -3px rgba(107, 20, 38, 0.06);
  white-space: nowrap;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  flex-shrink: 0;
}

.country-flag-card:hover {
  transform: translateY(-2px);
  border-color: #C59B27;
  box-shadow: 0 8px 20px -4px rgba(197, 155, 39, 0.2);
}

/* ==========================================================================
   SERVICES ONE-LINE HEADING GUARANTEE
   ========================================================================== */
.service-title-oneline {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  display: block !important;
  line-height: 1.35 !important;
}

/* ==========================================================================
   CREATIVE 3D UPCOMING BOOK PRESENTATION
   ========================================================================== */
.book-3d-wrapper {
  perspective: 1200px;
}

.book-3d-card {
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.6s ease;
  box-shadow: -15px 25px 50px -10px rgba(107, 20, 38, 0.35), 0 10px 20px -5px rgba(31, 25, 22, 0.2);
}

.book-3d-card:hover {
  transform: rotateY(-8deg) rotateX(4deg) translateY(-8px) scale(1.02);
  box-shadow: -20px 35px 65px -10px rgba(107, 20, 38, 0.45), 0 15px 30px -5px rgba(197, 155, 39, 0.3);
}

@keyframes bookFloat {

  0%,
  100% {
    transform: translateY(0px) rotateY(-10deg) rotateX(4deg);
  }

  50% {
    transform: translateY(-10px) rotateY(-8deg) rotateX(2deg);
  }
}

.animate-book-float {
  animation: bookFloat 6s ease-in-out infinite;
}

.animate-book-float:hover {
  animation-play-state: paused;
}

/* ==========================================================================
   HERO ASTROLOGY ROTATING CHAKRA WHEEL ANIMATION & ONE-SCREEN ENGINE
   ========================================================================== */
@keyframes spinAstrologyClockwise {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes spinAstrologyCounter {
  from {
    transform: rotate(360deg);
  }

  to {
    transform: rotate(0deg);
  }
}

@keyframes celestialGlowPulse {

  0%,
  100% {
    transform: scale(0.97);
    opacity: 0.6;
  }

  50% {
    transform: scale(1.05);
    opacity: 0.95;
  }
}

@keyframes floatBadge1 {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-5px);
  }
}

@keyframes floatBadge2 {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(5px);
  }
}

.animate-astro-clockwise {
  animation: spinAstrologyClockwise 35s linear infinite;
  transform-origin: center center;
  will-change: transform;
}

.animate-astro-counter {
  animation: spinAstrologyCounter 50s linear infinite;
  transform-origin: center center;
  will-change: transform;
}

.animate-celestial-pulse {
  animation: celestialGlowPulse 5s ease-in-out infinite;
  transform-origin: center center;
}

.animate-float-badge-1 {
  animation: floatBadge1 4s ease-in-out infinite;
}

.animate-float-badge-2 {
  animation: floatBadge2 4.5s ease-in-out infinite 1s;
}

/* Astrological Chakra Container Responsive Sizing */
.astro-chakra-container {
  isolation: isolate;
  position: relative;
  width: min(290px, 82vw);
  height: min(290px, 82vw);
  aspect-ratio: 1 / 1;
}

@media (min-width: 640px) {
  .astro-chakra-container {
    width: 340px;
    height: 340px;
  }
}

@media (min-width: 768px) {
  .astro-chakra-container {
    width: 380px;
    height: 380px;
  }
}

@media (min-width: 1024px) {
  .hero-viewport-screen {
    min-height: calc(100vh - 6.8rem);
    display: flex;
    align-items: center;
  }

  .astro-chakra-container {
    width: 390px;
    height: 390px;
    max-height: 60vh;
  }
}

@media (min-width: 1280px) {
  .astro-chakra-container {
    width: 440px;
    height: 440px;
    max-height: 62vh;
  }
}

@media (min-width: 1536px) {
  .astro-chakra-container {
    width: 480px;
    height: 480px;
    max-height: 65vh;
  }
}

/* Extra support for short-height desktop/laptop displays (e.g. 1366x768) */
@media (min-width: 1024px) and (max-height: 780px) {
  .hero-viewport-screen {
    min-height: calc(100vh - 6.2rem);
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }

  .astro-chakra-container {
    width: 330px !important;
    height: 330px !important;
  }
}

.astro-chakra-container:hover .animate-astro-clockwise {
  animation-duration: 55s;
}

/* ==========================================================================
   LUXURY SHOP & GEMSTONE CATEGORIES SHOWCASE
   ========================================================================== */
.shop-dept-card {
  background: linear-gradient(145deg, #FFFFFF 0%, #FAF6EE 100%);
  border: 1.5px solid rgba(197, 155, 39, 0.35);
  border-radius: 1.25rem;
  transition: all 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 4px 18px -4px rgba(107, 20, 38, 0.06);
  position: relative;
  overflow: hidden;
}

.shop-dept-card:hover {
  transform: translateY(-5px);
  border-color: #C59B27;
  box-shadow: 0 16px 32px -8px rgba(197, 155, 39, 0.25), 0 6px 16px -4px rgba(107, 20, 38, 0.1);
}

.gem-cat-card {
  background: #FFFFFF;
  border: 1.5px solid rgba(197, 155, 39, 0.3);
  border-radius: 1.25rem;
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 4px 16px -4px rgba(31, 25, 22, 0.06);
  position: relative;
  display: flex;
  flex-direction: column;
}

.gem-cat-card:hover {
  transform: translateY(-6px);
  border-color: #C59B27;
  box-shadow: 0 18px 36px -8px rgba(197, 155, 39, 0.28), 0 8px 18px -4px rgba(107, 20, 38, 0.12);
}

.gem-cat-img-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: #FAF6EE;
}

.gem-cat-img {
  transition: transform 0.65s cubic-bezier(0.2, 0.8, 0.2, 1);
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gem-cat-card:hover .gem-cat-img {
  transform: scale(1.07);
}

.gem-type-pill {
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  transition: all 0.2s ease;
  border: 1px solid rgba(197, 155, 39, 0.3);
  background: #FFFFFF;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  user-select: none;
}

.gem-type-pill:hover,
.gem-type-pill.active {
  background: #6B1426;
  color: #FFFFFF;
  border-color: #6B1426;
  box-shadow: 0 2px 10px rgba(107, 20, 38, 0.25);
}

.grade-filter-btn {
  padding: 6px 16px;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 700;
  transition: all 0.2s ease;
  border: 1px solid rgba(197, 155, 39, 0.3);
  background: #FAF6EE;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.grade-filter-btn:hover,
.grade-filter-btn.active {
  background: linear-gradient(135deg, #C59B27 0%, #967417 100%);
  color: #FFFFFF;
  border-color: #C59B27;
  box-shadow: 0 2px 8px rgba(197, 155, 39, 0.3);
}

.glow-gem-border {
  position: relative;
}

.glow-gem-border::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1.5px solid transparent;
  background: linear-gradient(135deg, rgba(197, 155, 39, 0.6), rgba(107, 20, 38, 0.3)) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask-composite: exclude;
  pointer-events: none;
}

/* ==========================================================================
   ASTROLOGY UNIQUE SECTION PALETTES (Inspired by AstroTalk & AstroSage)
   Transforms monotone white/grey into rich, authentic Vedic atmospheres
   ========================================================================== */

/* 1. Sacred Saffron & Surya Amber Glow (Guru & Surya Auspicious Warmth) */
.section-saffron-warm {
  background: linear-gradient(180deg, #FFF9EC 0%, #FFF1D4 50%, #FFF8EE 100%);
  border-top: 1px solid rgba(197, 155, 39, 0.28);
  border-bottom: 1px solid rgba(197, 155, 39, 0.28);
  position: relative;
}

/* 2. Sacred Sandalwood & Vedic Parchment (Ancestral Lineage & Scholarship) */
.section-sandalwood {
  background: linear-gradient(180deg, #FAF1DF 0%, #F5E6CA 100%);
  border-top: 1px solid rgba(197, 155, 39, 0.25);
  border-bottom: 1px solid rgba(197, 155, 39, 0.25);
  position: relative;
}

/* 3. Deep Celestial Cosmic Midnight Indigo (Planetary Cosmos, Gemstones & Rudraksha) */
.section-cosmic-night {
  background: radial-gradient(circle at 50% 15%, #182244 0%, #0D142B 55%, #080D1D 100%);
  color: #F8FAFC;
  border-top: 1px solid rgba(229, 185, 78, 0.35);
  border-bottom: 1px solid rgba(229, 185, 78, 0.35);
  position: relative;
}

.section-cosmic-night .font-cinzel:not(.text-\[\#6B1426\]):not(.text-gold-gradient) {
  color: #F8FAFC;
}

.section-cosmic-night p {
  color: #CBD5E1;
}

/* Cosmic Night Glass Card */
.card-cosmic-night {
  background: rgba(22, 32, 60, 0.8);
  border: 1px solid rgba(197, 155, 39, 0.32);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 1rem;
  color: #F8FAFC;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-cosmic-night:hover {
  border-color: #E8CF7C;
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45), 0 0 24px rgba(197, 155, 39, 0.22);
}

.card-cosmic-night h3,
.card-cosmic-night h3 a {
  color: #F8FAFC !important;
}

.card-cosmic-night h3 a:hover {
  color: #E8CF7C !important;
}

.card-cosmic-night .text-price-cosmic {
  color: #FBBF24 !important;
}

/* 4. Royal Sovereign Navy Trust (State Bank of India & High Credibility) */
.section-royal-navy {
  background: linear-gradient(135deg, #09172E 0%, #12294A 50%, #09172E 100%);
  color: #F8FAFC;
  border: 2px solid rgba(229, 185, 78, 0.4);
  box-shadow: 0 12px 40px rgba(9, 23, 46, 0.35);
  border-radius: 1.5rem;
  position: relative;
}

.section-royal-navy p {
  color: #CBD5E1;
}

/* 5. Luminous Honey Amber (Verified Client Reviews & Testimonials) */
.section-amber-honey {
  background: linear-gradient(180deg, #FFF8EC 0%, #FFF0D2 50%, #FFF8ED 100%);
  border-top: 1px solid rgba(197, 155, 39, 0.25);
  border-bottom: 1px solid rgba(197, 155, 39, 0.25);
  position: relative;
}

/* 6. Warm Papyrus & Antique Gold (Fee Protocol & Transparent Schedules) */
.section-papyrus-gold {
  background: linear-gradient(180deg, #F8EFE0 0%, #EFE1C5 100%);
  border-top: 1px solid rgba(197, 155, 39, 0.25);
  border-bottom: 1px solid rgba(197, 155, 39, 0.25);
  position: relative;
}

/* 7. Saffron Glow Service Card */
.card-saffron-glow {
  background: #FFFFFF;
  border: 1px solid rgba(217, 119, 6, 0.22);
  box-shadow: 0 6px 20px -2px rgba(217, 119, 6, 0.08);
  border-radius: 1rem;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-saffron-glow:hover {
  border-color: #D97706;
  transform: translateY(-4px);
  box-shadow: 0 14px 32px -4px rgba(217, 119, 6, 0.18);
}

/* 8. Sacred Aura Glow */
.aura-glow-gold {
  background: radial-gradient(circle at 50% 50%, rgba(245, 175, 25, 0.22) 0%, rgba(245, 175, 25, 0.06) 50%, transparent 70%);
}

.aura-glow-cosmic {
  background: radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.25) 0%, rgba(197, 155, 39, 0.12) 50%, transparent 70%);
}



/* ==========================================================================
   MOBILE-FIRST RESPONSIVE OPTIMIZATION SYSTEM
   Designed specifically for iPhone 15/16/17 and compact mobile viewports (320px–430px)
   ========================================================================== */

/* 1. Global Viewport & Horizontal Overflow Prevention */
html,
body {
  overflow-x: hidden !important;
  max-width: 100vw !important;
  position: relative;
}

/* Fluid Heading Clamping */
h1,
.text-hero-title {
  font-size: clamp(1.75rem, 5.2vw + 0.3rem, 3.25rem);
  line-height: 1.18;
}

h2,
.text-section-title {
  font-size: clamp(1.35rem, 3.8vw + 0.2rem, 2.25rem);
  line-height: 1.25;
}

h3,
.text-card-title {
  font-size: clamp(1.05rem, 2.2vw + 0.15rem, 1.45rem);
  line-height: 1.3;
}

/* Touch Targets: Finger-friendly 44px standard */
button,
a.btn,
.btn-gold,
.btn-gold-outline,
.btn-gold-outline-light,
.btn-action-touch {
  min-height: 44px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* 2. 4-Card Clean 2x2 Grid for Mobile */
.grid-mobile-2x2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.625rem;
  /* 10px on mobile */
}

@media (min-width: 640px) {
  .grid-mobile-2x2 {
    gap: 1rem;
  }
}

@media (min-width: 1024px) {
  .grid-mobile-2x2 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.5rem;
  }
}

/* 2x2 Card Compact Sizing for 320px–430px */
@media (max-width: 767px) {
  .card-2x2-compact {
    padding: 0.75rem !important;
  }

  .card-2x2-compact .card-icon-wrapper {
    width: 2rem !important;
    height: 2rem !important;
    margin-bottom: 0.5rem !important;
  }

  .card-2x2-compact .card-icon-wrapper svg {
    width: 1.1rem !important;
    height: 1.1rem !important;
  }

  .card-2x2-compact h3,
  .card-2x2-compact .card-title {
    font-size: 0.8125rem !important;
    line-height: 1.25 !important;
    margin-bottom: 0.25rem !important;
  }

  .card-2x2-compact p,
  .card-2x2-compact .card-desc {
    font-size: 0.6875rem !important;
    line-height: 1.35 !important;
  }

  .card-2x2-compact .card-badge {
    font-size: 0.5625rem !important;
    padding: 0.125rem 0.375rem !important;
  }
}

/* 3. Mobile Swipe-Friendly Carousel System (> 4 Cards) */
@media (max-width: 1023px) {
  .mobile-carousel-wrapper {
    position: relative;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    overflow: hidden;
  }

  .mobile-carousel-track {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory !important;
    scroll-behavior: smooth !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    /* Firefox */
    -ms-overflow-style: none !important;
    /* IE 10+ */
    gap: 0.875rem !important;
    padding: 0.5rem 0.75rem 1rem 0.75rem !important;
    margin: 0 !important;
  }

  .mobile-carousel-track::-webkit-scrollbar {
    display: none !important;
    /* WebKit */
  }

  .mobile-carousel-track>* {
    flex: 0 0 86% !important;
    min-width: 260px !important;
    max-width: 340px !important;
    scroll-snap-align: center !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    transform-origin: center center;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
  }

  /* Compact smartphones (320px–360px) */
  @media (max-width: 360px) {
    .mobile-carousel-track>* {
      flex: 0 0 90% !important;
      min-width: 240px !important;
    }
  }

  /* Navigation Dots & Controls */
  .mobile-carousel-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-bottom: 0.25rem;
  }

  .carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 9999px;
    background-color: rgba(197, 155, 39, 0.3);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .carousel-dot.active {
    width: 24px;
    border-radius: 9999px;
    background-color: #C59B27;
    box-shadow: 0 2px 8px rgba(197, 155, 39, 0.4);
  }

  /* Mobile Touch Prev/Next Arrows */
  .mobile-carousel-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(197, 155, 39, 0.3);
    color: #4A121A;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    user-select: none;
  }

  .mobile-carousel-arrow:active {
    transform: scale(0.92);
  }

  .section-cosmic-night .mobile-carousel-arrow {
    background: rgba(15, 23, 42, 0.85);
    border-color: rgba(229, 185, 78, 0.4);
    color: #F8FAFC;
  }
}

/* Desktop reset: restore original multi-column grid and hide carousel controls */
@media (min-width: 1024px) {

  .mobile-carousel-nav,
  .mobile-carousel-arrow {
    display: none !important;
  }
}

/* 4. Long Content Preview: Read More / Read Less Toggle */
@media (max-width: 768px) {
  .mobile-text-preview {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .mobile-text-preview.is-expanded {
    display: block !important;
    -webkit-line-clamp: unset !important;
    overflow: visible !important;
  }

  .read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #B45309;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 2px 0;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s ease;
  }

  .read-more-btn:hover,
  .read-more-btn:active {
    color: #92400E;
  }

  .section-cosmic-night .read-more-btn {
    color: #FBBF24;
  }

  .section-cosmic-night .read-more-btn:hover {
    color: #FDE68A;
  }
}

@media (min-width: 769px) {
  .read-more-btn {
    display: none !important;
  }

  .mobile-text-preview {
    display: block !important;
    -webkit-line-clamp: unset !important;
    overflow: visible !important;
  }
}

/* 5. Safe Area / Viewport Spacing on Compact iOS */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .mobile-safe-bottom {
    padding-bottom: calc(env(safe-area-inset-bottom) + 0.75rem);
  }
}

/* ==========================================================================
   MOBILE-FIRST RESPONSIVE PRODUCT SYSTEM (iPhone 15, 16, 17 & Compact Screens)
   ========================================================================== */

/* Prevent horizontal overflow on all screen sizes */
html, body {
  max-width: 100vw;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

/* Smooth touch momentum scrolling on mobile drawers & modals */
#verificationModal, #mobileDrawer {
  -webkit-overflow-scrolling: touch;
}

/* Ensure images never exceed parent container on small screens */
img, svg, video, canvas, picture {
  max-width: 100%;
  height: auto;
}

/* Mobile responsive adjustments for screens <= 480px (iPhone 15, 16, 17) */
@media (max-width: 480px) {
  /* Finger-friendly touch target heights */
  .btn-touch {
    min-height: 44px;
  }

  /* Compact padding on product cards for maximum readability */
  .card-luxury {
    border-radius: 0.875rem;
  }

  /* Catalog grid item typography */
  .product-item-card h2, .product-item-card h3, .gemstone-tier-card h3 {
    font-size: 0.8125rem !important;
    line-height: 1.25 !important;
  }

  /* Ensure modal is comfortably padded on mobile */
  #verificationModal > div {
    max-height: 85vh;
    padding: 1rem !important;
    margin: 0.75rem !important;
  }
}


/* ==========================================================================
   SHOP & CATALOG MOBILE RESPONSIVENESS FIX (iPhone 15, 16, 17 & Compact Screens)
   ========================================================================== */

/* Hard viewport constraint */
html, body {
  width: 100%;
  max-width: 100vw !important;
  overflow-x: hidden !important;
}

/* Category pills container strictly bounded to viewport with horizontal swipe */
.scroll-pills-container {
  display: flex !important;
  max-width: 100% !important;
  width: 100% !important;
  min-width: 0 !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  box-sizing: border-box !important;
  scroll-snap-type: x mandatory;
}

.scroll-pills-container::-webkit-scrollbar {
  display: none !important;
}

/* Ensure cards inside 2-column grid never overflow */
.product-item-card,
.gemstone-tier-card {
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

/* Mobile 2-column product card enhancements */
@media (max-width: 639px) {
  .product-item-card .aspect-square,
  .gemstone-tier-card .aspect-square {
    border-radius: 0.625rem;
  }
}
