/* ── EVENT MODAL ────────────────────────── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.modal-overlay.open {
    display: flex;
    opacity: 1;
}

.modal-container {
    position: relative;
    width: 100%;
    max-width: 1000px;
    max-height: 90vh;
    animation: modalSlide 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlide {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-close-btn {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
    transition: all 0.3s cubic-bezier(.25, .8, .25, 1);
}

.modal-close-btn:hover {
    color: var(--accent);
    transform: rotate(90deg);
}

.event-modal-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    overflow: hidden;
    height: 100%;
    min-height: 500px;
}

.modal-gallery {
    position: relative;
    background: #000;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.4s ease;
}

/* Carousel Controls */
.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.modal-nav:hover {
    background: var(--accent);
    border-color: var(--accent);
    transform: translateY(-50%) scale(1.1);
}

.modal-prev { left: 20px; }
.modal-next { right: 20px; }

.modal-thumbs {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 5;
    background: rgba(0,0,0,0.3);
    padding: 6px 12px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
}

.thumb-dot {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.thumb-dot.active {
    background: var(--accent);
    transform: scale(1.3);
    box-shadow: 0 0 10px var(--accent-glow);
}

.modal-info {
    padding: 40px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.modal-info h2 {
    font-size: 2.2rem;
    line-height: 1.1;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.modal-info .past-year {
    display: inline-block;
    margin-bottom: 24px;
    font-family: var(--font-h);
    font-size: .78rem;
    letter-spacing: 3px;
    color: var(--accent);
    font-weight: 700;
}

.modal-description {
    margin-bottom: 30px;
}

.modal-description p {
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

.modal-details-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 40px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid var(--glass-border);
}

.m-detail {
    text-align: center;
}

.m-label {
    display: block;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--muted);
    margin-bottom: 4px;
}

.m-value {
    display: block;
    font-family: var(--font-h);
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
}

.modal-action {
    margin-top: auto;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .modal-overlay {
        padding: 0;
    }

    .modal-container {
        max-height: 100vh;
        height: 100vh;
        border-radius: 0;
    }

    .event-modal-content {
        grid-template-columns: 1fr;
        grid-template-rows: 40vh 1fr;
        border-radius: 0;
        overflow-y: auto;
        height: 100%;
    }

    .modal-close-btn {
        top: 20px;
        right: 20px;
        z-index: 10;
        background: rgba(0, 0, 0, 0.5);
        border-radius: 50%;
        width: 40px;
        height: 40px;
        font-size: 1.8rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .modal-nav {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .modal-prev { left: 10px; }
    .modal-next { right: 10px; }

    .modal-info {
        padding: 30px 24px;
    }

    .modal-info h2 {
        font-size: 1.8rem;
    }

    .modal-details-grid {
        margin-bottom: 30px;
        padding: 16px;
    }
}

#modal-main-img {
    width: 100%;
    height: 450px; /* Altura fija */
    object-fit: contain; /* Muestra la imagen completa sin deformar ni recortar */
    background-color: rgba(0, 0, 0, 0.2); /* Fondo sutil para los espacios vacíos */
    display: block;
    border-radius: 8px;
}