/* =========================================================
   Green • Robinette • Johnson — calm clinical theme
   Palette: warm off-white + dusty teal accent + warm gold focus
   Structure preserved from the original stylesheet so existing
   class names (.card, .hero, .notice, .grid-3, .btn, etc.)
   continue to work.
   ========================================================= */

:root{
  /* Surfaces */
  --bg:#fafaf7;          /* page background — very subtle warm white */
  --surface:#f1ede4;     /* warm cream — used in hero panel */
  --card:#ffffff;        /* card background — clean clinical white */
  --border:#e6e1d6;      /* warm hairline */

  /* Text */
  --text:#1c2a31;        /* deep slate — high contrast on warm bg */
  --muted:#5d6e77;       /* secondary text */

  /* Brand — dusty teal */
  --brand:#355e6c;       /* primary accent */
  --brand-2:#558088;     /* hover / lighter accent */
  --brand-soft:#e3ecef;  /* tinted surface for soft callouts */

  /* Highlights */
  --accent:#b88a4a;      /* warm gold — used sparingly on update stripes */
  --focus:#ffbf47;       /* a11y focus ring — kept from original */

  /* System */
  --shadow-sm:0 1px 2px rgba(28,42,49,.04), 0 2px 6px rgba(28,42,49,.04);
  --shadow-md:0 4px 12px rgba(28,42,49,.06), 0 12px 28px rgba(28,42,49,.05);
  --shadow-lg:0 10px 24px rgba(28,42,49,.08), 0 24px 50px rgba(28,42,49,.06);
  --radius:14px;
  --radius-sm:10px;
  --max:1120px;

  --font-display:ui-serif, "Source Serif Pro", Georgia, "Times New Roman", serif;
  --font-body:system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  color-scheme:light;
}

/* ---- Base ------------------------------------------------ */
*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }

body{
  margin:0;
  font-family:var(--font-body);
  font-size:17px;
  line-height:1.6;
  color:var(--text);
  background:var(--bg);
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}

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

h1, h2, h3, h4{
  font-family:var(--font-display);
  font-weight:600;
  letter-spacing:-0.01em;
  color:var(--text);
}

a{
  color:var(--brand);
  text-decoration:underline;
  text-decoration-thickness:1px;
  text-underline-offset:.22em;
  transition:color .15s ease;
}
a:hover{ color:var(--brand-2); }

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

/* ---- Skip link (accessibility) --------------------------- */
.skip-link{
  position:absolute;
  left:-999px;
  width:1px;
  height:1px;
  overflow:hidden;
}
.skip-link:focus{
  left:16px;
  top:16px;
  width:auto;
  height:auto;
  padding:10px 14px;
  background:var(--card);
  border:1px solid var(--border);
  box-shadow:var(--shadow-md);
  z-index:9999;
  border-radius:8px;
}

/* ---- Layout container ----------------------------------- */
.container{
  max-width:var(--max);
  margin:0 auto;
  padding:0 20px;
}

/* ---- Header / Nav --------------------------------------- */
.site-header{
  position:sticky;
  top:0;
  z-index:100;
  background:rgba(250,250,247,.88);
  backdrop-filter:saturate(140%) blur(10px);
  -webkit-backdrop-filter:saturate(140%) blur(10px);
  border-bottom:1px solid var(--border);
}

.nav{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:14px 0;
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  text-decoration:none;
  color:inherit;
  min-width:0;
}
.brand:hover{ color:inherit; }

/* Logo mark — dusty teal gradient with subtle inner highlight */
.logo{
  width:42px;
  height:42px;
  border-radius:12px;
  flex:0 0 auto;
  background:
    radial-gradient(circle at 30% 25%, rgba(255,255,255,.35), transparent 55%),
    linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow:var(--shadow-sm);
}

.brand-text{ display:flex; flex-direction:column; min-width:0; }
.brand-title{
  font-family:var(--font-display);
  font-weight:600;
  font-size:1rem;
  line-height:1.15;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  color:var(--text);
}
.brand-subtitle{
  font-size:.85rem;
  color:var(--muted);
  letter-spacing:.01em;
}

/* Doctor-page header: <h1> sits inside .brand. Match index look. */
header .nav .brand h1{
  margin:0;
  font-size:1rem;
  font-weight:600;
  line-height:1.15;
  letter-spacing:0;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width:70vw;
}
header .nav .brand small{
  display:block;
  font-size:.85rem;
  color:var(--muted);
}

.navlinks{
  display:flex;
  gap:6px;
  align-items:center;
}

.navlinks a{
  padding:9px 12px;
  border-radius:10px;
  text-decoration:none;
  color:var(--text);
  font-weight:500;
  font-size:.95rem;
  transition:background-color .15s ease, color .15s ease;
}
.navlinks a:hover{ background:var(--brand-soft); color:var(--brand); }
.navlinks a[aria-current="page"]{
  background:var(--brand-soft);
  color:var(--brand);
}

.menu-btn{
  display:none;
  background:var(--card);
  border:1px solid var(--border);
  padding:8px 12px;
  border-radius:10px;
  font-weight:500;
  cursor:pointer;
  box-shadow:var(--shadow-sm);
}

@media (max-width:860px){
  .menu-btn{ display:inline-flex; }
  .navlinks{
    position:absolute;
    left:0;
    right:0;
    top:68px;
    display:none;
    flex-direction:column;
    align-items:stretch;
    padding:12px 20px 16px;
    background:var(--card);
    border-bottom:1px solid var(--border);
    box-shadow:var(--shadow-md);
    gap:4px;
  }
  .navlinks.open{ display:flex; }
  .navlinks a{ padding:12px 14px; }
}

/* ---- Main ------------------------------------------------ */
main.container{
  padding-top:28px;
  padding-bottom:96px;
}

/* ---- Hero ------------------------------------------------
   Grid with auto-fit handles BOTH layouts:
   - index.html (1 child) → single column
   - doctor pages (2 children: name block + education card) → two columns
   ---------------------------------------------------------- */
.hero{
  margin-top:8px;
  padding:36px;
  border:1px solid var(--border);
  border-radius:var(--radius);
  background:
    linear-gradient(180deg, var(--surface) 0%, #f6f3ec 100%);
  box-shadow:var(--shadow-md);

  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(280px, 1fr));
  gap:28px;
  align-items:center;
}

.hero-content{ max-width:62ch; }

.hero h1,
.hero h2,
.hero-title{
  margin:0 0 10px;
  font-size:clamp(1.85rem, 3.2vw, 2.6rem);
  line-height:1.1;
  letter-spacing:-0.015em;
}

.hero p{ margin:0 0 12px; color:var(--muted); }
.hero-subtitle{
  margin:0 0 18px;
  color:var(--muted);
  font-size:1.05rem;
}

/* The notice inside the hero gets a distinct accent stripe */
.notice{
  position:relative;
  padding:14px 16px 14px 18px;
  border-radius:var(--radius-sm);
  background:var(--card);
  border:1px solid var(--border);
  box-shadow:var(--shadow-sm);
  font-size:.97rem;
}
.notice::before{
  content:"";
  position:absolute;
  left:0; top:10px; bottom:10px;
  width:3px;
  border-radius:3px;
  background:var(--accent);
}
.notice strong{ color:var(--text); }

/* Education card on doctor pages (the right side of the hero) */
.hero > .card{
  margin:0;
  background:var(--card);
}

/* ---- Sections ------------------------------------------- */
.section{ margin-top:44px; }
.section h2{
  margin:0 0 16px;
  font-size:1.55rem;
  letter-spacing:-0.01em;
}

/* ---- Cards ---------------------------------------------- */
.card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:22px;
  box-shadow:var(--shadow-sm);
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.card h3{
  margin:0 0 6px;
  font-size:1.15rem;
  line-height:1.25;
}

.card p{ margin:0 0 10px; }
.card p:last-child{ margin-bottom:0; }

.card ul{
  margin:0;
  padding-left:1.1em;
  color:var(--muted);
}
.card ul li{ margin:.15em 0; }

/* ---- Doctor grid ---------------------------------------- */
.grid-3{
  display:grid;
  grid-template-columns:repeat(3, minmax(0,1fr));
  gap:18px;
}
@media (max-width:980px){
  .grid-3{ grid-template-columns:1fr; }
}

/* ---- Doctor card ---------------------------------------- */
.card.doctor{
  display:flex;
  flex-direction:column;
  gap:14px;
}
.card.doctor:hover{
  transform:translateY(-2px);
  box-shadow:var(--shadow-md);
  border-color:#dad3c4;
}

/* Avatar — perfect circle, with a soft inner ring for polish */
.card.doctor .avatar{
  width:128px;
  height:128px;
  border-radius:50%;
  overflow:hidden;
  background:var(--surface);
  box-shadow:
    0 0 0 1px var(--border),
    0 0 0 4px var(--bg),
    0 0 0 5px var(--brand-soft);
}
.card.doctor .avatar img{
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center;
}

.card.doctor .doctor-head{ margin-top:2px; }
.card.doctor h3{ margin:0 0 2px; }

/* Clamp preview text to keep cards uniform */
.card.doctor .small{
  margin:0;
  color:var(--muted);
  font-size:.95rem;
  display:-webkit-box;
  -webkit-line-clamp:4;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

.card.doctor .btn{ margin-top:auto; align-self:flex-start; }

/* ---- Buttons -------------------------------------------- */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.4em;
  padding:10px 16px;
  border-radius:10px;
  border:1px solid var(--brand);
  background:var(--brand);
  color:#fff;
  text-decoration:none;
  font-weight:600;
  font-size:.95rem;
  letter-spacing:.005em;
  transition:background-color .15s ease, transform .12s ease, box-shadow .15s ease;
  box-shadow:var(--shadow-sm);
}
.btn:hover{
  background:var(--brand-2);
  border-color:var(--brand-2);
  color:#fff;
  transform:translateY(-1px);
  box-shadow:var(--shadow-md);
}
.btn:active{ transform:translateY(0); }

.btn.btn-ghost{
  background:transparent;
  color:var(--brand);
  border-color:var(--border);
}
.btn.btn-ghost:hover{
  background:var(--brand-soft);
  color:var(--brand);
  border-color:var(--brand-soft);
}

/* ---- Updates ------------------------------------------- */
.updates{ display:grid; gap:14px; }

.card.update{
  position:relative;
  padding-left:26px;
  border-color:var(--border);
}
.card.update::before{
  content:"";
  position:absolute;
  left:0; top:18px; bottom:18px;
  width:3px;
  border-radius:3px;
  background:var(--brand);
  opacity:.85;
}
.card.update time,
.card.update .meta{
  display:inline-block;
  font-size:.85rem;
  color:var(--muted);
  letter-spacing:.04em;
  text-transform:uppercase;
  margin:0 0 6px;
}
.card.update h3{
  font-size:1.2rem;
  margin:0 0 8px;
}

/* ---- Practice update notice cards (doctor pages) -------- */
.card.notice{
  padding-left:26px;
  background:#fbf6ec;
  border-color:#ecddbe;
}
.card.notice::before{
  background:var(--accent);
}
.card.notice .meta{
  font-size:.85rem;
  color:var(--muted);
  letter-spacing:.04em;
  text-transform:uppercase;
}

/* ---- Meta text ------------------------------------------ */
.meta{ color:var(--muted); margin:0; }

/* ---- Footer --------------------------------------------- */
.footer{
  margin-top:64px;
  padding-top:24px;
  border-top:1px solid var(--border);
  color:var(--muted);
  font-size:.92rem;
}

/* ---- Accessibility helper ------------------------------- */
.visually-hidden{
  position:absolute;
  left:-10000px;
  width:1px;
  height:1px;
  overflow:hidden;
}

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