/* VENTANAS EMERGENTES (MODALES) */

.modal {
    position: fixed;
    inset: 0;
    z-index: 100;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(19, 0, 28, 0.5);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);

    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal.abierto {
    opacity: 1;
    pointer-events: auto;
}

/* Evita que la página de detrás se desplace */
body.modal-abierto {
    overflow: hidden;
}

.modal-container {
    position: relative;
    width: 90%;
    max-width: 600px;
    max-height: 82vh;
    overflow-y: auto;

    display: flex;
    flex-direction: column;
    gap: 15px;

    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.modal.abierto .modal-container {
    transform: scale(1);
}

.modal-grande {
    max-width: 900px;
}

.modal-container::-webkit-scrollbar {
    width: 6px;
}

.modal-container::-webkit-scrollbar-thumb {
    background: #381321;
    border-radius: 3px;
}

.modal-cerrar {
    position: absolute;
    top: 12px;
    right: 15px;
    z-index: 1;
    background: none;
    border: none;
    color: #ffd1ec;
    font-size: 18px;
    cursor: pointer;
}

.modal-cerrar:hover {
    color: #ff6fc8;
}

.modal-titulo {
    font-family: "Abril Fatface", serif;
    font-size: 24px;
    padding-right: 30px;
}

.modal-subtitulo {
    margin-top: -10px;
    font-size: 14px;
    opacity: 0.8;
}

.modal-vacio {
    padding: 20px 0;
    text-align: center;
    font-size: 14px;
    opacity: 0.7;
}

.modal .buscador {
    width: 100%;
}

/* Texto con formato que viene del panel (noticias, guías) */
.texto-panel {
    font-size: 14px;
    line-height: 1.6;
}

.texto-panel p + p,
.texto-panel ul,
.texto-panel ol {
    margin-top: 10px;
}

.texto-panel ul,
.texto-panel ol {
    padding-left: 20px;
}

.texto-panel h2,
.texto-panel h3 {
    font-family: "Abril Fatface", serif;
    margin: 15px 0 5px;
}

.texto-panel a {
    color: #ff6fc8;
}

.texto-panel img {
    max-width: 100%;
    border-radius: 8px;
}

@media (max-width: 800px) {
    .modal-container {
        width: 94%;
        max-height: 88vh;
    }
}
