/* ─────────────────────────────────────────────
   Procedure Guide pages — shared styles
   Used by:
     /procedures/                       (concern grid)
     /procedures/[concern]/             (concern detail)
     /procedures/[concern]/[procedure]/ (procedure detail)
   ───────────────────────────────────────────── */

body {
    margin: 0;
    padding: 0;
    font-family: 'Outfit', Arial, sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text);
}

.procedure-main {
    max-width: 880px;
    margin: 0 auto;
    padding: 32px 40px 96px;
    box-sizing: border-box;
    color: var(--color-text);
}

/* Concern (list) pages only: widen the container to 1280px (matching
   planning/before-you-go) so the hero spans wide. The lists below are
   re-constrained back to 880px via .procedure-list-section /
   .related-concerns. Individual procedure detail pages have no
   .procedure-concern-hero, so they keep the 880px default. */
.procedure-main:has(.procedure-concern-hero) {
    max-width: 1280px;
}

/* Breadcrumb styles moved to the shared partials/breadcrumb.css
   (single source of truth — also used by /planning/). */

/* ─── Eyebrow label (concern hero — matches the hub-hero eyebrow) ─── */
.procedure-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.32em;
    font-size: 13px;
    font-weight: 400;
    color: var(--color-text-faint);
    margin: 0 0 14px;
}

/* ═══════════════════════════════════════════════
   INDEX PAGE (/procedures/)
   ═══════════════════════════════════════════════ */
.procedure-hero {
    margin: 0 0 40px;
}
.procedure-hero-title {
    font-size: 36px;
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin: 0 0 14px;
    color: var(--color-text);
}
.procedure-hero-desc {
    font-size: 17px;
    line-height: 1.6;
    color: var(--color-text-secondary);
    margin: 0;
    max-width: 600px;
}

.concern-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
.concern-card {
    display: block;
    padding: 24px 26px;
    border: 1px solid var(--color-divider);
    border-radius: var(--radius-md);
    background: var(--color-bg);
    color: inherit;
    text-decoration: none;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.concern-card:hover {
    border-color: color-mix(in srgb, var(--color-border), #000 20%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}
.concern-card:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}
.concern-card h2 {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.25;
    margin: 0 0 8px;
    color: var(--color-text);
}
.concern-card p {
    font-size: 14px;
    line-height: 1.55;
    color: var(--color-text-secondary);
    margin: 0 0 14px;
}
.concern-card-meta {
    font-size: 12px;
    color: var(--color-text-faint);
    line-height: 1.4;
}

/* ═══════════════════════════════════════════════
   CONCERN DETAIL PAGE (/procedures/[concern]/)
   ═══════════════════════════════════════════════ */
/* Concern hero — unified with the hub-hero (/planning/before-you-go/ etc.):
   centered, light oversized title, wide-tracked eyebrow, centered sub-text.
   (Breadcrumb sits above, so a little less top padding than the hub's 96px.) */
.procedure-concern-hero {
    text-align: center;
    padding: 56px 24px 64px;
    border-bottom: 1px solid var(--color-divider);
    margin: 0;
}
.procedure-concern-title {
    font-size: 72px;
    font-weight: 300;
    line-height: 1;
    letter-spacing: 0.01em;
    margin: 0 0 14px;
    color: var(--color-text);
}
.procedure-concern-desc {
    margin: 32px auto 0;
    max-width: 580px;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.6;
    color: var(--color-text-muted);
}

.procedure-list-section {
    /* Re-constrain the list to the original 880px and center it within the
       now-wider 1280px container. */
    max-width: 880px;
    margin: 40px auto 0;
}
.procedure-list-heading {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--color-divider);
}

.procedure-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.procedure-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 22px;
    border: 1px solid var(--color-divider);
    border-radius: var(--radius-md);
    background: var(--color-bg);
    color: inherit;
    text-decoration: none;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.procedure-card:hover {
    border-color: color-mix(in srgb, var(--color-border), #000 20%);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}
.procedure-card:active { transform: translateY(0); }
.procedure-card-body {
    flex: 1;
    min-width: 0;
}
.procedure-card h3 {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 4px;
    color: var(--color-text);
}
.procedure-card p {
    font-size: 14px;
    line-height: 1.55;
    color: var(--color-text-secondary);
    margin: 0 0 10px;
}
.procedure-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 12px;
    color: var(--color-text-faint);
}
.procedure-card-arrow {
    flex: none;
    width: 24px;
    height: 24px;
    color: var(--color-text-disabled);
    font-size: 18px;
    line-height: 24px;
    text-align: center;
    transition: color 0.15s ease, transform 0.15s ease;
}
.procedure-card:hover .procedure-card-arrow {
    color: var(--color-text);
    transform: translateX(2px);
}

.related-concerns {
    /* Match the list's 880px constraint + centering within the wide container. */
    max-width: 880px;
    margin: 48px auto 0;
}
.related-concerns h2 {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 14px;
}
.related-concerns-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.related-concern-chip {
    padding: 8px 16px;
    border: 1px solid var(--color-divider);
    border-radius: 999px;
    background: var(--color-bg);
    font-size: 13px;
    color: var(--color-text);
    text-decoration: none;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.related-concern-chip:hover {
    border-color: var(--color-text);
    background: var(--color-surface-dark);
    color: var(--color-bg);
}

/* ═══════════════════════════════════════════════
   PROCEDURE DETAIL PAGE (/procedures/[concern]/[procedure]/)
   ═══════════════════════════════════════════════ */
.procedure-detail-hero {
    margin: 0 0 24px;
}
.procedure-detail-title {
    font-size: 40px;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 0 0 10px;
    color: var(--color-text);
}
.procedure-detail-tagline {
    font-size: 18px;
    line-height: 1.4;
    color: var(--color-text-secondary);
    margin: 0 0 20px;
}

.procedure-treats {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}
.procedure-treats-label {
    color: var(--color-text-faint);
    margin-right: 2px;
}
.procedure-treats-tag {
    padding: 5px 12px;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    background: var(--color-bg);
    color: var(--color-text);
    text-decoration: none;
    font-weight: 500;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.procedure-treats-tag:hover {
    border-color: var(--color-brand);
    background: var(--color-brand-tint);
    color: var(--color-text);
}

/* Key-facts grid (Pain / Downtime / Duration / Price) */
.procedure-key-facts {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 32px 0;
    padding: 20px 22px;
    border: 1px solid var(--color-divider);
    border-radius: var(--radius-md);
    background: var(--color-surface-alt);
}
.key-fact {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.key-fact-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-faint);
    font-weight: 500;
}
.key-fact-value {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text);
    line-height: 1.3;
}

/* Long-form article body */
.procedure-article {
    max-width: 680px;
}
.procedure-article h2 {
    font-size: 22px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--color-text);
    margin: 32px 0 12px;
    letter-spacing: -0.01em;
}
.procedure-article h2:first-child { margin-top: 0; }
.procedure-article h3 {
    font-size: 17px;
    font-weight: 600;
    color: var(--color-text);
    margin: 24px 0 8px;
}
.procedure-article p {
    font-size: 16px;
    line-height: 1.75;
    color: var(--color-text);
    margin: 0 0 16px;
}
.procedure-article ul,
.procedure-article ol {
    padding-left: 22px;
    margin: 0 0 16px;
}
.procedure-article li {
    font-size: 16px;
    line-height: 1.7;
    color: var(--color-text);
    margin-bottom: 8px;
}
.procedure-article strong { font-weight: 600; color: var(--color-text); }

/* "Similar procedures" + "Where to get it" sections */
.procedure-similar,
.procedure-clinics {
    margin-top: 48px;
}
.procedure-similar h2,
.procedure-clinics h2 {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--color-divider);
}

/* ═══════════════════════════════════════════════
   MOBILE
   ═══════════════════════════════════════════════ */
@media (max-width: 743px) {
    .procedure-main { padding: 24px 20px 64px; }

    .procedure-hero-title { font-size: 28px; }
    .procedure-hero-desc { font-size: 15px; }

    .concern-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .concern-card { padding: 20px 22px; }
    .concern-card h2 { font-size: 18px; }

    .procedure-concern-hero { padding: 40px 20px 48px; }
    .procedure-concern-title { font-size: 52px; }

    .procedure-card { padding: 16px 18px; gap: 14px; }
    .procedure-card h3 { font-size: 16px; }
    .procedure-card-meta { gap: 10px; font-size: 11px; }

    .procedure-detail-title { font-size: 32px; }
    .procedure-detail-tagline { font-size: 16px; }

    .procedure-key-facts {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px 12px;
        padding: 16px 18px;
    }
    .key-fact-value { font-size: 14px; }

    .procedure-article h2 { font-size: 19px; }
    .procedure-article p,
    .procedure-article li { font-size: 15px; line-height: 1.7; }
}

/* ═══════════════════════════════════════════════
   PROCEDURE GUIDE SHEET (in concern pages)
   Skim view of a procedure — same content as the full
   page but presented in-context. Opens on procedure
   card click, closes on backdrop/X/ESC. URL hash
   syncs (e.g. #botox). Header has an "expand"
   button that navigates to the full-page version.
   ═══════════════════════════════════════════════ */
.guide-sheet {
    position: fixed;
    inset: 0;
    z-index: var(--z-overlay-sheet);
    visibility: hidden;
    pointer-events: none;
    transition: visibility 0s linear var(--modal-slide-duration);
}
.guide-sheet.is-open {
    visibility: visible;
    pointer-events: auto;
    transition: visibility 0s linear 0s;
}
.guide-sheet-backdrop {
    position: absolute;
    inset: 0;
    background: var(--backdrop-color);
    opacity: 0;
    transition: opacity var(--backdrop-duration) ease;
}
.guide-sheet.is-open .guide-sheet-backdrop { opacity: 1; }

.guide-sheet-panel {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) translateY(100vh);
    width: calc(100% - 48px);
    max-width: 720px;
    height: 86vh;
    max-height: 86vh;
    background: var(--color-bg);
    border-radius: var(--radius-2xl);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    transition: transform var(--modal-slide-duration) var(--modal-ease);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.guide-sheet.is-open .guide-sheet-panel {
    transform: translate(-50%, -50%);
}
.guide-sheet-handle {
    flex: none;
    width: 40px;
    height: 4px;
    border-radius: 2px;
    background: var(--color-divider);
    margin: 12px auto 0;
}
/* Handle = swipe-down affordance (touch only) — decorative on desktop, hide */
@media (min-width: 950px) {
    .guide-sheet-handle { display: none; }
}

/* Prev/Next navigation — DESKTOP: tall wedge chevrons on left/right
   of sheet (lightbox-style). MOBILE: hidden — use horizontal swipe
   on the panel instead (handled in JS). */
.guide-sheet-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 96px;
    border: none;
    background: transparent;
    color: var(--color-bg);
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.6;
    z-index: 2;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.guide-sheet-nav:hover {
    opacity: 1;
    transform: translateY(-50%) scale(1.05);
}
.guide-sheet-nav svg {
    width: 28px;
    height: 60px;
}
.guide-sheet-prev { left: 16px; }
.guide-sheet-next { right: 16px; }

@media (max-width: 743px) {
    .guide-sheet-nav { display: none; }
}

/* Top-right action buttons (expand + close) */
.guide-sheet-actions {
    position: absolute;
    /* concentric with the 28px corner: 10 + 18 (36px button radius) = 28 */
    top: 10px;
    right: 10px;
    display: flex;
    gap: 6px;
    z-index: 10;
}
.guide-sheet-action {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--color-surface);
    color: var(--color-text-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}
.guide-sheet-action:hover { background: var(--color-divider); color: var(--color-text); }
.guide-sheet-action svg { width: 18px; height: 18px; }

.guide-sheet-scroll {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 28px 40px 24px;
    -webkit-overflow-scrolling: touch;
}

/* Pinned footer — always visible at bottom of sheet, holds the CTAs.
   ::before creates a soft fade above the footer so scrolling content
   melts into white before hitting the CTAs. */
.guide-sheet-footer {
    position: relative;
    flex: none;
    padding: 16px 40px 20px;
    background: var(--color-bg);
}
.guide-sheet-footer::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, var(--color-bg) 100%);
    pointer-events: none;
}
.guide-sheet-footer .guide-sheet-cta-row {
    margin-top: 0;
}

/* Inner content (rendered by JS) */
.guide-sheet-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 11px;
    font-weight: 600;
    color: var(--color-text-faint);
    margin: 0 0 8px;
}
.guide-sheet-title {
    font-size: 32px;
    font-weight: 600;
    line-height: 1.15;
    margin: 0 0 8px;
    color: var(--color-text);
    letter-spacing: -0.01em;
}
.guide-sheet-tagline {
    font-size: 16px;
    line-height: 1.45;
    color: var(--color-text-secondary);
    margin: 0 0 18px;
}
.guide-sheet-treats {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    margin-bottom: 24px;
}
.guide-sheet-treats-label {
    color: var(--color-text-faint);
    margin-right: 2px;
}
.guide-sheet-treats-tag {
    padding: 5px 12px;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    background: var(--color-bg);
    color: var(--color-text);
    text-decoration: none;
    font-weight: 500;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.guide-sheet-treats-tag:hover {
    border-color: var(--color-brand);
    background: var(--color-brand-tint);
}

/* Key facts grid */
.guide-sheet-keyfacts {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 0 0 28px;
    padding: 18px 20px;
    border: 1px solid var(--color-divider);
    border-radius: var(--radius-md);
    background: var(--color-surface-alt);
}
.guide-sheet-keyfact {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.guide-sheet-keyfact-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-faint);
    font-weight: 500;
}
.guide-sheet-keyfact-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
    line-height: 1.3;
}

/* Article body */
.guide-sheet-body h2 {
    font-size: 19px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--color-text);
    margin: 28px 0 10px;
}
.guide-sheet-body h2:first-child { margin-top: 0; }
.guide-sheet-body p {
    font-size: 15px;
    line-height: 1.7;
    color: var(--color-text);
    margin: 0 0 14px;
}
.guide-sheet-body ul {
    padding-left: 20px;
    margin: 0 0 14px;
}
.guide-sheet-body li {
    font-size: 15px;
    line-height: 1.65;
    color: var(--color-text);
    margin-bottom: 6px;
}
.guide-sheet-body strong { font-weight: 600; color: var(--color-text); }

/* Bottom CTA row — Read full guide + See clinics.
   Desktop: side by side, Mobile: stacked. */
.guide-sheet-cta-row {
    display: flex;
    gap: 10px;
    margin-top: 36px;
}
.guide-sheet-cta-row > .guide-sheet-cta { flex: 1; min-width: 0; }
.guide-sheet-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: filter 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease,
                background 0.2s ease, border-color 0.2s ease;
}
.guide-sheet-cta svg {
    width: 14px;
    height: 14px;
    flex: none;
}
.guide-sheet-cta--primary {
    background: var(--color-surface-dark);
    color: var(--color-bg);
    border-color: var(--color-text);
}
.guide-sheet-cta--primary:hover {
    filter: brightness(1.15);
    transform: scale(1.01);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}
.guide-sheet-cta--primary:active {
    transform: scale(0.99);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.guide-sheet-cta--secondary {
    background: var(--color-bg);
    color: var(--color-text);
    border-color: var(--color-divider);
}
.guide-sheet-cta--secondary:hover {
    border-color: color-mix(in srgb, var(--color-border), #000 20%);
    transform: scale(1.01);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}
.guide-sheet-cta--secondary:active {
    transform: scale(0.99);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}
@media (max-width: 743px) {
    .guide-sheet-cta-row { flex-direction: column; gap: 8px; }
}

@media (max-width: 743px) {
    .guide-sheet-panel {
        width: calc(100% - 32px);
        height: 84vh;
        max-height: 84vh;
    }
    .guide-sheet-scroll { padding: 24px 16px 16px; }
    .guide-sheet-footer { padding: 12px 20px 16px; }
    .guide-sheet-title { font-size: 26px; }
    .guide-sheet-tagline { font-size: 15px; }
    .guide-sheet-keyfacts {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px 12px;
    }
}
