body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background: #f5f5f5;
    overflow-x: hidden; /* 🔒 Evita desplazamiento horizontal */
}

.titulo-pagina {
    text-align: center;
    margin-bottom: 20px;
    font-size: 2em;
    color: #333;
}

.contenedor-eventos-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    overflow-x: hidden;
}

.contenedor-eventos {
    overflow-x: hidden; /* 🔒 Oculta scroll horizontal */
    width: 100%;
}

.carousel-track {
    display: flex;
    gap: 20px;
    scroll-snap-type: x mandatory;
    padding: 10px 0;
    scrollbar-width: none; /* Firefox */
}
.carousel-track::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.tarjeta-evento {
    background: white;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    flex: 0 0 auto;
    scroll-snap-align: start;
    cursor: pointer;
    transition: transform 0.3s ease;
    width: calc(100% / 2 - 20px);
    box-sizing: border-box;
}
.tarjeta-evento:hover {
    transform: scale(1.03);
}
.tarjeta-evento img {
    width: 100%;
    height: auto;
    border-radius: 6px;
}
.tarjeta-evento h3 {
    font-size: 1.1em;
    margin: 10px 0 5px;
    color: #222;
}
.tarjeta-evento .fecha {
    color: #666;
    font-size: 0.9em;
}

@media (min-width: 600px) {
    .tarjeta-evento {
        width: calc(100% / 3 - 20px);
    }
}
@media (min-width: 900px) {
    .tarjeta-evento {
        width: calc(100% / 4 - 20px);
    }
}
@media (min-width: 1200px) {
    .tarjeta-evento {
        width: calc(100% / 5 - 20px);
    }
}

/* Navegación con íconos SVG */
.btn-nav {
    background-color: rgba(0, 0, 0, 0.4);
    border: none;
    color: white;
    padding: 12px;
    cursor: pointer;
    z-index: 10;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    user-select: none;
    border-radius: 50%;
}

/* Ocultar flechas de navegación en pantallas pequeñas */
@media (max-width: 768px) {
    .btn-nav {
        display: none;
    }
}
.btn-nav:hover {
    background-color: rgba(0, 0, 0, 0.6);
}
.btn-nav svg {
    display: block;
}
.btn-nav.izquierda {
    left: 0;
}
.btn-nav.derecha {
    right: 0;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0; top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    align-items: center;
    justify-content: center;
}
.modal.show {
    display: flex;
}
.modal-contenido {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    max-width: 1000px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.cerrar {
    position: absolute;
    top: 10px; right: 15px;
    font-size: 24px;
    color: #333;
    cursor: pointer;
}

.modal-body {
    display: flex;
    flex-direction: row;
    gap: 20px;
    flex-wrap: wrap;
}
.modal-texto {
    flex: 1 1 50%;
    color: #444;
    font-size: 1em;
    line-height: 1.5;
}
.modal-imagen {
    flex: 1 1 40%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-imagen img {
    max-width: 100%;
    border-radius: 8px;
}

/* Responsive modal */
@media (max-width: 768px) {
    .modal-body {
        flex-direction: column;
    }
    .modal-texto, .modal-imagen {
        flex: 1 1 100%;
    }
}
