/* ============================================
   CHAPTERS PAGE STYLE (Charles Leclerc Inspired)
   ============================================ */

.chapters-page {
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* Chapter Hero - Full Screen Opening */
.chapter-hero {
    position: relative;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.chapter-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        var(--color-dark) 0%, 
        var(--color-dark-soft) 50%, 
        var(--color-dark-lighter) 100%);
    z-index: 0;
}

.chapter-hero-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(255, 165, 0, 0.15) 0%, transparent 70%);
    animation: pulseBackground 8s ease-in-out infinite;
}

@keyframes pulseBackground {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

.chapter-hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    animation: fadeInUp 1.2s ease;
}

.chapter-icon {
    width: 140px;
    height: 140px;
    margin: 0 auto 2rem;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    color: var(--color-text-primary);
    box-shadow: 0 20px 60px rgba(255, 165, 0, 0.4);
}

.chapter-title {
    font-size: clamp(4rem, 10vw, 8rem);
    font-weight: 900;
    line-height: 1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
}

.chapter-subtitle {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 300;
    color: var(--color-text-secondary);
    letter-spacing: 0.05em;
}

.scroll-prompt {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: var(--color-text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    animation: fadeIn 2s ease 1s both;
}

.scroll-arrow-animated {
    width: 28px;
    height: 42px;
    border: 2px solid var(--color-text-muted);
    border-radius: 20px;
    position: relative;
}

.scroll-arrow-animated::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    width: 6px;
    height: 10px;
    background-color: var(--color-primary);
    border-radius: 3px;
    transform: translateX(-50%);
    animation: scrollBounce 2s ease infinite;
}

@keyframes scrollBounce {
    0%, 100% { top: 10px; opacity: 1; }
    50% { top: 22px; opacity: 0.5; }
}

/* Story Sections - Alternating Layout */
.story-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 6rem 0;
    overflow: hidden;
}

.story-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.story-content-wrapper {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
}

.story-section-reverse .story-content-wrapper {
    direction: rtl;
}

.story-section-reverse .story-text-side,
.story-section-reverse .story-image-side {
    direction: ltr;
}

/* Story Image Side */
.story-image-side {
    position: relative;
}

.story-image-placeholder {
    width: 100%;
    aspect-ratio: 4/5;
    background: rgba(26, 31, 46, 0.5);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    position: relative;
}

.story-image-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 165, 0, 0.1), rgba(255, 215, 0, 0.05));
    opacity: 0;
    transition: opacity 0.6s ease;
}

.story-image-placeholder:hover::before {
    opacity: 1;
}

.story-icon {
    font-size: 8rem;
    color: var(--color-primary);
    opacity: 0.7;
}

/* Story Text Side */
.story-text-side {
    animation: fadeInUp 1s ease;
}

.story-chapter-label {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 1.5rem;
    padding: 0.5rem 1.25rem;
    background: rgba(255, 165, 0, 0.1);
    border-radius: 20px;
    border: 1px solid rgba(255, 165, 0, 0.3);
}

.story-heading {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.story-intro {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--color-text-primary);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.story-divider {
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    margin: 2.5rem 0;
    border-radius: 2px;
}

.story-body {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
    line-height: 1.8;
    margin-bottom: 2rem;
}

/* Inline Stats */
.story-stat-inline {
    display: flex;
    gap: 3rem;
    margin-top: 3rem;
}

.stat-inline-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-inline-number {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--color-primary);
    line-height: 1;
}

.stat-inline-label {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

/* Highlight Box */
.story-highlight-box {
    margin-top: 2.5rem;
    padding: 2rem 2.5rem;
    background: rgba(255, 165, 0, 0.05);
    border-left: 4px solid var(--color-primary);
    border-radius: 12px;
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

.story-highlight-box i {
    font-size: 2rem;
    color: var(--color-primary);
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.story-highlight-box p {
    font-size: 1.125rem;
    line-height: 1.6;
    color: var(--color-text-primary);
}

/* Immersive Quote Section */
.immersive-quote-section {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8rem 2rem;
    overflow: hidden;
}

.immersive-quote-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(10, 14, 26, 0.98), rgba(37, 43, 61, 0.98));
    z-index: 0;
}

.immersive-quote-bg::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 165, 0, 0.2) 0%, transparent 70%);
    animation: breathe 6s ease-in-out infinite;
}

.immersive-quote-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    text-align: center;
}

.immersive-quote {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 300;
    font-style: italic;
    line-height: 1.4;
    color: var(--color-text-primary);
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease;
}

.immersive-quote::before {
    content: '"';
    font-size: 6rem;
    color: var(--color-primary);
    opacity: 0.3;
    line-height: 0;
}

.immersive-quote-author {
    font-size: 1.25rem;
    color: var(--color-text-secondary);
    font-weight: 500;
}

/* Journey Timeline Section */
.journey-timeline-section {
    position: relative;
    padding: 8rem 0;
    background: var(--color-dark-soft);
    min-height: 100vh;
}

.journey-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 50%, rgba(255, 165, 0, 0.05) 0%, transparent 60%);
    z-index: 0;
}

.journey-header {
    position: relative;
    z-index: 1;
    text-align: center;
    margin-bottom: 6rem;
}

.section-title-massive {
    font-size: clamp(3rem, 6vw, 5.5rem);
    font-weight: 900;
    line-height: 1.1;
    margin: 1.5rem 0;
    letter-spacing: -0.03em;
}

.journey-subtitle {
    font-size: 1.375rem;
    color: var(--color-text-secondary);
    margin-top: 1.5rem;
}

/* Journey Stages Flow */
.journey-stages-flow {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.journey-stage {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 4rem;
    align-items: flex-start;
    opacity: 1;
    transform: translateY(0);
    transition: all 0.8s ease;
}

.journey-stage.reveal {
    opacity: 1;
    transform: translateY(0);
}

/* Initial hidden state for animation */
.journey-stage.animate-in {
    opacity: 0;
    transform: translateY(40px);
}

/* Stagger animation */
.journey-stage:nth-child(1) { transition-delay: 0.1s; }
.journey-stage:nth-child(2) { transition-delay: 0.2s; }
.journey-stage:nth-child(3) { transition-delay: 0.3s; }
.journey-stage:nth-child(4) { transition-delay: 0.4s; }
.journey-stage:nth-child(5) { transition-delay: 0.5s; }
.journey-stage:nth-child(6) { transition-delay: 0.6s; }

.journey-stage-visual {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.journey-stage-number {
    font-size: 5rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    opacity: 0.9;
    /* Fallback for browsers that don't support clip */
    color: var(--color-primary);
}

.journey-stage-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 165, 0, 0.1);
    border: 2px solid rgba(255, 165, 0, 0.3);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--color-primary);
    transition: all 0.4s ease;
}

.journey-stage:hover .journey-stage-icon {
    background: rgba(255, 165, 0, 0.2);
    border-color: var(--color-primary);
    transform: scale(1.1) rotate(5deg);
}

.journey-stage-content {
    background: rgba(26, 31, 46, 0.5);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 3rem;
    transition: all 0.4s ease;
}

.journey-stage:hover .journey-stage-content {
    background: rgba(26, 31, 46, 0.7);
    transform: translateX(10px);
    box-shadow: 0 12px 50px rgba(0, 0, 0, 0.3);
}

.journey-stage-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--color-text-primary);
}

.journey-stage-desc {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.journey-stage-list {
    list-style: none;
    padding: 0;
}

.journey-stage-list li {
    padding: 0.75rem 0;
    padding-left: 2rem;
    color: var(--color-text-secondary);
    font-size: 1rem;
    position: relative;
}

.journey-stage-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--color-primary);
    font-weight: 700;
}

/* Chapter CTA Section */
.chapter-cta-section {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.chapter-cta-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--color-dark) 0%, var(--color-dark-lighter) 100%);
    z-index: 0;
}

.chapter-cta-bg::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(255, 165, 0, 0.2) 0%, transparent 70%);
    animation: pulseBackground 8s ease-in-out infinite;
}

.chapter-cta-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    padding: 0 2rem;
}

.chapter-cta-title {
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.chapter-cta-text {
    font-size: 1.5rem;
    color: var(--color-text-secondary);
    margin-bottom: 3rem;
}

.btn-chapter-cta {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 1.75rem 4rem;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    color: var(--color-text-primary);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.375rem;
    border-radius: 60px;
    transition: all 0.4s ease;
    box-shadow: 0 10px 40px rgba(255, 165, 0, 0.4);
}

.btn-chapter-cta:hover {
    transform: translateY(-6px) scale(1.05);
    box-shadow: 0 20px 60px rgba(255, 165, 0, 0.6);
}

.btn-chapter-cta i {
    transition: transform 0.3s ease;
}

.btn-chapter-cta:hover i {
    transform: translateX(8px);
}

/* Responsive */
@media (max-width: 1024px) {
    .story-content-wrapper {
        grid-template-columns: 1fr;
        gap: 4rem;
    }

    .story-section-reverse .story-content-wrapper {
        direction: ltr;
    }

    .journey-stage {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .journey-stage-visual {
        flex-direction: row;
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .chapter-hero {
        height: 100vh;
    }

    .story-section {
        min-height: auto;
        padding: 4rem 0;
    }

    .journey-timeline-section {
        padding: 4rem 0;
    }

    .story-stat-inline {
        flex-direction: column;
        gap: 2rem;
    }

    .btn-chapter-cta {
        padding: 1.5rem 3rem;
        font-size: 1.125rem;
    }
}
