/* ==========================================================================
   HEALTHCARE DIRECTORY — DESIGN FOUNDATION
   Original visual system for a global medical-tourism directory.
   Not modeled on any competitor.

   Direction: "clinical trust with a warm call to action." A trustworthy
   medical blue carries brand and interactive elements, deep navy anchors
   dark sections (hero, footer), and the logo crimson is reserved for primary
   calls to action, credentials and ratings. Backgrounds are a clean,
   cool near-white so hospital and doctor imagery reads clearly.

   Typography pairs Source Serif 4 (an editorial, peer-reviewed-journal
   feel, used only for headings) with Public Sans (the US Web Design
   System's body face — built for plain-language clarity across a broad,
   international audience) and IBM Plex Mono for figures that need to read
   as precise data: costs, ratings, stats.

   This file: design tokens, reset, typography, containers, and the
   responsive grid. See components.css for buttons, forms, cards, badges,
   ratings, alerts, and the doctor/hospital card patterns.
   ========================================================================== */

:root {
  /* ---- Color: ink & surfaces -------------------------------------- */
  --color-ink: #0F1B2D;            /* primary text */
  --color-ink-soft: #475569;       /* secondary text */
  --color-ink-faint: #5E6B80;      /* tertiary text — 5:1 on white, still readable on tinted panels */
  --color-bg: #F5F8FC;             /* app background — cool near-white */
  --color-surface: #FFFFFF;        /* card / panel surfaces */
  --color-surface-sunken: #EDF2F8; /* recessed panels, table stripes */
  --color-border: #DDE4EE;
  --color-border-strong: #C5D0DF;

  /* ---- Color: brand -------------------------------------------------
     Medical Blue is the interactive/brand color. Deep Navy is reserved
     for dark sections (footer, inverse hero panels). */
  --color-primary: #1D5FB4;
  --color-primary-dark: #164A8C;
  --color-primary-darker: #0D2748;
  --color-primary-tint: #E8F0FB;
  --color-primary-tint-strong: #D2E2F6;

  /* ---- Color: accent (logo crimson — CTAs & highlights) ----------- */
  --color-accent: #BE123C;
  --color-accent-dark: #9F1239;
  --color-accent-tint: #FFE4E6;
  --color-rating: #F59E0B;

  /* ---- Color: semantic -------------------------------------------- */
  --color-success: #15803D;
  --color-success-tint: #E7F6EC;
  --color-warning: #96631E;
  --color-warning-tint: #FBF0DD;
  --color-danger: #A23B32;
  --color-danger-tint: #FBEAE8;
  --color-info: #2A5F8F;
  --color-info-tint: #E7F0F9;

  /* ---- Typography --------------------------------------------------- */
  --font-display: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --font-body: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-md: 1.125rem;
  --text-lg: 1.375rem;
  --text-xl: 1.75rem;
  --text-2xl: 2.25rem;
  --text-3xl: 2.875rem;

  --leading-tight: 1.15;
  --leading-snug: 1.35;
  --leading-normal: 1.6;

  --tracking-wide: 0.02em;
  --tracking-wider: 0.08em;

  /* ---- Spacing (4px base) ------------------------------------------- */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* ---- Radius --------------------------------------------------------- */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 999px;

  /* ---- Elevation (navy-tinted, not pure black) ----------------------- */
  --shadow-sm: 0 1px 2px rgba(13, 39, 72, 0.07), 0 1px 1px rgba(13, 39, 72, 0.04);
  --shadow-md: 0 8px 20px rgba(13, 39, 72, 0.09), 0 2px 6px rgba(13, 39, 72, 0.06);
  --shadow-lg: 0 20px 45px rgba(13, 39, 72, 0.16), 0 6px 14px rgba(13, 39, 72, 0.08);
  --shadow-xl: 0 30px 70px rgba(13, 39, 72, 0.20), 0 10px 24px rgba(13, 39, 72, 0.10);

  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);

  /* ---- Layout ---------------------------------------------------------
     Widened again — even 1320px left a noticeable gutter on common wide
     laptop screens (1440px-1920px). 1600px uses much more of the
     available width while still capping on ultra-wide monitors. */
  --container-width: 1600px;
  --container-width-narrow: 820px;
  --container-width-wide: 1800px;
  --container-pad: 24px;
}

/* ==========================================================================
   Reset
   ========================================================================== */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-ink);
  background: var(--color-bg);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--color-primary-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

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

ul, ol { padding-left: 1.25em; }

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3, h4, .h1, .h2, .h3, .h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--leading-tight);
  color: var(--color-primary-darker);
  margin: 0 0 var(--space-4);
}

h1, .h1 { font-size: var(--text-3xl); letter-spacing: -0.01em; }
h2, .h2 { font-size: var(--text-2xl); letter-spacing: -0.01em; }
h3, .h3 { font-size: var(--text-xl); }
h4, .h4 { font-size: var(--text-lg); }

h5, h6, .h5, .h6 {
  font-family: var(--font-body);
  font-weight: 700;
  color: var(--color-ink);
  margin: 0 0 var(--space-3);
}
h5, .h5 { font-size: var(--text-md); }
h6, .h6 { font-size: var(--text-base); }

p { margin: 0 0 var(--space-4); }

.lede {
  font-size: var(--text-md);
  color: var(--color-ink-soft);
  line-height: var(--leading-snug);
}

/* The eyebrow + underline is the platform's one signature typographic
   device: a short label with a two-part rule beneath it, borrowed from
   the visual language of a certification seal — a deliberate nod to the
   accreditation ribbons used throughout the hospital/doctor content,
   rather than a decorative flourish. */
.eyebrow {
  display: inline-flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-accent-dark);
  margin-bottom: var(--space-3);
}
.eyebrow::after {
  content: '';
  display: block;
  width: 46px;
  height: 3px;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--color-accent) 0%, var(--color-accent) 60%, transparent 60%);
  background-size: 8px 3px;
  background-repeat: repeat-x;
}

.text-muted { color: var(--color-ink-soft); }
.text-faint { color: var(--color-ink-faint); }
.text-xs { font-size: var(--text-xs); }
.text-sm { font-size: var(--text-sm); }
.text-md { font-size: var(--text-md); }
.text-lg { font-size: var(--text-lg); }
.font-mono { font-family: var(--font-mono); }
.font-display { font-family: var(--font-display); }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

/* Precise figures — costs, ratings, stats — set in mono to read as data. */
.figure {
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* ==========================================================================
   Containers
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--container-width);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}
.container-narrow { max-width: var(--container-width-narrow); }
.container-wide { max-width: var(--container-width-wide); }

/* ==========================================================================
   Sections
   ========================================================================== */

.section {
  padding-block: var(--space-16);
}
.section-tight { padding-block: var(--space-10); }
.section-loose { padding-block: var(--space-24); }

.section-header {
  max-width: 640px;
  margin-bottom: var(--space-10);
}
.section-header.is-centered { margin-inline: auto; text-align: center; }
.section-header.is-centered .eyebrow { align-items: center; }
.section-header p { margin-bottom: 0; }

/* Inverse section — deep navy background for high-trust moments
   (e.g. accreditation strip, closing CTA). Used sparingly by design. */
.section-dark {
  background: var(--color-primary-darker);
  color: #DCEAE7;
}
.section-dark h1, .section-dark h2, .section-dark h3, .section-dark h4 { color: #FFFFFF; }
.section-dark .text-muted { color: #A7BDD9; }
.section-dark .lede,
.section-dark .section-header p { color: #C9D8EC; }
.section-dark .eyebrow { color: #FDA4AF; }
.section-dark a:not(.btn) { color: #EBF2FB; }

@media (max-width: 640px) {
  .section { padding-block: var(--space-10); }
  .section-loose { padding-block: var(--space-16); }
}

/* ==========================================================================
   Responsive grid
   Breakpoints: mobile <640px · tablet 641–1024px · desktop >1024px
   ========================================================================== */

.grid {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.grid-tight { gap: var(--space-4); }
.grid-loose { gap: var(--space-8); }

/* Fixed-column variants for deliberate layouts (fall back gracefully). */
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* Simple flex helpers used throughout components. */
.stack { display: flex; flex-direction: column; }
.cluster { display: flex; align-items: center; flex-wrap: wrap; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.space-between { justify-content: space-between; }

/* ==========================================================================
   CureIndiaHub logo lockup (components/brand/logo.blade.php)
   ========================================================================== */
.brand-logo { display: inline-flex; align-items: center; gap: 10px; line-height: 1; flex-shrink: 0; min-width: 0; }
.brand-logo__mark { width: 44px; height: 44px; flex: none; }
.brand-logo__text { display: inline-flex; flex-direction: column; min-width: 0; }
.brand-logo__name { font-family: 'Montserrat', 'Public Sans', system-ui, sans-serif; font-weight: 800; font-size: 1.55rem; letter-spacing: -0.01em; color: #1E293B; white-space: nowrap; }
.brand-logo__india { color: #BE123C; }
.brand-logo__tag { margin-top: 5px; font-family: 'Public Sans', system-ui, sans-serif; font-weight: 800; font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase; color: #1E293B; white-space: nowrap; }
.brand-logo__tag b { color: #BE123C; font-weight: 800; }
.brand-logo--white .brand-logo__name, .brand-logo--white .brand-logo__tag { color: #FFFFFF; }
.brand-logo--white .brand-logo__india, .brand-logo--white .brand-logo__tag b { color: #FB7185; }
.brand-logo--sm { gap: 8px; }
.brand-logo--sm .brand-logo__mark { width: 34px; height: 34px; }
.brand-logo--sm .brand-logo__name { font-size: 1.2rem; }
.brand-logo--sm .brand-logo__tag { font-size: 0.52rem; margin-top: 4px; }
.brand-logo--lg .brand-logo__mark { width: 64px; height: 64px; }
.brand-logo--lg .brand-logo__name { font-size: 2.1rem; }
.brand-logo--lg .brand-logo__tag { font-size: 0.78rem; margin-top: 7px; }
a:hover .brand-logo, a:focus .brand-logo { text-decoration: none; }
@media (max-width: 640px) {
  .brand-logo--md .brand-logo__mark { width: 38px; height: 38px; }
  .brand-logo--md .brand-logo__name { font-size: 1.25rem; }
  .brand-logo--md .brand-logo__tag { display: none; }
}
@media (max-width: 380px) {
  .brand-logo--md .brand-logo__name { font-size: 1.08rem; }
}
