/* Iftakhar Memorial Hospital — public site
   Palette is taken from the hospital emblem: navy ring, teal heart, gold flame.
   It matches the management system's brand tokens so print, app and web agree. */

:root {
  --teal-50:  #effcf9;
  --teal-100: #c9f5ec;
  --teal-200: #99ebdd;
  --teal-300: #5fd9c8;
  --teal-400: #2bbfae;
  --teal-500: #12a394;
  --teal-600: #0a8378;
  --teal-700: #0c6a62;
  --teal-900: #0d3f3d;

  --ink-50:  #f7f9fb;
  --ink-100: #eef2f6;
  --ink-200: #dfe6ed;
  --ink-300: #c5d0dc;
  --ink-400: #93a3b5;
  --ink-500: #657891;
  --ink-600: #465b75;
  --ink-700: #31445c;
  --ink-800: #1d2e44;
  --ink-900: #101d2e;
  --ink-950: #08111d;

  --gold-300: #e7b566;
  --gold-500: #d08228;
  --gold-600: #b06520;

  --red-600: #c02a2a;
  --red-700: #9c1f1f;

  --page: #ffffff;
  --shell: 1120px;
  --radius: 16px;
  --radius-lg: 24px;

  --shadow-card: 0 1px 2px rgba(16,29,46,.04), 0 12px 28px -16px rgba(16,29,46,.18);
  --shadow-lift: 0 2px 4px rgba(16,29,46,.05), 0 20px 40px -20px rgba(16,29,46,.28);

  --font-sans: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-display: 'Plus Jakarta Sans', 'Inter', 'Segoe UI', system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-700);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink-900);
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin: 0 0 .5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 1.3rem + 3.2vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.8vw, 2.4rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 700; }
p  { margin: 0 0 1rem; text-wrap: pretty; }
a  { color: var(--teal-700); }
img { max-width: 100%; height: auto; display: block; }

.shell { width: 100%; max-width: var(--shell); margin-inline: auto; padding-inline: 20px; }

.section { padding-block: clamp(3.5rem, 2rem + 6vw, 6rem); }
.section--tint { background: linear-gradient(180deg, var(--ink-50), #fff); }
.section--teal { background: var(--teal-50); }

.eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--teal-600); margin-bottom: .75rem;
}
.lede { font-size: 1.1rem; color: var(--ink-600); max-width: 62ch; }
.section-head { max-width: 62ch; margin-bottom: 2.5rem; }
.section-head--center { margin-inline: auto; text-align: center; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .8rem 1.5rem; border-radius: 999px; border: 1px solid transparent;
  font-family: var(--font-display); font-size: .97rem; font-weight: 700;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, color .18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible { outline: 3px solid var(--teal-400); outline-offset: 3px; }
.btn--primary { background: var(--teal-600); color: #fff; box-shadow: 0 8px 24px -10px rgba(10,131,120,.6); }
.btn--primary:hover { background: var(--teal-700); }
.btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.btn--ghost:hover { background: rgba(255,255,255,.14); border-color: #fff; }
.btn--outline { background: #fff; color: var(--ink-800); border-color: var(--ink-200); box-shadow: var(--shadow-card); }
.btn--outline:hover { border-color: var(--teal-300); color: var(--teal-700); }
.btn--emergency { background: var(--red-600); color: #fff; box-shadow: 0 8px 24px -10px rgba(192,42,42,.65); }
.btn--emergency:hover { background: var(--red-700); }
.btn--sm { padding: .55rem 1.1rem; font-size: .88rem; }

/* ----------------------------------------------------------------- header */
.topbar {
  background: var(--ink-900); color: var(--ink-300);
  font-size: .85rem; padding-block: .55rem;
}
.topbar .shell { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; align-items: center; justify-content: space-between; }
.topbar a { color: var(--ink-100); text-decoration: none; }
.topbar a:hover { color: #fff; text-decoration: underline; }
.topbar__item { display: inline-flex; align-items: center; gap: .45rem; }
.topbar svg { width: 15px; height: 15px; flex: none; color: var(--teal-400); }

.masthead {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255,255,255,.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--ink-200);
}
.masthead .shell { display: flex; align-items: center; gap: 1rem; min-height: 78px; }

.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; margin-right: auto; }
.brand img { width: 52px; height: 52px; flex: none; }
.brand > span { display: block; }
.brand__name { display: block; font-family: var(--font-display); font-weight: 800; font-size: 1.06rem; color: var(--ink-900); line-height: 1.2; letter-spacing: -.02em; }
.brand__tag { display: block; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--teal-600); font-weight: 600; margin-top: .1rem; }
@media (max-width: 460px) { .brand__name { font-size: .95rem; } .brand__tag { display: none; } }

.nav { display: flex; align-items: center; gap: .35rem; }
.nav a {
  padding: .5rem .85rem; border-radius: 999px; text-decoration: none;
  font-weight: 600; font-size: .95rem; color: var(--ink-700); white-space: nowrap;
  transition: background-color .15s ease, color .15s ease;
}
.nav a:hover { background: var(--ink-100); color: var(--ink-900); }
.nav a[aria-current="page"] { color: var(--teal-700); background: var(--teal-50); }
.nav a.btn { color: #fff; }
.nav a.btn:hover { color: #fff; }

.nav-toggle {
  display: none; width: 44px; height: 44px; border: 1px solid var(--ink-200);
  border-radius: 12px; background: #fff; cursor: pointer; padding: 0;
  align-items: center; justify-content: center; color: var(--ink-800);
}
.nav-toggle svg { width: 22px; height: 22px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }

@media (max-width: 900px) {
  .masthead .shell { min-height: 68px; position: relative; }
  .brand img { width: 44px; height: 44px; }
  .nav-toggle { display: inline-flex; }
  .nav {
    position: absolute; inset: 100% 0 auto; flex-direction: column; align-items: stretch;
    gap: 0; background: #fff; border-bottom: 1px solid var(--ink-200);
    padding: .5rem 20px 1.1rem; box-shadow: var(--shadow-lift);
  }
  .nav[hidden] { display: none; }
  .nav a { padding: .8rem .6rem; border-radius: 12px; font-size: 1rem; }
  .nav .btn { margin-top: .6rem; }
}
@media (min-width: 901px) { .nav[hidden] { display: flex; } }

/* ------------------------------------------------------------------- hero */
.hero { position: relative; isolation: isolate; color: #fff; overflow: hidden; }
.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 42%; }
.hero::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(8,17,29,.45) 0%, rgba(8,17,29,.22) 45%, rgba(8,17,29,.78) 100%),
    linear-gradient(100deg, rgba(13,63,61,.85) 0%, rgba(13,63,61,.42) 44%, rgba(8,17,29,0) 80%);
}
.hero__inner { padding-block: clamp(4.5rem, 3rem + 10vw, 8.5rem); max-width: 42rem; }
.hero h1 { color: #fff; margin-bottom: 1rem; }
.hero p { color: rgba(255,255,255,.88); font-size: 1.12rem; max-width: 50ch; }
.hero__badge {
  display: inline-flex; align-items: center; gap: .5rem; margin-bottom: 1.25rem;
  padding: .4rem .9rem .4rem .5rem; border-radius: 999px;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.28);
  font-size: .82rem; font-weight: 600; letter-spacing: .04em; backdrop-filter: blur(6px);
}
.hero__badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal-200); box-shadow: 0 0 0 4px rgba(153,235,221,.25); }
.hero__cta { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }

/* facts bar riding the bottom edge of the hero */
.factbar { background: #fff; box-shadow: var(--shadow-lift); border-radius: var(--radius-lg); margin-top: -3.25rem; position: relative; z-index: 5; overflow: hidden; }
.factbar__grid { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; }
.factbar__item { padding: 1.5rem 1.6rem; display: flex; gap: .9rem; align-items: flex-start; }
.factbar__item + .factbar__item { border-left: 1px solid var(--ink-200); }
.factbar__icon { width: 42px; height: 42px; flex: none; border-radius: 12px; background: var(--teal-50); color: var(--teal-600); display: grid; place-items: center; }
.factbar__icon svg { width: 22px; height: 22px; }
.factbar dt { font-family: var(--font-display); font-weight: 700; color: var(--ink-900); font-size: .95rem; }
.factbar dd { margin: .15rem 0 0; font-size: .92rem; color: var(--ink-600); }
@media (max-width: 760px) {
  .factbar { margin-top: -2rem; }
  .factbar__grid { grid-template-columns: 1fr; }
  .factbar__item + .factbar__item { border-left: 0; border-top: 1px solid var(--ink-200); }
}

/* ------------------------------------------------------------------ cards */
.grid { display: grid; gap: 1.25rem; }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

.card {
  background: #fff; border: 1px solid var(--ink-200); border-radius: var(--radius);
  padding: 1.6rem; box-shadow: var(--shadow-card);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card--hover:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: var(--teal-200); }
.card h3 { margin-bottom: .4rem; }
.card p:last-child { margin-bottom: 0; }
.card__icon {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--teal-700), var(--teal-500));
  color: #fff; margin-bottom: 1rem; box-shadow: 0 8px 20px -10px rgba(10,131,120,.7);
}
.card__icon svg { width: 25px; height: 25px; }

.taglist { display: flex; flex-wrap: wrap; gap: .4rem; margin: .9rem 0 0; padding: 0; list-style: none; }
.taglist li {
  font-size: .8rem; font-weight: 600; color: var(--ink-600);
  background: var(--ink-100); border-radius: 999px; padding: .25rem .7rem;
}

.ticklist { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.ticklist li { position: relative; padding-left: 1.9rem; }
.ticklist li::before {
  content: ''; position: absolute; left: 0; top: .45em; width: 1.15rem; height: 1.15rem;
  border-radius: 50%; background-color: var(--teal-50);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230a8378' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'><path d='M20 6 9 17l-5-5'/></svg>");
  background-repeat: no-repeat; background-position: center; background-size: .75rem;
}

/* --------------------------------------------------------------- chairman */
.figurepanel { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
@media (max-width: 860px) { .figurepanel { grid-template-columns: 1fr; } }

.portrait img { border-radius: var(--radius-lg); box-shadow: var(--shadow-lift); width: 100%; }
/* The mint block sits behind the photograph itself. Anchoring it to .portrait
   instead would measure from the bottom of the caption, leaving it stranded
   below the image. */
.portrait picture { position: relative; isolation: isolate; display: block; }
.portrait picture::before {
  content: ''; position: absolute; inset: auto -14px -14px auto; width: 58%; height: 58%;
  border-radius: var(--radius-lg); background: linear-gradient(135deg, var(--teal-200), var(--teal-50));
  z-index: -1;
}
.portrait__caption { margin-top: 1.1rem; font-family: var(--font-display); }
.portrait__caption strong { display: block; color: var(--ink-900); font-size: 1.15rem; font-weight: 800; }
.portrait__caption span { color: var(--teal-700); font-size: .9rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }

blockquote.message {
  margin: 0; padding: 0 0 0 1.5rem; border-left: 3px solid var(--teal-400);
  font-size: 1.1rem; color: var(--ink-700);
}
blockquote.message p:last-child { margin-bottom: 0; }

/* ------------------------------------------------------------- stats band */
.band {
  background: linear-gradient(135deg, var(--teal-900) 0%, var(--teal-700) 50%, var(--teal-600) 100%);
  color: #fff;
}
.band h2 { color: #fff; }
.band p { color: rgba(255,255,255,.85); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1.5rem; text-align: center; }
.stats div strong { display: block; font-family: var(--font-display); font-size: clamp(2rem, 1.4rem + 2.4vw, 2.9rem); font-weight: 800; color: #fff; line-height: 1.1; }
.stats div span { font-size: .9rem; color: rgba(255,255,255,.8); }

/* ------------------------------------------------------------------- misc */
.callout {
  border-radius: var(--radius-lg); padding: clamp(1.75rem, 1rem + 3vw, 3rem);
  background: linear-gradient(135deg, var(--ink-900), var(--ink-800) 60%, var(--teal-900));
  color: #fff; display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; justify-content: space-between;
}
.callout h2 { color: #fff; margin-bottom: .35rem; }
.callout p { color: rgba(255,255,255,.82); margin: 0; max-width: 46ch; }
.callout__actions { display: flex; flex-wrap: wrap; gap: .75rem; }

.emergency-strip {
  background: var(--red-600); color: #fff; border-radius: var(--radius);
  padding: 1.25rem 1.5rem; display: flex; flex-wrap: wrap; gap: 1rem;
  align-items: center; justify-content: space-between;
}
.emergency-strip strong { font-family: var(--font-display); font-size: 1.1rem; display: block; }
.emergency-strip p { margin: 0; color: rgba(255,255,255,.9); font-size: .95rem; }

.infocard { display: grid; gap: 1.5rem; }
.infocard__row { display: flex; gap: 1rem; align-items: flex-start; }
.infocard__icon { width: 44px; height: 44px; flex: none; border-radius: 12px; background: var(--teal-50); color: var(--teal-700); display: grid; place-items: center; }
.infocard__icon svg { width: 21px; height: 21px; }
.infocard h3 { font-size: 1rem; margin-bottom: .2rem; }
.infocard p { margin: 0; color: var(--ink-600); }
.infocard a { color: var(--ink-800); text-decoration: none; font-weight: 600; }
.infocard a:hover { color: var(--teal-700); text-decoration: underline; }

.hours { width: 100%; border-collapse: collapse; }
.hours th, .hours td { text-align: left; padding: .7rem .25rem; border-bottom: 1px solid var(--ink-200); font-size: .95rem; }
.hours th { font-weight: 600; color: var(--ink-800); }
.hours td { color: var(--ink-600); text-align: right; }
.hours tr:last-child th, .hours tr:last-child td { border-bottom: 0; }

.mapframe { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--ink-200); box-shadow: var(--shadow-card); aspect-ratio: 16 / 10; background: var(--ink-100); }
.mapframe iframe { width: 100%; height: 100%; border: 0; display: block; }

.pagehead { background: linear-gradient(135deg, var(--ink-900), var(--teal-900)); color: #fff; padding-block: clamp(3rem, 2rem + 5vw, 5rem); }
.pagehead h1 { color: #fff; margin-bottom: .5rem; }
.pagehead p { color: rgba(255,255,255,.82); max-width: 58ch; margin: 0; font-size: 1.08rem; }
.crumbs { font-size: .85rem; color: rgba(255,255,255,.65); margin-bottom: 1rem; }
.crumbs a { color: rgba(255,255,255,.85); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

/* A contact detail the hospital has not filled in yet. Impossible to miss. */
.ph {
  background: #fff4d6; color: #8d4a1e; border: 1px dashed var(--gold-500);
  border-radius: 6px; padding: 0 .35em; font-weight: 700; font-size: .92em;
  text-decoration: none; white-space: nowrap;
}
.topbar .ph, .footer .ph, .hero .ph, .callout .ph, .emergency-strip .ph {
  background: rgba(231,181,102,.2); color: var(--gold-300); border-color: var(--gold-300);
}

/* ----------------------------------------------------------------- footer */
.footer { background: var(--ink-950); color: var(--ink-400); padding-block: 3.5rem 2rem; font-size: .93rem; }
.footer__grid { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(auto-fit, minmax(160px, 1fr)); gap: 2.5rem; }
.footer h4 { color: #fff; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 1rem; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.footer a { color: var(--ink-300); text-decoration: none; }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer__brand { display: flex; align-items: center; gap: .8rem; margin-bottom: 1rem; }
.footer__brand img { width: 50px; height: 50px; }
.footer__brand strong { font-family: var(--font-display); color: #fff; font-size: 1.02rem; display: block; line-height: 1.25; }
/* Only the tagline. A bare `span` also matched the wrapper around the name,
   which then inherited the uppercase and letter-spacing. */
.footer__brand span span { font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--teal-400); }
.footer__legal {
  margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.1);
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; font-size: .85rem;
}
.footer__note { max-width: 44ch; color: var(--ink-500); font-size: .88rem; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--teal-700); color: #fff; padding: .75rem 1.25rem; border-radius: 0 0 12px 0;
}
.skip-link:focus { left: 0; }

/* Entrance animation. Scoped to .js, which the inline script in <head> adds:
   without JavaScript nothing is ever revealed, so the content must start
   visible rather than fade in. */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; } }
