/* Reset & General Styles */
* {
    padding: 0;
    margin: 0;
    font-family: 'Alexandria', sans-serif;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    width: 100%;
    min-height: 100vh;
    background-color: #051510;
    color: #e9ffec;
    position: relative;
    overflow-x: hidden;
}

/* Background Video Styling */
.video-container {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    overflow: hidden;
    z-index: -999 !important;
    pointer-events: none;
}

.bg-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.65); 
}

/* Header Styling */
.head {
    position: relative;
    z-index: 2;
    padding: 20px;
    display: flex;
    flex-direction: column; 
    align-items: center;    
    justify-content: center;
    gap: 15px;              
    color: #ffffff;
    margin-top: 10px;
    /* 💡 أنميشن نزول الـ Header عند فتح الصفحة */
    animation: fadeInDown 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.head nav ul {
    display: flex;
    gap: 20px;
    align-items: center;
    list-style-type: none;
    padding: 0;
}

.nav-link {
    color: #e9ffec; 
    text-decoration: none;
    transition: color 0.3s ease, transform 0.3s ease;
    display: inline-block;
}

.nav-link:hover {
    color: #65ba9e; 
    cursor: pointer;
    transform: translateY(-2px);
}

/* Reels Grid Section */
.reels-grid-container {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
    max-width: 1100px;
    margin: 20px auto 50px auto;
    padding: 0 20px;
}

/* Reel Card Styling */
.reel-card {
    display: block;
    cursor: pointer;
    border-radius: 24px;
    overflow: hidden;
    border: 3px solid #65ba9e; 
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.4s ease;
    
    /* 💡 أنميشن ظهور صعود الكروت بالتدريج عند تحميل الصفحة */
    opacity: 0;
    transform: translateY(40px);
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* 💡 تأخير زمني بسيط بين الكروت يعطي تأثير تتابع احترافي (Stagger Effect) */
.reel-card:nth-child(1) { animation-delay: 0.2s; }
.reel-card:nth-child(2) { animation-delay: 0.4s; }
.reel-card:nth-child(3) { animation-delay: 0.6s; }
.reel-card:nth-child(4) { animation-delay: 0.8s; }

.reel-media-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 16; 
    background-color: #081c15;
    overflow: hidden;
}

.reel-media-wrapper video,
.reel-media-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); 
}

/* خاصية الشاشة الكاملة لظهور الفيديو كاملاً */
video:-webkit-full-screen {
    object-fit: contain !important;
    background-color: #000;
}

video:-ms-fullscreen {
    object-fit: contain !important;
    background-color: #000;
}

video:fullscreen {
    object-fit: contain !important;
    background-color: #000;
}

/* Play Button Icon */
.play-btn-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background-color: rgba(8, 28, 21, 0.75);
    border: 2px solid #65ba9e;
    color: #65ba9e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    z-index: 3;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    pointer-events: none;
}

/* Overlay & Title */
.reel-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(8, 28, 21, 0.95), transparent);
    box-sizing: border-box;
    transition: opacity 0.3s ease, transform 0.4s ease;
    z-index: 2;
    pointer-events: none;
}

.reel-overlay h3 {
    color: #e9ffec;
    font-size: 1.2rem;
    margin: 0;
}

/* Hover Effects */
.reel-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 30px rgba(101, 186, 158, 0.3);
}

.reel-card:hover .play-btn-icon {
    background-color: #65ba9e;
    color: #081c15;
    transform: translate(-50%, -50%) scale(1.15) rotate(5deg);
}

.reel-card:hover .reel-media-wrapper video,
.reel-card:hover .reel-media-wrapper img {
    transform: scale(1.08);
}

/* -------------------------------------------------- */
/* 💡 Keyframes Definitions (تعريف الأنميشنات)       */
/* -------------------------------------------------- */

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}