.intro-section {
    padding: 80px 0;
    opacity: 0;
    animation: fadeInUp 1s ease 0.3s forwards;
}

.intro-grid {
    display: flex;
    align-items: center;
    gap: 60px;
}

.intro-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.intro-text p {
    color: var(--text-light);
    font-size: 1.1rem;
    line-height: 1.7;
    max-width: 500px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards;
}

.intro-text p:nth-child(1) {
    animation-delay: 0.5s;
}

.intro-text p:nth-child(2) {
    animation-delay: 0.7s;
}

.intro-text p:nth-child(3) {
    animation-delay: 0.9s;
}

.intro-text p span {
    color: var(--accent-orange);
    font-weight: 600;
    position: relative;
}

.intro-text p span::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-orange);
    transition: width 0.3s ease;
}

.intro-text p:hover span::after {
    width: 100%;
}

.intro-image {
    flex: 1.2;
    position: relative;
    opacity: 0;
    transform: translateX(30px);
    animation: fadeInRight 1s ease 0.8s forwards;
}

.intro-image .main-banner {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
    transform: scale(0.95);
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.intro-image:hover .main-banner {
    transform: scale(1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.intro-image .logo-overlay {
    position: absolute;
    top: -15px;
    right: 5px;
    width: 100px;
    height: 100px;
    border-radius: 8px;
    padding: 10px;
    box-sizing: border-box;
    animation: float 3s ease-in-out infinite;
}

/* --- Timeline Section --- */
.timeline-section {
    padding: 80px 0;
    overflow: hidden;
    opacity: 0;
    animation: fadeInUp 1s ease 1.2s forwards;
}

.timeline-year {
    font-family: var(--font-accent);
    color: var(--accent-orange);
    font-size: 3rem;
    text-align: center;
    margin-bottom: 30px;
    opacity: 0;
    transform: translateY(-20px);
    animation: fadeInDown 0.8s ease 1.5s forwards;
}

.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

/* The Central Line */
.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background: var(--accent-orange);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
    transform: scaleY(0);
    transform-origin: top;
    animation: growLine 1.5s ease 1.8s forwards;
    z-index: 1;
}

/* Timeline Item Container */
.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
    box-sizing: border-box;
    opacity: 0;
}

/* Position Left/Right */
.timeline-item:nth-child(odd) {
    left: 0;
    text-align: right;
    animation: fadeInLeft 0.8s ease forwards;
}

.timeline-item:nth-child(even) {
    left: 50%;
    text-align: left;
    animation: fadeInRight 0.8s ease forwards;
}

/* The Dot on the Line */
.timeline-dot {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background-color: var(--accent-orange);
    border-radius: 50%;
    top: 20px;
    z-index: 2;
    transform: scale(0);
    animation: popIn 0.5s ease forwards;
}

/* Dot positioning */
.timeline-item:nth-child(odd) .timeline-dot {
    right: -7px;
}

.timeline-item:nth-child(even) .timeline-dot {
    left: -8.5px;
}

/* The Horizontal Line */
.timeline-content {
    position: relative;
}

.timeline-content::before {
    content: '';
    position: absolute;
    width: 40px;
    height: 2px;
    background-color: var(--accent-orange);
    top: 18px;
    z-index: 1;
    transform: scaleX(0);
    animation: growLineHorizontal 0.6s ease forwards;
}

/* Horizontal line positioning */
.timeline-item:nth-child(odd) .timeline-content::before {
    right: -40px;
    transform-origin: right;
}

.timeline-item:nth-child(even) .timeline-content::before {
    left: -40px;
    transform-origin: left;
}

/* Text Content */
.timeline-content h4 {
    font-family: var(--font-primary);
    color: white;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
    opacity: 0;
    animation: fadeInRight 0.6s ease forwards;
}

.timeline-item:nth-child(odd) .timeline-content h4 {
    justify-content: flex-end;
    animation-name: fadeInLeft;
}

.timeline-content img {
    height: 20px;
    width: auto;
    transform: scale(0);
    animation: popIn 0.4s ease forwards;
}

.timeline-content p {
    color: var(--text-muted);
    font-size: 1rem;
    opacity: 0;
    animation: fadeInRight 0.6s ease forwards;
}

.timeline-item:nth-child(odd) .timeline-content p {
    animation-name: fadeInLeft;
}

/* Animation delays */
.timeline-item .timeline-dot {
    animation-delay: calc(2.3s + (var(--item-index, 0) * 0.3s));
}

.timeline-item .timeline-content::before {
    animation-delay: calc(2.4s + (var(--item-index, 0) * 0.3s));
}

.timeline-item .timeline-content h4 {
    animation-delay: calc(2.5s + (var(--item-index, 0) * 0.3s));
}

.timeline-item .timeline-content img {
    animation-delay: calc(2.7s + (var(--item-index, 0) * 0.3s));
}

.timeline-item .timeline-content p {
    animation-delay: calc(2.6s + (var(--item-index, 0) * 0.3s));
}

/* --- Timeline Photo Slider --- */
.timeline-photos-slider {
    margin-top: 50px;
    overflow: hidden;
    position: relative;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 2.8s;
}

/* Event-specific hover images */
.timeline-event-hover-image {
    position: absolute;
    width: 250px;
    height: 200px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border: 2px solid var(--accent-orange);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-50%);
    transition: all 0.3s ease;
    z-index: 100;
    pointer-events: none;
}

.timeline-event-hover-image.active {
    opacity: 1;
    visibility: visible;
}

.timeline-event-hover-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Position for left-side items */
.timeline-item.timeline-left .timeline-event-hover-image {
    left: -220px;
    top: 50%;
    transform: translateY(-50%) translateX(-20px);
}

.timeline-item.timeline-left .timeline-event-hover-image.active {
    transform: translateY(-50%) translateX(0);
}

/* Position for right-side items */
.timeline-item.timeline-right .timeline-event-hover-image {
    right: -220px;
    top: 50%;
    transform: translateY(-50%) translateX(20px);
}

.timeline-item.timeline-right .timeline-event-hover-image.active {
    transform: translateY(-50%) translateX(0);
}

.photos-container {
    display: flex;
    align-items: center;
    gap: 30px;
    padding: 20px 0;
    position: relative;
}

.photos-track {
    display: flex;
}

.photo-slide {
    flex-shrink: 0;
    width: 200px;
    height: 150px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.photo-slide:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.photo-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Gradient overlays */
.photos-container::before,
.photos-container::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100px;
    z-index: 2;
    pointer-events: none;
}

.photos-container::before {
    left: 0;
    background: linear-gradient(to right, var(--primary-bg), transparent);
}

.photos-container::after {
    right: 0;
    background: linear-gradient(to left, var(--primary-bg), transparent);
}

@media (max-width: 992px) {
    .intro-grid {
        flex-direction: column;
        gap: 40px;
    }

    .intro-text {
        max-width: 100%;
        padding: 0 5%;
    }

    .intro-image {
        transform: translateY(0);
        width: 90%;
        margin: 0 auto;
    }

    .intro-image .logo-overlay {
        width: 80px;
        height: 80px;
        top: -10px;
        right: 10px;
    }

    .photo-slide {
        width: 180px;
        height: 135px;
    }

    .photos-container::before,
    .photos-container::after {
        width: 80px;
    }
}

@media (max-width: 768px) {
    .intro-section {
        padding: 60px 0;
    }

    .intro-text p {
        font-size: 1rem;
        line-height: 1.6;
    }

    .intro-image .logo-overlay {
        width: 60px;
        height: 60px;
        top: -5px;
        right: 5px;
    }

    .timeline-section {
        padding: 60px 0;
    }

    .timeline-year {
        font-size: 2.5rem;
        margin-bottom: 20px;
    }

    .timeline::after {
        left: 20px;
        margin-left: 0;
    }

    .timeline-item {
        width: 100%;
        padding-left: 60px;
        padding-right: 25px;
        left: 0 !important;
        text-align: left !important;
        animation: fadeInRight 0.8s ease forwards !important;
    }

    .timeline-item:nth-child(odd) .timeline-dot,
    .timeline-item:nth-child(even) .timeline-dot {
        left: 13px;
        right: auto;
    }

    .timeline-item:nth-child(odd) .timeline-content::before,
    .timeline-item:nth-child(even) .timeline-content::before {
        left: -30px;
        right: auto;
        width: 30px;
        transform-origin: left;
    }

    .timeline-item:nth-child(odd) .timeline-content h4,
    .timeline-item:nth-child(even) .timeline-content h4 {
        justify-content: flex-start;
        animation-name: fadeInRight !important;
    }

    .timeline-content h4 {
        font-size: 1.3rem;
    }

    .timeline-item:nth-child(odd) .timeline-content p {
        animation-name: fadeInRight !important;
    }

    .timeline-photos-slider {
        margin-top: 40px;
    }

    .timeline-event-hover-image {
        width: 150px;
        height: 112px;
    }

    .timeline-item.timeline-left .timeline-event-hover-image,
    .timeline-item.timeline-right .timeline-event-hover-image {
        left: auto;
        right: -170px;
        top: 50%;
        transform: translateY(-50%) translateX(20px);
    }

    .timeline-item.timeline-left .timeline-event-hover-image.active,
    .timeline-item.timeline-right .timeline-event-hover-image.active {
        transform: translateY(-50%) translateX(0);
    }

    .photo-slide {
        width: 150px;
        height: 112px;
    }

    .photos-container::before,
    .photos-container::after {
        width: 60px;
    }

}

@media (max-width: 480px) {
    .timeline-photos-slider {
        margin-top: 30px;
    }

    .timeline-event-hover-image {
        display: none;
    }

    .photo-slide {
        width: 120px;
        height: 90px;
    }

    .photos-container {
        gap: 15px;
        padding: 15px 0;
    }

    .photos-container::before,
    .photos-container::after {
        width: 40px;
    }
}

@media (max-width: 360px) {
    .timeline-item {
        padding-left: 45px;
        padding-right: 10px;
    }

    .timeline-content h4 {
        font-size: 1.1rem;
    }

    .timeline-content p {
        font-size: 0.85rem;
    }

    .photo-slide {
        width: 100px;
        height: 75px;
    }

    .photos-container {
        gap: 12px;
    }
}