/* Video Gallery Styles */
.video-gallery-section {
    padding: 40px 0;
    max-width: 1200px;
    margin: 0 auto;
}

.video-gallery-title {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    margin-bottom: 30px;
    text-align: left;
}

.video-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.video-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f5f5f5;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.video-item:hover .video-thumbnail img {
    transform: scale(1.05);
}

.play-button-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-item:hover .play-button-overlay {
    opacity: 1;
}

.play-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    transition: transform 0.3s ease, background 0.3s ease;
    text-decoration: none;
    cursor: pointer;
}

.play-button:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 1);
}

.play-button svg {
    width: 60px;
    height: 60px;
}

.video-item-title {
    padding: 15px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    color: #333;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 60px;
}

.video-gallery-footer {
    text-align: center;
    margin-top: 30px;
}

.view-all-button {
    display: inline-block;
    padding: 12px 30px;
    background: #007cba;
    color: #fff;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    transition: background 0.3s ease, transform 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.view-all-button:hover {
    background: #005a87;
    transform: translateY(-2px);
    color: #fff;
    text-decoration: none;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .video-gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
    
    .video-gallery-title {
        font-size: 28px;
    }
}

@media (max-width: 768px) {
    .video-gallery-section {
        padding: 30px 15px;
    }
    
    .video-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .video-gallery-title {
        font-size: 24px;
        margin-bottom: 20px;
    }
    
    .video-thumbnail {
        height: 150px;
    }
    
    .video-item-title {
        font-size: 13px;
        padding: 12px;
        min-height: 50px;
    }
    
    .play-button {
        width: 50px;
        height: 50px;
    }
    
    .play-button svg {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 480px) {
    .video-gallery-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .video-gallery-title {
        font-size: 20px;
        text-align: center;
    }
    
    .video-thumbnail {
        height: 200px;
    }
    
    .video-item-title {
        font-size: 14px;
        padding: 15px;
        min-height: 60px;
    }
}

/* Animation for loading */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.video-item {
    animation: fadeInUp 0.6s ease forwards;
}

.video-item:nth-child(1) { animation-delay: 0.1s; }
.video-item:nth-child(2) { animation-delay: 0.2s; }
.video-item:nth-child(3) { animation-delay: 0.3s; }
.video-item:nth-child(4) { animation-delay: 0.4s; }

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .video-item {
        background: #2a2a2a;
        box-shadow: 0 2px 10px rgba(255, 255, 255, 0.1);
    }
    
    .video-item:hover {
        box-shadow: 0 8px 25px rgba(255, 255, 255, 0.15);
    }
    
    .video-item-title {
        color: #fff;
    }
    
    .video-gallery-title {
        color: #fff;
    }
}

/* Accessibility */
.play-button:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

.view-all-button:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Video Modal Styles */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.video-modal.active {
    opacity: 1;
    visibility: visible;
}

.video-modal-overlay {
    position: relative;
    width: 90%;
    max-width: 900px;
    height: 80%;
    max-height: 600px;
}

.video-modal-content {
    position: relative;
    width: 100%;
    height: 100%;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.video-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 30px;
    cursor: pointer;
    z-index: 10001;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transition: background 0.3s ease;
}

.video-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.video-modal-body {
    width: 100%;
    height: 100%;
}

.video-modal-body iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Print styles */
@media print {
    .play-button-overlay {
        display: none;
    }

    .video-item {
        break-inside: avoid;
    }

    .video-modal {
        display: none !important;
    }
}
