/* ============================================
   BEACON PAIN CLINIC - SHARED CONDITION PAGE
   Single source of truth for all pain condition pages
   Uses site CSS variables from base.html
   ============================================ */

/* ========== Page Wrapper ========== */
.condition-page {
    background: var(--bg-light);
    color: var(--text-dark);
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
}

.content-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ========== Hero ========== */
.condition-hero {
    background: linear-gradient(135deg, rgba(91, 163, 208, 0.12), rgba(91, 163, 208, 0.02));
    padding: 56px 0 44px;
    text-align: left;
}

.condition-hero h1 {
    font-size: clamp(2.2rem, 4vw, 3.2rem);
    margin: 0 0 18px;
    color: var(--text-dark);
}

.hero-text {
    max-width: 720px;
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-muted);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 32px;
}

/* ========== Badges ========== */
.hero-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(91, 163, 208, 0.18);
    color: var(--primary-dark);
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-bottom: 18px;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    border-radius: 999px;
    background: rgba(55, 65, 81, 0.08);
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
}

.section-badge.warning {
    background: rgba(251, 191, 36, 0.18);
    color: #b45309;
}

/* ========== Buttons ========== */
.primary-btn,
.outline-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn {
    background: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-sm);
}

.primary-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(91, 163, 208, 0.22);
    color: white;
}

.outline-btn {
    border: 2px solid var(--primary-color);
    color: var(--primary-dark);
    background: white;
}

.outline-btn:hover {
    transform: translateY(-1px);
    background: rgba(91, 163, 208, 0.08);
    color: var(--primary-dark);
}

/* ========== Section Headings ========== */
.section-heading {
    text-align: left;
    margin-bottom: 24px;
}

.section-heading h2 {
    font-size: clamp(1.9rem, 3.5vw, 2.6rem);
    margin: 16px 0 12px;
    color: var(--text-dark);
}

.section-text {
    max-width: 680px;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.7;
}

/* ========== Fact Box ========== */
.fact-box {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: white;
    border-radius: 14px;
    padding: 20px 24px;
    margin-top: 28px;
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
    max-width: 580px;
}

.fact-box i {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-top: 2px;
}

.fact-box strong {
    color: var(--text-dark);
}

.fact-box p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.fact-source {
    font-size: 0.8rem;
    color: var(--text-muted);
    opacity: 0.7;
    margin-top: 4px;
    display: block;
}

/* ========== Card Grid + Info Cards ========== */
.types-section,
.treatment-section {
    padding: 48px 0;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.info-card {
    background: white;
    border-radius: 18px;
    padding: 28px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
    border: 1px solid rgba(148, 163, 184, 0.18);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-card h3 {
    margin: 0;
    color: var(--text-dark);
    font-size: 1.15rem;
}

.info-card p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.6;
}

.info-card ul {
    margin: 0;
    padding-left: 20px;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.info-card ul li {
    padding: 3px 0;
}

.card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(91, 163, 208, 0.15);
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 4px;
}

/* ========== Comparison Section ========== */
.comparison-section {
    background: white;
    padding: 48px 0;
}

.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.compare-card {
    background: var(--bg-light);
    border-radius: 18px;
    padding: 28px;
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.compare-card h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 20px;
    font-size: 1.25rem;
    color: var(--text-dark);
}

.compare-card h3 i {
    color: var(--primary-color);
}

.compare-card.alt-card h3 i {
    color: #EF4444;
}

.compare-card ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.compare-card ul li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-dark);
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.compare-card ul li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.compare-card ul li i {
    color: var(--primary-color);
    font-size: 0.5rem;
    flex-shrink: 0;
}

.compare-card.alt-card ul li i {
    color: #EF4444;
}

.compare-note {
    background: rgba(91, 163, 208, 0.06);
    border-radius: 12px;
    padding: 18px 24px;
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
}

/* ========== Steps Section ========== */
.steps-section {
    background: white;
    padding: 48px 0;
}

.steps-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr;
    gap: 16px;
    align-items: flex-start;
}

.step-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding-top: 12px;
    color: var(--primary-color);
}

.step-arrow .arrow-line {
    display: block;
    width: 16px;
    height: 2px;
    background: var(--border-color);
}

.step-arrow i {
    font-size: 0.7rem;
    opacity: 0.4;
}

.step-item {
    text-align: center;
    padding: 12px;
}

.step-number {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(91, 163, 208, 0.15);
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 auto 16px;
}

.step-item h3 {
    margin: 0 0 8px;
    font-size: 1.1rem;
    color: var(--text-dark);
}

.step-item p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* ========== FAQ Section ========== */
.faq-section {
    padding: 48px 0;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 800px;
}

.faq-item {
    background: white;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    overflow: hidden;
}

.faq-item summary {
    padding: 20px 24px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--primary-color);
    flex-shrink: 0;
    margin-left: 12px;
}

.faq-item[open] summary::after {
    content: '\2212';
}

.faq-item summary:hover {
    background: rgba(91, 163, 208, 0.03);
}

.faq-item p {
    padding: 0 24px 20px;
    margin: 0;
    color: var(--text-muted);
    line-height: 1.7;
    font-size: 0.95rem;
}

.faq-item a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.faq-item a:hover {
    text-decoration: underline;
}

/* ========== Warning Cards (from whiplash) ========== */
.warning-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin: 28px 0 18px;
}

.warning-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 20px;
    border-radius: 14px;
    border: 1px solid rgba(251, 191, 36, 0.4);
    background: rgba(251, 191, 36, 0.12);
    color: #92400e;
    font-weight: 500;
}

.warning-card i {
    font-size: 1.2rem;
}

.warning-note {
    margin: 0;
    color: var(--text-muted);
    font-size: 1rem;
}

/* ========== CTA Section ========== */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    padding: 56px 0;
    text-align: center;
}

.cta-section h2 {
    color: white;
    font-size: clamp(1.8rem, 3vw, 2.2rem);
    margin: 0 0 12px;
}

.cta-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.05rem;
    margin: 0 0 28px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.cta-section .primary-btn {
    background: white;
    color: var(--primary-color);
    border: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.cta-section .primary-btn:hover {
    background: var(--bg-light);
    color: var(--primary-dark);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.cta-section .outline-btn {
    background: transparent;
    color: white;
    border-color: rgba(255, 255, 255, 0.4);
}

.cta-section .outline-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
    color: white;
}

.cta-footer-note {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.9rem;
    margin: 0;
}

/* ========== Condition Hub Cards (chronic.html) ========== */
.hub-section {
    padding: 48px 0;
}

.hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.hub-card {
    background: white;
    border-radius: 18px;
    padding: 28px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
    border: 1px solid rgba(148, 163, 184, 0.18);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hub-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.1);
    text-decoration: none;
    color: inherit;
}

.hub-card .card-icon {
    margin-bottom: 4px;
}

.hub-card h3 {
    margin: 0;
    color: var(--text-dark);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hub-card h3 .fa-arrow-right {
    font-size: 0.8rem;
    color: var(--primary-color);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.hub-card:hover h3 .fa-arrow-right {
    opacity: 1;
    transform: translateX(4px);
}

.hub-card p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ========== Flagship Page (chronic.html) ========== */
.flagship-hero {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    padding: 64px 0 52px;
    text-align: center;
}

.flagship-hero h1 {
    font-size: clamp(2.4rem, 4.5vw, 3.4rem);
    margin: 0 0 18px;
    color: white;
}

.flagship-hero .hero-text {
    max-width: 680px;
    margin: 0 auto;
    color: rgba(255, 255, 255, 0.9);
}

.flagship-hero .hero-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.flagship-hero .hero-actions {
    justify-content: center;
}

.flagship-hero .primary-btn {
    background: white;
    color: var(--primary-color);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.flagship-hero .primary-btn:hover {
    background: var(--bg-light);
    color: var(--primary-dark);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.flagship-hero .outline-btn {
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
    background: transparent;
}

.flagship-hero .outline-btn:hover {
    border-color: white;
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* ---- Stats Bar ---- */
.stats-bar {
    background: white;
    padding: 0;
    position: relative;
    z-index: 1;
}

.stats-bar-inner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    max-width: 900px;
    margin: -32px auto 0;
    background: white;
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.12);
    overflow: hidden;
}

.stat-item {
    text-align: center;
    padding: 28px 16px;
    border-right: 1px solid rgba(148, 163, 184, 0.12);
}

.stat-item:last-child {
    border-right: none;
}

.stat-item .stat-number {
    display: block;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.2;
    margin-bottom: 6px;
}

.stat-item .stat-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 500;
}

/* ---- Trust Section ---- */
.trust-section {
    padding: 48px 0;
    background: white;
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.trust-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 24px;
    background: var(--bg-light);
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.trust-item .trust-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(91, 163, 208, 0.15);
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.trust-item h3 {
    margin: 0 0 6px;
    font-size: 1rem;
    color: var(--text-dark);
}

.trust-item p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
    .condition-hero {
        padding: 40px 0;
    }

    .flagship-hero {
        padding: 48px 0 40px;
    }

    .types-section,
    .comparison-section,
    .treatment-section,
    .faq-section {
        padding: 40px 0;
    }

    .steps-section {
        padding: 40px 0;
    }

    .cta-section {
        padding: 48px 0;
    }

    .comparison-grid {
        grid-template-columns: 1fr;
    }

    .steps-row {
        grid-template-columns: 1fr;
        gap: 24px;
        max-width: 320px;
        margin: 0 auto;
    }

    .step-arrow {
        display: none;
    }

    .hero-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .flagship-hero .hero-actions {
        align-items: center;
    }

    .primary-btn,
    .outline-btn {
        width: 100%;
        justify-content: center;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .cta-buttons .primary-btn,
    .cta-buttons .outline-btn {
        width: 100%;
        max-width: 280px;
    }

    .stats-bar-inner {
        grid-template-columns: repeat(2, 1fr);
        margin-top: -24px;
    }

    .stat-item {
        padding: 20px 12px;
    }

    .stat-item:nth-child(2) {
        border-right: none;
    }

    .stat-item:nth-child(1),
    .stat-item:nth-child(2) {
        border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    }

    .trust-section {
        padding: 40px 0;
    }
}

/* ── Related Conditions ── */
.related-section {
    padding: 60px 0;
    background: #f8fafc;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 28px;
}

.related-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    background: #fff;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.15);
    color: #1e293b;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.related-link:hover {
    border-color: #2563eb;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08);
}

.related-link i {
    color: #2563eb;
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

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

/* ========== Insurance Logo Strip (CTA section) ========== */
.insurance-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 18px;
    flex-wrap: wrap;
}
.insurance-strip__label {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.7);
    font-weight: 500;
    white-space: nowrap;
}
.insurance-strip__logos {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}
.insurance-strip__pill {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 110px;
    height: 50px;
    background: #fff;
    border-radius: 8px;
    padding: 6px 12px;
    opacity: 0.92;
    transition: opacity 0.2s;
}
.insurance-strip__pill:hover { opacity: 1; }
.insurance-strip__pill img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

@media (max-width: 600px) {
    .insurance-strip { flex-direction: column; gap: 8px; }
    .insurance-strip__pill { width: 72px; height: 34px; padding: 4px 8px; }
}
