/* ── Video Grid for Elementor ── */

.vge-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    width: 100%;
    box-sizing: border-box;
}

/* ── Card ── */
.vge-card {
    position: relative;
    overflow: hidden;
    height: 500px;
    border-radius: 12px;
    cursor: pointer;
    background: #000;
    display: block;
    width: 100%;
}

.vge-card video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

/* ── Overlay (hidden by default, shown on hover) ── */
.vge-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
    box-sizing: border-box;
}

.vge-card:hover .vge-overlay {
    opacity: 1;
}

/* ── Title position variants ── */
.vge-grid[data-title-pos="top"] .vge-overlay    { justify-content: flex-start; align-items: flex-start; }
.vge-grid[data-title-pos="center"] .vge-overlay { justify-content: center;     align-items: center; }
.vge-grid[data-title-pos="bottom"] .vge-overlay { justify-content: flex-end;   align-items: flex-start; }

/* ── Title ── */
.vge-title {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
    margin: 0;
    display: block;
}

/* ── Fullscreen button ── */
.vge-fs-icon {
    background: rgba(255,255,255,0.15);
    border: 2px solid rgba(255,255,255,0.6);
    color: #fff;
    font-size: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    padding: 0;
    margin: 0;
    line-height: 1;
    flex-shrink: 0;
}

.vge-fs-icon:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

.vge-fs-icon svg {
    width: 1em;
    height: 1em;
    pointer-events: none;
}

/* ── Fullscreen Modal ── */
.vge-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: vgeModalIn 0.25s ease;
}

@keyframes vgeModalIn {
    from { opacity: 0; transform: scale(0.96); }
    to   { opacity: 1; transform: scale(1); }
}

.vge-modal video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.vge-modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: rgba(255,255,255,0.15);
    border: 2px solid rgba(255,255,255,0.6);
    color: #fff;
    font-size: 28px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100000;
    line-height: 1;
    transition: background 0.2s ease;
    padding: 0;
    margin: 0;
}

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

/* ── Responsive ── */
@media (max-width: 1024px) {
    .vge-grid {
        grid-template-columns: repeat(var(--vge-col-tablet, 2), 1fr) !important;
    }
}

@media (max-width: 767px) {
    .vge-grid {
        grid-template-columns: repeat(var(--vge-col-mobile, 1), 1fr) !important;
    }
    .vge-card {
        height: 300px;
    }
    /* Always show overlay on mobile (no hover) */
    .vge-overlay {
        opacity: 1;
        background: rgba(0,0,0,0.35);
    }
}
