/**
 * HTK Video Embed Gallery - Frontend Styles
 */

/* Grid Layout */
.veg-grid {
    display: grid;
    gap: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    border-radius: 12px;
}

.veg-cols-1 { grid-template-columns: 1fr; }
.veg-cols-2 { grid-template-columns: repeat(2, 1fr); }
.veg-cols-3 { grid-template-columns: repeat(3, 1fr); }
.veg-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* Video Item */
.veg-item {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* Thumbnail */
.veg-video-wrapper {
    cursor: pointer;
    position: relative;
}

.veg-thumb {
    position: relative;
    overflow: hidden;
    background: #f0f0f0;
}

.veg-thumb img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.veg-item:hover .veg-thumb img {
    transform: scale(1.05);
}

/* Play Overlay */
.veg-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.veg-item:hover .veg-overlay {
    background: rgba(255, 0, 0, 0.85);
    transform: translate(-50%, -50%) scale(1.1);
}

.veg-overlay svg {
    margin-left: 5px;
}

/* Title & Description */
.veg-title {
    padding: 12px 15px 8px;
    font-weight: 600;
    font-size: 15px;
    color: #1a1a1a;
    line-height: 1.4;
}

.veg-description {
    padding: 0 15px 15px;
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

/* Lightbox */
.veg-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.veg-lightbox-show {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.veg-lightbox-visible {
    opacity: 1;
}

.veg-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(10px);
}

.veg-lightbox-inner {
    position: relative;
    width: 90%;
    max-width: 900px;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.veg-lightbox-close {
    position: absolute;
    top: -45px;
    right: 0;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
    line-height: 1;
}

.veg-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.veg-lightbox-content {
    position: relative;
    padding-top: 56.25%; /* 16:9 aspect ratio */
}

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

/* Responsive */
@media (max-width: 1024px) {
    .veg-cols-4 { grid-template-columns: repeat(3, 1fr); }
    
    .veg-thumb img {
        height: 180px;
    }
}

@media (max-width: 768px) {
    .veg-cols-3,
    .veg-cols-4 { grid-template-columns: repeat(2, 1fr); }
    
    .veg-grid {
        gap: 12px;
        padding: 10px;
    }
    
    .veg-thumb img {
        height: 150px;
    }
    
    .veg-title {
        font-size: 13px;
        padding: 10px 12px 5px;
    }
    
    .veg-description {
        display: none;
    }
    
    .veg-overlay {
        width: 50px;
        height: 50px;
    }
    
    .veg-overlay svg {
        width: 40px;
        height: 40px;
    }
    
    .veg-lightbox-inner {
        width: 95%;
    }
    
    .veg-lightbox-close {
        top: -40px;
        right: 5px;
    }
}

@media (max-width: 480px) {
    .veg-cols-2,
    .veg-cols-3,
    .veg-cols-4 { grid-template-columns: 1fr; }
    
    .veg-thumb img {
        height: 300px;
    }
}
