/* --- HISTORY PAGE STYLES (FULL) --- */
body, html {
    overflow-x: hidden; 
}

.history-page {
    background-color: #f9f9f9;
    color: #000;
    /* ჰედერის სიმაღლის გათვალისწინება */
    padding-top: 80px; 
}

/* =========================================
   1. HERO SECTION
========================================= */
.history-hero {
    position: relative;
    height: 60vh;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.history-hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.history-hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.1); /* მსუბუქი ფენა */
    z-index: 2;
} 

/* Play Button Styling */
.hero-play-trigger {
    position: absolute;
    bottom: 40px;
    right: 40px;
    width: 60px;
    height: 60px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, background 0.3s;
}

.hero-play-trigger i {
    color: #000;
    font-size: 20px;
    margin-left: 4px; /* ვიზუალური ცენტრირებისთვის */
}

.hero-play-trigger:hover {
    transform: scale(1.1);
    background: #d11f26; /* JAC Red */
}

.hero-play-trigger:hover i {
    color: #fff;
}


/* =========================================
   2. TIMELINE LAYOUT
========================================= */
.timeline-section {
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.timeline-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    padding: 0 20px;
}

/* ცენტრალური ხაზი */
.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #d1d1d1;
    transform: translateX(-50%);
    z-index: 1;
}

.timeline-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 80px;
    position: relative;
    z-index: 2;
}

.timeline-row.left { flex-direction: row; }
.timeline-row.right { flex-direction: row-reverse; }

/* ქარდის სტილი */
.timeline-content {
    width: 45%; 
    background: #fff;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border-radius: 4px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    border: 1px solid transparent; /* გამჭვირვალე ჩარჩო */
}

/* ჰოვერზე წითელი ჩარჩო */
.timeline-content:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 15px 40px rgba(0,0,0,0.1); 
    border-color: #d11f26; 
}

.t-img-box {
    width: 100%;
    margin-bottom: 20px;
    overflow: hidden;
}

.t-img-box img {
    width: 100%;
    height: auto;
    display: block;
}

.t-text-box { text-align: left; }

.t-year {
    display: block;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #000;
    text-align: right;
}

.timeline-row.right .t-year { text-align: left; }

.t-text-box p {
    font-size: 15px;
    line-height: 1.6;
    color: #444;
}

/* წერტილი ხაზზე */
.timeline-dot {
    position: absolute;
    left: 50%;
    width: 12px;
    height: 12px;
    background-color: #d11f26; 
    border-radius: 50%;
    transform: translateX(-50%);
    z-index: 3;
    border: 3px solid #fff;
    box-shadow: 0 0 0 1px #d1d1d1;
}

/* =========================================
   3. PARALLAX BREAK BANNERS
========================================= */
.history-break-banner {
    position: relative;
    height: 500px;
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* პარალაქს ეფექტი */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    flex-direction: column;
}

.break-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1;
}

.break-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 20px;
}

.break-content h2 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 20px;
}

.break-content p {
    font-size: 18px;
    line-height: 1.6;
    opacity: 0.9;
}

/* Partner Logos Style */
.partner-logos {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-bottom: 30px;
}

.p-logo {
    height: 45px;
    width: auto;
    object-fit: contain;
    filter: brightness(0) invert(1); /* ლოგოები თეთრდება */
}

.p-divider {
    width: 2px;
    height: 30px;
    background-color: rgba(255,255,255,0.5);
}

/* =========================================
   4. ANIMATIONS
========================================= */
.fade-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   5. VIDEO MODAL STYLES
========================================= */
.history-video-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.95);
    z-index: 9999;
    display: none; /* თავიდან დამალულია */
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.history-video-modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    width: 90%;
    max-width: 1200px;
    aspect-ratio: 16 / 9;
    position: relative;
}

.modal-content video {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

/* დახურვის ღილაკი */
.modal-close-trigger {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.6);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10002;
    transition: background-color 0.3s, transform 0.3s;
}

.modal-close-trigger i {
    font-size: 18px;
}

.modal-close-trigger:hover {
    background-color: #d11f26;
    transform: rotate(90deg);
}

/* =========================================
   RESPONSIVE STYLES
========================================= */
@media (max-width: 1024px) {
    .history-page { padding-top: 80px; } 
}

@media (max-width: 768px) {
    .history-page { padding-top: 70px; } 

    /* ხაზი და წერტილები გადადის მარცხნივ */
    .timeline-line { left: 20px; }
    .timeline-dot { left: 20px; }
    
    /* ქარდები ლაგდება ერთ სვეტად */
    .timeline-row, .timeline-row.right, .timeline-row.left {
        flex-direction: column;
        align-items: flex-start;
        padding-left: 50px; 
        width: 100%;
    }
    
    .timeline-content { width: 100%; }
    
    /* წელი ყოველთვის მარცხნივ */
    .t-year, .timeline-row.right .t-year { text-align: left; }
    
    .history-hero { height: 40vh; min-height: 300px; }
    
    .history-break-banner { height: 350px; background-attachment: scroll; } 
    .break-content h2 { font-size: 32px; }

    .hero-play-trigger { width: 50px; height: 50px; bottom: 20px; right: 20px; }
    
    .p-logo { height: 35px; }

    .modal-close-trigger { width: 36px; height: 36px; top: 15px; right: 15px; }
}