/* ============================================================
   D.R. Healthcare — Design System CSS
   Foundation: custom properties, reset, typography, layout
   ============================================================ */

/* ============================================================
   1. GOOGLE FONTS IMPORT
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400&family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600&family=Hind:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;600&display=swap');


/* ============================================================
   2. CSS CUSTOM PROPERTIES
   ============================================================ */
:root {

  /* --- Color Palette --- */
  --color-primary:          #0854c2;
  --color-primary-light:    #2172b3;
  --color-primary-dark:     #053a8a;
  --color-accent-red:       #e62a2b;
  --color-accent-amber:     #cc5c14;
  --color-dark:             #07111F;
  --color-dark-2:           #0d1f38;
  --color-dark-3:           #152c4e;
  --color-bg-light:         #EEF4FF;
  --color-bg-white:         #FFFFFF;
  --color-text-primary:     #07111F;
  --color-text-secondary:   #4A5568;
  --color-text-muted:       #718096;
  --color-text-white:       #F8FAFF;

  /* --- Glassmorphism --- */
  --glass-bg:               rgba(255, 255, 255, 0.08);
  --glass-bg-light:         rgba(255, 255, 255, 0.15);
  --glass-border:           rgba(255, 255, 255, 0.12);
  --glass-border-light:     rgba(255, 255, 255, 0.25);
  --glass-shadow:           0 8px 32px rgba(8, 84, 194, 0.15);

  /* --- Typography --- */
  --font-display:  'DM Serif Display', serif;
  --font-heading:  'Playfair Display', serif;
  --font-body:     'DM Sans', sans-serif;
  --font-hindi:    'Hind', sans-serif;
  --font-mono:     'JetBrains Mono', monospace;

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

  /* --- Spacing Scale (8px base) --- */
  --space-1:  8px;
  --space-2:  16px;
  --space-3:  24px;
  --space-4:  32px;
  --space-5:  48px;
  --space-6:  64px;
  --space-7:  80px;
  --space-8:  96px;
  --space-9:  128px;

  /* --- Border Radius --- */
  --radius-sm:   8px;
  --radius-md:   16px;
  --radius-lg:   24px;
  --radius-xl:   40px;
  --radius-full: 9999px;

  /* --- Shadows --- */
  --shadow-sm:   0 2px 8px rgba(8, 84, 194, 0.08);
  --shadow-md:   0 8px 24px rgba(8, 84, 194, 0.12);
  --shadow-lg:   0 16px 48px rgba(8, 84, 194, 0.18);
  --shadow-glow: 0 0 40px rgba(8, 84, 194, 0.25);

  /* --- Transitions --- */
  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 600ms cubic-bezier(0.25, 0.46, 0.45, 0.94);

  /* --- Layout --- */
  --nav-height:      72px;
  --section-padding: 96px;
  --container-max:   1200px;
  --container-pad:   24px;
}


/* ============================================================
   3. MODERN CSS RESET
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  font-size: 16px;
}

body {
  min-height: 100vh;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

input,
button,
textarea,
select {
  font: inherit;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

ul,
ol {
  list-style: none;
}

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

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

table {
  border-collapse: collapse;
}


/* ============================================================
   4. BASE TYPOGRAPHY
   ============================================================ */

/* Body */
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  color: var(--color-text-primary);
  background-color: var(--color-bg-light);
}

/* Hindi language body override */
body.lang-hi {
  font-family: var(--font-hindi);
}

/* Headings — Playfair Display by default */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-text-primary);
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl);  }
h5 { font-size: var(--text-lg);  }
h6 { font-size: var(--text-md);  }

/* Display / Hero headings — DM Serif Display */
.hero-title,
.display,
.font-display {
  font-family: var(--font-display);
  font-weight: 400; /* DM Serif Display is naturally heavy */
}

/* Monospace — stats and numbers */
.font-mono {
  font-family: var(--font-mono);
  font-weight: 600;
}

/* Paragraph */
p {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  line-height: 1.75;
}

/* Small / muted text */
small,
.text-sm {
  font-size: var(--text-sm);
}

.text-xs  { font-size: var(--text-xs);  }
.text-md  { font-size: var(--text-md);  }
.text-lg  { font-size: var(--text-lg);  }
.text-xl  { font-size: var(--text-xl);  }
.text-2xl { font-size: var(--text-2xl); }
.text-3xl { font-size: var(--text-3xl); }
.text-4xl { font-size: var(--text-4xl); }

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

.font-light    { font-weight: 300; }
.font-normal   { font-weight: 400; }
.font-medium   { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold     { font-weight: 700; }

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

.uppercase     { text-transform: uppercase; }
.capitalize    { text-transform: capitalize; }
.tracking-wide { letter-spacing: 0.05em; }
.tracking-wider{ letter-spacing: 0.1em;  }


/* ============================================================
   5. LAYOUT UTILITIES
   ============================================================ */

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

/* Section */
.section {
  padding-block: var(--section-padding);
  position: relative;
  overflow: hidden;
}

/* Section Header */
.section-header {
  text-align: center;
  margin-bottom: var(--space-6);
}

.section-header-light .section-title,
.section-header-light h2 {
  color: var(--color-text-white);
}

/* Section Tag — pill label above section titles */
.section-tag {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 600;
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-primary);
  background-color: rgba(8, 84, 194, 0.1);
  border: 1px solid rgba(8, 84, 194, 0.2);
  border-radius: var(--radius-full);
  padding: 6px 16px;
  margin-bottom: var(--space-2);
}

.section-tag-light {
  color: var(--color-text-white);
  background-color: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Section Title */
.section-title {
  font-family: var(--font-heading);
  font-size: var(--text-4xl);
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.15;
  margin-bottom: var(--space-2);
}

.section-title-light {
  color: var(--color-text-white);
}

/* CSS Grid Helpers */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
}

/* Flex utilities */
.flex         { display: flex; }
.flex-col     { flex-direction: column; }
.items-center { align-items: center; }
.items-start  { align-items: flex-start; }
.items-end    { align-items: flex-end; }
.justify-center  { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end     { justify-content: flex-end; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-5 { gap: var(--space-5); }
.flex-wrap { flex-wrap: wrap; }

/* Spacing utilities */
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-5 { margin-bottom: var(--space-5); }

.pt-1 { padding-top: var(--space-1); }
.pt-2 { padding-top: var(--space-2); }
.pb-1 { padding-bottom: var(--space-1); }
.pb-2 { padding-bottom: var(--space-2); }

/* Width utilities */
.w-full  { width: 100%; }
.w-auto  { width: auto; }
.h-full  { height: 100%; }

/* Position */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed    { position: fixed; }
.sticky   { position: sticky; }

/* Overflow */
.overflow-hidden { overflow: hidden; }
.overflow-auto   { overflow: auto; }


/* ============================================================
   6. COMPONENT BASE CLASSES
   ============================================================ */

/* --- Glass Card --- */
.glass-card {
  background: var(--glass-bg-light);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  transition: transform var(--transition-base),
              box-shadow var(--transition-base);
}

.glass-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Glass card on dark backgrounds */
.glass-card-dark {
  background: var(--glass-bg);
  border-color: var(--glass-border);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  padding: 12px 28px;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 1;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform var(--transition-fast),
              box-shadow var(--transition-fast),
              background-color var(--transition-fast),
              color var(--transition-fast),
              border-color var(--transition-fast);
  white-space: nowrap;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 3px;
}

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

/* Primary Button */
.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-text-white);
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
}

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

/* Outline Button */
.btn-outline {
  background-color: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

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

/* Outline on dark background */
.btn-outline-light {
  background-color: transparent;
  color: var(--color-text-white);
  border-color: var(--glass-border-light);
}

.btn-outline-light:hover {
  background-color: var(--glass-bg-light);
  color: var(--color-text-white);
}

/* Ghost Button */
.btn-ghost {
  background-color: transparent;
  color: var(--color-primary);
  border-color: transparent;
}

.btn-ghost:hover {
  background-color: rgba(8, 84, 194, 0.08);
}

/* Size Variants */
.btn-sm {
  padding: 8px 18px;
  font-size: var(--text-sm);
}

.btn-lg {
  padding: 16px 36px;
  font-size: var(--text-md);
}

/* Full Width */
.btn-full {
  width: 100%;
}


/* --- Hidden utility --- */
.hidden {
  display: none !important;
}

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


/* ============================================================
   7. CUSTOM SCROLLBAR
   ============================================================ */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg-light);
}

::-webkit-scrollbar-thumb {
  background: var(--color-primary-light);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--color-primary-light) var(--color-bg-light);
}


/* ============================================================
   8. TEXT SELECTION
   ============================================================ */
::selection {
  background-color: rgba(8, 84, 194, 0.2);
  color: var(--color-primary-dark);
}

::-moz-selection {
  background-color: rgba(8, 84, 194, 0.2);
  color: var(--color-primary-dark);
}


/* ============================================================
   9. FOCUS STYLES (ACCESSIBILITY)
   ============================================================ */
:focus {
  outline: none;
}

:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 3px;
}


/* ============================================================
   10. RESPONSIVE BREAKPOINTS
   ============================================================ */
/*
  xs:  < 480px
  sm:  480px – 767px
  md:  768px – 1023px
  lg:  1024px – 1279px
  xl:  >= 1280px
*/

@media (max-width: 1023px) {
  :root {
    --section-padding: 72px;
  }

  .section-title {
    font-size: var(--text-3xl);
  }

  h1 { font-size: var(--text-4xl); }
  h2 { font-size: var(--text-3xl); }
  h3 { font-size: var(--text-xl);  }

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

@media (max-width: 767px) {
  :root {
    --section-padding: 56px;
    --container-pad: 16px;
  }

  .section-title {
    font-size: var(--text-2xl);
  }

  h1 { font-size: var(--text-3xl); }
  h2 { font-size: var(--text-2xl); }
  h3 { font-size: var(--text-xl);  }

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

  .section-header {
    margin-bottom: var(--space-4);
  }
}

@media (max-width: 479px) {
  :root {
    --section-padding: 48px;
  }

  .section-title {
    font-size: var(--text-xl);
  }

  h1 { font-size: var(--text-2xl); }
  h2 { font-size: var(--text-xl);  }
  h3 { font-size: var(--text-lg);  }
}


/* ============================================================
   11. PRINT STYLES
   ============================================================ */
@media print {
  /* Hide loader and fixed UI */
  #loader,
  .whatsapp-float,
  .scroll-indicator {
    display: none !important;
  }

  /* Reset navbar for print */
  #navbar {
    position: static;
    box-shadow: none;
    background: white;
  }

  /* Hide canvas elements (they are decorative) */
  canvas {
    display: none !important;
  }

  /* Ensure text is black for printing */
  body {
    color: #000;
    background: #fff;
  }

  a {
    color: #000;
    text-decoration: underline;
  }

  /* Remove backgrounds from sections */
  .section,
  .glass-card {
    background: #fff !important;
    box-shadow: none !important;
    border: 1px solid #ddd !important;
    backdrop-filter: none !important;
  }

  /* Page breaks */
  .section {
    page-break-inside: avoid;
  }

  h2, h3 {
    page-break-after: avoid;
  }
}


/* ============================================================
   12. UTILITY CLASSES (MISC)
   ============================================================ */

/* Aspect ratios */
.aspect-square   { aspect-ratio: 1 / 1; }
.aspect-video    { aspect-ratio: 16 / 9; }
.aspect-portrait { aspect-ratio: 3 / 4; }

/* Rounded */
.rounded-sm   { border-radius: var(--radius-sm); }
.rounded-md   { border-radius: var(--radius-md); }
.rounded-lg   { border-radius: var(--radius-lg); }
.rounded-xl   { border-radius: var(--radius-xl); }
.rounded-full { border-radius: var(--radius-full); }

/* Background colors */
.bg-primary   { background-color: var(--color-primary); }
.bg-dark      { background-color: var(--color-dark); }
.bg-dark-2    { background-color: var(--color-dark-2); }
.bg-dark-3    { background-color: var(--color-dark-3); }
.bg-light     { background-color: var(--color-bg-light); }
.bg-white     { background-color: var(--color-bg-white); }

/* Border */
.border       { border: 1px solid var(--glass-border-light); }
.border-brand { border: 1px solid var(--color-primary); }

/* Shadow */
.shadow-sm  { box-shadow: var(--shadow-sm); }
.shadow-md  { box-shadow: var(--shadow-md); }
.shadow-lg  { box-shadow: var(--shadow-lg); }
.shadow-glow{ box-shadow: var(--shadow-glow); }

/* Opacity */
.opacity-0  { opacity: 0; }
.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }
.opacity-100{ opacity: 1; }

/* Cursor */
.cursor-pointer { cursor: pointer; }
.cursor-default { cursor: default; }

/* No select */
.no-select {
  user-select: none;
  -webkit-user-select: none;
}

/* Transition helpers */
.transition-fast { transition: all var(--transition-fast); }
.transition-base { transition: all var(--transition-base); }
.transition-slow { transition: all var(--transition-slow); }
