/* ===========================
   MODAL DE EVENTO - DISEÑO ÉPICO
   =========================== */

.evento-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.3s ease-out;
}

/* Prevent horizontal overflow inside modal */
.evento-modal,
.evento-modal-container,
.evento-modal-content {
    box-sizing: border-box;
    overflow-x: hidden;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.evento-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: -1;
}

.evento-modal-container {
    position: relative;
    width: min(800px, calc(100% - 2rem));
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    background: linear-gradient(145deg, 
        rgba(30, 30, 60, 0.95) 0%, 
        rgba(20, 20, 40, 0.98) 100%);
    border-radius: 28px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.8),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.1),
        0 0 60px rgba(100, 170, 255, 0.2);
    animation: modalSlideIn 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Borde holográfico exterior */
.evento-modal-container::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    background: linear-gradient(135deg, 
        #667eea 0%, 
        #764ba2 20%, 
        #f093fb 40%, 
        #4facfe 60%,
        #00f2fe 80%,
        #667eea 100%);
    border-radius: 30px;
    z-index: -1;
    opacity: 0.5;
    filter: blur(20px);
    animation: borderRotate 4s linear infinite;
    background-size: 200% 200%;
}

@keyframes borderRotate {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.evento-modal-close {
    position: fixed;
    top: 1.2rem;
    right: 1.2rem;
    width: 48px;
    height: 48px;
    border: none;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.08) 0%, 
        rgba(255, 255, 255, 0.04) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 12px;
    z-index: 10001;
    transition: all 0.28s ease;
    border: 1px solid rgba(255, 255, 255, 0.14);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45), 0 0 30px rgba(100,170,255,0.08);
}

.evento-modal-close:hover {
    background: linear-gradient(135deg, 
        rgba(255, 120, 180, 0.12) 0%, 
        rgba(200, 80, 150, 0.14) 100%);
    transform: scale(1.06);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 30px rgba(118,75,162,0.12);
}

.evento-modal-content {
    position: relative;
}

.evento-modal-header {
    position: relative;
    height: 300px;
    border-radius: 26px 26px 0 0;
    overflow: hidden;
    background: linear-gradient(135deg,
        rgba(124, 58, 237, 0.3) 0%,
        rgba(76, 175, 254, 0.2) 50%,
        rgba(236, 72, 153, 0.3) 100%);
}

.evento-modal-image {
    width: 100%;
    height: 100%;
    position: relative;
    max-width: 100%;
}

.evento-modal-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8rem;
    position: relative;
    z-index: 2;
    text-shadow: 0 0 40px rgba(255, 255, 255, 0.8),
                 0 0 80px rgba(124, 58, 237, 1),
                 0 8px 30px rgba(0, 0, 0, 0.9);
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.7));
    animation: float 3s ease-in-out infinite;
}

/* Ensure modal body doesn't force horizontal scroll */
.evento-modal-body,
.evento-modal-content,
.evento-modal-header {
    max-width: 100%;
    box-sizing: border-box;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
}

/* Overlay de gradiente sobre la imagen */
.evento-modal-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to top, 
        rgba(20, 20, 40, 0.98) 0%,
        transparent 100%);
    z-index: 1;
    pointer-events: none;
}

.evento-modal-tags {
    position: absolute;
    top: 1.2rem;
    right: 1.2rem;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    z-index: 3;
}

.evento-modal-tags .tag {
    background: linear-gradient(135deg, 
        rgba(15, 15, 35, 0.9) 0%, 
        rgba(25, 25, 50, 0.95) 100%);
    backdrop-filter: blur(12px);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.4rem 1rem;
    border-radius: 8px;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(100, 170, 255, 0.3);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.evento-modal-body {
    padding: 2rem 2.5rem 2.5rem;
    position: relative;
}

.evento-modal-date {
    display: inline-block;
    font-size: 1rem;
    padding: 0.5rem 1.2rem;
    background: linear-gradient(135deg, 
        rgba(6, 182, 212, 0.85) 0%, 
        rgba(6, 182, 212, 0.65) 100%);
    color: #fff;
    border-radius: 12px;
    font-weight: 700;
    margin-bottom: 1rem;
    box-shadow: 0 3px 12px rgba(6, 182, 212, 0.3);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    letter-spacing: 1px;
    text-transform: uppercase;
    border: 1px solid rgba(6, 182, 212, 0.5);
}

.evento-modal-titulo {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    background: linear-gradient(135deg, 
        #ffffff 0%, 
        #e0e0ff 50%,
        #c0c0ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.evento-modal-info {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 1.8rem;
}

.evento-modal-info-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 1.1rem;
    color: var(--text-secondary);
    padding: 0.6rem 0;
}

.evento-modal-info-item .info-icon {
    font-size: 1.5rem;
    filter: drop-shadow(0 2px 6px rgba(100, 170, 255, 0.3));
}

.evento-modal-descripcion {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    padding: 1.2rem;
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.03) 0%,
        rgba(255, 255, 255, 0.01) 100%);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.evento-modal-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-large {
    padding: 0.9rem 2rem;
    font-size: 1.05rem;
    font-weight: 700;
    border-radius: 14px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    text-decoration: none;
    display: inline-block;
}

/* Responsive */
@media (max-width: 768px) {
    .evento-modal-container {
        max-width: 95%;
        border-radius: 20px;
    }
    
    .evento-modal-header {
        height: 220px;
    }
    
    .evento-modal-placeholder {
        font-size: 5rem;
    }
    
    .evento-modal-body {
        padding: 1.5rem 1.5rem 2rem;
    }
    
    .evento-modal-titulo {
        font-size: 1.8rem;
    }
    
    .evento-modal-actions {
        flex-direction: column;
    }
    
    .btn-large {
        width: 100%;
        text-align: center;
    }
    
    .evento-modal-close {
        width: 36px;
        height: 36px;
        font-size: 1.6rem;
    }
}

/* Scrollbar personalizada para el modal */
.evento-modal-container::-webkit-scrollbar {
    width: 8px;
}

.evento-modal-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0 28px 28px 0;
}

.evento-modal-container::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

.evento-modal-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #764ba2 0%, #f093fb 100%);
}

/* Modal de Calendario - más ancho */
.calendario-modal-container {
    max-width: 1000px;
}

.calendario-modal-container .evento-modal-titulo {
    margin-bottom: 2rem;
    text-align: center;
}
