.histoire-hero {
    background: #0B092F;
    margin-bottom:0 !important;
}

.histoire-header {
    background-color: #0B092F;
    padding: 60px 0;
    text-align: center;
    color: #F2F0EF;
}

.histoire-header h1 {
    font-family: "Great Vibes", cursive;
    font-size: 4rem;
    margin-bottom: 30px;
    color: #F9D581;
}

.histoire-intro {
    max-width: 900px;
    margin: 60px auto;
    padding: 40px;
    font-size: 1.1rem;
    line-height: 1.7;
    text-align: justify;
    background-color: #F2F0EF;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    color: #333;
}

.histoire-intro p {
    margin-bottom: 1.5rem;
    text-indent: 30px;
}

.histoire-intro p:last-child {
    margin-bottom: 0;
}

html, body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

body {
    background-color: #110e45;
}

.timeline {
    position: relative;
    max-width: 1200px;
    margin: 50px auto;
    padding: 20px;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background: linear-gradient(to bottom, transparent, #F9D581 10%, #F9D581 90%, transparent);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
    z-index: 1;
}

.timeline-item {
    padding: 30px 50px;
    position: relative;
    width: 50%;
    opacity: 0;
    transform: translateX(-100px);
    transition: all 0.8s ease;
}

.timeline-item.visible {
    opacity: 1;
    transform: translateX(0);
}

.timeline-item:nth-child(even) {
    left: 50%;
    transform: translateX(100px);
}

.timeline-item:nth-child(even).visible {
    transform: translateX(0);
}

.timeline-content {
    position: relative;
    padding: 20px;
    background-color: #F2F0EF;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    z-index: 2;
}

.timeline-content::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 25px;
    right: -62px;
    top: 30px;
    border: 4px solid #F9D581;
    border-radius: 50%;
    background: #F9D581;
    //box-shadow: 0 0 0 4px rgba(249, 213, 129, 0.2);
    z-index: 3;
}

.timeline-content::before {
    content: '';
    position: absolute;
    right: -50px;
    top: 42px;
    width: 40px;
    height: 2px;
    background: #F9D581;
    z-index: 2;
}

.timeline-item:nth-child(even) .timeline-content::after {
    left: -62px;
    right: auto;
}

.timeline-item:nth-child(even) .timeline-content::before {
    left: -50px;
    right: auto;
}

.timeline-content img {
    width: 100%;
    border-radius: 8px;
    margin: 15px 0;
    transition: transform 0.3s ease;
}

.timeline-content img:hover {
    transform: scale(1.02);
}

.timeline-content h3 {
    color: #0B092F;
    margin-bottom: 15px;
    font-family: "Josefin Sans", sans-serif;
}

.timeline-content p {
    margin-bottom: 10px;
    line-height: 1.6;
    color: #333;
}

.timeline-content .subtitle {
    color: #666;
    font-style: italic;
    margin-bottom: 15px;
}

.container {
    max-width: 100%;
    overflow-x: hidden;
}

@media screen and (max-width: 768px) {
    .timeline::after {
        left: 47px; /* Adjusted to align with dots */
    }

    .timeline-item {
        width: 100%;
        padding-left: 60px; /* Adjusted to give more space */
        padding-right: 15px;
        margin-left: 0;
    }

    .timeline-item:nth-child(even) {
        left: 0;
    }

    .timeline-content {
        margin-left: 0; /* Removed extra margin */
    }

    .timeline-content::after {
        left: -45px !important; /* Perfect alignment with timeline line */
        right: auto !important;
        top: 30px;
    }

    .timeline-content::before {
        left: -33px !important; /* Adjusted to match new dot position */
        right: auto !important;
        width: 33px; /* Adjusted width to reach dot center */
    }

    .histoire-header h1 {
        font-size: 3rem;
    }

    .histoire-intro {
        margin: 30px auto;
        padding: 25px;
        font-size: 1rem;
        text-align: left;
    }
    
    .histoire-intro p {
        text-indent: 20px;
    }
}
