/* ========================================
   ROMANTIC PILOT — Article Page Stylesheet
   ======================================== */

/* --- Article Main Container --- */
.article-main {
    padding: 8rem 0 5rem;
    min-height: 100vh;
}

.article-back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text-muted);
    text-decoration: none;
    margin-bottom: 1.5rem;
    transition: color 0.2s ease;
}
.article-back:hover { color: var(--color-text); }
.article-back svg { flex-shrink: 0; }

/* --- Two-Column Layout --- */
.article-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2.5rem;
    align-items: start;
}

/* --- Sticky TOC Sidebar --- */
.article-toc {
    position: sticky;
    top: 90px;
    background: var(--color-bg-card);
    border-radius: 20px;
    padding: 1.8rem 1.5rem;
    box-shadow: 0 4px 24px rgba(0, 40, 80, 0.06);
}
.article-toc-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 1rem;
}
.article-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.article-toc-item {
    display: block;
    padding: 0.55rem 0.85rem;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--color-text);
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}
.article-toc-item:hover {
    background: rgba(43, 124, 186, 0.06);
}
.article-toc-item.active {
    background: rgba(43, 124, 186, 0.1);
    color: var(--color-aviation);
}

/* --- Article Body (white card) --- */
.article-body {
    background: var(--color-bg-card);
    border-radius: 24px;
    padding: 3rem 3.5rem;
    box-shadow: 0 4px 24px rgba(0, 40, 80, 0.06);
}

/* --- Article Header --- */
.article-title {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 700;
    color: var(--color-text);
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
    line-height: 1.25;
}
.article-hero-img {
    width: 100%;
    border-radius: 16px;
    margin-bottom: 2.5rem;
    object-fit: cover;
    max-height: 360px;
}

/* --- Section Headings --- */
.article-section-title {
    font-family: var(--font-display);
    font-size: clamp(1.3rem, 2.5vw, 1.7rem);
    font-weight: 700;
    color: var(--color-text);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

/* --- Body Text --- */
.article-body p {
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--color-text);
    margin-bottom: 1.2rem;
}

/* --- Exam Info Line --- */
.article-exam-info {
    font-size: 0.9rem;
    color: var(--color-text);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* --- Blockquote --- */
.article-blockquote {
    border-left: 4px solid var(--color-aviation);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0 2rem;
    background: rgba(43, 124, 186, 0.04);
    border-radius: 0 12px 12px 0;
}
.article-blockquote p {
    font-style: italic;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 0;
}

/* --- Learning Objective Titles --- */
.lo-title {
    font-family: var(--font-body);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-text);
    margin-top: 2rem;
    margin-bottom: 0.6rem;
}

/* --- Article Lists --- */
.article-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.2rem 0;
}
.article-list li {
    position: relative;
    padding: 0.5rem 0 0.5rem 1.6rem;
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--color-text);
}
.article-list li::before {
    content: '';
    position: absolute;
    left: 0.35rem;
    top: 1rem;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #b0c4d8;
}
/* Dash-style variant */
.article-list-dash li::before {
    content: '\2014';
    width: auto;
    height: auto;
    border-radius: 0;
    background: none;
    top: 0.5rem;
    left: 0;
    font-size: 0.95rem;
    color: var(--color-text);
}
.article-list-dash li {
    padding-left: 2rem;
}

/* --- Inline Link --- */
.article-inline-link {
    color: var(--color-aviation);
    text-decoration: underline;
    font-weight: 500;
    transition: opacity 0.2s ease;
}
.article-inline-link:hover {
    opacity: 0.75;
}

/* --- Section Divider --- */
.article-divider {
    border: none;
    height: 1px;
    background: var(--color-border);
    margin: 2.5rem 0;
}

/* ========================================
   QUIZ CAROUSEL — "Check yourself"
   ======================================== */
.quiz-section {
    background: rgba(43, 124, 186, 0.08);
    border-radius: 20px;
    padding: 2.5rem;
    margin-top: 2.5rem;
}
.quiz-section-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
    text-align: center;
    margin-bottom: 1.5rem;
}

/* --- Quiz Slide Wrapper --- */
.quiz-carousel {
    position: relative;
    overflow: hidden;
}
.quiz-slide {
    display: none;
}
.quiz-slide.active {
    display: block;
}

/* --- Quiz Card (purple gradient frame) --- */
.quiz-card-frame {
    background: linear-gradient(160deg, #1a3a5c 0%, #1e5080 30%, #2a6fa8 60%, #4a9ad4 100%);
    border-radius: 20px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}
/* Decorative clouds */
.quiz-cloud {
    position: absolute;
    width: 50px;
    height: 30px;
    background: rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    filter: blur(2px);
}
.quiz-cloud::before {
    content: '';
    position: absolute;
    width: 30px;
    height: 20px;
    background: rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    top: -10px;
    left: 10px;
}
.quiz-cloud-1 { top: 15%; right: 5%; }
.quiz-cloud-2 { bottom: 20%; left: 2%; }
.quiz-cloud-3 { bottom: 10%; right: 8%; }

/* --- Quiz Inner Card (white) --- */
.quiz-inner {
    background: rgba(245, 247, 252, 0.95);
    border-radius: 14px;
    padding: 1.8rem 2rem;
    position: relative;
    z-index: 1;
}

/* --- Quiz Meta (stars + seen in exam) --- */
.quiz-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.2rem;
}
.quiz-meta-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.quiz-stars {
    display: flex;
    gap: 0.15rem;
    color: #e8b84b;
    font-size: 1rem;
}
.quiz-seen {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--color-text-muted);
}
.quiz-seen-icon {
    color: #e8884b;
    font-size: 0.8rem;
}

/* --- Check Button --- */
.quiz-check-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    border: 2px solid #e8b84b;
    background: transparent;
    color: var(--color-text);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
.quiz-check-btn:hover {
    background: #e8b84b;
    color: #fff;
}

/* --- Quiz Question --- */
.quiz-question {
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-text);
    line-height: 1.6;
    margin-bottom: 1.2rem;
}

/* --- Quiz Options --- */
.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.quiz-option {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.9rem 1.2rem;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    color: var(--color-text);
}
.quiz-option:hover {
    border-color: var(--color-aviation);
    background: rgba(43, 124, 186, 0.03);
}
.quiz-option.selected {
    border-color: var(--color-aviation);
    background: rgba(43, 124, 186, 0.06);
}
.quiz-option.correct {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.08);
}
.quiz-option.incorrect {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.06);
}

/* Radio circle */
.quiz-radio {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.quiz-option.selected .quiz-radio {
    border-color: var(--color-aviation);
}
.quiz-option.selected .quiz-radio::after {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--color-aviation);
}
.quiz-option.correct .quiz-radio {
    border-color: #22c55e;
    background: #22c55e;
}
.quiz-option.correct .quiz-radio::after {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fff;
}
.quiz-option.incorrect .quiz-radio {
    border-color: #ef4444;
}

/* --- Pagination Dots --- */
.quiz-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}
.quiz-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #cbd5e1;
    cursor: pointer;
    transition: all 0.25s ease;
    border: none;
}
.quiz-dot.active {
    background: #e8b84b;
    transform: scale(1.15);
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 960px) {
    .article-layout {
        grid-template-columns: 1fr;
    }
    .article-toc {
        position: static;
        border-radius: 16px;
        padding: 1.2rem 1.5rem;
    }
    .article-toc-list {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.3rem;
    }
    .article-toc-item {
        padding: 0.4rem 0.75rem;
        font-size: 0.82rem;
    }
    .article-body {
        padding: 2rem 1.5rem;
        border-radius: 20px;
    }
}

@media (max-width: 640px) {
    .article-main {
        padding: 7rem 0 3rem;
    }
    .article-body {
        padding: 1.5rem 1.2rem;
        border-radius: 16px;
    }
    .article-title {
        font-size: 1.4rem;
    }
    .quiz-section {
        padding: 1.5rem;
        border-radius: 16px;
    }
    .quiz-card-frame {
        padding: 1.2rem;
        border-radius: 16px;
    }
    .quiz-inner {
        padding: 1.2rem 1rem;
    }
    .quiz-option {
        padding: 0.7rem 0.9rem;
        font-size: 0.82rem;
    }
}
