/* ═══════════════════════════════════════════════════════════════════
   Excel Hearing Video Testimonials – Vertical Mosaic Styles
   No background colours — slider is transparent, inherits from page.
   ═══════════════════════════════════════════════════════════════════ */

.eht-vertical-section {
    --eht-accent:  #f5c518;
    --col-gap:     12px;
    --card-radius: 18px;
    --mosaic-h:    620px;

    padding: 0;
    position: relative;
    overflow: hidden;
    font-family: inherit;
    box-sizing: border-box;
    /* No background — inherits from the page */
}

/* ── Section-level skeleton loader ─────────────────────────────────── */
.eht-mosaic-loader {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 12px;
    padding: var(--col-gap);
    transition: opacity .4s ease;
    pointer-events: none;
}

.eht-mosaic-loader-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--col-gap);
    flex: 1;
}

.eht-mosaic-loader-col {
    display: flex;
    flex-direction: column;
    gap: var(--col-gap);
}

/* Hide 4th col on tablet, 3rd+4th on mobile */
@media (max-width: 1024px) { .eht-mosaic-loader-col--hide-tablet { display: none; } .eht-mosaic-loader-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 767px)  { .eht-mosaic-loader-col--hide-mobile  { display: none; } .eht-mosaic-loader-grid { grid-template-columns: repeat(2, 1fr); } }

/* Skeleton shimmer cards */
.eht-skeleton {
    flex: 1;
    min-height: 120px;
    border-radius: 18px;
    background: linear-gradient(90deg, rgba(255,255,255,.06) 25%, rgba(255,255,255,.13) 50%, rgba(255,255,255,.06) 75%);
    background-size: 200% 100%;
    animation: eht-shimmer 1.6s ease-in-out infinite;
}

.eht-skeleton--short { flex: 0 0 80px;  min-height: 80px;  }
.eht-skeleton--tall  { flex: 0 0 200px; min-height: 200px; }

@keyframes eht-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Progress bar at the bottom of the loader */
.eht-mosaic-loader-bar {
    height: 3px;
    background: rgba(255,255,255,.12);
    border-radius: 2px;
    overflow: hidden;
    flex-shrink: 0;
}

.eht-mosaic-loader-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, rgba(255,255,255,.5), rgba(255,255,255,.9));
    border-radius: 2px;
    transition: width .3s ease;
}

/* Loader hidden + mosaic visible once ready */
.eht-vertical-section.eht-ready .eht-mosaic-loader {
    opacity: 0;
}
.eht-vertical-section.eht-ready .eht-vmosaic--hidden {
    opacity: 1;
}

/* ── Mosaic hidden until ready ───────────────────────────────────────── */
.eht-vmosaic--hidden {
    opacity: 0;
    transition: opacity .5s ease;
}

/* ── Mosaic grid ────────────────────────────────────────────────────── */
.eht-vmosaic {
    position: relative;
    height: var(--mosaic-h);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--col-gap);
    padding: 0 var(--col-gap);
    overflow: hidden;
    box-sizing: border-box;
}

/* ── Column ─────────────────────────────────────────────────────────── */
.eht-vcol {
    overflow: hidden;
    position: relative;
}

/* ── Scrolling inner strip ──────────────────────────────────────────── */
.eht-vcol-inner {
    display: flex;
    flex-direction: column;
    gap: var(--col-gap);
    will-change: transform;
}

/* ── Card ───────────────────────────────────────────────────────────── */
.eht-vcard {
    border-radius: var(--card-radius);
    overflow: hidden;
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    transition: transform .3s ease;
}

.eht-vcard:hover {
    transform: scale(1.03);
}

/* ── Thumbnail container ────────────────────────────────────────────── */
/* Default: 1:1 square. When group setting defines a max-height, the     */
/* PHP template adds style="height:Xpx" on the element — aspect-ratio   */
/* is then unset so the explicit height takes over. Width always fills   */
/* the column so thumbnails are responsive.                               */
.eht-vcard-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #222;
    overflow: hidden;
}

/* When an explicit height is applied via inline style, drop aspect-ratio */
.eht-vcard-thumb[style*="height"] {
    aspect-ratio: unset;
}

.eht-thumb-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}
/* ── Thumbnail loading progress bar ────────────────────────────────── */
.eht-thumb-loader {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255,255,255,.15);
    z-index: 5;
    overflow: hidden;
    transition: opacity .3s ease;
}

.eht-thumb-loader-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, rgba(255,255,255,.6), rgba(255,255,255,.95));
    border-radius: 0 2px 2px 0;
    transition: width .4s ease;
    animation: eht-loader-shimmer 1.4s ease-in-out infinite;
}

@keyframes eht-loader-shimmer {
    0%   { opacity: .6; }
    50%  { opacity: 1;  }
    100% { opacity: .6; }
}

/* Hide loader once image is loaded (JS adds .eht-loaded class) */
.eht-vcard-thumb.eht-loaded .eht-thumb-loader {
    opacity: 0;
    pointer-events: none;
}

/* Placeholder cards have no image to load — hide loader immediately */
.eht-thumb-placeholder ~ .eht-thumb-loader {
    display: none;
}



/* Placeholder when no thumbnail uploaded */
.eht-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a1a1a;
    color: #fff;
}

/* GIF thumbnails animate on hover only — saves bandwidth/CPU when idle */
.eht-thumb-gif {
    animation-play-state: running;
}

/* Placeholder when no thumbnail is available */
.eht-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a1a1a;
    color: #fff;
}

/* ── Card overlay — meta text at bottom, shown on hover ─────────────── */
.eht-vcard-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,.75) 100%);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 12px;
    opacity: 0;
    transition: opacity .3s ease;
    pointer-events: none;
    z-index: 3;
}

.eht-vcard:hover .eht-vcard-overlay {
    opacity: 1;
}

/* ── Play button — always visible, top-right corner ─────────────────── */
.eht-vplay-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(0,0,0,.55);
    backdrop-filter: blur(4px);
    border: 1.5px solid rgba(255,255,255,.35);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    z-index: 4;
    transition: background .2s, transform .2s;
}

.eht-vplay-btn:hover {
    background: rgba(0,0,0,.8);
    transform: scale(1.12);
}

.eht-vplay-btn svg { width: 16px; height: 16px; margin-left: 2px; }

/* ── Meta text ───────────────────────────────────────────────────────── */
.eht-vcard-meta {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.eht-vreviewer-name {
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.eht-vreviewer-title {
    font-size: 10px;
    color: rgba(255,255,255,.65);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.eht-vstar {
    font-size: 14px;
    color: var(--eht-accent);
    margin-top: 2px;
}

/* ── Top / bottom fade via CSS mask — colour-independent ────────────── */
/* mask-image clips the mosaic itself so the fade matches any bg colour  */
.eht-vmosaic {
    -webkit-mask-image: linear-gradient(
        to bottom,
        transparent 0%,
        black 12%,
        black 88%,
        transparent 100%
    );
    mask-image: linear-gradient(
        to bottom,
        transparent 0%,
        black 12%,
        black 88%,
        transparent 100%
    );
}

/* Keep the div elements in the template but make them invisible —       */
/* they are no longer needed but removing them would break the template. */
.eht-vfade { display: none; }

/* ── Modal ──────────────────────────────────────────────────────────── */
.eht-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.eht-modal[hidden] { display: none; }

.eht-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.88);
    backdrop-filter: blur(8px);
    cursor: pointer;
}

.eht-modal-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: var(--eht-modal-max-width, 900px);
    background: #000;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0,0,0,.8);
    animation: ehtModalIn .3s cubic-bezier(.25,.46,.45,.94);
}

@keyframes ehtModalIn {
    from { opacity: 0; transform: scale(.92); }
    to   { opacity: 1; transform: scale(1);   }
}

.eht-modal-video {
    width: 100%;
    display: block;
    max-height: 80vh;
    background: #000;
}

.eht-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,.15);
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: background .2s;
}
.eht-modal-close:hover { background: rgba(255,255,255,.3); }
.eht-modal-close svg   { width: 18px; height: 18px; }

/* ── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .eht-vmosaic { --mosaic-h: 520px; }
}

@media (max-width: 767px) {
    .eht-vmosaic {
        --mosaic-h: 480px;
        --col-gap: 10px;
        padding: 0 10px;
    }
}
