/* ============================================================
   MJ LIONS EYE HOSPITAL — DESIGN SYSTEM
   Premium Healthcare UI v2.0
   ============================================================ */

/* --------------------------------------------------
   1. CSS CUSTOM PROPERTIES (TOKENS)
   -------------------------------------------------- */
:root {
  /* === COLOR PALETTE === */
  /* Primary — Trust Navy Blue */
  --clr-primary:        #0A3D62;
  --clr-primary-light:  #1A6FA8;
  --clr-primary-mid:    #155F8A;
  --clr-primary-glow:   #2196F3;
  --clr-primary-pale:   #E8F4FD;

  /* Secondary — Healing Teal */
  --clr-secondary:      #00838F;
  --clr-secondary-light:#00BCD4;
  --clr-secondary-dark: #006064;
  --clr-secondary-pale: #E0F7FA;

  /* Accent — Premium Gold (CTAs) */
  --clr-accent:         #F7A800;
  --clr-accent-dark:    #E08900;
  --clr-accent-light:   #FFD54F;
  --clr-accent-pale:    #FFF8E1;

  /* Status */
  --clr-success:        #10B981;
  --clr-danger:         #EF4444;
  --clr-warning:        #F59E0B;
  --clr-whatsapp:       #25D366;
  --clr-emergency:      #DC2626;

  /* Backgrounds */
  --clr-bg-dark:        #04192E;
  --clr-bg-navy:        #0A3D62;
  --clr-bg-surface:     #F4F8FC;
  --clr-bg-white:       #FFFFFF;
  --clr-bg-light:       #F8FAFF;

  /* Text */
  --clr-text-primary:   #1A1A2E;
  --clr-text-secondary: #4A5568;
  --clr-text-muted:     #718096;
  --clr-text-white:     #FFFFFF;
  --clr-text-light:     rgba(255,255,255,0.85);

  /* Borders */
  --clr-border:         #E2E8F0;
  --clr-border-light:   #F1F5F9;

  /* === TYPOGRAPHY === */
  --font-heading:       'Outfit', sans-serif;
  --font-body:          'Inter', sans-serif;
  --font-mono:          'Roboto Mono', monospace;

  --fs-xs:   0.75rem;    /* 12px */
  --fs-sm:   0.875rem;   /* 14px */
  --fs-base: 1rem;       /* 16px */
  --fs-lg:   1.125rem;   /* 18px */
  --fs-xl:   1.25rem;    /* 20px */
  --fs-2xl:  1.5rem;     /* 24px */
  --fs-3xl:  1.875rem;   /* 30px */
  --fs-4xl:  2.25rem;    /* 36px */
  --fs-5xl:  3rem;       /* 48px */
  --fs-6xl:  3.75rem;    /* 60px */

  --fw-normal:  400;
  --fw-medium:  500;
  --fw-semibold:600;
  --fw-bold:    700;
  --fw-extrabold:800;

  --lh-tight:  1.2;
  --lh-snug:   1.375;
  --lh-normal: 1.5;
  --lh-relaxed:1.625;
  --lh-loose:  2;

  /* === SPACING === */
  --sp-1:  0.25rem;
  --sp-2:  0.5rem;
  --sp-3:  0.75rem;
  --sp-4:  1rem;
  --sp-5:  1.25rem;
  --sp-6:  1.5rem;
  --sp-8:  2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;
  --sp-16: 4rem;
  --sp-20: 5rem;
  --sp-24: 6rem;
  --sp-32: 8rem;

  --section-padding-y: 3.5rem;
  --container-max:     1240px;
  --container-pad:     1.5rem;

  /* === BORDER RADIUS === */
  --radius-xs:   4px;
  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   20px;
  --radius-xl:   28px;
  --radius-2xl:  40px;
  --radius-pill: 9999px;
  --radius-circle: 50%;

  /* === SHADOWS === */
  --shadow-xs:   0 1px 3px rgba(10,61,98,0.06);
  --shadow-sm:   0 2px 8px rgba(10,61,98,0.08);
  --shadow-md:   0 8px 24px rgba(10,61,98,0.10);
  --shadow-lg:   0 16px 48px rgba(10,61,98,0.14);
  --shadow-xl:   0 24px 64px rgba(10,61,98,0.18);
  --shadow-2xl:  0 32px 80px rgba(10,61,98,0.22);
  --shadow-glow: 0 0 24px rgba(247,168,0,0.35);
  --shadow-teal: 0 8px 32px rgba(0,131,143,0.25);
  --shadow-inset:inset 0 2px 4px rgba(0,0,0,0.06);

  /* === TRANSITIONS === */
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out:    cubic-bezier(0, 0, 0.2, 1);
  --ease-in:     cubic-bezier(0.4, 0, 1, 1);

  --duration-fast:   150ms;
  --duration-base:   250ms;
  --duration-slow:   350ms;
  --duration-slower: 500ms;

  --transition:      all var(--duration-base) var(--ease-smooth);
  --transition-fast: all var(--duration-fast) var(--ease-smooth);
  --transition-slow: all var(--duration-slow) var(--ease-smooth);

  /* === Z-INDEX STACK === */
  --z-base:     0;
  --z-above:    10;
  --z-dropdown: 100;
  --z-sticky:   200;
  --z-fixed:    300;
  --z-modal:    400;
  --z-toast:    500;

  /* === GRADIENTS === */
  --grad-primary:   linear-gradient(135deg, #0A3D62 0%, #1A6FA8 100%);
  --grad-secondary: linear-gradient(135deg, #006064 0%, #00838F 100%);
  --grad-accent:    linear-gradient(135deg, #E08900 0%, #F7A800 50%, #FFD54F 100%);
  --grad-hero:      linear-gradient(135deg, rgba(4,25,46,0.92) 0%, rgba(10,61,98,0.75) 60%, rgba(0,131,143,0.40) 100%);
  --grad-overlay:   linear-gradient(180deg, transparent 0%, rgba(4,25,46,0.8) 100%);
  --grad-card:      linear-gradient(145deg, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0.04) 100%);
  --grad-surface:   linear-gradient(180deg, #F4F8FC 0%, #FFFFFF 100%);
}

/* --------------------------------------------------
   2. CSS RESET & BASE
   -------------------------------------------------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  tab-size: 4;
  overflow-x: clip;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: var(--fw-normal);
  line-height: var(--lh-relaxed);
  color: var(--clr-text-primary);
  background-color: var(--clr-bg-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, video, svg {
  display: block;
  max-width: 100%;
}

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

ul, ol { list-style: none; }

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

button { cursor: pointer; border: none; background: none; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  color: var(--clr-text-primary);
}

/* --------------------------------------------------
   3. TYPOGRAPHY SCALE
   -------------------------------------------------- */
.text-xs      { font-size: var(--fs-xs); }
.text-sm      { font-size: var(--fs-sm); }
.text-base    { font-size: var(--fs-base); }
.text-lg      { font-size: var(--fs-lg); }
.text-xl      { font-size: var(--fs-xl); }
.text-2xl     { font-size: var(--fs-2xl); }
.text-3xl     { font-size: var(--fs-3xl); }
.text-4xl     { font-size: var(--fs-4xl); }
.text-5xl     { font-size: var(--fs-5xl); }
.text-6xl     { font-size: var(--fs-6xl); }

.font-normal  { font-weight: var(--fw-normal); }
.font-medium  { font-weight: var(--fw-medium); }
.font-semibold{ font-weight: var(--fw-semibold); }
.font-bold    { font-weight: var(--fw-bold); }
.font-extrabold{ font-weight: var(--fw-extrabold); }

.heading-display {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: var(--fw-extrabold);
  line-height: var(--lh-tight);
  letter-spacing: -0.02em;
}

.heading-section {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: var(--fw-bold);
  line-height: var(--lh-snug);
  letter-spacing: -0.01em;
}

.heading-card {
  font-family: var(--font-heading);
  font-size: var(--fs-xl);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-snug);
}

/* --------------------------------------------------
   4. LAYOUT UTILITIES
   -------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.container-fluid {
  width: 100%;
  padding-inline: var(--container-pad);
}

.section {
  padding-block: var(--section-padding-y);
}

.section-sm  { padding-block: 2rem; }
.section-lg  { padding-block: 5rem; }
.section-xl  { padding-block: 6.5rem; }

/* Grid */
.grid        { display: grid; }
.grid-2      { grid-template-columns: repeat(2, 1fr); gap: var(--sp-8); }
.grid-3      { grid-template-columns: repeat(3, 1fr); gap: var(--sp-8); }
.grid-4      { grid-template-columns: repeat(4, 1fr); gap: var(--sp-6); }

/* Flex */
.flex        { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between{ display: flex; align-items: center; justify-content: space-between; }
.flex-col    { display: flex; flex-direction: column; }
.flex-wrap   { flex-wrap: wrap; }
.gap-2       { gap: var(--sp-2); }
.gap-3       { gap: var(--sp-3); }
.gap-4       { gap: var(--sp-4); }
.gap-6       { gap: var(--sp-6); }
.gap-8       { gap: var(--sp-8); }

/* Alignment */
.text-left    { text-align: left; }
.text-center  { text-align: center; }
.text-right   { text-align: right; }
.items-center { align-items: center; }
.items-start  { align-items: flex-start; }
.justify-center{ justify-content: center; }

/* --------------------------------------------------
   5. SECTION LABEL / EYEBROW
   -------------------------------------------------- */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--clr-secondary);
  margin-bottom: var(--sp-4);
}

.section-label::before {
  content: '';
  display: block;
  width: 28px;
  height: 3px;
  background: var(--grad-secondary);
  border-radius: var(--radius-pill);
}

.section-label.accent {
  color: var(--clr-accent-dark);
}
.section-label.accent::before {
  background: var(--grad-accent);
}

.section-label.white {
  color: rgba(255,255,255,0.8);
}
.section-label.white::before {
  background: rgba(255,255,255,0.5);
}

/* Section Head Group */
.section-head {
  margin-bottom: var(--sp-6);
}
.section-head.center { text-align: center; }
.section-head.center .section-label { justify-content: center; }

.section-head .subtitle {
  margin-top: var(--sp-2);
  font-size: var(--fs-base);
  color: var(--clr-text-secondary);
  max-width: 600px;
  line-height: var(--lh-relaxed);
}
.section-head.center .subtitle { margin-inline: auto; }

/* --------------------------------------------------
   6. COLOR UTILITIES
   -------------------------------------------------- */
.bg-primary    { background: var(--clr-primary); }
.bg-secondary  { background: var(--clr-secondary); }
.bg-accent     { background: var(--clr-accent); }
.bg-dark       { background: var(--clr-bg-dark); }
.bg-surface    { background: var(--clr-bg-surface); }
.bg-white      { background: var(--clr-bg-white); }
.bg-navy       { background: var(--clr-bg-navy); }
.bg-grad-primary   { background: var(--grad-primary); }
.bg-grad-secondary { background: var(--grad-secondary); }

.text-primary    { color: var(--clr-primary); }
.text-secondary  { color: var(--clr-secondary); }
.text-accent     { color: var(--clr-accent); }
.text-muted      { color: var(--clr-text-muted); }
.text-white      { color: var(--clr-text-white); }

/* --------------------------------------------------
   7. KEYFRAME ANIMATIONS
   -------------------------------------------------- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-30px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

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

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes pulse-ring {
  0%   { transform: scale(1); opacity: 1; }
  100% { transform: scale(2.2); opacity: 0; }
}

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

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

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

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes ticker-scroll {
  0%   { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 10px rgba(247,168,0,0.3); }
  50%       { box-shadow: 0 0 30px rgba(247,168,0,0.7); }
}

@keyframes underline-grow {
  from { width: 0; }
  to   { width: 100%; }
}

@keyframes bounce-y {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-6px); }
}

@keyframes flow-gradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes float-blob {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -50px) scale(1.08); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* --------------------------------------------------
   8. SCROLL-TRIGGERED ANIMATION HELPERS
   -------------------------------------------------- */
[data-animate] {
  opacity: 0;
  transition: opacity var(--duration-slower) var(--ease-out),
              transform var(--duration-slower) var(--ease-out);
}

[data-animate="fade-up"]    { transform: translateY(30px); }
[data-animate="fade-down"]  { transform: translateY(-30px); }
[data-animate="fade-left"]  { transform: translateX(-30px); }
[data-animate="fade-right"] { transform: translateX(30px); }
[data-animate="scale-in"]   { transform: scale(0.92); }
[data-animate="fade"]       { transform: none; }

[data-animate].animated {
  opacity: 1;
  transform: none !important;
}

/* Stagger delays */
[data-delay="100"] { transition-delay: 100ms; }
[data-delay="200"] { transition-delay: 200ms; }
[data-delay="300"] { transition-delay: 300ms; }
[data-delay="400"] { transition-delay: 400ms; }
[data-delay="500"] { transition-delay: 500ms; }
[data-delay="600"] { transition-delay: 600ms; }
[data-delay="700"] { transition-delay: 700ms; }
[data-delay="800"] { transition-delay: 800ms; }

/* --------------------------------------------------
   9. SCROLLBAR STYLING
   -------------------------------------------------- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--clr-bg-surface); }
::-webkit-scrollbar-thumb {
  background: var(--clr-primary-light);
  border-radius: var(--radius-pill);
}
::-webkit-scrollbar-thumb:hover { background: var(--clr-primary); }

/* --------------------------------------------------
   10. SELECTION
   -------------------------------------------------- */
::selection {
  background: var(--clr-primary-pale);
  color: var(--clr-primary);
}

/* --------------------------------------------------
   11. FOCUS STYLES
   -------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--clr-accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* --------------------------------------------------
   12. RESPONSIVE BREAKPOINTS (max-width)
   -------------------------------------------------- */
/* Tablet: max 1024px */
/* Mobile: max 768px  */
/* Small:  max 480px  */
@media (max-width: 1024px) {
  :root {
    --section-padding-y: 4rem;
    --container-pad: 1.25rem;
  }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root {
    --section-padding-y: 3rem;
    --container-pad: 1rem;
  }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section-head .subtitle { font-size: var(--fs-base); }
}

@media (max-width: 480px) {
  :root {
    --section-padding-y: 2.5rem;
  }
}
