/* ===== Estilos para Modales Premium (TEACAST) ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(7, 11, 18, 0.85);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
}

.modal-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: #ffffff;
    border: 1px solid rgba(4, 26, 54, 0.12);
    border-radius: 22px;
    width: min(100%, 750px);
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

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

.modal-header {
    padding: 24px 30px;
    border-bottom: 1px solid rgba(4, 26, 54, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    background: #ffffff;
    z-index: 10;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 850;
    color: #34a1cf; /* Azul corporativo más vivo */
}

.modal-close {
    background: rgba(4, 26, 54, 0.05);
    border: 1px solid rgba(4, 26, 54, 0.12);
    color: #041a36;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 24px;
    font-weight: 400;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(4, 26, 54, 0.1);
    transform: scale(1.1);
    color: #ef4444; /* Rojo al hover para indicar cierre */
}

.modal-body {
    padding: 30px;
    color: #041a36; /* Texto oscuro sobre fondo claro */
    line-height: 1.7;
    font-size: 1.05rem;
}

.modal-body p {
    margin-bottom: 1.5rem;
}

.modal-body ul {
    margin-bottom: 1.5rem;
    padding-left: 20px;
}

.modal-body li {
    margin-bottom: 0.8rem;
}

.modal-body a {
    color: #60a5fa;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.modal-body a:hover {
    color: #93c5fd;
}

/* Flecha de Scroll para modales largos */
.modal-scroll-arrow {
    position: sticky;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 44px;
    height: 44px;
    background: #34a1cf;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(52, 161, 207, 0.4);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    animation: bounce 2s infinite;
}

.modal-scroll-arrow.is-active {
    opacity: 1;
    visibility: visible;
}

.modal-scroll-arrow:hover {
    background: #041a36;
    transform: translateX(-50%) scale(1.1);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateX(-50%) translateY(0);}
    40% {transform: translateX(-50%) translateY(-10px);}
    60% {transform: translateX(-50%) translateY(-5px);}
}
