/* history-styles.css */

.history-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    overflow-x: hidden;
}

/* Hero Section */
.history-hero {
    position: relative;
    text-align: center;
    padding: 20px 20px 20px 20px;
    border-radius: 16px;
    margin-top: 20px;
    background-image: url('/public/images/k-history.jpg');
    background-size: cover;
    background-position: 90% 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.history-hero .text-container {
    background: #f0e1d248; /* Semi-transparent background */
    padding: 20px 30px;
    border-radius: 12px;
    max-width: 800px;
}

.history-hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: #000000;
    margin-bottom: 20px;
}

.history-hero p {
    font-family: 'Quicksand', sans-serif;
    font-size: 1.2rem;
    color: #292827;
    font-weight: 300;
}



/* Timeline Section */
.timeline-section {
    position: relative;
    padding: 0 0 40px 0;
}

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

/* Timeline Line */
.timeline::before {
    content: '';
    position: absolute;
    width: 2px;
    background: #a18f7d57;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

/* Timeline Items */
.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
    opacity: 0;
    transform: translateX(-100px);
    transition: all 0.8s ease;
    margin: 100px 0;
}

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

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

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

/* Year Marker */
.timeline-item::before {
    content: attr(data-year);
    position: absolute;
    width: 90px;
    height: 30px;
    background: #e0cebda6;
    background: #F0E1D2;
    top: 0;
    border-radius: 20px;
    text-align: center;
    line-height: 30px;
    font-family: 'Quicksand', sans-serif;
    font-weight: 500;
    color: #403d3b;
}

.timeline-item:nth-child(odd)::before {
    right: -130px;
}

.timeline-item:nth-child(even)::before {
    left: -130px;
}

/* Timeline Dots */
.timeline-item::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background: #f1e2d2;
    border: 2px solid #edd3b9;
    border-radius: 50%;
    top: 7px;
}

.timeline-item:nth-child(odd)::after {
    right: -48px;
}

.timeline-item:nth-child(even)::after {
    left: -48px;
}

/* Content Styling */
.timeline-content {
    padding: 30px;
    background: #f8f4ef;
    background: #e1cebc;
    background: #f0e1d2;

    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.timeline-content h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: #403d3b;
    margin-bottom: 20px;
}

.timeline-image {
    width: 100%;
    height: 200px;
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
}

.timeline-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s ease;
}

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

.timeline-content p {
    font-family: 'Quicksand', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: #403d3b;
    font-weight: 300;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #f1e2d2;
}

::-webkit-scrollbar-thumb {
    background: #edd3b9;
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: #e5c5a5;
}

/* Responsive Design */
@media (max-width: 768px) {
    .history-hero {
        margin-bottom: 60px;
    }
    
    .timeline::before {
        left: 20px;
    }

    .timeline-item {
        width: calc(100% - 40px);
        padding: 20px;
        margin: 10px 10px 40px;
        transform: translateX(0);
    }

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

    .timeline-item::before {
        left: 40px;
        top: -20px;
    }

    .timeline-item::after {
        left: 12px;
    }

    .timeline-content {
        padding: 20px;
        margin: 0;
    }

    .timeline-content h2 {
        font-size: 1.4rem;
    }

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

    .history-hero h1 {
        font-size: 1.8rem;
    }

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

    .timeline-item::after {
        left: 28px;
        top: -16px;
    }
    .timeline-item:nth-child(even)::after {
        left: 28px;
    }
}

/* Animation Performance Optimization */
.timeline-item {
    will-change: transform, opacity;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .timeline-item {
        transition: none;
    }
    
    html {
        scroll-behavior: auto;
    }
}