/* Neuro Anesthesia Protocols — stylesheet
   Modern, professional, clinical teal/blue theme. */

:root {
  --teal-900: #0b4a50;
  --teal-800: #0d5a61;
  --teal-700: #0f766e;
  --teal-600: #128a80;
  --teal-500: #14b8a6;
  --teal-050: #ecfeff;

  --ink: #0f172a;
  --body: #334155;
  --muted: #64748b;
  --bg: #f6f9fb;
  --surface: #ffffff;
  --border: #e2e8f0;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .06);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);

  --maxw: 1080px;
  --radius: 14px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--body);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--teal-700); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--ink);
  font-weight: 700;
}
.brand:hover { text-decoration: none; }

.brand__logo {
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--teal-050), #dff6f4);
  border: 1px solid var(--border);
  object-fit: cover;
  display: block;
}

.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__title { font-size: 1.06rem; letter-spacing: -.01em; }
.brand__sub {
  font-size: .74rem;
  font-weight: 600;
  color: var(--teal-700);
  text-transform: uppercase;
  letter-spacing: .08em;
}

/* ---------- Navigation ---------- */
.nav-toggle {
  margin-left: auto;
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
  color: var(--ink);
}

.main-nav { margin-left: auto; }
.main-nav > ul { list-style: none; display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; }

.main-nav > ul > li { position: relative; }

.main-nav a,
.dropdown > button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: inherit;
  font-weight: 600;
  font-size: .95rem;
  color: var(--ink);
  background: none;
  border: 0;
  cursor: pointer;
  padding: 9px 13px;
  border-radius: 10px;
}
.main-nav a:hover,
.dropdown > button:hover { background: var(--teal-050); text-decoration: none; }

.main-nav a.is-active { color: var(--teal-700); background: var(--teal-050); }

.dropdown > button::after {
  content: "";
  width: 7px; height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  opacity: .55;
}

.dropdown__menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 260px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  list-style: none;
  margin: 0;
  padding: 6px;
  display: none;
  flex-direction: column;
  gap: 2px;
}
.dropdown:hover .dropdown__menu,
.dropdown:focus-within .dropdown__menu,
.dropdown.open .dropdown__menu { display: flex; }

.dropdown__menu a {
  display: block;
  padding: 9px 12px;
  border-radius: 8px;
  font-weight: 500;
  color: var(--body);
}
.dropdown__menu a:hover { background: var(--teal-050); color: var(--teal-800); }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1200px 380px at 82% -10%, rgba(20, 184, 166, .16), transparent 60%),
    linear-gradient(180deg, #0b4a50 0%, #0f766e 100%);
  color: #eafaf8;
  overflow: hidden;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 32px;
  align-items: center;
  padding: 56px 24px 60px;
}
.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -.02em;
  color: #ffffff;
}
.hero p { margin: 0; font-size: 1.08rem; color: #cdeeea; max-width: 46ch; }
.hero__art {
  width: 100%;
  height: auto;
  max-width: 420px;
  justify-self: end;
  filter: drop-shadow(0 12px 30px rgba(0, 0, 0, .25));
}

/* Hero on interior protocol pages: compact band */
.subhero { background: linear-gradient(180deg, #0b4a50, #0f766e); color: #eafaf8; }
.subhero-inner { padding: 30px 24px; }
.subhero .eyebrow {
  font-size: .76rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: #8fe3da; margin: 0 0 6px;
}
.subhero h1 { margin: 0; color: #fff; font-size: clamp(1.5rem, 3vw, 2.1rem); letter-spacing: -.01em; }

/* ---------- Main ---------- */
main { padding: 48px 0 72px; }

.section-title {
  font-size: 1.15rem;
  color: var(--ink);
  margin: 40px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  letter-spacing: -.01em;
}
.section-title:first-of-type { margin-top: 0; }

/* Card grid of protocols on the home page */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 20px 18px;
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: #cfe9e6;
  text-decoration: none;
}
.card__eyebrow {
  font-size: .72rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--teal-700); margin-bottom: 8px;
}
.card__title { font-size: 1.06rem; font-weight: 700; color: var(--ink); margin: 0 0 6px; }
.card__meta { font-size: .86rem; color: var(--muted); margin-top: auto; padding-top: 12px; }
.card__meta .arrow { color: var(--teal-600); font-weight: 700; }

/* Placeholder badge */
.badge {
  display: inline-block;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #92610a;
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: 999px;
  padding: 2px 9px;
}

/* ---------- Protocol article ---------- */
.article-wrap { display: grid; grid-template-columns: 1fr; gap: 24px; }
.prose {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 34px clamp(20px, 4vw, 48px);
  max-width: 820px;
}
.prose h2 { color: var(--ink); margin-top: 1.8em; font-size: 1.3rem; }
.prose h3 { color: var(--ink); font-size: 1.08rem; }
.prose h2:first-child, .prose h3:first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose table { border-collapse: collapse; width: 100%; margin: 1em 0; font-size: .95rem; }
.prose th, .prose td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; }
.prose th { background: var(--teal-050); color: var(--teal-900); }

.placeholder-note {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: #f0fdfa;
  border: 1px dashed #99e5dc;
  border-radius: 12px;
  padding: 18px 20px;
  color: #14524c;
  margin-top: 8px;
}
.placeholder-note svg { flex: none; margin-top: 2px; }

.backlink {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 600; font-size: .9rem; margin-bottom: 18px;
}
.backlink::before { content: "\2190"; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: .88rem;
}
.footer-inner {
  padding: 28px 24px;
  display: flex; flex-wrap: wrap; gap: 8px 20px;
  align-items: center; justify-content: space-between;
}
.footer-inner .disclaimer { max-width: 62ch; }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .main-nav {
    position: absolute;
    left: 0; right: 0; top: 68px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: none;
    padding: 10px 16px 18px;
  }
  .main-nav.open { display: block; }
  .main-nav > ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .dropdown__menu {
    position: static;
    display: none;
    box-shadow: none;
    border: 0;
    padding: 2px 0 6px 12px;
    min-width: 0;
  }
  /* On narrow screens open a section only when its label is tapped. */
  .dropdown:hover > .dropdown__menu,
  .dropdown:focus-within > .dropdown__menu { display: none; }
  .dropdown.open > .dropdown__menu { display: flex; }
  .dropdown > button { width: 100%; justify-content: space-between; }
  .hero-inner { grid-template-columns: 1fr; text-align: left; }
  .hero__art { justify-self: start; max-width: 300px; margin-top: 8px; }
}
