/* Hip & Knee Surgery - one shared look for every page (based on the DoctorsVideos.video design).
   Colors, corners and shadows live in the variables below; change them here to restyle the whole site. */
:root {
    --ink: #0f172a;
    --ink-soft: #334155;
    --muted: #64748b;
    --line: #e2e8f0;
    --bg: #ffffff;
    --bg-soft: #f4f8fb;
    --bg-tint: #eef4ff;
    --brand: #2563eb;
    --brand-dark: #1d4ed8;
    --green: #10b981;
    --green-dark: #047857;
    --amber: #f59e0b;
    --grad: linear-gradient(135deg, #1d4ed8 0%, #0d9488 100%);
    --radius: 16px;
    --radius-sm: 10px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05), 0 2px 8px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 10px 30px rgba(15, 23, 42, 0.10);
    --font-head: 'Outfit', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;

    /* Older names still used in a few places */
    --text-main: var(--ink);
    --text-muted: var(--muted);
    --border-light: var(--line);
    --bg-primary: var(--bg);
    --bg-secondary: var(--bg-soft);
    --brand-blue: var(--brand);
    --brand-blue-dark: var(--brand-dark);
    --brand-green: var(--green);
    --alert-orange: var(--amber);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--ink);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; letter-spacing: -0.02em; }

/* Anything marked hidden stays hidden, whatever its display style */
[hidden] { display: none !important; }

/* ---------- Buttons: one family used everywhere ---------- */
.btn, .portal-btn, .card-btn, .read-btn, .buy-btn, .ad-submit, .load-more, .triage-suggestion-btn, .viewpoint-watch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.2;
    text-decoration: none;
    border-radius: 999px;
    padding: 11px 22px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

/* Filled (main action) */
.btn-primary, .card-btn, .ad-submit, .triage-suggestion-btn {
    background: var(--grad);
    color: #fff;
    border: 1px solid transparent;
}
.btn-primary:hover, .card-btn:hover, .ad-submit:hover, .triage-suggestion-btn:hover {
    box-shadow: 0 6px 18px rgba(14, 165, 233, 0.35);
    transform: translateY(-1px);
}

/* Outline (secondary action) */
.btn-outline, .portal-btn, .read-btn, .buy-btn, .load-more, .viewpoint-watch {
    background: #fff;
    color: var(--brand-dark);
    border: 1px solid #bae6fd;
}
.btn-outline:hover, .portal-btn:hover, .read-btn:hover, .buy-btn:hover, .load-more:hover, .viewpoint-watch:hover {
    background: var(--bg-tint);
    border-color: var(--brand);
}

.portal-btn:disabled, .card-btn:disabled, .btn:disabled {
    background: var(--bg-soft);
    color: var(--muted);
    border-color: var(--line);
    cursor: default;
    box-shadow: none;
    transform: none;
}

/* ---------- Top bars ---------- */
.disclaimer-bar {
    background: var(--ink);
    color: #e2e8f0;
    font-size: 0.82rem;
    padding: 7px 5%;
    text-align: center;
}
.disclaimer-bar strong { color: #fff; }

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 14px 5%;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 900;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--ink);
    flex-shrink: 0;
}

.logo-mark {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--bg-tint);
    display: flex;
    align-items: center;
    justify-content: center;
}
.logo-mark svg { width: 26px; height: 26px; }

.logo-text {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 1.45rem;
    letter-spacing: -0.5px;
}
.logo-accent { color: var(--brand); }

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

/* Menu items: all the same soft "pill" style; the current page is tinted */
.nav-btn {
    text-decoration: none;
    color: var(--ink-soft);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 9px 16px;
    border-radius: 999px;
    border: 1px solid transparent;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}
.nav-btn:hover { background: var(--bg-soft); color: var(--ink); }
.nav-btn.active { background: var(--bg-tint); color: var(--brand-dark); }

.highlight-btn {
    background: var(--grad);
    color: #fff;
    font-weight: 600;
    margin-left: 6px;
}
.highlight-btn:hover { background: var(--grad); color: #fff; box-shadow: 0 6px 18px rgba(14, 165, 233, 0.35); }

@media (max-width: 820px) {
    .navbar { flex-wrap: wrap; padding: 10px 16px; }
    .logo-text { font-size: 1.25rem; }
    .nav-links { width: 100%; justify-content: space-between; gap: 4px; }
    .nav-btn { padding: 8px 10px; font-size: 0.9rem; }
    .highlight-btn { margin-left: 0; padding: 8px 14px; }
    .hide-sm { display: none; }
    .hero-title br { display: none; }
}

/* ---------- Home hero ---------- */
.hero-section {
    position: relative;
    overflow: hidden;
    padding: 72px 5% 56px;
    text-align: center;
    background:
        radial-gradient(900px 400px at 15% -10%, rgba(14, 165, 233, 0.14), transparent 60%),
        radial-gradient(800px 380px at 90% 0%, rgba(16, 185, 129, 0.12), transparent 60%),
        linear-gradient(180deg, #f7fbff 0%, #ffffff 100%);
}

.hero-content { position: relative; max-width: 900px; margin: 0 auto; }

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    border-radius: 999px;
    padding: 6px 14px 6px 6px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--ink-soft);
    margin-bottom: 22px;
}

.play-dot {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--grad);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.play-dot::after {
    content: '';
    border-left: 8px solid #fff;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    margin-left: 2px;
}

.hero-title {
    font-size: clamp(2.3rem, 6vw, 4rem);
    font-weight: 800;
    line-height: 1.06;
    margin-bottom: 20px;
    color: var(--ink);
    letter-spacing: -0.03em;
}

.grad-text {
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-subtitle {
    font-size: clamp(1.02rem, 2.2vw, 1.2rem);
    color: var(--muted);
    max-width: 640px;
    margin: 0 auto 34px;
}

.search-container {
    display: flex;
    align-items: center;
    max-width: 640px;
    margin: 0 auto;
    background: #fff;
    border-radius: 999px;
    padding: 7px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--line);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.search-container:focus-within { border-color: var(--brand); box-shadow: 0 10px 30px rgba(14, 165, 233, 0.18); }

.search-input {
    flex: 1;
    min-width: 0;
    border: none;
    padding: 14px 22px;
    border-radius: 999px;
    font-size: 1.08rem;
    outline: none;
    font-family: inherit;
    background: transparent;
}

.search-submit {
    background: var(--grad);
    color: #fff;
    border: none;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: box-shadow 0.2s;
}
.search-submit:hover { box-shadow: 0 6px 18px rgba(14, 165, 233, 0.4); }

/* Stats under the search */
.stats-bar {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin: 34px auto 0;
}
.stat {
    display: flex;
    align-items: baseline;
    gap: 8px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 18px;
    box-shadow: var(--shadow-sm);
}
.stat-num { font-family: var(--font-head); font-weight: 800; font-size: 1.25rem; color: var(--brand-dark); }
.stat-label { color: var(--muted); font-size: 0.9rem; }

/* ---------- Topic chips (home, topics, topic pages) ---------- */
.topic-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
}
.topic-chips-label { color: var(--muted); font-size: 0.9rem; margin-right: 4px; }

.topic-chip {
    background: #fff;
    border: 1px solid var(--line);
    color: var(--ink-soft);
    border-radius: 999px;
    padding: 8px 16px;
    font: 500 0.93rem var(--font-body);
    cursor: pointer;
    transition: all 0.2s;
}
.topic-chip:hover { border-color: var(--brand); color: var(--brand-dark); background: var(--bg-tint); }
a.topic-chip { text-decoration: none; display: inline-block; }
.topic-chip-featured { border-color: #bae6fd; color: var(--brand-dark); font-weight: 600; }
.topic-chips-left { justify-content: flex-start; margin-top: 0; }

/* ---------- Search results under the search box ---------- */
.search-results {
    max-width: 660px;
    margin: 20px auto 0;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px 22px;
    text-align: left;
    box-shadow: var(--shadow-md);
}
.search-results .triage-bot-msg { color: var(--ink); font-weight: 500; }
.triage-suggestions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.triage-suggestion-btn { padding: 9px 16px; font-size: 0.9rem; }
.triage-topics { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 14px; }
.triage-topic-link {
    background: var(--bg-tint);
    border: 1px solid #bae6fd;
    color: var(--brand-dark);
    border-radius: 999px;
    padding: 7px 14px;
    font-weight: 600;
    font-size: 0.92rem;
    text-decoration: none;
}
.triage-topic-link:hover { border-color: var(--brand); }
.triage-emergency { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; padding: 10px 14px; border-radius: var(--radius-sm); margin-bottom: 12px; }
.triage-note { color: var(--muted); font-size: 0.8rem; margin-top: 12px; }

/* ---------- Sections ---------- */
.section { max-width: 1200px; margin: 0 auto; padding: 64px 5%; }
.section-band { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}
.section-head .section-title { text-align: left; margin: 0; }
.section-kicker {
    color: var(--green-dark);
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 6px;
}
.section-link { color: var(--brand-dark); font-weight: 600; text-decoration: none; white-space: nowrap; }
.section-link:hover { text-decoration: underline; }

.section-title {
    font-size: clamp(1.6rem, 3.5vw, 2.2rem);
    text-align: center;
    margin-bottom: 36px;
    font-weight: 800;
}
.section-sub { color: var(--muted); max-width: 640px; }

.section-more { text-align: center; margin-top: 24px; }
.section-more a { color: var(--brand-dark); font-weight: 600; text-decoration: none; }

/* ---------- Video cards & pop-up player ---------- */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

.video-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1000px) { .video-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .video-grid-4 { grid-template-columns: 1fr; } }

.video-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0 0 14px;
    overflow: hidden;
    cursor: pointer;
    font: inherit;
    color: inherit;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s, transform 0.2s;
}
.video-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }

.video-thumb { position: relative; display: block; background: #dbe4ee; }
.video-thumb img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.video-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 55%, rgba(15, 23, 42, 0.35));
}
.video-play {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 1;
    width: 54px;
    height: 54px;
    margin: -27px 0 0 -27px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, background 0.2s;
}
.video-play::after {
    content: '';
    border-left: 16px solid var(--brand-dark);
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    margin-left: 4px;
}
.video-card:hover .video-play { transform: scale(1.08); background: #fff; }

.video-card-title {
    padding: 6px 14px 0;
    font-weight: 600;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.video-card-meta { padding: 0 14px; color: var(--muted); font-size: 0.85rem; }

.video-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 1000;
}
.video-modal[hidden] { display: none; }
/* The player always fits the screen: never wider than 760px, and short enough to leave room around it */
.video-modal-inner { width: min(760px, 100%, calc((100vh - 200px) * 16 / 9)); position: relative; }
.video-modal-frame { aspect-ratio: 16 / 9; background: #000; border-radius: 12px; overflow: hidden; }
.video-modal-frame iframe { width: 100%; height: 100%; border: 0; }
.video-modal-caption { color: #e2e8f0; margin-top: 10px; font-size: 0.95rem; }
.video-modal-close {
    position: absolute;
    top: -46px;
    right: 0;
    background: rgba(255, 255, 255, 0.12);
    border: none;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    color: #fff;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
}

/* ---------- Browse-by tiles (home) ---------- */
.browse-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}
.browse-tile {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
    text-decoration: none;
    color: var(--ink);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}
.browse-tile:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: #bae6fd; }
.browse-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 8px;
    background: var(--bg-tint);
}
.browse-tile h3 { font-size: 1.2rem; }
.browse-tile p { color: var(--muted); font-size: 0.92rem; flex: 1; }
.browse-tile .section-link { padding-top: 8px; font-size: 0.92rem; }
.tint-blue { background: #e0f2fe; }
.tint-green { background: #d1fae5; }
.tint-violet { background: #ede9fe; }
.tint-amber { background: #fef3c7; }
.tint-rose { background: #ffe4e6; }

@media (max-width: 900px) { .browse-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .browse-grid { grid-template-columns: 1fr; } }

/* ---------- Home "perspective" cards (all three the same height) ---------- */
.portals-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    align-items: stretch;
}
.portal-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 32px 26px 26px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
}
.portal-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.portal-icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 16px;
}
.gradient-blue { background: #e0f2fe; }
.gradient-purple { background: #ede9fe; }
.gradient-green { background: #d1fae5; }
.portal-title { font-size: 1.4rem; font-weight: 700; margin-bottom: 10px; }
.portal-desc { color: var(--muted); margin-bottom: 22px; font-size: 0.95rem; flex: 1; }
.portal-btn { width: 100%; }
.portal-btn.btn-primary { background: var(--grad); color: #fff; border-color: transparent; }
.portal-btn.btn-primary:hover { box-shadow: 0 6px 18px rgba(14, 165, 233, 0.35); }

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

/* ---------- State directory ---------- */
.state-directory-section {
    background: var(--bg-soft);
    border-top: 1px solid var(--line);
    padding: 64px 5%;
    scroll-margin-top: 70px;
}
.directory-container { max-width: 1200px; margin: 0 auto; }
.directory-title {
    font-size: clamp(1.6rem, 3.5vw, 2.2rem);
    font-weight: 800;
    margin-bottom: 10px;
    text-align: center;
}
.directory-subtitle { text-align: center; color: var(--muted); margin: 0 auto 32px; max-width: 700px; }

.state-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 10px;
}
.state-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: #fff;
    border: 1px solid var(--line);
    color: var(--ink-soft);
    text-decoration: none;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s;
}
.state-link:hover { border-color: var(--brand); color: var(--brand-dark); box-shadow: var(--shadow-sm); }
.doc-count {
    background: var(--bg-tint);
    color: var(--brand-dark);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
}

.doctor-results-header { margin-top: 44px; text-align: center; scroll-margin-top: 90px; }
.doctor-results-header h3 { font-size: clamp(1.4rem, 3vw, 1.9rem); }

/* ---------- Doctor cards (state results and Doctors page) ---------- */
.doctor-results-grid, .doctor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
    margin-top: 24px;
}
.doctor-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 14px;
    transition: transform 0.2s, box-shadow 0.2s;
}
.doctor-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.doctor-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--grad);
    color: #fff;
    font-family: var(--font-head);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}
.card-specialty {
    color: var(--green-dark);
    font-weight: 700;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 4px;
}
.card-name { font-size: 1.15rem; color: var(--ink); line-height: 1.25; margin-bottom: 6px; }
.card-state { color: var(--muted); font-size: 0.9rem; }
.card-btn { width: 100%; padding: 10px 16px; }

.sponsor-card { background: #fffbeb; border-color: #fde68a; }
.sponsor-card .card-specialty { color: #b45309; }
.sponsor-open { border-style: dashed; }

/* ---------- Ads ---------- */
.ad-slot { margin: 40px auto; padding: 0 16px; text-align: center; }
.ad-banner { max-width: 760px; }
.ad-banner .ad-body { min-height: 90px; }
.ad-box { max-width: 332px; }
.ad-box .ad-body { min-height: 250px; }
@media (max-width: 600px) { .ad-banner .ad-body { min-height: 100px; } }

.ad-label {
    display: block;
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 6px;
}
.ad-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-soft);
    color: var(--ink);
    text-decoration: none;
    padding: 16px 20px;
}
.ad-body img { max-width: 100%; border-radius: 8px; }
.ad-body span { color: var(--muted); font-size: 0.9rem; }
.ad-placeholder { border-style: dashed; background: #fff; }
.ad-placeholder strong { color: var(--brand-dark); }
.ad-sponsor-name { font-size: 0.8rem; }

/* ---------- Footer ---------- */
.site-footer {
    background: var(--ink);
    color: #94a3b8;
    font-size: 0.85rem;
    padding: 40px 5%;
    text-align: center;
}
.site-footer p { max-width: 800px; margin: 0 auto 10px; }
.site-footer a { color: #e2e8f0; }
.site-footer .footer-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 22px; margin-bottom: 18px; }
.footer-links a { text-decoration: none; font-weight: 500; }
.footer-links a:hover { text-decoration: underline; }

/* ---------- Inner pages ---------- */
.page-hero {
    background:
        radial-gradient(700px 300px at 10% -20%, rgba(14, 165, 233, 0.13), transparent 60%),
        radial-gradient(600px 300px at 95% 0%, rgba(16, 185, 129, 0.10), transparent 60%),
        linear-gradient(180deg, #f7fbff 0%, #ffffff 100%);
    border-bottom: 1px solid var(--line);
}
.page-hero-inner { max-width: 1200px; margin: 0 auto; padding: 48px 5% 36px; }

.page-main { max-width: 1200px; margin: 0 auto; padding: 40px 5% 70px; }
.page-title { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; margin-bottom: 12px; }
.page-lede { color: var(--muted); font-size: 1.1rem; max-width: 65ch; margin-bottom: 24px; }
.page-hero .page-lede { margin-bottom: 0; }
.page-status { color: var(--muted); }
.page-status a, .breadcrumb a { color: var(--brand-dark); }
.breadcrumb { margin-bottom: 16px; }
.breadcrumb a { text-decoration: none; font-weight: 500; }

.filter-box {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 560px;
    margin-top: 24px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px 6px 6px 18px;
    box-shadow: var(--shadow-sm);
}
.filter-box:focus-within { border-color: var(--brand); }
.filter-box svg { color: var(--muted); flex-shrink: 0; }
.filter-box input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    font: inherit;
    padding: 10px 4px;
    background: transparent;
}
.filter-box select {
    font: inherit;
    font-size: 0.9rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 12px;
    background: var(--bg-soft);
    color: var(--ink-soft);
    max-width: 50%;
}

/* Topics index */
.topic-group { margin-bottom: 36px; scroll-margin-top: 90px; }
.topic-group h2 { font-size: 1.45rem; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.topic-group-icon { width: 38px; height: 38px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.15rem; }
.topic-count {
    color: var(--muted);
    font: 600 0.8rem var(--font-body);
    background: var(--bg-soft);
    border-radius: 999px;
    padding: 2px 10px;
}
.category-jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }

.popular-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 14px;
}
.popular-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px 16px;
    text-decoration: none;
    color: var(--ink);
    font-weight: 600;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}
.popular-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: #bae6fd; }
.popular-card .browse-icon { width: 42px; height: 42px; margin: 0; font-size: 1.25rem; flex-shrink: 0; }
.popular-card small { display: block; color: var(--muted); font-weight: 500; font-size: 0.8rem; }

.hub-block { margin-bottom: 52px; }
.hub-block > h2 { font-size: 1.6rem; margin-bottom: 6px; }
.hub-block > .section-sub { margin-bottom: 20px; }

/* Topic page */
.topic-category {
    color: var(--green-dark);
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 6px;
}
.topic-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; align-items: start; }
.topic-content section { margin-bottom: 44px; }
.topic-content h2 { font-size: 1.5rem; margin-bottom: 8px; }
.section-note { color: var(--muted); font-size: 0.9rem; margin-bottom: 16px; }
.topic-content .video-grid { margin-top: 16px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.topic-aside { position: sticky; top: 90px; }
.topic-aside .ad-slot { margin-top: 0; }
@media (max-width: 900px) {
    .topic-layout { grid-template-columns: 1fr; }
    .topic-aside { position: static; }
}

.viewpoints-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.viewpoint-card {
    border: 1px solid var(--line);
    border-left: 4px solid var(--brand);
    border-radius: var(--radius);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #fff;
    box-shadow: var(--shadow-sm);
}
.viewpoint-doctor { font-weight: 700; }
.viewpoint-doctor span { display: block; color: var(--muted); font-weight: 500; font-size: 0.85rem; text-transform: capitalize; }
.viewpoint-summary { color: var(--ink-soft); font-size: 0.95rem; }
.viewpoint-watch { align-self: flex-start; margin-top: auto; padding: 7px 14px; font-size: 0.88rem; }
.load-more { display: flex; margin: 26px auto 0; }

/* ---------- Articles ---------- */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 22px;
}
.article-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s, transform 0.2s;
    text-decoration: none;
    color: var(--ink);
}
.article-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.article-cover {
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}
.article-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.article-tag {
    color: var(--green-dark);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
}
.article-card h3 { font-size: 1.22rem; margin-bottom: 10px; }
.article-card p { color: var(--muted); font-size: 0.95rem; margin-bottom: 18px; flex: 1; }
.article-card .read-btn { align-self: flex-start; }

.article-container { max-width: 760px; margin: 0 auto; padding: 40px 5% 60px; color: var(--ink-soft); line-height: 1.8; font-size: 1.1rem; }
.article-container h1 { font-size: clamp(2rem, 5vw, 2.8rem); font-weight: 800; color: var(--ink); margin-bottom: 1.25rem; }
.article-container h2 { font-size: 1.7rem; color: var(--ink); margin: 2.5rem 0 1rem; }
.article-meta { display: inline-block; color: var(--green-dark); background: #d1fae5; border-radius: 999px; padding: 3px 12px; font-weight: 700; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 1rem; }
.article-container p { margin-bottom: 1.4rem; }
.article-container strong { color: var(--ink); }
.article-container hr { border: none; border-top: 1px solid var(--line); margin: 3rem 0; }
.back-link { color: var(--brand-dark); text-decoration: none; display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1.5rem; font-weight: 500; }
.back-link:hover { text-decoration: underline; }
.highlight-box { background: var(--bg-tint); border-left: 4px solid var(--brand); padding: 1.25rem 1.5rem; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 2rem 0; }
.highlight-box p { margin: 0; }
.article-cta {
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
}
.article-cta p { margin-bottom: 14px; }

/* ---------- Doctors page: featured authors & books ---------- */
.author-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 22px; }
.author-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.author-head { display: flex; align-items: center; gap: 16px; }
.author-photo { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; border: 3px solid var(--bg-tint); flex-shrink: 0; }
.author-head h3 { font-size: 1.35rem; }
.author-role { color: var(--muted); font-size: 0.9rem; }
.author-bio { color: var(--ink-soft); font-size: 0.95rem; }
.book-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: auto; }
.book { display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: var(--ink); }
.book-cover {
    aspect-ratio: 2 / 3;
    border-radius: 4px 10px 10px 4px;
    padding: 12px 10px;
    display: flex;
    align-items: flex-end;
    color: #fff;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 0.8rem;
    line-height: 1.15;
    overflow: hidden;
    overflow-wrap: anywhere;
    hyphens: auto;
    box-shadow: inset 6px 0 0 rgba(0, 0, 0, 0.18), 0 6px 14px rgba(15, 23, 42, 0.18);
    transition: transform 0.2s;
}
.book:hover .book-cover { transform: translateY(-3px); }
.book-cover.c1 { background: linear-gradient(160deg, #0ea5e9, #0369a1); }
.book-cover.c2 { background: linear-gradient(160deg, #10b981, #047857); }
.book-cover.c3 { background: linear-gradient(160deg, #6366f1, #4338ca); }
.book-cover.c4 { background: linear-gradient(160deg, #f59e0b, #b45309); }
.book-cover.c5 { background: linear-gradient(160deg, #f43f5e, #be123c); }
.book-link { font-size: 0.82rem; font-weight: 600; color: var(--brand-dark); }

.doctor-count-line { color: var(--muted); margin-top: 14px; font-size: 0.92rem; }

/* ---------- Advertise page ---------- */
.advertise-page { max-width: 860px; margin: 0 auto; padding: 50px 20px 70px; }
.advertise-page h1 { font-size: clamp(2rem, 5vw, 2.8rem); margin-bottom: 14px; }
.advertise-page h2 { font-size: 1.5rem; margin: 40px 0 16px; }
.advertise-lede { color: var(--muted); font-size: 1.1rem; max-width: 65ch; }
.spot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.spot-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #fff;
    box-shadow: var(--shadow-sm);
}
.spot-card h3 { font-size: 1.1rem; }
.spot-card p { color: var(--muted); font-size: 0.95rem; }
.spot-card .spot-price { color: var(--brand-dark); font-weight: 700; font-size: 1.1rem; margin-top: auto; }
.spot-note { color: var(--muted); font-size: 0.9rem; margin-top: 12px; }
.advertise-rules { padding-left: 20px; color: var(--muted); display: grid; gap: 6px; }

.ad-form { display: grid; gap: 14px; max-width: 520px; }
.form-row { display: grid; gap: 4px; }
.form-row label { font-weight: 600; font-size: 0.9rem; }
.form-row input, .form-row select, .form-row textarea {
    font: inherit;
    padding: 11px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fff;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.ad-submit { justify-self: start; padding: 12px 30px; }
.ad-submit:disabled { opacity: 0.6; cursor: default; }
.ad-form-status { color: var(--muted); min-height: 1.5em; }

@media (max-width: 600px) {
    .section, .state-directory-section { padding-top: 44px; padding-bottom: 44px; }
    .hero-section { padding: 44px 16px 40px; }
    .search-input { padding: 12px 16px; font-size: 1rem; }
    .search-submit { width: 46px; height: 46px; }
    .book-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
    .book-cover { font-size: 0.75rem; padding: 8px; }
}

/* ---------- Health question pages ---------- */
.qa-text { color: var(--ink-soft); margin-bottom: 14px; }
.qa-note { color: var(--muted); font-size: 0.92rem; background: var(--bg-soft); border-radius: var(--radius-sm); padding: 12px 16px; }
.qa-section { scroll-margin-top: 90px; padding-top: 8px; border-top: 1px solid var(--line); padding-top: 32px; }
.qa-answer {
    background: var(--bg-tint);
    border: 1px solid #bae6fd;
    border-radius: var(--radius);
    padding: 16px 18px;
    margin: 12px 0 16px;
}
.qa-answer p { color: var(--ink); font-size: 1.05rem; font-weight: 500; }
.qa-answer-label {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--brand-dark);
    margin-bottom: 4px;
}
.qa-safety {
    font-size: 0.92rem;
    color: #92400e;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    margin-bottom: 18px;
}
.qa-videos-title { font-size: 1.1rem; margin-bottom: 4px; }
.qa-videos .video-grid { margin-top: 12px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.qa-list { padding-left: 22px; display: grid; gap: 12px; color: var(--ink-soft); }
.qa-updated { color: var(--muted); font-size: 0.85rem; border-top: 1px solid var(--line); padding-top: 18px; }

.qa-hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.qa-hub-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px 22px;
    box-shadow: var(--shadow-sm);
}
.qa-hub-head { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); margin-bottom: 12px; }
.qa-hub-head .browse-icon { margin: 0; flex-shrink: 0; }
.qa-hub-head h2 { font-size: 1.2rem; }
.qa-hub-head:hover h2 { color: var(--brand-dark); }
.qa-hub-card ul { list-style: none; display: grid; gap: 6px; }
.qa-hub-card li a { color: var(--brand-dark); text-decoration: none; font-size: 0.95rem; }
.qa-hub-card li a:hover { text-decoration: underline; }

/* ---------- Specialty guides ---------- */
.guide-videos .video-grid { margin-top: 12px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.video-grid > .page-status, .doctor-grid > .page-status { grid-column: 1 / -1; }

/* ---------- Hip & Knee Surgery additions ---------- */
.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 8px 0 16px; }
.pros, .cons { border-radius: var(--radius); padding: 16px 18px; border: 1px solid var(--line); }
.pros { background: #f0fdf4; border-color: #bbf7d0; }
.cons { background: #fff7ed; border-color: #fed7aa; }
.pros h3, .cons h3 { font-size: 1.05rem; margin-bottom: 8px; }
.pros ul, .cons ul, .qa-list-plain { padding-left: 20px; display: grid; gap: 6px; color: var(--ink-soft); }
@media (max-width: 700px) { .pros-cons { grid-template-columns: 1fr; } }
.fact-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0 18px; }
.fact { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: 0.9rem; color: var(--ink-soft); }
.fact strong { color: var(--ink); }
.surgery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.surgery-card { display: flex; flex-direction: column; gap: 6px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow-sm); transition: box-shadow .2s, transform .2s; }
.surgery-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.surgery-card h3 { font-size: 1.15rem; }
.surgery-card p { color: var(--muted); font-size: 0.92rem; flex: 1; }
.surgeon-table-note { color: var(--muted); font-size: 0.9rem; margin-top: 10px; }
.surgeon-card .card-state { line-height: 1.5; }
.video-badge { display: inline-block; background: #dcfce7; color: #166534; border-radius: 999px; font-size: 0.72rem; font-weight: 700; padding: 2px 8px; margin-left: 6px; vertical-align: middle; }

/* ---------- Soft robin's-egg blue for all tinted text boxes ---------- */
:root {
    --robin: #e4f5f6;
    --robin-line: #b7e3e6;
    --bg-soft: #f1fafa;
    --bg-tint: var(--robin);
}
.pros, .cons, .qa-safety, .qa-answer, .qa-note, .highlight-box, .fact {
    background: var(--robin);
    border: 1px solid var(--robin-line);
    color: var(--ink-soft);
}
/* A colored edge still tells the boxes apart */
.pros { border-left: 5px solid #0d9488; }
.cons { border-left: 5px solid #e08a3c; }
.qa-safety { border-left: 5px solid #d97706; }
.qa-safety strong, .pros h3, .cons h3 { color: var(--ink); }
.section-band { background: var(--bg-soft); }

/* ---------- FAQ and state directory pages ---------- */
.faq-list { display: grid; gap: 10px; }
.faq-item { background: var(--robin, #e4f5f6); border: 1px solid var(--robin-line, #b7e3e6); border-radius: var(--radius-sm); padding: 0 16px; }
.faq-item summary { cursor: pointer; font-weight: 600; color: var(--ink); padding: 14px 0; list-style-position: inside; }
.faq-item p { color: var(--ink-soft); padding: 0 0 14px; }
.city-group { margin-top: 36px; scroll-margin-top: 90px; }
.city-group h2 { font-size: 1.35rem; display: flex; align-items: center; gap: 10px; }
.city-group .doctor-grid { margin-top: 12px; }
.state-section .state-grid { margin-top: 14px; }
@media (max-width: 820px) {
    .nav-links { flex-wrap: wrap; justify-content: flex-start; row-gap: 6px; }
    .nav-links .highlight-btn { margin-left: auto; }
}

/* ---------- Getting Ready page pictures ---------- */
.prep-figure { margin: 6px 0 20px; }
.prep-figure img { display: block; width: 100%; max-width: 760px; height: auto; border-radius: var(--radius); }
.prep-figure figcaption { color: var(--muted); font-size: 0.82rem; margin-top: 6px; }

/* ---------- "Not sure what to search?" question links (home hero) ---------- */
.try-questions {
    max-width: 760px;
    margin: 22px auto 0;
    padding: 16px 18px;
    background: var(--robin, #fff);
    border: 1px solid var(--robin-line, var(--line));
    border-radius: 16px;
    text-align: left;
}
.try-questions-label { margin: 0 0 10px; font-weight: 600; color: var(--ink); }
.try-questions-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 6px 18px;
}
.try-questions-list a {
    display: block;
    padding: 6px 0 6px 22px;
    position: relative;
    color: var(--brand-dark);
    text-decoration: none;
    font-size: 0.97rem;
    line-height: 1.35;
}
.try-questions-list a::before { content: "?"; position: absolute; left: 0; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg-tint); color: var(--brand-dark); font: 700 0.72rem/16px var(--font-body); text-align: center; }
.try-questions-list a:hover { text-decoration: underline; }
.try-questions-more { display: inline-block; margin-top: 10px; font-weight: 600; color: var(--brand-dark); text-decoration: none; }
.try-questions-more:hover { text-decoration: underline; }

.try-questions-list a::before { background: #fff; }

/* ---------- Sources lists and the About page ---------- */
.sources-list { margin: 10px 0 0; padding-left: 22px; color: var(--muted); font-size: 0.93rem; line-height: 1.5; }
.sources-list li { margin-bottom: 6px; overflow-wrap: anywhere; }
.sources-list a { color: var(--brand-dark); }
.about-page h2 { margin-top: 28px; }
.about-list li { margin-bottom: 10px; line-height: 1.55; }
