/* ============================================
   HISTORY PAGE REDESIGN - Premium Timeline
   Same structure & colors as About, Products
   ============================================ */

/* Hero Section - Dark Premium (matches About page) */
.history-hero {
    position: relative;
    width: 100%;
    height: 220px;
    background: linear-gradient(135deg, var(--dark-bg) 0%, var(--dark-soft) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: -100px;
    padding-top: 100px;
    margin-bottom: 0;
}

.history-hero .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.history-hero .hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #FFFFFF;
    padding: 0 var(--spacing-lg);
    max-width: 800px;
}

.history-hero .hero-title {
    font-family: var(--font-heading);
    font-size: var(--text-4xl);
    font-weight: var(--weight-bold);
    margin-bottom: 0.5rem;
    color: #FFFFFF;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.history-hero .hero-subtitle {
    font-size: var(--text-lg);
    font-weight: var(--weight-normal);
    margin-bottom: 0.5rem;
    color: var(--dark-text);
}

.history-hero .hero-divider {
    width: 100px;
    height: 4px;
    background: var(--primary-orange);
    margin: 0 auto;
    border-radius: var(--radius-full);
}

/* Timeline Section */
.timeline-section {
    padding: var(--spacing-4xl) 0;
    background-color: var(--bg-alt);
    position: relative;
}

.timeline-container {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

/* Vertical Center Line */
.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--primary-orange) 0%, var(--primary-orange-dark) 100%);
    transform: translateX(-50%);
    border-radius: var(--radius-full);
    z-index: 0;
}

/* Timeline Item - in front of line */
.timeline-item {
    position: relative;
    margin-bottom: var(--spacing-4xl);
    display: flex;
    align-items: center;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
    z-index: 2;
}

.timeline-item:nth-child(1) { animation-delay: 0.1s; }
.timeline-item:nth-child(2) { animation-delay: 0.2s; }
.timeline-item:nth-child(3) { animation-delay: 0.3s; }
.timeline-item:nth-child(4) { animation-delay: 0.4s; }
.timeline-item:nth-child(5) { animation-delay: 0.5s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Year Badge on Center Line */
.timeline-year-badge {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-orange) 0%, var(--primary-orange-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.4);
    border: 4px solid var(--bg-white);
    z-index: 10;
}

.timeline-year-badge .year-number {
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-weight: var(--weight-bold);
    color: #FFFFFF;
}

/* Timeline Text Card - stays in its half, no overlap with center */
.timeline-text-card {
    width: calc(50% - 120px);
    max-width: 450px;
    min-height: 280px;
    background-color: var(--bg-white);
    border-radius: var(--radius-xl);
    padding: var(--spacing-2xl);
    box-shadow: var(--shadow-lg);
    border: 2px solid var(--border-light);
    transition: var(--transition-all);
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.timeline-text-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-2xl);
    border-color: var(--primary-orange);
}

/* Timeline Image Card - same properties as text card */
.timeline-image-card {
    width: calc(50% - 120px);
    max-width: 450px;
    min-height: 280px;
    background-color: var(--bg-white);
    border-radius: var(--radius-xl);
    padding: var(--spacing-2xl);
    box-shadow: var(--shadow-lg);
    border: 2px solid var(--border-light);
    transition: var(--transition-all);
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timeline-image-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-2xl);
    border-color: var(--primary-orange);
}

/* Left Side Items (Text Left, Image Right) */
.timeline-item.left {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-4xl);
}

.timeline-item.left .timeline-text-card {
    margin-right: auto;
    margin-left: 0;
    margin-right: 60px;
}

.timeline-item.left .timeline-image-card {
    margin-left: auto;
    margin-right: 0;
    margin-left: 60px;
}

/* Right Side Items (Text Right, Image Left) */
.timeline-item.right {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-direction: row-reverse;
    gap: var(--spacing-4xl);
}

.timeline-item.right .timeline-text-card {
    margin-left: auto;
    margin-right: 0;
    margin-left: 80px;
}

.timeline-item.right .timeline-image-card {
    margin-right: auto;
    margin-left: 0;
    margin-right: 80px;
}

.year-badge-in-card {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-orange) 0%, var(--primary-orange-dark) 100%);
    color: #FFFFFF;
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: var(--radius-full);
    font-family: var(--font-heading);
    font-size: var(--text-sm);
    font-weight: var(--weight-bold);
    margin-bottom: var(--spacing-md);
    width: fit-content;
}

.timeline-title {
    font-family: var(--font-heading);
    font-size: var(--text-3xl);
    font-weight: var(--weight-bold);
    color: var(--text-dark);
    margin-bottom: var(--spacing-md);
}

.timeline-description {
    font-size: var(--text-base);
    color: var(--text-medium);
    line-height: 1.8;
}

/* Image Wrapper */
.timeline-image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background-color: var(--bg-alt);
    width: 100%;
    height: 100%;
    min-height: 240px;
}

.timeline-image {
    width: 100%;
    height: 100%;
    min-height: 240px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.timeline-image-card:hover .timeline-image {
    transform: scale(1.1);
}

.image-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: #FFFFFF;
    padding: var(--spacing-md);
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.timeline-image-wrapper:hover .image-caption {
    opacity: 1;
}

.placeholder-image {
    width: 100%;
    height: 100%;
    min-height: 240px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-orange) 0%, var(--primary-orange-dark) 100%);
    color: #FFFFFF;
    font-size: var(--text-2xl);
}

.placeholder-image i {
    margin-bottom: var(--spacing-sm);
    opacity: 0.5;
}

.placeholder-image p {
    font-size: var(--text-sm);
    opacity: 0.7;
}

/* Connecting Lines from Center to Cards */
.timeline-connector {
    position: absolute;
    left: 50%;
    top: 50px;
    height: 3px;
    background: var(--primary-orange);
    z-index: 1;
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(249, 115, 22, 0.25);
    transition: box-shadow 0.3s ease, height 0.3s ease;
}

.timeline-item:hover .timeline-connector {
    box-shadow: 0 0 12px rgba(249, 115, 22, 0.4);
    height: 4px;
}

.timeline-connector-left {
    width: 60px;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent 0%, var(--primary-orange) 50%, var(--primary-orange) 100%);
    border-radius: 2px 0 0 2px;
}

.timeline-connector-right {
    width: 60px;
    transform: translateX(0);
    background: linear-gradient(90deg, var(--primary-orange) 0%, var(--primary-orange) 50%, transparent 100%);
    border-radius: 0 2px 2px 0;
}

.timeline-item.left .timeline-connector-left {
    display: block;
}

.timeline-item.left .timeline-connector-right {
    display: none;
}

.timeline-item.right .timeline-connector-left {
    display: none;
}

.timeline-item.right .timeline-connector-right {
    display: block;
}


/* Responsive Design */
@media (max-width: 1024px) {
    .timeline-text-card,
    .timeline-image-card {
        width: 40%;
        padding: var(--spacing-xl);
    }
    
}

@media (max-width: 768px) {
    .history-hero {
        height: 180px;
    }
    
    .history-hero .hero-title {
        font-size: var(--text-3xl);
    }
    
    .timeline-line {
        left: 30px;
    }
    
    .timeline-year-badge {
        left: 30px;
        width: 60px;
        height: 60px;
    }
    
    .timeline-year-badge .year-number {
        font-size: var(--text-base);
    }
    
    .timeline-item {
        flex-direction: column !important;
        align-items: flex-start !important;
        padding-left: var(--spacing-4xl);
        gap: var(--spacing-lg);
    }
    
    .timeline-item.left,
    .timeline-item.right {
        flex-direction: column !important;
    }
    
    .timeline-text-card,
    .timeline-image-card {
        width: 100%;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    .timeline-connector {
        left: 30px;
        width: 24px;
        height: 3px;
        top: 30px;
    }
    
    .timeline-connector-left,
    .timeline-connector-right {
        width: 24px;
        transform: none;
        background: linear-gradient(90deg, var(--primary-orange) 0%, transparent 100%);
    }
    
    .timeline-title {
        font-size: var(--text-2xl);
    }
}

@media (max-width: 480px) {
    .history-hero {
        height: 160px;
    }
    
    .history-hero .hero-title {
        font-size: var(--text-2xl);
    }
    
    .timeline-line {
        left: 20px;
    }
    
    .timeline-year-badge {
        left: 20px;
        width: 50px;
        height: 50px;
    }
    
    .timeline-item {
        padding-left: var(--spacing-3xl);
    }
    
    .timeline-card {
        padding: var(--spacing-lg);
    }
    
    .timeline-title {
        font-size: var(--text-xl);
    }
}

