/* 5.3 The Lupercalia - Styles */

/* CSS Variables */
:root {
    --festival-primary: #c0392b;
    --festival-secondary: #962d22;
    --festival-light: #fdecea;
    --festival-gradient: linear-gradient(135deg, #c0392b, #962d22);
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f5f7;
    color: #333;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Top Bar */
.top-bar {
    background: #1a1a2e;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.top-bar .brand {
    color: #fff;
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 0.5px;
    transition: opacity 0.2s ease;
}

.top-bar .brand:hover {
    opacity: 0.85;
}

.top-bar .course-label {
    color: #8888aa;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Lesson Hero */
.lesson-hero {
    background: var(--festival-gradient);
    padding: 4rem 2rem 3.5rem;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.lesson-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.08) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
    margin: 0 auto;
}

.lesson-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: #fff;
    color: var(--festival-primary);
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1.25rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.lesson-hero h1 {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.hero-subtitle {
    font-size: 1.15rem;
    opacity: 0.9;
    font-weight: 400;
}

/* Lesson Nav Bar */
.lesson-nav-bar {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 1.25rem 2rem;
    background: transparent;
    margin-top: -1.5rem;
    position: relative;
    z-index: 2;
}

.nav-pill {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    padding: 0.6rem 1.4rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--festival-primary);
    transition: all 0.25s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.nav-pill:hover {
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(192, 57, 43, 0.2);
}

/* Content Wrapper */
.content-wrapper {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

/* Objectives Card */
.objectives-card {
    background: linear-gradient(135deg, #e8f4fd, #d6eaf8);
    border-radius: 16px;
    padding: 2rem 2.5rem;
    margin-bottom: 2rem;
    border-left: 5px solid #2196f3;
}

.objectives-card h2 {
    font-size: 1.3rem;
    color: #1565c0;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.objectives-card li {
    position: relative;
    padding: 0.5rem 0 0.5rem 1.75rem;
    color: #333;
    line-height: 1.6;
    font-size: 0.98rem;
}

.objectives-card li::before {
    content: '\2713';
    position: absolute;
    left: 0;
    color: #2196f3;
    font-weight: 700;
    font-size: 1.1rem;
}

/* Content Section */
.content-section {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.06);
    padding: 2rem 2.5rem;
    margin-bottom: 2rem;
    transition: box-shadow 0.3s ease;
}

.content-section:hover {
    box-shadow: 0 4px 24px rgba(0,0,0,0.1);
}

/* Section Header */
.section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.section-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #222;
    margin: 0;
}

/* Paragraphs */
.content-section p {
    color: #444;
    line-height: 1.8;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.content-section p:last-child {
    margin-bottom: 0;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 2rem;
    margin: 1.5rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, var(--festival-primary), var(--festival-secondary));
    border-radius: 3px;
}

.timeline-item {
    position: relative;
    padding-bottom: 2rem;
    padding-left: 1.5rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -1.65rem;
    top: 0.35rem;
    width: 16px;
    height: 16px;
    background: var(--festival-primary);
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 0 0 3px var(--festival-primary);
    z-index: 1;
}

.timeline-label {
    font-weight: 700;
    color: var(--festival-primary);
    font-size: 1.05rem;
    margin-bottom: 0.3rem;
    display: block;
}

.timeline-content {
    color: #555;
    line-height: 1.7;
    font-size: 0.98rem;
}

/* Info Callout */
.info-callout {
    background: var(--festival-light);
    border-left: 4px solid var(--festival-primary);
    padding: 1.25rem 1.5rem;
    border-radius: 0 10px 10px 0;
    margin: 1.5rem 0;
    font-size: 0.98rem;
    color: #444;
    line-height: 1.7;
}

.info-callout strong {
    color: var(--festival-secondary);
}

/* Source Quote */
.source-quote {
    background: linear-gradient(135deg, #f8f8fc, #f0ecf5);
    border-left: 5px solid var(--festival-primary);
    padding: 1.75rem 2rem;
    border-radius: 0 12px 12px 0;
    margin: 2rem 0;
    position: relative;
    box-shadow: 0 3px 12px rgba(0,0,0,0.04);
}

.source-quote::before {
    content: '\201C';
    font-size: 4rem;
    color: var(--festival-primary);
    position: absolute;
    top: -8px;
    left: 14px;
    opacity: 0.25;
    font-family: Georgia, serif;
    line-height: 1;
}

.source-quote .quote-text {
    font-style: italic;
    color: #444;
    line-height: 1.8;
    font-size: 1.05rem;
}

.source-quote .quote-citation {
    font-style: normal;
    font-weight: 600;
    color: var(--festival-secondary);
    margin-top: 1rem;
    font-size: 0.9rem;
    display: block;
}

/* Detail Grid */
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin: 1.5rem 0;
}

.detail-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-top: 4px solid var(--festival-primary);
    border-radius: 0 0 12px 12px;
    padding: 1.5rem;
    transition: all 0.25s ease;
}

.detail-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(192, 57, 43, 0.12);
}

.detail-card h4 {
    color: var(--festival-primary);
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.detail-card p {
    color: #555;
    font-size: 0.93rem;
    line-height: 1.65;
    margin-bottom: 0;
}

/* Bullet List inside content sections */
.content-section ul {
    padding-left: 1.25rem;
    margin: 1rem 0;
}

.content-section li {
    color: #444;
    line-height: 1.75;
    margin-bottom: 0.6rem;
    font-size: 0.98rem;
}

/* Terms Section */
.terms-section {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.06);
    padding: 2rem 2.5rem;
    margin-bottom: 2rem;
}

.terms-section .section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.terms-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.term-chip {
    background: var(--festival-light);
    color: var(--festival-secondary);
    padding: 0.45rem 1.1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid rgba(192, 57, 43, 0.2);
    transition: all 0.2s ease;
}

.term-chip:hover {
    background: var(--festival-primary);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(192, 57, 43, 0.3);
}

/* Bottom Nav */
.bottom-nav {
    display: flex;
    justify-content: space-between;
    max-width: 900px;
    margin: 0 auto 2rem;
    padding: 0 1.5rem;
    gap: 1rem;
}

.bottom-nav-btn {
    padding: 0.85rem 1.75rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.25s ease;
    text-align: center;
}

.bottom-nav-btn.primary {
    background: var(--festival-gradient);
    color: #fff;
    box-shadow: 0 3px 12px rgba(192, 57, 43, 0.3);
}

.bottom-nav-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(192, 57, 43, 0.4);
}

.bottom-nav-btn.secondary {
    background: #fff;
    color: var(--festival-primary);
    border: 2px solid var(--festival-primary);
}

.bottom-nav-btn.secondary:hover {
    background: var(--festival-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(192, 57, 43, 0.15);
}

/* Site Footer */
.site-footer {
    text-align: center;
    padding: 2rem 1rem;
    color: #999;
    font-size: 0.85rem;
    border-top: 1px solid #e8e8e8;
    background: #fff;
}

/* Responsive Design */
@media (max-width: 768px) {
    .lesson-hero {
        padding: 3rem 1.25rem 2.5rem;
    }

    .lesson-hero h1 {
        font-size: 2rem;
    }

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

    .lesson-badge {
        width: 55px;
        height: 55px;
        font-size: 1.25rem;
    }

    .lesson-nav-bar {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
        margin-top: -1rem;
    }

    .content-wrapper {
        padding: 0 1rem;
    }

    .content-section,
    .objectives-card,
    .terms-section {
        padding: 1.5rem;
        border-radius: 12px;
    }

    .section-title {
        font-size: 1.25rem;
    }

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

    .timeline {
        padding-left: 1.5rem;
    }

    .timeline-item {
        padding-left: 1rem;
    }

    .timeline-marker {
        left: -1.35rem;
        width: 14px;
        height: 14px;
    }

    .bottom-nav {
        flex-direction: column;
        padding: 0 1rem;
    }

    .bottom-nav-btn {
        width: 100%;
    }

    .source-quote {
        padding: 1.25rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .top-bar {
        padding: 0.6rem 1rem;
    }

    .top-bar .brand {
        font-size: 1rem;
    }

    .top-bar .course-label {
        font-size: 0.8rem;
    }

    .lesson-hero h1 {
        font-size: 1.65rem;
    }

    .detail-grid {
        gap: 0.75rem;
    }
}
