/* ===== Topic Detail Page ===== */
/* Ported 1:1 from neu/topic.php — full-bleed hero, content-grid, advice card, products */

/* ─── Full-bleed Hero ─────────────────────────────────────── */
.page-hero {
    position: relative;
    height: 60vh;
    min-height: 400px;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    color: white;
}

.page-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.page-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.3) 60%, rgba(0, 0, 0, 0.1) 100%);
    z-index: 1;
}

.page-hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    padding-bottom: 4rem;
}

.back-link-white {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    transition: color 0.3s;
}

.back-link-white:hover {
    color: white;
}

.hero-label {
    display: inline-block;
    background: var(--white);
    color: var(--primary);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.hero-title {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin: 0;
    line-height: 1.1;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.95;
    max-width: 600px;
    margin-top: 1rem;
    color: #ffffff;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
}

/* ─── Content Section ─────────────────────────────────────── */
.page-details-section {
    padding: 5rem 0;
}

.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
}

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

/* ─── Topic Section Headings ──────────────────────────────── */
.topic-section-title {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    margin-bottom: 1.5rem;
    color: var(--primary-dark);
}

.topic-details-text {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--gray-600);
    margin-bottom: 3rem;
}

.topic-details-text p {
    margin-bottom: 1.5rem;
}

.topic-subsection-title {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    margin-bottom: 1rem;
}

.topic-faq-title {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
}

/* ─── Symptom List ────────────────────────────────────────── */
.symptom-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.symptom-list li {
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.75rem;
    color: var(--gray-700);
    line-height: 1.6;
}

.symptom-list li::before {
    content: "•";
    color: var(--primary);
    font-weight: bold;
    position: absolute;
    left: 0;
    font-size: 1.2em;
}

/* ─── FAQ (flat style matching original) ──────────────────── */
.faq-section {
    margin-top: 1rem;
}

.faq-item {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    padding-bottom: 1.5rem;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
    display: block;
    font-size: 1rem;
}

/* h4.faq-question from post_content (new editable layout) */
h4.faq-question {
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
    margin: 2rem 0 0.5rem 0;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

/* First FAQ question should not have top border */
.topic-faq-title + h4.faq-question,
.topic-full-content h4.faq-question:first-of-type {
    border-top: none;
    padding-top: 0;
    margin-top: 1rem;
}

p.faq-answer {
    color: var(--gray-600);
    line-height: 1.7;
    margin-bottom: 0;
}

.faq-answer {
    color: var(--gray-600);
    line-height: 1.7;
}

/* ─── Advice Card (sidebar) ───────────────────────────────── */
.advice-card {
    background: var(--primary);
    padding: 2rem;
    border-radius: var(--radius-xl);
    color: white;
    position: sticky;
    top: 2rem;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.advice-card-title {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    margin-top: 1rem;
    color: white;
}

.advice-card-text {
    margin-bottom: 2rem;
    opacity: 0.9;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
}

.advice-card .btn {
    width: 100%;
    text-align: center;
    justify-content: center;
    color: var(--primary);
}

/* ─── Product Grid for Topic (reuses shop-grid styles from main.css) ── */
.product-image-wrapper {
    width: 100%;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--gray-50);
}

.product-image {
    max-width: 100%;
    max-height: 130px;
    object-fit: contain;
    transition: transform 0.4s var(--ease-out-expo);
}

.product-card:hover .product-image {
    transform: scale(1.08);
}

.product-icon-placeholder {
    color: var(--primary);
    opacity: 0.5;
}

.product-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* ─── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
    .page-hero {
        height: 50vh;
        min-height: 350px;
    }

    .page-hero-content {
        padding-bottom: 2.5rem;
    }

    .hero-title {
        font-size: clamp(2rem, 6vw, 2.5rem);
    }

    .hero-subtitle {
        font-size: 1.05rem;
    }

    .page-details-section {
        padding: 3rem 0;
    }

    .content-grid {
        gap: 2rem;
    }
}
