
/* Fondo de la modal */
.temario-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 25px;
    background: rgba(0, 0, 0, 0.8);

    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Modal */
.temario-modal {
    position: relative;
    width: 100%;
    max-width: 90%;
    height: 95vh;
    max-height: 900px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;

    transform: translateY(20px);
    transition: transform 0.3s ease;
}

/* Modal visible */
.temario-overlay.active {
    opacity: 1;
    visibility: visible;
}

.temario-overlay.active .temario-modal {
    transform: translateY(0);
}

/* Botón cerrar */
.temario-close {
    position: absolute;
    top: 12px;
    right: 16px;
    z-index: 10;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: #222;
    color: #fff;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.temario-close:hover {
    background: #e53935;
}

/* Contenido */
.temario-contenido {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    padding: 35px;
    box-sizing: border-box;
}

/* Cargando */
.temario-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    font-size: 18px;
    color: #777;
}

/* Error */
.temario-error {
    padding: 40px;
    text-align: center;
    color: #c62828;
}

/* Bloquear scroll de fondo */
body.temario-open {
    overflow: hidden;
}

/* Responsive */
@media (max-width: 768px) {
    .temario-overlay {
        padding: 0;
    }

    .temario-modal {
        width: 100%;
        height: 100%;
        max-height: none;
        border-radius: 0;
    }

    .temario-contenido {
        padding: 65px 20px 25px;
    }

    .temario-close {
        top: 12px;
        right: 12px;
    }
}
