/* ─── Insor Eventos en Vivo — Estilos ───────────────────────────────────────── */

.insor-ev-wrapper {
    --ev-primary:    #003876;
    --ev-primary-dk: #002555;
    --ev-accent:     #e30000;
    --ev-text:       #1a1a2e;
    --ev-muted:      #6b7280;
    --ev-bg:         #f4f6fb;
    --ev-bg-card:    #ffffff;
    --ev-border:     #e5e7eb;
    --ev-radius:     12px;
    --ev-shadow:     0 2px 12px rgba(0, 0, 0, .07);
    --ev-shadow-hv:  0 10px 32px rgba(0, 56, 118, .18);

    font-family: inherit;
    max-width: 1200px;
    margin: 0 auto;
    padding: 8px 0 32px;
}

/* ─── Controls ───────────────────────────────────────────────────────────────── */

.insor-ev-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    margin-bottom: 20px;
}

/* Search */

.insor-ev-search-wrap {
    position: relative;
    flex: 1 1 260px;
    max-width: 400px;
}

#insor-ev-search {
    width: 100%;
    padding: 12px 44px 12px 18px;
    border: 2px solid var(--ev-border);
    border-radius: 50px;
    font-size: 15px;
    color: var(--ev-text);
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
    box-sizing: border-box;
    outline: none;
    -webkit-appearance: none;
}

#insor-ev-search:focus {
    border-color: var(--ev-primary);
    box-shadow: 0 0 0 4px rgba(0, 56, 118, .1);
}

#insor-ev-search::placeholder {
    color: #9ca3af;
}

.insor-ev-search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ev-muted);
    pointer-events: none;
    display: flex;
    align-items: center;
}

/* Year filters */

.insor-ev-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.insor-ev-filter {
    padding: 9px 20px;
    border: 2px solid var(--ev-border);
    border-radius: 50px;
    background: #fff;
    color: var(--ev-muted);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s;
    line-height: 1;
    letter-spacing: .03em;
}

.insor-ev-filter:hover {
    border-color: var(--ev-primary);
    color: var(--ev-primary);
    background: rgba(0, 56, 118, .05);
}

.insor-ev-filter.active {
    border-color: var(--ev-primary);
    background: var(--ev-primary);
    color: #fff;
}

/* Result count */

.insor-ev-count {
    font-size: 13px;
    color: var(--ev-muted);
    margin: 0 0 18px;
    min-height: 1em;
}

/* ─── Grid ───────────────────────────────────────────────────────────────────── */

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

@media (max-width: 920px) {
    .insor-ev-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 580px) {
    .insor-ev-wrapper {
        padding: 4px 0 24px;
    }

    .insor-ev-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .insor-ev-search-wrap {
        max-width: 100%;
    }

    .insor-ev-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* ─── Card ───────────────────────────────────────────────────────────────────── */

.insor-ev-card {
    background: var(--ev-bg-card);
    border-radius: var(--ev-radius);
    box-shadow: var(--ev-shadow);
    overflow: hidden;
    transition: transform .25s cubic-bezier(.34,1.3,.7,1), box-shadow .25s ease;
    border: 1px solid var(--ev-border);
}

.insor-ev-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--ev-shadow-hv);
}

.insor-ev-card.ev-hidden {
    display: none !important;
}

.insor-ev-card-btn {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    text-align: left;
    color: inherit;
    font: inherit;
}

/* ─── Thumbnail ──────────────────────────────────────────────────────────────── */

.insor-ev-thumb {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 */
    overflow: hidden;
    background: #0f0f0f;
    flex-shrink: 0;
}

.insor-ev-thumb img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .45s ease;
}

.insor-ev-card:hover .insor-ev-thumb img {
    transform: scale(1.06);
}

.insor-ev-thumb-placeholder {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #003876 0%, #0073cf 100%);
}

/* Overlay */

.insor-ev-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    transition: background .25s;
}

.insor-ev-card:hover .insor-ev-overlay {
    background: rgba(0, 0, 0, .28);
}

/* Play button */

.insor-ev-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .25s;
    pointer-events: none;
}

.insor-ev-card:hover .insor-ev-play {
    opacity: 1;
}

.insor-ev-play svg {
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, .6));
    transition: transform .2s;
}

.insor-ev-card:hover .insor-ev-play svg {
    transform: scale(1.12);
}

/* Year badge */

.insor-ev-year-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--ev-primary);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    padding: 4px 11px;
    border-radius: 50px;
    letter-spacing: .06em;
    text-transform: uppercase;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0,0,0,.25);
}

/* ─── Card info ──────────────────────────────────────────────────────────────── */

.insor-ev-info {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.insor-ev-date {
    display: block;
    font-size: 12px;
    color: var(--ev-muted);
    margin-bottom: 7px;
    font-weight: 500;
    letter-spacing: .02em;
}

.insor-ev-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--ev-text);
    line-height: 1.45;
    margin: 0 0 14px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.insor-ev-cta {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 700;
    color: var(--ev-primary);
    text-transform: uppercase;
    letter-spacing: .06em;
    padding-bottom: 2px;
    border-bottom: 2px solid transparent;
    transition: border-color .2s, color .2s;
    align-self: flex-start;
}

.insor-ev-card:hover .insor-ev-cta {
    border-color: var(--ev-primary);
    color: var(--ev-primary-dk);
}

/* ─── Modal ──────────────────────────────────────────────────────────────────── */

.insor-ev-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

.insor-ev-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .82);
    cursor: pointer;
    animation: ev-fade-in .2s ease;
}

.insor-ev-modal-box {
    position: relative;
    z-index: 1;
    background: #111;
    border-radius: 14px;
    width: 100%;
    max-width: 860px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .7);
    overflow: hidden;
    animation: ev-scale-in .22s cubic-bezier(.34,1.3,.7,1);
}

.insor-ev-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    background: #1a1a1a;
}

.insor-ev-modal-title {
    font-size: 13px;
    font-weight: 600;
    color: #e5e7eb;
    line-height: 1.4;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.insor-ev-modal-close {
    background: rgba(255,255,255,.1);
    border: none;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #e5e7eb;
    flex-shrink: 0;
    transition: background .15s;
    padding: 0;
}

.insor-ev-modal-close:hover {
    background: rgba(255,255,255,.22);
}

.insor-ev-modal-video {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background: #000;
}

.insor-ev-modal-video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.insor-ev-modal-footer {
    padding: 10px 18px;
    background: #1a1a1a;
    display: flex;
    justify-content: flex-end;
}

.insor-ev-modal-yt-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 700;
    color: #9ca3af;
    text-decoration: none;
    transition: color .15s;
    letter-spacing: .04em;
}

.insor-ev-modal-yt-btn:hover {
    color: #fff;
    text-decoration: none;
}

@keyframes ev-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes ev-scale-in {
    from { opacity: 0; transform: scale(.93); }
    to   { opacity: 1; transform: scale(1); }
}

/* ─── No results ─────────────────────────────────────────────────────────────── */

.insor-ev-no-results {
    text-align: center;
    padding: 48px 24px;
    color: var(--ev-muted);
    font-size: 16px;
    background: var(--ev-bg);
    border-radius: var(--ev-radius);
    border: 2px dashed var(--ev-border);
}

.insor-ev-empty {
    padding: 20px;
    background: #fff8e6;
    border-left: 4px solid #f59e0b;
    border-radius: 4px;
    color: #92400e;
}
