:root {
    --primary: #E31B21;
    --bg-color: #F5EBE1;
    --text-color: #333;
    --font-main: 'Encode Sans', sans-serif;
}

/* Animations */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.main-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    /* Updated color to Red */
    margin-bottom: 20px;
    line-height: 1.2;
    opacity: 0;
    /* Start hidden */
    animation: slideInDown 0.8s ease-out forwards;
    /* Effect from top */
    animation-delay: 0.2s;
}

/* Scroll Animation Classes */
.reveal-left,
.reveal-right {
    opacity: 0;
    transition: all 0.8s ease-out;
}

.reveal-left {
    transform: translateX(-100px);
}

.reveal-right {
    transform: translateX(100px);
}

.is-visible {
    opacity: 1;
    transform: translateX(0);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

.infographic-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 60px;
    padding-top: 40px;
}

.sub-title {
    color: var(--primary);
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 10px;
    letter-spacing: 2px;
}



.sapo-text {
    max-width: 900px;
    margin: 0 auto 40px;
    font-size: 1.15rem;
    color: #333;
    text-align: justify;
    line-height: 1.6;
}

.sapo-text p {
    margin-bottom: 20px;
}

.sapo-text strong {
    color: var(--primary);
}

.highlight-box {
    background-color: var(--primary);
    color: #fff;
    padding: 15px 30px;
    display: inline-block;
    border-radius: 5px;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(227, 27, 33, 0.3);
}

/* Timeline Section */
.timeline-section {
    position: relative;
    padding: 40px 0;
}

.timeline-container {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

/* The vertical central line */
.timeline-container::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--primary);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
    border-radius: 2px;
}

.timeline-item {
    padding: 20px 40px;
    position: relative;
    background-color: transparent;
    width: 50%;
    box-sizing: border-box;
}

/* Left side */
.timeline-item.left {
    left: 0;
    text-align: right;
}

/* Right side */
.timeline-item.right {
    left: 50%;
    text-align: left;
}

/* The dots on the timeline */
.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background-color: #fff;
    border: 4px solid var(--primary);
    top: 25px;
    border-radius: 50%;
    z-index: 1;
}

.timeline-item.right::after {
    left: -10px;
}

.content {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    position: relative;
    transition: transform 0.3s ease;
}

.timeline-item:hover .content {
    transform: translateY(-5px);
}

.timeline-item .number {
    font-size: 3rem;
    font-weight: 800;
    color: rgba(227, 27, 33, 0.1);
    position: absolute;
    top: 0;
    line-height: 1;
}

.timeline-item.left .number {
    right: 20px;
}

.timeline-item.right .number {
    left: 20px;
}

.timeline-item h3 {
    margin-top: 15px;
    margin-bottom: 10px;
    color: var(--primary);
    font-size: 1.2rem;
    position: relative;
    z-index: 1;
}

.timeline-item p {
    font-size: 1rem;
    color: #555;
    position: relative;
    z-index: 1;
}

/* Section Divider */
.section-divider {
    text-align: center;
    margin: 80px 0 60px;
    position: relative;
}

.section-title {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 15px;
}

.source-text {
    font-style: italic;
    color: #666;
}

/* Perspectives Section */
.perspectives-section {
    position: relative;
    padding: 50px 0;
    overflow: hidden;
    /* Hide SVG overflow if any */
}

.perspectives-container {
    display: flex;
    flex-direction: column;
    gap: 60px;
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
}

.perspective-item {
    background: #fff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    width: 60%;
    position: relative;
}

/* Zigzag layout for perspectives bubbles */
.perspective-item:nth-child(odd) {
    align-self: flex-start;
}

.perspective-item:nth-child(even) {
    align-self: flex-end;
}

.p-number {
    background: var(--primary);
    color: #fff;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 700;
    position: absolute;
    top: -20px;
    left: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.p-content {
    margin-top: 10px;
}

.p-content ul {
    margin-top: 10px;
    padding-left: 20px;
}

.p-content ul li {
    margin-bottom: 5px;
}

/* SVG Curve Background */
.curve-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* Mobile Responsive */
@media screen and (max-width: 768px) {
    .main-title {
        font-size: 1.8rem;
    }

    /* Timeline Mobile */
    .timeline-container::after {
        left: 30px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 20px;
        text-align: left;
    }

    .timeline-item.right {
        left: 0;
    }

    .timeline-item.left {
        text-align: left;
        /* Align left for mobile */
    }

    .timeline-item::after {
        left: 20px;
        /* Align dot to the line on the left */
        right: auto;
    }

    .timeline-item.right::after {
        left: 20px;
    }

    .timeline-item.left .number {
        left: 20px;
        /* Move number to left for consistency if possible, or keep as is */
        right: auto;
    }

    /* Perspectives Mobile */
    .perspective-item {
        width: 100%;
        align-self: center !important;
        margin-bottom: 20px;
    }

    /* Hide curve on mobile or make it a simple vertical line */
    .curve-svg {
        display: none;
        /* Simplify for mobile, or redraw vertical */
    }

    .perspectives-container {
        gap: 30px;
    }
}