﻿/* =========================
    VIDEO BACKGROUND
========================= */
.video-section {
    position: relative;
    height: 100%;
    overflow: hidden;
    
}

    .video-section video {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

.video-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
}

.video-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
}


/* ============================================
           انیمیشن‌های متن ویدیو
        ============================================ */

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fadeInDown {
    animation: fadeInDown 0.8s ease-out;
}

.animate-fadeInUp {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

/* ============================================
           ریسپانسیو برای موبایل (طول کامل صفحه بدون overflow)
        ============================================ */

@media (max-width: 768px) {
    .video-section {
        height: auto;
        width: 100vw;
        aspect-ratio: 16 / 9;
        left: 50%;
        margin-left: -50vw;
        margin-right: -50vw;
    }

    /* رفع overflow در موبایل */
    body {
        overflow-x: hidden !important;
    }

    .video-content h2 {
        font-size: 1.75rem !important;
        padding: 0 1rem;
    }

    .video-content p {
        font-size: 0.9rem !important;
        padding: 0 1rem;
    }
    /* اطمینان از پوشش کامل صفحه توسط ویدیو */
    #heroVideo {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    .video-content,
    .video-overlay {
        height: 100%;
    }
}

/* برای موبایل‌های خیلی کوچک */
@media (max-width: 480px) {
    .video-content h2 {
        font-size: 1.5rem !important;
    }

    .video-content p {
        font-size: 0.85rem !important;
    }
}

/* اطمینان از عدم overflow افقی در تمام دستگاه‌ها */
html, body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

/* Fallback برای مرورگرهای قدیمی */
@supports not (object-fit: cover) {
    #heroVideo {
        width: 100%;
        height: auto;
        min-height: 100%;
        object-fit: contain;
    }
}



.mute-btn {
    position: absolute;
    left: 25px;
    bottom: 25px;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: rgba(0,0,0,.45);
    backdrop-filter: blur(8px);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    transition: .25s;
}

    .mute-btn:hover {
        background: rgba(0,0,0,.7);
    }