﻿/* YouTube Gallery Container */
.youtube-gallery-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 50px 30px;
    background: linear-gradient(135deg, #1a472a 0%, #2d6a4f 100%);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.gallery-header {
    text-align: center;
    margin-bottom: 50px;
}

.gallery-title {
    color: #ffd700;
    font-size: 3rem;
    font-weight: bold;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.5);
    margin-bottom: 15px;
}

.gallery-subtitle {
    color: rgba(255,255,255,0.9);
    font-size: 1.2rem;
}

/* Videos Grid */
.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    padding: 20px;
}

/* Video Card */
.video-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    cursor: pointer;
}

    .video-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 15px 35px rgba(0,0,0,0.3);
    }

.video-thumbnail-container {
    position: relative;
    overflow: hidden;
    background: #000;
    aspect-ratio: 16/9;
}

.video-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.video-card:hover .video-thumbnail {
    transform: scale(1.1);
}

.play-button-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-thumbnail-container:hover .play-button-overlay {
    opacity: 1;
}

.play-video-btn {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(255,255,255,0.95);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

    .play-video-btn:hover {
        transform: scale(1.15);
        background: #ff6b6b;
    }

.play-icon {
    font-size: 28px;
    color: #ff6b6b;
    margin-left: 5px;
}

.play-video-btn:hover .play-icon {
    color: white;
}

.video-info {
    padding: 18px;
}

.video-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1a472a;
    margin-bottom: 8px;
}

.video-duration {
    font-size: 0.9rem;
    color: #ff6b6b;
    font-weight: 600;
}

/* Modal Styles */
.video-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.95);
    animation: fadeIn 0.3s ease;
}

.video-modal-content {
    position: relative;
    background-color: #111;
    margin: 5% auto;
    padding: 25px;
    width: 90%;
    max-width: 1000px;
    border-radius: 20px;
    animation: slideIn 0.4s ease;
}

.modal-video-title {
    color: #ffd700;
    margin-bottom: 20px;
    font-size: 1.5rem;
    text-align: center;
    font-weight: bold;
}

.video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    border-radius: 12px;
}

    .video-wrapper iframe {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border-radius: 12px;
    }

.close-modal {
    position: absolute;
    right: 25px;
    top: 15px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 1001;
}

    .close-modal:hover {
        color: #ff6b6b;
        transform: scale(1.1);
    }

.video-controls {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.control-btn {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 600;
}

    .control-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(255,107,107,0.4);
    }

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-60px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .videos-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
        padding: 10px;
    }

    .gallery-title {
        font-size: 2rem;
    }

    .gallery-subtitle {
        font-size: 1rem;
    }

    .video-modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 15px;
    }

    .play-video-btn {
        width: 50px;
        height: 50px;
    }

    .play-icon {
        font-size: 20px;
    }

    .modal-video-title {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .videos-grid {
        grid-template-columns: 1fr;
    }

    .gallery-title {
        font-size: 1.5rem;
    }

    .youtube-gallery-container {
        padding: 30px 15px;
    }
}
