/* 
   Sanskar National School - Videos Specific Styles
   Isolated from global main.css
*/

.videos-archive {
    padding-bottom: 100px;
}

/* Filter & Search Bar */
.videos-filters-container {
    background: var(--white);
    padding: 30px;
    border-radius: 35px;
    box-shadow: var(--shadow-md);
    margin-bottom: 60px;
    margin-top: -50px;
    position: relative;
    z-index: 10;
}

.videos-filter-form {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.videos-search-box {
    flex: 1;
    min-width: 300px;
    position: relative;
}

.videos-search-box i {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
}

.videos-search-box input {
    width: 100%;
    padding: 15px 20px 15px 50px;
    border-radius: 20px;
    border: 2px solid var(--bg-soft);
    font-family: inherit;
    font-weight: 500;
    transition: var(--transition-base);
}

.videos-search-box input:focus {
    border-color: var(--primary);
    outline: none;
}

.videos-category-filter {
    min-width: 200px;
}

.videos-category-filter select {
    width: 100%;
    padding: 15px 20px;
    border-radius: 20px;
    border: 2px solid var(--bg-soft);
    font-family: inherit;
    font-weight: 700;
    color: var(--text-main);
    cursor: pointer;
    appearance: none;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%236c5ce7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")
        no-repeat right 15px center;
}

/* Video Grid */
.videos-grid-fun {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.video-card-fun {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
    cursor: pointer;
    position: relative;
}

.video-card-fun:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.video-thumbnail-wrapper {
    position: relative;
    aspect-ratio: 16/9;
    background: #2d3436;
    overflow: hidden;
}

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

.video-card-fun:hover .video-thumbnail-wrapper img {
    transform: scale(1.1);
}

.play-button-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    transition: var(--transition-base);
}

.play-icon-fun {
    width: 60px;
    height: 60px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.5rem;
    padding-left: 5px; /* Visual center for triangle */
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    transition: var(--transition-base);
}

.video-card-fun:hover .play-icon-fun {
    transform: scale(1.2);
    background: var(--primary-gradient);
    color: var(--white);
}

.video-info-fun {
    padding: 20px;
}

.video-info-fun span {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--secondary);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.video-info-fun h4 {
    font-size: 1.2rem;
    color: var(--text-main);
    line-height: 1.4;
}

/* Video Modal */
.video-player-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    padding: 20px;
    justify-content: center;
    align-items: center;
}

.video-modal-container {
    width: 100%;
    max-width: 1000px;
    position: relative;
}

.video-modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    color: var(--white);
    font-size: 2rem;
    cursor: pointer;
    transition: var(--transition-base);
}

.video-modal-close:hover {
    color: var(--secondary);
    transform: rotate(90deg);
}

.video-aspect-ratio {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    background: #000;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.video-aspect-ratio iframe,
.video-aspect-ratio video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Empty State */
.videos-empty {
    text-align: center;
    padding: 100px 0;
    background: var(--white);
    border-radius: var(--radius-lg);
}

.videos-empty i {
    font-size: 5rem;
    color: var(--bg-soft);
    margin-bottom: 25px;
}

/* Responsive */
@media (max-width: 768px) {
    .videos-filters-container {
        padding: 20px;
    }

    .videos-search-box {
        min-width: 100%;
    }

    .videos-category-filter {
        min-width: 100%;
    }

    .video-modal-close {
        top: -40px;
    }
}
