/* ---------------- Video grid ---------------- */
.er-empty { text-align: center; color: #667085; padding: 40px 20px; }

.er-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(3, 1fr);
}
.er-columns-1 { grid-template-columns: 1fr; }
.er-columns-2 { grid-template-columns: repeat(2, 1fr); }
.er-columns-4 { grid-template-columns: repeat(4, 1fr); }

.er-item {
    display: block;
    width: 100%;
    padding: 0;
    border: none;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 28px rgba(0,0,0,0.06);
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.er-item:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(0,0,0,0.1); }

.er-item-thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #000; }
.er-item-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }
.er-item:hover .er-item-thumb img { transform: scale(1.05); }

.er-play-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.er-play-icon::after {
    content: '\25B6';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(255,255,255,0.92);
    color: #008751;
    font-size: 1.2rem;
    padding-left: 4px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}

.er-item-body { padding: 16px 18px 20px; }
.er-item-title { margin: 0 0 6px; font-size: 1rem; font-weight: 700; color: #1c1c1a; line-height: 1.35; }
.er-item-desc { margin: 0; font-size: 0.88rem; color: #667085; line-height: 1.55; }

@media (max-width: 900px) {
    .er-grid, .er-columns-3, .er-columns-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
    .er-grid, .er-columns-2, .er-columns-3, .er-columns-4 { grid-template-columns: 1fr; }
}

/* ---------------- Lightbox (created dynamically by JS) ---------------- */
.er-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(6,10,8,0.92);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease;
    padding: 20px;
    box-sizing: border-box;
}
.er-lightbox.is-open { opacity: 1; visibility: visible; }

.er-lightbox-video-wrap { width: min(90vw, 960px); aspect-ratio: 16 / 9; }
.er-lightbox-video-wrap iframe { width: 100%; height: 100%; border: none; border-radius: 4px; }

.er-lightbox-caption { color: rgba(255,255,255,0.85); margin-top: 16px; font-size: 0.95rem; text-align: center; }

.er-lightbox-close {
    position: absolute;
    top: 24px;
    right: 28px;
    background: none;
    border: none;
    color: rgba(255,255,255,0.8);
    font-size: 2rem;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
}
.er-lightbox-close:hover { color: #fff; }
