/* Yog Nidra: Nasha Mukti Kendra - Premium Mobile-First Responsive Design System */
@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@400;500;600;700;800&family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,600;1,400&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --blue-900: #0B3D91;
  --blue-600: #1A73E8;
  --blue-400: #2E9CF5;
  --blue-100: #E3F2FD;
  
  --green-900: #0F5E1F;
  --green-600: #2E7D32;
  --green-500: #7CC142;
  --green-100: #EAF6E9;
  --green-50: #F4FAF3;

  --ink-900: #0F172A;
  --ink-700: #334155;
  --ink-500: #5B6B7A;
  --ink-300: #94A3B8;
  
  --bg-main: #F8FAFC;
  --bg-card: #FFFFFF;
  
  --gradient-brand: linear-gradient(135deg, #0B3D91 0%, #1A73E8 50%, #7CC142 100%);
  --gradient-blue: linear-gradient(135deg, #0B3D91 0%, #2E9CF5 100%);
  --gradient-green: linear-gradient(135deg, #0F5E1F 0%, #7CC142 100%);
  --gradient-aura: radial-gradient(circle at 50% 50%, rgba(124, 193, 66, 0.18) 0%, rgba(46, 156, 245, 0.08) 50%, rgba(248, 250, 252, 0) 70%);

  --shadow-soft: 0 10px 30px -5px rgba(11, 61, 145, 0.07), 0 4px 12px -2px rgba(15, 94, 31, 0.04);
  --shadow-hover: 0 20px 40px -10px rgba(11, 61, 145, 0.14), 0 8px 20px -4px rgba(124, 193, 66, 0.12);
  --shadow-glow: 0 0 25px rgba(124, 193, 66, 0.35);

  --font-hindi: 'Baloo 2', 'Plus Jakarta Sans', sans-serif;
  --font-body: 'Inter', 'Plus Jakarta Sans', sans-serif;
  --font-serif: 'Playfair Display', serif;
}

/* High Contrast / Accessibility Mode */
body.high-contrast {
  --ink-900: #000000;
  --ink-700: #111111;
  --bg-main: #FFFFFF;
  --bg-card: #FFFFFF;
  filter: contrast(115%);
}

body.large-font {
  font-size: 115% !important;
}

/* Mobile-First CSS Reset & Overflow Control */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  font-size: 16px;
  max-width: 100vw;
  overflow-x: hidden;
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  color: var(--ink-700);
  background-color: var(--bg-main);
  line-height: 1.6;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Fluid Typography */
h1, .text-fluid-h1 {
  font-family: var(--font-hindi);
  color: var(--ink-900);
  font-weight: 800;
  line-height: 1.2;
  font-size: clamp(1.85rem, 4.5vw + 0.5rem, 3.75rem);
}

h2, .text-fluid-h2 {
  font-family: var(--font-hindi);
  color: var(--ink-900);
  font-weight: 700;
  line-height: 1.25;
  font-size: clamp(1.5rem, 3.2vw + 0.3rem, 2.75rem);
}

h3, .text-fluid-h3 {
  font-family: var(--font-hindi);
  color: var(--ink-900);
  font-weight: 700;
  line-height: 1.3;
  font-size: clamp(1.2rem, 2.2vw + 0.2rem, 1.85rem);
}

h4, h5, h6, .font-heading {
  font-family: var(--font-hindi);
  color: var(--ink-900);
  font-weight: 700;
  line-height: 1.35;
}

.font-serif {
  font-family: var(--font-serif);
}

/* Media Elements Responsiveness */
img, svg, video, canvas, audio, iframe, embed, object {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Form Inputs & Mobile Touch Targets */
input, select, textarea, button {
  font-family: inherit;
  max-width: 100%;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="date"],
input[type="time"],
input[type="number"],
select,
textarea {
  font-size: 16px; /* Prevents auto-zoom on iOS Safari */
  min-height: 46px;
  width: 100%;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #F1F5F9;
}
::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--green-500);
}

/* Brand Button Gradients & Touch Targets */
.btn-brand {
  background: var(--gradient-brand);
  color: #FFFFFF !important;
  font-weight: 600;
  border-radius: 9999px;
  padding: 0.75rem 1.6rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 14px rgba(11, 61, 145, 0.25);
  border: none;
  cursor: pointer;
  text-decoration: none;
  user-select: none;
  touch-action: manipulation;
}
.btn-brand:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(124, 193, 66, 0.35);
  filter: brightness(1.05);
}
.btn-brand:active {
  transform: scale(0.98);
}

.btn-outline-brand {
  background: transparent;
  color: var(--blue-900);
  border: 2px solid var(--blue-600);
  font-weight: 600;
  border-radius: 9999px;
  padding: 0.7rem 1.5rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
}
.btn-outline-brand:hover {
  background: var(--blue-100);
  border-color: var(--green-500);
  color: var(--green-900);
  transform: translateY(-2px);
}
.btn-outline-brand:active {
  transform: scale(0.98);
}

.btn-green-pulse {
  background: var(--gradient-green);
  color: #FFFFFF;
  font-weight: 600;
  border-radius: 9999px;
  padding: 0.75rem 1.6rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 14px rgba(15, 94, 31, 0.25);
  animation: pulseGreen 2.5s infinite;
  user-select: none;
  touch-action: manipulation;
}

@keyframes pulseGreen {
  0% { box-shadow: 0 0 0 0 rgba(124, 193, 66, 0.5); }
  70% { box-shadow: 0 0 0 14px rgba(124, 193, 66, 0); }
  100% { box-shadow: 0 0 0 0 rgba(124, 193, 66, 0); }
}

/* Breathing Glow Orb (Responsive Scaling) */
.breathing-orb {
  width: clamp(200px, 60vw, 300px);
  height: clamp(200px, 60vw, 300px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 193, 66, 0.35) 0%, rgba(46, 156, 245, 0.2) 60%, rgba(255, 255, 255, 0) 100%);
  animation: breatheGlow 7s ease-in-out infinite alternate;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

@keyframes breatheGlow {
  0% {
    transform: scale(0.92);
    box-shadow: 0 0 30px rgba(124, 193, 66, 0.2);
  }
  50% {
    transform: scale(1.08);
    box-shadow: 0 0 60px rgba(46, 156, 245, 0.35), 0 0 80px rgba(124, 193, 66, 0.3);
  }
  100% {
    transform: scale(0.92);
    box-shadow: 0 0 30px rgba(124, 193, 66, 0.2);
  }
}

/* Floating Birds Animation */
.floating-bird {
  animation: birdDrift 16s linear infinite;
  opacity: 0.7;
}
.floating-bird-2 {
  animation: birdDrift 22s linear infinite 4s;
  opacity: 0.5;
}
.floating-bird-3 {
  animation: birdDrift 19s linear infinite 8s;
  opacity: 0.6;
}

@keyframes birdDrift {
  0% { transform: translate(-100px, 40px) scale(0.8); }
  50% { transform: translate(450px, -20px) scale(1); }
  100% { transform: translate(1100px, 30px) scale(0.9); }
}

/* Cards & Glassmorphism */
.card-wellness {
  background: var(--bg-card);
  border-radius: 20px;
  border: 1px solid rgba(124, 193, 66, 0.15);
  box-shadow: var(--shadow-soft);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  max-width: 100%;
}
.card-wellness:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(46, 156, 245, 0.35);
}

.glass-pill {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 9999px;
}

/* Wave Dividers */
.wave-divider {
  width: 100%;
  overflow: hidden;
  line-height: 0;
}
.wave-divider svg {
  display: block;
  width: calc(100% + 1.3px);
  height: clamp(24px, 4vw, 48px);
}

/* Badge Icons */
.icon-badge {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  background: var(--green-100);
  color: var(--green-900);
  transition: all 0.3s ease;
  flex-shrink: 0;
}
.card-wellness:hover .icon-badge {
  background: var(--gradient-brand);
  color: #FFFFFF;
  transform: scale(1.08) rotate(4deg);
}

/* Text Gradients */
.text-gradient-brand {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.text-gradient-green {
  background: var(--gradient-green);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.text-gradient-blue {
  background: var(--gradient-blue);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Sound Waveform Animation */
.waveform-bar {
  width: 4px;
  background: var(--green-500);
  border-radius: 2px;
  animation: waveMotion 1.2s ease-in-out infinite alternate;
}
.waveform-bar:nth-child(2) { animation-delay: 0.2s; height: 28px; }
.waveform-bar:nth-child(3) { animation-delay: 0.4s; height: 38px; }
.waveform-bar:nth-child(4) { animation-delay: 0.1s; height: 22px; }
.waveform-bar:nth-child(5) { animation-delay: 0.5s; height: 32px; }
.waveform-bar:nth-child(6) { animation-delay: 0.3s; height: 18px; }

@keyframes waveMotion {
  0% { transform: scaleY(0.3); }
  100% { transform: scaleY(1.2); }
}

/* Floating Actions on Mobile & Desktop */
.floating-whatsapp-btn {
  position: fixed;
  bottom: 20px;
  right: 18px;
  z-index: 940;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #25D366;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.65rem;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2.5px solid rgba(255, 255, 255, 0.9);
  text-decoration: none;
}
.floating-whatsapp-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 28px rgba(37, 211, 102, 0.6);
}

.ai-companion-btn {
  position: fixed;
  bottom: 84px;
  right: 18px;
  z-index: 940;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--gradient-brand);
  box-shadow: 0 8px 25px rgba(11, 61, 145, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2.5px solid rgba(255, 255, 255, 0.9);
}
.ai-companion-btn:hover {
  transform: scale(1.1) rotate(-8deg);
  box-shadow: 0 12px 30px rgba(124, 193, 66, 0.45);
}

/* Responsive Table Wrapper */
.table-responsive-container {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 1rem;
  box-shadow: var(--shadow-soft);
}
.table-responsive-container table {
  width: 100%;
  min-width: 600px;
}

/* Mobile Responsive Adjustments */
@media (max-width: 640px) {
  .floating-whatsapp-btn {
    bottom: 16px;
    right: 14px;
    width: 48px;
    height: 48px;
    font-size: 1.45rem;
  }
  .ai-companion-btn {
    bottom: 74px;
    right: 14px;
    width: 48px;
    height: 48px;
  }

  /* Satva AI modal as mobile bottom sheet */
  #aiCompanionModal {
    bottom: 0 !important;
    right: 0 !important;
    left: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    max-height: 88vh !important;
    z-index: 9999 !important;
  }

  /* Compact breathing orb on small screens */
  .breathing-orb {
    width: 180px;
    height: 180px;
  }

  .card-wellness {
    border-radius: 16px;
    padding: 1.25rem !important;
  }
}

/* Touch Device Enhancements */
@media (hover: none) and (pointer: coarse) {
  .btn-brand, .btn-outline-brand, a, button {
    -webkit-tap-highlight-color: transparent;
  }
}
