/* =========================================================
   Dr. Sharath Adiga M — website styles
   To change the colours of the whole site, edit the values
   in :root below.
   ========================================================= */

:root {
  --ink: #1f2a55;        /* deep indigo: headings, header, buttons */
  --text: #1c2233;       /* body text */
  --muted: #56607a;      /* secondary text */
  --paper: #f6f7f9;      /* page background */
  --white: #ffffff;
  --tint: #e6ecf5;       /* soft blue panels */
  --line: #d6dce7;       /* borders and rules */
  --sea: #2c7a6a;        /* sea-green: "open today", links */
  --sea-tint: #e2f1ed;

  --serif: "Literata", Georgia, "Times New Roman", serif;
  --sans: "Atkinson Hyperlegible", "Segoe UI", Arial, sans-serif;

  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 {
  font-family: var(--serif);
  color: var(--ink);
  line-height: 1.15;
  font-weight: 600;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.4rem, 6vw, 4.25rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); letter-spacing: -0.01em; }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; max-width: 68ch; }

a { color: var(--sea); text-underline-offset: 3px; }
a:hover { color: var(--ink); }

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

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip-link {
  position: absolute; left: -999px; top: 8px;
  background: var(--ink); color: var(--white); padding: 8px 14px; z-index: 100;
}
.skip-link:focus { left: 8px; }

/* ---------- Header ---------- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 72px;
}
.brand { text-decoration: none; color: var(--ink); line-height: 1.2; }
.brand strong { font-family: var(--serif); font-size: 1.2rem; display: block; }
.brand span { font-size: 0.875rem; color: var(--muted); }

.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; align-items: center; }
.nav a {
  display: block; padding: 8px 12px; text-decoration: none;
  color: var(--text); border-radius: 6px; font-weight: 600; font-size: 0.975rem;
}
.nav a:hover { background: var(--tint); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -3px 0 var(--sea); border-radius: 0; }
.nav .nav-call {
  background: var(--ink); color: var(--white); margin-left: 8px; border-radius: 6px; padding: 8px 16px;
}
.nav .nav-call:hover { background: var(--sea); color: var(--white); }

.menu-toggle {
  display: none; background: none; border: 1px solid var(--line); border-radius: 6px;
  padding: 8px 12px; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer;
}

@media (max-width: 860px) {
  .menu-toggle { display: block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%;
         background: var(--white); border-bottom: 1px solid var(--line); }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; align-items: stretch; padding: 8px var(--gutter) 16px; }
  .nav a { padding: 12px; }
  .nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--sea); }
  .nav .nav-call { margin: 8px 0 0; text-align: center; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 22px; border-radius: 8px; font-weight: 700; text-decoration: none;
  font-size: 1rem; border: 2px solid var(--ink); line-height: 1.2;
}
.btn-primary { background: var(--ink); color: var(--white); }
.btn-primary:hover { background: var(--sea); border-color: var(--sea); color: var(--white); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--white); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ---------- Hero (home) ---------- */
.hero { padding: clamp(40px, 7vw, 88px) 0 clamp(48px, 7vw, 96px); background: var(--white); }
.hero-grid {
  display: grid; grid-template-columns: 1.25fr 0.85fr; gap: clamp(32px, 6vw, 80px); align-items: center;
}
.hero h1 { margin-bottom: 0.25em; }
.hero .degrees { font-family: var(--serif); font-size: clamp(1.1rem, 2vw, 1.35rem); color: var(--muted); margin-bottom: 1.4em; }
.hero .role { font-size: 1.15rem; font-weight: 700; color: var(--ink); margin-bottom: 0.6em; }

.portrait { position: relative; }
.portrait img { border-radius: 14px; aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }

/* "OPD today" card — the signature element */
.today {
  position: relative; margin: -64px 20px 0; background: var(--ink); color: var(--white);
  border-radius: 12px; padding: 18px 20px;
}
.today .today-label { font-size: 0.9rem; opacity: 0.8; margin: 0; }
.today .today-hours { font-family: var(--serif); font-size: 1.6rem; margin: 2px 0 4px; }
.today .today-note { font-size: 0.9rem; margin: 0; opacity: 0.85; }
.today .dot {
  display: inline-block; width: 10px; height: 10px; border-radius: 50%;
  background: #6fd3b8; margin-right: 8px; vertical-align: middle;
}
.today.closed .dot { background: #f2b8a0; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .portrait { max-width: 420px; }
}

/* ---------- Page header (inner pages) ---------- */
.page-head { background: var(--white); border-bottom: 1px solid var(--line); padding: clamp(36px, 6vw, 72px) 0 clamp(28px, 4vw, 48px); }
.page-head h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
.page-head p { color: var(--muted); font-size: 1.15rem; }

/* ---------- Sections ---------- */
.section { padding: clamp(48px, 7vw, 88px) 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-white { background: var(--white); }
.section-intro { margin-bottom: 32px; }
.section-intro p { color: var(--muted); }

/* Conditions overview list (home) */
.condition-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 40px;
}
.condition-list li { border-top: 1px solid var(--line); }
.condition-list a { display: block; padding: 16px 0; text-decoration: none; color: var(--text); }
.condition-list a strong { display: block; font-family: var(--serif); color: var(--ink); font-size: 1.15rem; font-weight: 600; }
.condition-list a span { color: var(--muted); font-size: 0.95rem; }
.condition-list a:hover strong { color: var(--sea); }
@media (max-width: 900px) { .condition-list { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .condition-list { grid-template-columns: 1fr; } }

/* Two-column split */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
.split img { border-radius: 14px; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* Simple bulleted list */
.ticks { list-style: none; padding: 0; margin: 0 0 1em; }
.ticks li { padding: 8px 0 8px 28px; position: relative; border-bottom: 1px solid var(--line); }
.ticks li::before {
  content: ""; position: absolute; left: 4px; top: 17px; width: 10px; height: 10px;
  border-radius: 50%; border: 2px solid var(--sea);
}

/* Training timeline */
.timeline { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.timeline li { padding: 20px 24px 0 0; border-top: 3px solid var(--ink); position: relative; }
.timeline li::before {
  content: ""; position: absolute; top: -9px; left: 0; width: 15px; height: 15px;
  border-radius: 50%; background: var(--white); border: 3px solid var(--ink);
}
.timeline .years { color: var(--muted); font-size: 0.95rem; }
.timeline h3 { margin: 4px 0 4px; }
.timeline p { margin: 0; }
@media (max-width: 760px) {
  .timeline { grid-template-columns: 1fr; }
  .timeline li { border-top: none; border-left: 3px solid var(--ink); padding: 0 0 28px 24px; }
  .timeline li::before { left: -9px; top: 2px; }
}

/* Experience list */
.experience { list-style: none; padding: 0; margin: 0; }
.experience li { padding: 18px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 260px 1fr; gap: 24px; }
.experience strong { color: var(--ink); }
@media (max-width: 700px) { .experience li { grid-template-columns: 1fr; gap: 4px; } }

/* OPD schedule table */
.schedule { width: 100%; border-collapse: collapse; background: var(--white); border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.schedule th, .schedule td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.schedule tr:last-child th, .schedule tr:last-child td { border-bottom: none; }
.schedule th { font-weight: 700; color: var(--ink); width: 40%; }
.schedule small { display: block; color: var(--muted); }
.schedule tr.is-today { background: var(--sea-tint); }
.schedule tr.is-today th::after {
  content: "Today"; margin-left: 10px; font-size: 0.8rem; font-weight: 700;
  background: var(--sea); color: var(--white); padding: 2px 8px; border-radius: 99px;
}

/* Contact block */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 64px); align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.contact-list .k { display: block; color: var(--muted); font-size: 0.9rem; }
.contact-list a, .contact-list .v { font-size: 1.15rem; font-weight: 700; color: var(--ink); text-decoration: none; }
.contact-list a:hover { color: var(--sea); text-decoration: underline; }

.notice {
  background: #fff4ec; border-left: 4px solid #c8642f; padding: 14px 18px; border-radius: 6px;
  margin: 24px 0 0; font-size: 0.975rem;
}
.notice p { margin: 0; }

.map { width: 100%; aspect-ratio: 4 / 3; border: 0; border-radius: 12px; background: var(--tint); }

/* Conditions accordion */
.accordion { border-top: 1px solid var(--line); }
.accordion details { border-bottom: 1px solid var(--line); }
.accordion summary {
  cursor: pointer; list-style: none; padding: 22px 48px 22px 0; position: relative;
  font-family: var(--serif); font-size: clamp(1.2rem, 2.4vw, 1.5rem); color: var(--ink); font-weight: 600;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after {
  content: ""; position: absolute; right: 8px; top: 50%; width: 12px; height: 12px;
  border-right: 2.5px solid var(--ink); border-bottom: 2.5px solid var(--ink);
  transform: translateY(-70%) rotate(45deg); transition: transform 0.2s;
}
.accordion details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.accordion summary:hover { color: var(--sea); }
.accordion ul { columns: 2; column-gap: 40px; margin: 0 0 24px; padding-left: 20px; }
.accordion li { margin-bottom: 8px; break-inside: avoid; }
@media (max-width: 640px) { .accordion ul { columns: 1; } }

/* Procedures */
.proc-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: 48px; }
.proc-list li { border-top: 1px solid var(--line); padding: 18px 0; }
.proc-list strong { display: block; font-family: var(--serif); font-size: 1.2rem; color: var(--ink); font-weight: 600; }
.proc-list span { color: var(--muted); }
@media (max-width: 760px) { .proc-list { grid-template-columns: 1fr; } }

.pubs { padding-left: 20px; }
.pubs li { margin-bottom: 12px; max-width: 75ch; }
.pubs em { color: var(--muted); }

/* Call-to-action band */
.cta-band { background: var(--ink); color: var(--white); padding: clamp(40px, 6vw, 64px) 0; }
.cta-band h2 { color: var(--white); }
.cta-band p { color: #cdd5ea; }
.cta-band .btn-primary { background: var(--white); color: var(--ink); border-color: var(--white); }
.cta-band .btn-primary:hover { background: var(--sea-tint); border-color: var(--sea-tint); color: var(--ink); }
.cta-band .btn-ghost { color: var(--white); border-color: var(--white); }
.cta-band .btn-ghost:hover { background: var(--white); color: var(--ink); }
.cta-inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.cta-inner .btn-row { margin-top: 0; }

/* ---------- Footer ---------- */
.site-footer { background: #151d3d; color: #c4cbe0; padding: 48px 0 28px; font-size: 0.95rem; }
.site-footer a { color: var(--white); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.footer-grid h3 { color: var(--white); font-size: 1.1rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 6px; }
.footer-bottom { border-top: 1px solid #2d3866; margin-top: 32px; padding-top: 20px; font-size: 0.875rem; }
.footer-bottom p { max-width: none; margin: 0 0 6px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

/* Floating WhatsApp/call button on phones */
.float-call {
  display: none; position: fixed; right: 16px; bottom: 16px; z-index: 60;
  background: var(--sea); color: var(--white); text-decoration: none; font-weight: 700;
  padding: 14px 20px; border-radius: 99px; box-shadow: 0 6px 18px rgba(31, 42, 85, 0.3);
}
@media (max-width: 700px) { .float-call { display: inline-block; } body { padding-bottom: 72px; } }
