/* ==========================================================
   Ramraksha Hospital – single page site
   Theme: white + fresh orange. Light, minimal, mobile first.
   ========================================================== */

:root {
  --orange: #F26B0C;        /* logo + large accents */
  --orange-fill: #FF8A1F;   /* buttons, lines (dark text on top) */
  --orange-ink: #C2530A;    /* orange used for small text (AA contrast) */
  --ink: #1B1A17;
  --muted: #5E5B55;
  --line: #ECE6DF;
  --tint: #FFF6EE;
  --tint-line: #F4DAC4;
  --white: #FFFFFF;

  --font: 'Plus Jakarta Sans', 'Noto Sans Devanagari', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-hi: 'Noto Sans Devanagari', 'Plus Jakarta Sans', system-ui, sans-serif;
  --wrap: 1120px;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --header-h: 72px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  hyphens: none;
  overflow-wrap: normal;
  word-break: normal;
}

img { max-width: 100%; display: block; }
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- Language switching ---------- */
html[data-lang="en"] .hi { display: none !important; }
html[data-lang="hi"] .en { display: none !important; }
.hi { font-family: var(--font-hi); letter-spacing: 0 !important; }

/* ---------- Layout helpers ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2rem);
}

.sec { padding-block: clamp(3.75rem, 9vw, 7rem); }
.sec-line { border-top: 1px solid var(--line); }

.split { display: block; }

h2 {
  font-size: clamp(1.75rem, 3.6vw, 2.6rem);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-wrap: balance;
  margin-bottom: clamp(1.5rem, 3.4vw, 2.5rem);
}
.sec h2::before {
  content: ""; display: block; width: 44px; height: 4px; border-radius: 2px;
  background: var(--orange-fill); margin-bottom: 1.1rem;
}
html[data-lang="hi"] h2 { line-height: 1.35; }

.nb { white-space: nowrap; }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: 8px;
  text-decoration: none; transition: top .2s;
}
.skip:focus { top: .75rem; }

:focus-visible { outline: 3px solid var(--orange-ink); outline-offset: 3px; border-radius: 4px; }

/* ---------- Scroll progress ---------- */
.progress {
  position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 60;
  background: var(--orange-fill);
  transform-origin: 0 50%;
  transform: scaleX(var(--p, 0));
  pointer-events: none;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .86);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
.site-header.scrolled {
  border-color: var(--line);
  box-shadow: 0 6px 24px rgba(27, 26, 23, .06);
}
.bar {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  transition: height .3s var(--ease);
}
.site-header.scrolled .bar { height: 62px; }

.logo { text-decoration: none; display: inline-flex; align-items: baseline; gap: .4rem; white-space: nowrap; }
.logo-name { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.03em; color: var(--orange); }
.logo-sub { font-size: 1.05rem; font-weight: 600; color: var(--ink); }

.nav { display: flex; gap: clamp(1rem, 2.4vw, 2rem); }
.nav a {
  position: relative; text-decoration: none; font-weight: 600; font-size: .95rem;
  padding-block: .4rem; color: var(--muted); transition: color .2s;
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--orange-fill); transform: scaleX(0); transform-origin: 0 50%;
  transition: transform .35s var(--ease);
}
.nav a:hover, .nav a.active { color: var(--ink); }
.nav a:hover::after, .nav a.active::after { transform: scaleX(1); }

.bar-tools { display: flex; align-items: center; gap: .75rem; }

.lang {
  display: inline-flex; padding: 3px; border-radius: 999px;
  background: var(--tint); border: 1px solid var(--tint-line);
}
.lang button {
  border: 0; background: transparent; cursor: pointer;
  min-width: 42px; min-height: 34px; padding: 0 .7rem; border-radius: 999px;
  font-size: .85rem; font-weight: 700; color: var(--muted);
  transition: background .25s, color .25s;
}
.lang button[aria-pressed="true"] { background: var(--orange-fill); color: var(--ink); }

.menu-btn {
  display: none; width: 44px; height: 44px; border: 0; border-radius: 12px;
  background: transparent; cursor: pointer; position: relative;
}
.menu-btn span {
  position: absolute; left: 11px; right: 11px; height: 2px; background: var(--ink); border-radius: 2px;
  transition: transform .3s var(--ease), opacity .2s;
}
.menu-btn span:nth-child(1) { top: 15px; }
.menu-btn span:nth-child(2) { top: 21px; }
.menu-btn span:nth-child(3) { top: 27px; }
.nav-open .menu-btn span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-open .menu-btn span:nth-child(2) { opacity: 0; }
.nav-open .menu-btn span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; text-align: center;
  min-height: 52px; padding: .8rem 1.7rem; border-radius: 999px;
  font-weight: 700; font-size: 1rem; line-height: 1.2; text-decoration: none;
  border: 1.5px solid transparent; cursor: pointer;
  transition: transform .25s var(--ease), background .25s, border-color .25s, box-shadow .25s;
}
.btn-sm { min-height: 44px; padding: .55rem 1.2rem; font-size: .92rem; white-space: nowrap; }
.btn-primary { background: var(--orange-fill); color: var(--ink); box-shadow: 0 8px 22px rgba(255, 138, 31, .28); }
.btn-primary:hover { background: #FF9B3F; transform: translateY(-2px); box-shadow: 0 12px 28px rgba(255, 138, 31, .38); }
.btn-ghost { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

/* ---------- Hero ---------- */
.hero {
  padding-top: clamp(3rem, 8vw, 6.5rem);
  overflow-x: clip;
}
.hero h1 {
  font-size: clamp(2.3rem, 7.2vw, 5.1rem);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.035em;
}
html[data-lang="hi"] .hero h1 { font-size: clamp(2rem, 5.6vw, 4rem); line-height: 1.3; }
.hero h1 .en, .hero h1 .hi { display: block; }

.line { display: block; overflow: hidden; padding-block: .06em; margin-block: -.06em; }
.line > span {
  display: block;
  transform: translateY(110%);
  animation: rise .95s var(--ease) forwards;
}
.line:nth-child(1) > span { animation-delay: .10s; }
.line:nth-child(2) > span { animation-delay: .28s; }
.line:nth-child(3) > span { animation-delay: .46s; }

.lead {
  margin-top: clamp(1.5rem, 3vw, 2.25rem);
  max-width: 38rem;
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  line-height: 1.6;
  color: var(--muted);
  text-align: justify; text-justify: inter-word; hyphens: none;
}
.actions { margin-top: clamp(1.75rem, 3.5vw, 2.5rem); display: flex; flex-wrap: wrap; gap: .85rem; }

.lead, .actions { opacity: 0; animation: fadeup .8s var(--ease) forwards; }
.lead { animation-delay: .75s; }
.actions { animation-delay: .9s; }

.ecg { margin-top: clamp(2rem, 5vw, 4rem); overflow: hidden; }
.ecg svg { display: block; width: max(100%, 900px); height: auto; }
.ecg path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.ecg-base { stroke: var(--orange-fill); stroke-width: 3; opacity: .3; }
.ecg-trail { stroke: var(--orange-fill); stroke-width: 3; opacity: .55; stroke-dasharray: .5 1; stroke-dashoffset: .5; }
.ecg-run { stroke: var(--orange); stroke-width: 3.5; stroke-dasharray: .28 1; stroke-dashoffset: .28; }

@keyframes rise { to { transform: translateY(0); } }
@keyframes fadeup { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ---------- Trust strip ---------- */
.trust-wrap { border-block: 1px solid var(--line); background: #fff; }
.trust { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.trust li {
  display: flex; align-items: flex-start; gap: .7rem;
  padding: 1.5rem 1.1rem 1.5rem 0;
  font-weight: 600; font-size: .95rem; line-height: 1.4;
}
.trust li + li { padding-left: 1.1rem; border-left: 1px solid var(--line); }
.tick { flex: none; width: 24px; height: 24px; margin-top: 1px; }

/* ---------- About ---------- */
.prose { max-width: 46rem; }
.prose p, .appt-text, .bio, .dlg-body p {
  text-align: justify; text-justify: inter-word; hyphens: none; text-wrap: pretty;
}
.prose p { font-size: clamp(1.05rem, 1.5vw, 1.2rem); line-height: 1.8; color: #34322D; }

/* ---------- Lists ---------- */
.big-list, .dot-list { max-width: 52rem; }
.big-list li {
  border-bottom: 1px solid var(--line);
  padding-block: clamp(1rem, 2vw, 1.4rem);
  font-size: clamp(1.4rem, 3.2vw, 2.1rem);
  font-weight: 600; letter-spacing: -0.015em; line-height: 1.25;
  display: flex; align-items: center; gap: 1rem;
  transition: padding-left .35s var(--ease), color .25s;
}
.big-list li:first-child { border-top: 1px solid var(--line); }
.big-list li::before {
  content: ""; flex: none; width: 10px; height: 10px; border-radius: 50%;
  background: var(--orange-fill); transition: transform .35s var(--ease);
}
.big-list li:hover { padding-left: .75rem; color: var(--orange-ink); }
.big-list li:hover::before { transform: scale(1.5); }
html[data-lang="hi"] .big-list li { line-height: 1.5; }

.dot-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(1.5rem, 4vw, 3rem); }
.dot-list li {
  display: flex; align-items: center; gap: .85rem;
  padding-block: 1rem; border-bottom: 1px solid var(--line);
  font-size: clamp(1.05rem, 1.8vw, 1.25rem); font-weight: 600;
}
.dot-list li::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 2px; background: var(--orange-fill); transform: rotate(45deg); }

/* ---------- Doctors ---------- */
.docs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(2.25rem, 6vw, 4.5rem); }
.doc img {
  width: 100%; height: auto; max-width: 228px; aspect-ratio: 1 / 1; object-fit: cover;
  border-radius: 10px; background: var(--tint);
  transition: transform .5s var(--ease);
}
.doc:hover img { transform: translateY(-4px); }
.doc h3 { margin-top: 1.4rem; font-size: clamp(1.4rem, 2.4vw, 1.75rem); line-height: 1.25; letter-spacing: -0.015em; font-weight: 700; }
html[data-lang="hi"] .doc h3 { line-height: 1.45; }
.deg { margin-top: .4rem; font-weight: 700; color: var(--orange-ink); }
.role { margin-top: .15rem; font-weight: 600; color: #34322D; }
.reg { margin-top: .5rem; font-size: .95rem; color: var(--muted); }
.bio { margin-top: .9rem; max-width: 26rem; color: #34322D; }

/* ---------- Appointment ---------- */
.appt { background: var(--tint); border-block: 1px solid var(--tint-line); }
.appt-text { max-width: 42rem; margin: 0 0 clamp(2rem, 4vw, 3rem); color: #34322D; }
.appt-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.phones { max-width: none; }
.phones li:first-child { border-top: 1px solid var(--tint-line); }
.phones li { border-bottom: 1px solid var(--tint-line); }
.phones a {
  display: flex; align-items: center; gap: 1rem; min-height: 64px; padding-block: .9rem;
  text-decoration: none; font-weight: 700; letter-spacing: -0.01em;
  font-size: clamp(1.35rem, 4.8vw, 1.95rem); font-variant-numeric: tabular-nums;
  transition: padding-left .35s var(--ease), color .25s;
}
.phones svg { flex: none; width: 28px; height: 28px; color: var(--orange-ink); transition: transform .35s var(--ease); }
.phones a:hover { padding-left: .75rem; color: var(--orange-ink); }
.phones a:hover svg { transform: rotate(-12deg) scale(1.1); }

/* Timings */
.timings { margin: 0; max-width: none; }
.slot { padding-block: 1.1rem; border-top: 1px solid var(--tint-line); }
.slot:first-child { padding-top: .9rem; }
.slot:last-child { border-bottom: 1px solid var(--tint-line); }
.slot dt { font-weight: 700; font-size: 1.05rem; margin-bottom: .45rem; }
.slot dd {
  margin: 0; padding-block: .2rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .1rem 1.25rem;
  color: #34322D; font-size: 1rem;
}
.slot dd span:last-child { font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; margin-left: auto; }
.slot dd.off, .slot dd.off span:last-child { color: var(--muted); }
.slot dd.off span:last-child { font-weight: 500; }
.slot dd.live span:last-child { color: var(--orange-ink); font-weight: 700; }

/* ---------- Find us ---------- */
.find-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(1.75rem, 5vw, 4rem); align-items: start; }
.find-info address { margin-top: 0; }
address { font-style: normal; margin: 1.5rem 0 1.75rem; font-size: 1.1rem; line-height: 1.8; font-weight: 500; }
.map iframe {
  display: block; width: 100%; aspect-ratio: 4 / 3; min-height: 280px; border: 0;
  border-radius: 10px; background: var(--tint); outline: 1px solid var(--line); outline-offset: -1px;
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: 1.75rem; }
.foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 2rem; font-size: .92rem; color: var(--muted); }
.legal { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; }
.legal button {
  background: none; border: 0; padding: .5rem 0; cursor: pointer; min-height: 44px;
  text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--tint-line);
  transition: color .2s, text-decoration-color .2s;
}
.legal button:hover { color: var(--ink); text-decoration-color: var(--orange-fill); }

/* ---------- Mobile call bar ---------- */
.callbar {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 55;
  align-items: center; justify-content: center; gap: .6rem;
  min-height: 58px; padding: .5rem 1rem calc(.5rem + env(safe-area-inset-bottom));
  background: var(--orange-fill); color: var(--ink);
  font-weight: 800; text-decoration: none; text-align: center;
  box-shadow: 0 -8px 24px rgba(27, 26, 23, .12);
  transition: transform .4s var(--ease);
}
.callbar svg { width: 22px; height: 22px; flex: none; }
.callbar.is-hidden { transform: translateY(110%); }

/* ---------- Dialogs ---------- */
body.lock { overflow: hidden; }
dialog {
  padding: 0; border: 0; border-radius: 14px; overflow: hidden; color: var(--ink); background: #fff;
  width: min(680px, calc(100% - 1.5rem));
  box-shadow: 0 30px 80px rgba(27, 26, 23, .28);
}
dialog[open] { animation: pop .32s var(--ease); }
dialog::backdrop { background: rgba(27, 26, 23, .5); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.dlg { display: flex; flex-direction: column; max-height: min(86vh, 760px); max-height: min(86dvh, 760px); }
.dlg-head {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.1rem 1.25rem 1.1rem 1.6rem; border-bottom: 1px solid var(--line);
}
.dlg-head h2 { font-size: 1.35rem; margin: 0; }
.dlg-close {
  flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--tint); font-size: 1.6rem; line-height: 1; transition: background .2s, transform .3s var(--ease);
}
.dlg-close:hover { background: var(--tint-line); transform: rotate(90deg); }
.dlg-body { overflow-y: auto; padding: 1.25rem 1.6rem 1.75rem; overscroll-behavior: contain; }
.dlg-body h3 { margin-top: 1.4rem; font-size: 1.05rem; font-weight: 700; }
.dlg-body p { margin-top: .35rem; color: #34322D; font-size: 1rem; line-height: 1.7; }
.dlg-body .note { margin-top: 0; font-size: .9rem; color: var(--muted); text-align: left; }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }

/* ---------- Scroll reveal (only when JS is on) ---------- */
.js .reveal {
  opacity: 0; transform: translateY(22px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  transition-delay: calc(var(--d, 0) * 1ms);
}
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- 404 ---------- */
.nf { min-height: 70vh; display: grid; align-content: center; justify-items: start; gap: 1.25rem; padding-block: 4rem; }
.nf h1 { font-size: clamp(2.2rem, 7vw, 4rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.nf p { color: var(--muted); max-width: 28rem; }

/* ==========================================================
   Responsive
   ========================================================== */
@media (max-width: 1100px) {
  .trust { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .trust li:nth-child(4) { padding-left: 0; border-left: 0; }
  .trust li:nth-child(n+4) { border-top: 1px solid var(--line); }
}

@media (max-width: 1180px) {
  .head-cta { display: none; }
}

@media (max-width: 860px) {
  :root { --header-h: 64px; }
  .appt-body, .find-grid { grid-template-columns: minmax(0, 1fr); }
  .menu-btn { display: block; }

  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 30px rgba(27, 26, 23, .08);
    padding: .5rem clamp(1.25rem, 4vw, 2rem) 1rem;
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity .25s, transform .3s var(--ease), visibility 0s .3s;
  }
  .nav-open .nav { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
  .nav a { font-size: 1.15rem; padding-block: .95rem; border-bottom: 1px solid var(--line); color: var(--ink); }
  .nav a:last-child { border-bottom: 0; }
  .nav a::after { display: none; }
  .nav a.active { color: var(--orange-ink); }

  .callbar { display: flex; }
  body { padding-bottom: 58px; }

  .docs { grid-template-columns: minmax(0, 1fr); }
  .doc img { max-width: 192px; }
}

@media (max-width: 640px) {
  body { font-size: 1rem; }
  .logo-name { font-size: 1.35rem; }
  .logo-sub { font-size: .95rem; }
  .trust { grid-template-columns: minmax(0, 1fr); }
  .trust li, .trust li + li, .trust li:nth-child(4) { padding: 1rem 0; border-left: 0; }
  .trust li + li, .trust li:nth-child(n+4) { border-top: 1px solid var(--line); }
  .dot-list { grid-template-columns: minmax(0, 1fr); }
  .actions .btn { flex: 1 1 100%; }
  .lead { max-width: none; }
  .dlg-head { padding: 1rem 1rem 1rem 1.25rem; }
  .dlg-body { padding: 1rem 1.25rem 1.5rem; }
}

@media (max-width: 480px) {
  .bar { gap: .5rem; }
  .bar-tools { gap: .25rem; }
  .menu-btn { width: 40px; }
  .menu-btn span { left: 9px; right: 9px; }
  .lang button { min-width: 40px; padding: 0 .6rem; }
}

@media (max-width: 350px) {
  .logo { flex-direction: column; align-items: flex-start; gap: 0; line-height: 1.15; }
  .logo-name { font-size: 1.2rem; }
  .logo-sub { font-size: .8rem; }
}

@media (max-width: 380px) {
  .logo { gap: .3rem; }
  .logo-name { font-size: 1.2rem; }
  .logo-sub { font-size: .85rem; }
  .bar-tools { gap: .4rem; }
  .lang button { min-width: 38px; padding: 0 .55rem; }
}

/* ---------- Respect reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .line > span { transform: none; }
  .lead, .actions { opacity: 1; }
  .ecg-base { opacity: 1; }
  .ecg-trail, .ecg-run, .ecg .pulse { display: none; }
  .js .reveal { opacity: 1; transform: none; }
}
