/* ── Showcase Video Grid ─ Elementor Widget ────────── */

/* ── Grid ─────────────────────────────────────────── */
.showcase-grid {
    display: flex;
    /* Default to flex for expandable layout */
    gap: 16px;
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
}

/* Default height for Expandable Row (desktop) */
.svg-cols-expand .showcase-grid {
    height: 560px;
}

/* Grid Layout (if columns are selected) */
[class*="svg-cols-"]:not(.svg-cols-expand) .showcase-grid {
    display: grid;
    grid-template-columns: repeat(var(--grid-cols, 3), 1fr);
    height: auto !important;
}

/* Responsive Grid Overrides */
@media (min-width: 768px) and (max-width: 1024px) {
    [class*="svg-cols-tablet-"]:not(.svg-cols-tablet-expand) .showcase-grid {
        display: grid;
        grid-template-columns: repeat(var(--grid-cols-tablet, 2), 1fr);
    }
}

@media (max-width: 767px) {
    [class*="svg-cols-mobile-"]:not(.svg-cols-mobile-expand) .showcase-grid {
        display: grid;
        grid-template-columns: repeat(var(--grid-cols-mobile, 1), 1fr);
    }

    /* If Expand is selected on mobile, stack them vertically */
    .svg-cols-mobile-expand .showcase-grid {
        flex-direction: column;
        height: auto !important;
    }
}

/* ── Card ──────────────────────────────────────────── */
.showcase-card {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    flex: 1;
    min-width: 0;
    cursor: pointer;
    border: 1px solid rgb(203, 213, 225);
    box-shadow: none;
    transition: flex .5s cubic-bezier(.22, 1, .36, 1);
    /* Default aspect ratio for fluid cards */
    aspect-ratio: var(--card-aspect, 4/5);
}

/* If Expandable Row is used, the cards should fill the grid height, not their own aspect ratio */
.svg-cols-expand .showcase-card {
    aspect-ratio: auto;
    height: 100%;
}

/* Disable flex expansion if in Grid mode */
[class*="svg-cols-"]:not(.svg-cols-expand) .showcase-card {
    flex: none;
    width: 100%;
}

.showcase-card:hover {
    flex: calc(1 * var(--hover-expand, 1.5));
    box-shadow: none;
}

[class*="svg-cols-"]:not(.svg-cols-expand) .showcase-card:hover {
    flex: none;
}

/* ── Poster image ─────────────────────────────────── */
.showcase-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity .5s ease;
    z-index: 1;
}

.showcase-card.playing img {
    opacity: 0;
    pointer-events: none;
}

/* ── Video ─────────────────────────────────────────── */
.showcase-card video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

/* ── Overlay gradient (Removed as per request) ── */
.showcase-card::after {
    display: none;
}

.showcase-card.no-overlay::after {
    display: none;
}

/* ── Play / Pause button ──────────────────────────── */
.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    z-index: 4;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, .15) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    transition: opacity .3s ease, transform .3s ease;
    pointer-events: none;
    border: none;
    cursor: pointer;
    outline: none;
}

.play-icon svg {
    width: 22px;
    height: 22px;
    fill: #fff;
}

.play-icon .icon-play {
    margin-left: 3px;
}

.play-icon .icon-pause {
    display: none;
}

.showcase-card.playing .play-icon .icon-play {
    display: none;
}

.showcase-card.playing .play-icon .icon-pause {
    display: block;
}
.play-icon:hover {background: rgba(0, 0, 0, .7) !important;}
/* ── Volume button ────────────────────────────────── */
.vol-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 5;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, .55) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transform: scale(.7);
    transition: opacity .3s ease, transform .3s ease, background .2s ease;
    pointer-events: none;
}

.vol-btn svg {
    width: 26px;
    height: 26px;
    fill: #fff;
}

.showcase-card.playing .vol-btn {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.vol-btn:hover {
    background: rgba(0, 0, 0, .7) !important;
}

/* ── Mobile/Tablet: show play button, make it tappable ── */
@media (max-width: 1024px) {
    .play-icon {
        display: flex;
        pointer-events: auto;
    }

    .play-icon {
        width: 54px;
        height: 54px;
    }

    .showcase-card.playing .play-icon {
        opacity: .7;
        transform: translate(-50%, -50%) scale(.85);
    }
}