/* =====================================================================
   GANPATI SUPERSPECIALITY HOSPITAL — REVAMPED DESIGN SYSTEM
   Premium • Custom • Trust-Driven Healthcare
   "Precision & Care" Design Language
   ===================================================================== */

/* --- Google Font Import --- */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* --- CSS Custom Properties (Design Tokens) --- */
:root {
  /* Primary Palette — Medical Authority */
  --color-primary: #1B2B4B;              /* Deep Navy (Trust & Authority) */
  --color-primary-hover: #243A64;
  --color-primary-light: rgba(27, 43, 75, 0.08);
  --color-primary-gradient: linear-gradient(135deg, #1B2B4B 0%, #2D4A7A 100%);

  /* Accent — Healthcare Action */
  --color-accent: #0891B2;               /* Teal/Cyan (Universal healthcare trust) */
  --color-accent-hover: #0E7490;
  --color-accent-light: rgba(8, 145, 178, 0.08);
  --color-accent-gradient: linear-gradient(135deg, #0891B2, #06B6D4);

  /* Warm Accent — Awards, Ratings, Gold highlights */
  --color-gold: #D4A843;
  --color-gold-light: rgba(212, 168, 67, 0.1);

  /* Semantic Colors */
  --color-success: #10B981;
  --color-success-light: rgba(16, 185, 129, 0.08);
  --color-danger: #EF4444;
  --color-danger-light: rgba(239, 68, 68, 0.08);

  /* Neutrals — Clean & Clinical */
  --color-white: #FFFFFF;
  --color-bg: #FFFFFF;
  --color-bg-alt: #F7F8FA;
  --color-bg-soft: #F1F5F9;
  --color-text-primary: #0F172A;
  --color-text-secondary: #475569;
  --color-text-light: #94A3B8;
  --color-divider: #E2E8F0;
  --color-dark: #0F172A;
  --color-dark-lighter: #1E293B;

  /* Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.82);
  --glass-border: rgba(255, 255, 255, 0.2);
  --glass-blur: 20px;
  --glass-shadow: 0 8px 32px rgba(15, 23, 42, 0.08);

  /* Typography */
  --font-family: 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
  --font-mono: 'Space Grotesk', monospace;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 2rem;
  --font-size-4xl: 2.5rem;
  --font-size-5xl: 3.25rem;
  --font-size-6xl: 4rem;

  /* Spacing — 8px scale */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 24px;
  --space-2xl: 32px;
  --space-3xl: 40px;
  --space-4xl: 48px;
  --space-5xl: 64px;
  --space-6xl: 80px;
  --space-7xl: 96px;
  --space-8xl: 128px;

  /* Borders & Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-2xl: 28px;
  --radius-full: 9999px;

  /* Shadows — Layered depth */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 6px rgba(15, 23, 42, 0.05), 0 2px 4px rgba(15, 23, 42, 0.03);
  --shadow-lg: 0 10px 25px rgba(15, 23, 42, 0.08), 0 4px 10px rgba(15, 23, 42, 0.04);
  --shadow-xl: 0 20px 50px rgba(15, 23, 42, 0.1), 0 8px 20px rgba(15, 23, 42, 0.05);
  --shadow-2xl: 0 25px 60px rgba(15, 23, 42, 0.15);
  --shadow-glow-accent: 0 0 20px rgba(8, 145, 178, 0.25);
  --shadow-glow-primary: 0 0 30px rgba(27, 43, 75, 0.2);

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Layout */
  --container-max: 1280px;
  --container-narrow: 900px;
  --navbar-height: 72px;
  --emergency-height: 40px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--navbar-height) + var(--emergency-height) + 20px);
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  color: var(--color-text-primary);
  background-color: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-fast);
}

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  font-size: inherit;
}

/* --- Scroll Progress Bar --- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--color-accent-gradient);
  z-index: 10001;
  transition: width 0.1s linear;
  border-radius: 0 2px 2px 0;
}

/* --- Container --- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

.container-narrow {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-text-primary);
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 700;
}

h1 {
  font-size: var(--font-size-5xl);
  font-weight: 800;
  letter-spacing: -0.03em;
}

h2 {
  font-size: var(--font-size-3xl);
}

h3 {
  font-size: var(--font-size-xl);
  font-weight: 600;
}

h4 {
  font-size: var(--font-size-lg);
  font-weight: 600;
}

p {
  color: var(--color-text-secondary);
  line-height: 1.7;
}

.text-sm {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

.text-xs {
  font-size: var(--font-size-xs);
  color: var(--color-text-light);
}

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

/* --- Section Styles --- */
.section {
  padding: var(--space-7xl) 0;
  position: relative;
}

.section--alt {
  background-color: var(--color-bg-alt);
}

/* --- Global Page Hero (Inner Pages) --- */
.page-hero {
  background: var(--color-primary);
  position: relative;
  overflow: hidden;
  padding: calc(var(--navbar-height) + var(--emergency-height) + 60px) 0 var(--space-6xl);
  text-align: center;
  color: var(--color-white);
}

.page-hero .mesh-gradient {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(ellipse at 20% 80%, rgba(8, 145, 178, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(45, 74, 122, 0.3) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(15, 23, 42, 0.5) 0%, transparent 100%);
  z-index: 0;
}

.page-hero .container {
  position: relative;
  z-index: 1;
}

.page-hero h1 {
  color: var(--color-white);
  font-size: var(--font-size-4xl);
  margin-bottom: var(--space-md);
}

.page-hero .breadcrumb {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  font-size: var(--font-size-sm);
  color: rgba(255, 255, 255, 0.6);
}

.page-hero .breadcrumb a {
  color: rgba(255, 255, 255, 0.6);
  transition: color var(--transition-fast);
}

.page-hero .breadcrumb a:hover {
  color: var(--color-accent);
}

.page-hero .breadcrumb span {
  color: var(--color-white);
}

/* --- Section Header — Left Aligned Default --- */
.section-header {
  margin-bottom: var(--space-5xl);
}

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

.section-header h2 {
  margin-bottom: var(--space-md);
  position: relative;
}

.section-header p {
  font-size: var(--font-size-lg);
  max-width: 600px;
  line-height: 1.7;
}

.section-header.center p {
  margin: 0 auto;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  background: var(--color-accent-light);
  color: var(--color-accent);
  font-size: var(--font-size-xs);
  font-weight: 700;
  padding: 6px var(--space-lg);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-lg);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* --- Button System --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: var(--font-size-sm);
  font-family: var(--font-heading);
  transition: all var(--transition-normal);
  white-space: nowrap;
  line-height: 1.5;
  cursor: pointer;
  border: 1.5px solid transparent;
  position: relative;
  overflow: hidden;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-white);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background: var(--color-primary-hover);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.btn-accent {
  background: var(--color-accent-gradient);
  color: var(--color-white);
  box-shadow: 0 4px 15px rgba(8, 145, 178, 0.3);
}

.btn-accent:hover {
  box-shadow: var(--shadow-glow-accent);
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-divider);
}

.btn-secondary:hover {
  background: var(--color-bg-alt);
  border-color: var(--color-primary);
}

.btn-ghost {
  background: transparent;
  color: var(--color-accent);
  padding: var(--space-sm) var(--space-lg);
  font-weight: 600;
}

.btn-ghost:hover {
  background: var(--color-accent-light);
}

.btn-sm {
  padding: 8px 16px;
  font-size: var(--font-size-xs);
}

.btn-lg {
  padding: 16px 32px;
  font-size: var(--font-size-base);
  border-radius: var(--radius-lg);
}

.btn-xl {
  padding: 18px 40px;
  font-size: var(--font-size-lg);
  border-radius: var(--radius-lg);
}

/* Pulsing Glow CTA */
.btn-glow {
  animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { box-shadow: 0 4px 15px rgba(8, 145, 178, 0.3); }
  50% { box-shadow: 0 4px 30px rgba(8, 145, 178, 0.5), 0 0 60px rgba(8, 145, 178, 0.15); }
}

/* --- Card Base --- */
.card {
  background: var(--color-white);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  transition: all var(--transition-normal);
  position: relative;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: transparent;
}

.card-glass {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
}

/* --- Icon Container --- */
.icon-box {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition-normal);
}

.icon-box--accent {
  background: var(--color-accent-light);
  color: var(--color-accent);
}

.icon-box--primary {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.icon-box--gradient {
  background: var(--color-accent-gradient);
  color: var(--color-white);
  box-shadow: 0 4px 15px rgba(8, 145, 178, 0.2);
}

/* --- Grid Utilities --- */
.grid {
  display: grid;
  gap: var(--space-xl);
}

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

/* --- Bento Grid --- */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(180px, auto);
  gap: var(--space-xl);
}

.bento-grid .bento-lg {
  grid-column: span 2;
  grid-row: span 2;
}

.bento-grid .bento-wide {
  grid-column: span 2;
}

.bento-grid .bento-tall {
  grid-row: span 2;
}

/* --- Badge / Tag --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 600;
  font-family: var(--font-heading);
}

.badge-accent {
  background: var(--color-accent-light);
  color: var(--color-accent);
}

.badge-gold {
  background: var(--color-gold-light);
  color: var(--color-gold);
}

.badge-primary {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.badge-success {
  background: var(--color-success-light);
  color: var(--color-success);
}

/* --- Rating Stars --- */
.rating {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
}

.rating-stars {
  color: var(--color-gold);
  font-size: var(--font-size-sm);
  letter-spacing: 2px;
}

.rating-text {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  font-weight: 500;
}

/* --- Scroll Reveal Animation — Staggered --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Staggered children */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-stagger.revealed > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger.revealed > *:nth-child(2) { transition-delay: 0.1s; }
.reveal-stagger.revealed > *:nth-child(3) { transition-delay: 0.15s; }
.reveal-stagger.revealed > *:nth-child(4) { transition-delay: 0.2s; }
.reveal-stagger.revealed > *:nth-child(5) { transition-delay: 0.25s; }
.reveal-stagger.revealed > *:nth-child(6) { transition-delay: 0.3s; }

.reveal-stagger.revealed > * {
  opacity: 1;
  transform: translateY(0);
}

/* --- Keyframe Animations --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  14% { transform: scale(1.1); }
  28% { transform: scale(1); }
  42% { transform: scale(1.1); }
  70% { transform: scale(1); }
}

@keyframes ecgLine {
  0% { stroke-dashoffset: 2000; }
  100% { stroke-dashoffset: 0; }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes rotateWords {
  0%, 20% { opacity: 1; transform: translateY(0); }
  25%, 45% { opacity: 0; transform: translateY(-100%); }
  50%, 70% { opacity: 0; transform: translateY(100%); }
  75%, 100% { opacity: 1; transform: translateY(0); }
}

/* --- Reduced Motion --- */
@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;
  }
  .reveal { opacity: 1; transform: none; }
  .reveal-stagger > * { opacity: 1; transform: none; }
}

/* --- Responsive Breakpoints --- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  h1 { font-size: var(--font-size-4xl); }
  h2 { font-size: var(--font-size-2xl); }
  .section { padding: var(--space-6xl) 0; }

  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: minmax(140px, auto);
  }
}

@media (max-width: 768px) {
  :root {
    --font-size-5xl: 2.25rem;
    --font-size-4xl: 1.875rem;
    --font-size-3xl: 1.5rem;
  }

  .grid-4, .grid-3, .grid-2 {
    grid-template-columns: 1fr;
  }

  body {
    overflow-x: hidden !important;
    width: 100%;
    position: relative;
  }

  .container, .container-narrow {
    padding: 0 var(--space-lg);
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .section { padding: var(--space-5xl) 0; }
  .section-header { margin-bottom: var(--space-3xl); }

  .page-hero {
    padding-top: calc(var(--navbar-height) + var(--emergency-height) + 40px) !important;
    min-height: auto !important;
  }

  iframe {
    height: 400px !important;
    border-radius: var(--radius-lg);
    width: 100% !important;
  }

  .btn-lg, .btn-xl {
    padding: 14px 24px;
    font-size: var(--font-size-sm);
  }

  .bento-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }

  .bento-grid .bento-lg,
  .bento-grid .bento-wide {
    grid-column: span 1;
  }

  .bento-grid .bento-tall {
    grid-row: span 1;
  }
}

/* --- Utility Classes --- */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-xs { gap: var(--space-xs); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }
.gap-2xl { gap: var(--space-2xl); }

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
