/* css/history.css */
/* History Page Specific Styles */

/* Page Hero Section */
.page-hero {
    height: 60vh;
    min-height: 400px;
    background: linear-gradient(rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.92)), 
                url('../images/Stock/4.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(37, 99, 235, 0.25) 0%, transparent 45%),
        radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.25) 0%, transparent 45%),
        radial-gradient(circle at 40% 80%, rgba(96, 165, 250, 0.2) 0%, transparent 40%);
    pointer-events: none;
}

.page-hero-content {
    max-width: 800px;
    padding: 0 20px;
    position: relative;
    z-index: 2;
    color: var(--text-dark);
}

.page-hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.8rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.2;
}

.page-hero p {
    font-size: clamp(0.9rem, 2vw, 1.2rem);
    color: var(--text-light);
    margin-bottom: 30px;
    line-height: 1.6;
    font-weight: 500;
}

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

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary-blue), var(--accent-blue));
    border-radius: 2px;
}

.timeline-item {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 80px;
    position: relative;
}

.timeline-item:nth-child(odd) {
    flex-direction: row;
}

.timeline-item:nth-child(even) {
    flex-direction: row-reverse;
}

.timeline-content {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-light);
    width: 45%;
    position: relative;
    transition: all 0.3s ease;
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-blue);
}

.timeline-year {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-blue);
    color: white;
    padding: 8px 20px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
    z-index: 2;
}

.timeline-content h3 {
    font-size: 1.2rem;
    margin-bottom: 12px;
    color: var(--text-dark);
    font-weight: 600;
}

.timeline-content p {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 0.9rem;
    font-weight: 500;
}

.timeline-image {
    width: 45%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.timeline-image:hover {
    transform: scale(1.03);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

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

/* Milestones Section */
.milestones {
    background: var(--bg-light);
}

.milestones-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 50px;
}

.milestone-card {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 25px 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.milestone-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-blue), var(--accent-blue));
}

.milestone-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-blue);
}

.milestone-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.3);
}

.milestone-icon i {
    font-size: 1.5rem;
    color: white;
}

.milestone-card h3 {
    font-size: 1.2rem;
    margin-bottom: 12px;
    color: var(--text-dark);
    font-weight: 600;
}

.milestone-card p {
    color: var(--text-light);
    line-height: 1.6;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Legacy Section */
.legacy {
    background: var(--bg-white);
}

.legacy-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.legacy-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin: 50px 0;
}

.legacy-stat {
    text-align: center;
    padding: 20px;
    border-radius: 12px;
    transition: all 0.3s ease;
    background: var(--bg-white);
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.legacy-stat:hover {
    background: rgba(37, 99, 235, 0.05);
    transform: translateY(-3px);
}

.legacy-stat h3 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 8px;
}

.legacy-stat p {
    color: var(--text-light);
    font-size: clamp(0.8rem, 1.5vw, 1rem);
    font-weight: 500;
}

/* Gallery Section */
.gallery {
    background: var(--bg-light);
}

.gallery-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.gallery-item {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    background: var(--bg-white);
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-caption {
    padding: 15px;
    background: var(--bg-white);
}

.gallery-caption h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: var(--text-dark);
    font-weight: 600;
}

.gallery-caption p {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Responsive Design */
@media (max-width: 768px) {
    .timeline::before {
        left: 30px;
    }

    .timeline-item {
        flex-direction: row !important;
        align-items: flex-start;
        margin-bottom: 60px;
    }

    .timeline-content {
        width: calc(100% - 80px);
        margin-left: 80px;
    }

    .timeline-year {
        left: 30px;
        transform: translateX(-50%);
    }

    .timeline-image {
        display: none;
    }

    .legacy-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* Desktop Styles */
@media (min-width: 769px) {
    .milestones-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 30px;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    .gallery-item img {
        height: 300px;
    }

    /* Hero background animation */
    .page-hero::before {
        animation: float-bg-hero 50s infinite linear;
    }

    @keyframes float-bg-hero {
        0% { 
            transform: translate(0, 0) rotate(0deg) scale(1);
            opacity: 0.6;
        }
        25% { 
            transform: translate(-0.2%, -0.1%) rotate(90deg) scale(1.01);
            opacity: 0.8;
        }
        50% { 
            transform: translate(0.1%, 0.2%) rotate(180deg) scale(1.02);
            opacity: 0.9;
        }
        75% { 
            transform: translate(0.2%, -0.1%) rotate(270deg) scale(1.01);
            opacity: 0.7;
        }
        100% { 
            transform: translate(0, 0) rotate(360deg) scale(1);
            opacity: 0.6;
        }
    }
}

/* Tablet Styles */
@media (min-width: 481px) and (max-width: 768px) {
    .milestones-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Image Fallback Styles */
.image-fallback {
    background: linear-gradient(135deg, var(--light-blue), var(--bg-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.image-fallback::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="%236b7280"><path d="M5 3a2 2 0 00-2 2v2a2 2 0 002 2h2a2 2 0 002-2V5a2 2 0 00-2-2H5zM5 11a2 2 0 00-2 2v2a2 2 0 002 2h2a2 2 0 002-2v-2a2 2 0 00-2-2H5zM11 5a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V5zM14 11a1 1 0 011 1v1h1a1 1 0 110 2h-1v1a1 1 0 11-2 0v-1h-1a1 1 0 110-2h1v-1a1 1 0 011-1z"/></svg>') center/50px 50px no-repeat;
    opacity: 0.1;
}