/* 1. Reseteo básico para limpiar márgenes del navegador */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: #f4f7f9;
    /* Un fondo gris muy claro para resaltar las tarjetas luego */
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    /* Asegura que el footer quede abajo si hay poco contenido */
}

/* Un contenedor para que la página no se estire infinitamente en pantallas gigantes */
.contenedor {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* --- HEADER --- */
.cabecera-principal {
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    /* Una sombra suave */
    padding: 15px 0;
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navegacion a {
    text-decoration: none;
    color: #2b3260;
    /* Tu color azul para los enlaces del menú */
    margin-left: 25px;
    font-weight: 600;
}

.navegacion a:hover {
    text-decoration: underline;
}

/* --- CONTENIDO PRINCIPAL --- */
.contenido-principal {
    flex: 1;
    /* Empuja el footer hacia abajo */
    padding: 40px 20px;
}

/* --- FOOTER --- */
.pie-pagina {
    background-color: #2b3260;
    /* El azul que solicitaste */
    color: #ffffff;
    padding: 40px 0 15px 0;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* Divide el footer en 3 columnas iguales */
    gap: 20px;
    margin-bottom: 30px;
}

/* Actualizamos la columna para que centre todo su contenido */
.footer-columna {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Centra los elementos horizontalmente */
    text-align: center;
    /* Centra el texto en sí */
}

.footer-columna h3,
.footer-columna h4 {
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: #ffffff;
}

/* Le damos un pequeño margen inferior a los párrafos y enlaces para que respiren */
.footer-columna p,
.footer-columna a {
    color: #d1d5eb;
    text-decoration: none;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 8px;
}

.footer-columna a:hover {
    color: #ffffff;
}

.footer-copyright {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    /* Una línea sutil para separar */
    padding-top: 15px;
    font-size: 0.85rem;
    color: #9ba3c9;
}

/* --- CONTENIDO POSTÍTULOS --- */
.seccion-inscripcion {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.titulo-principal {
    color: #2b3260;
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.alerta-requisito {
    background-color: #e8ebf0;
    /* Un gris/azul muy suave */
    color: #333;
    padding: 15px;
    border-radius: 8px;
    border-left: 5px solid #2b3260;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.texto-informativo {
    margin-bottom: 40px;
    color: #555;
}

/* Creamos la cuadrícula para las dos tarjetas */
.grid-opciones {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* Dos columnas iguales */
    gap: 30px;
}

.tarjeta-opcion {
    background: #ffffff;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    /* Sombra elegante */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.tarjeta-cabecera h2 {
    color: #2b3260;
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.tarjeta-opcion p {
    color: #666;
    margin-bottom: 25px;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Estilos de los botones */
.acciones-tarjeta {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.btn {
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
    /* Suaviza el cambio de color al pasar el mouse */
}

/* Botón sólido (azul) */
.btn-primario {
    background-color: #2b3260;
    color: #ffffff;
    border: 2px solid #2b3260;
}

.btn-primario:hover {
    background-color: #1a1e3a;
    color: #ffffff;
}

/* Botón transparente con borde */
.btn-secundario {
    background-color: transparent;
    color: #2b3260;
    border: 2px solid #2b3260;
}

.btn-secundario:hover {
    background-color: #e8ebf0;
}

/* --- SECCIÓN DE OFERTAS INFORMATIVAS --- */
.ofertas-info {
    background-color: #ffffff;
    border: 1px solid #d1d5eb;
    /* Un borde sutil usando tu tono azul claro */
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 30px;
    text-align: left;
    /* Alineamos a la izquierda para facilitar la lectura */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.ofertas-info h3 {
    color: #2b3260;
    font-size: 1.1rem;
    margin-bottom: 15px;
    text-align: center;
    border-bottom: 2px solid #e8ebf0;
    padding-bottom: 10px;
}

.lista-ofertas {
    list-style: none;
    /* Quitamos las viñetas por defecto */
    padding: 0;
    margin: 0;
}

.lista-ofertas li {
    color: #555;
    padding: 10px 0;
    border-bottom: 1px solid #f4f7f9;
    font-size: 0.95rem;
    font-weight: 500;
}

/* Quitamos la línea del último elemento para que quede más limpio */
.lista-ofertas li:last-child {
    border-bottom: none;
}

/* Agregamos un pequeño check decorativo antes de cada diplomatura */
.lista-ofertas li::before {
    content: "✓ ";
    color: #2b3260;
    font-weight: bold;
    margin-right: 10px;
}

/* =========================================
   ESTILOS PARA FORMULARIOS
   ========================================= */
.formulario-caja {
    background: #ffffff;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    max-width: 500px;
    margin: 0 auto 40px auto;
    /* Centramos la caja */
    text-align: left;
}

.grupo-form {
    margin-bottom: 25px;
}

.grid-opciones .grupo-form {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.grid-opciones .grupo-form label {
    margin-bottom: auto;
    padding-bottom: 8px;
}

.grid-opciones .grupo-form select,
.grid-opciones .grupo-form input {
    margin-top: auto;
}

.grupo-form label {
    display: block;
    font-weight: 600;
    color: #2b3260;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

/* Estilos para el desplegable (y futuros inputs de texto) */
.grupo-form select,
.grupo-form input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #d1d5eb;
    border-radius: 8px;
    font-size: 1rem;
    color: #333;
    outline: none;
    /* Quita el borde azul feo por defecto de los navegadores */
    background-color: #f9fbfd;
    /* Fondo un poco más grisáceo */
    transition: border-color 0.3s ease;
}

.grupo-form select,
.grupo-form input[type="file"],
.grupo-form input[type="checkbox"],
.grupo-form input[type="radio"],
.grupo-form input[type="submit"],
.grupo-form input[type="button"] {
    cursor: pointer;
}

.grupo-form input:not([type="button"]):not([type="submit"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]) {
    cursor: text;
}

/* Efecto al hacer clic en el desplegable */
.grupo-form select:focus,
.grupo-form input:focus {
    border-color: #2b3260;
}

/* Botón que ocupa todo el ancho */
.btn-block {
    width: 100%;
    font-size: 1.1rem;
    cursor: pointer;
    margin-top: 10px;
}

/* =========================================
   ALERTAS Y MENSAJES DINÁMICOS
   ========================================= */
.alerta-error {
    background-color: #f4d9d9;
    /* Un rojo muy clarito */
    color: #842029;
    /* Texto rojo oscuro */
    border: 1px solid #f1aeb5;
    border-radius: 8px;
    padding: 30px;
    max-width: 600px;
    margin: 0 auto 40px auto;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.alerta-error p {
    margin-bottom: 25px;
    font-size: 1.1rem;
}

/* =========================================
   BOTÓN DE RETROCESO (VOLVER)
   ========================================= */
.acciones-superiores {
    text-align: left;
    /* Lo alineamos a la izquierda */
    margin-bottom: 20px;
    /* Separación con el título principal */
}

.btn-retroceso {
    color: #555;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    padding: 5px 10px;
    border-radius: 5px;
}

/* Efecto al pasar el mouse: se vuelve de tu color azul institucional */
.btn-retroceso:hover {
    color: #2b3260;
    background-color: #e8ebf0;
    /* Un fondo grisáceo muy suave */
}

/* =========================================
   TARJETAS SELECTORAS DE MODALIDAD / CONDICIÓN
   ========================================= */
.contenedor-modalidades {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 10px;
    margin-bottom: 25px;
}

.tarjeta-modalidad {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 16px !important;
    padding: 16px 20px !important;
    border: 2px solid #e0e4ec !important;
    border-radius: 12px !important;
    cursor: pointer !important;
    background-color: #ffffff !important;
    transition: all 0.2s ease !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin-bottom: 0 !important;
    text-align: left !important;
}

.tarjeta-modalidad:hover {
    border-color: #2b3260 !important;
    background-color: #f8fafc !important;
    box-shadow: 0 4px 12px rgba(43, 50, 96, 0.06) !important;
}

.tarjeta-modalidad.activa {
    border-color: #2b3260 !important;
    background-color: #f4f6fa !important;
    box-shadow: 0 4px 14px rgba(43, 50, 96, 0.1) !important;
}

.tarjeta-modalidad input[type="radio"] {
    width: 22px !important;
    min-width: 22px !important;
    max-width: 22px !important;
    height: 22px !important;
    margin: 0 !important;
    padding: 0 !important;
    accent-color: #2b3260 !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    outline: none !important;
    box-shadow: none !important;
}

.tarjeta-modalidad .info-modalidad {
    flex: 1 1 auto !important;
    display: flex !important;
    flex-direction: column !important;
}

.tarjeta-modalidad .cabecera-modalidad {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    margin-bottom: 4px !important;
}

.tarjeta-modalidad .titulo-modalidad {
    color: #2b3260 !important;
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    margin: 0 !important;
}

.tarjeta-modalidad .badge-modalidad {
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    padding: 3px 10px !important;
    border-radius: 20px !important;
    display: inline-block !important;
}

.tarjeta-modalidad .badge-azul {
    background-color: #e8f4fd !important;
    color: #1976d2 !important;
    border: 1px solid #bbdefb !important;
}

.tarjeta-modalidad .badge-verde {
    background-color: #e8f8f5 !important;
    color: #1b8a5a !important;
    border: 1px solid #b7ebd5 !important;
}

.tarjeta-modalidad .desc-modalidad {
    margin: 0 !important;
    color: #666 !important;
    font-size: 0.88rem !important;
    line-height: 1.4 !important;
}

/* =========================================
   DISEÑO RESPONSIVO (MÓVILES Y TABLETS)
   ========================================= */
@media (max-width: 768px) {

    /* 1. Las tarjetas pasan a estar una debajo de la otra */
    .grid-opciones {
        grid-template-columns: 1fr;
        /* 1 sola columna */
        gap: 20px;
    }

    /* 2. El footer también pasa a 1 sola columna */
    .footer-grid {
        grid-template-columns: 1fr;
        /* 1 sola columna */
        gap: 30px;
    }

    /* 3. Acomodamos la cabecera por si el menú se aprieta */
    .header-flex {
        flex-direction: column;
        gap: 15px;
    }

    /* 4. Achicamos un poco el título principal para que no ocupe tanta pantalla */
    .titulo-principal {
        font-size: 2rem;
    }
}

/* =========================================
   BOTÓN Y MODAL INSTRUCTIVO COMPROBANTE MP
   ========================================= */
.btn-instructivo-mp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: #f1f5f9;
    color: #2b3260;
    border: 1px solid #cbd5e1;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.btn-instructivo-mp:hover {
    background-color: #e2e8f0;
    color: #1a1f3d;
    border-color: #94a3b8;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
}

dialog.modal-instructivo {
    border: none;
    border-radius: 12px;
    padding: 0;
    max-width: 580px;
    width: 92%;
    max-height: 90vh;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    background: #ffffff;
    margin: auto;
    overflow: hidden;
    animation: modalInstructivoFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

dialog.modal-instructivo::backdrop {
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
}

@keyframes modalInstructivoFadeIn {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(8px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-instructivo-cabecera {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #2b3260;
    color: #ffffff;
}

.modal-instructivo-cabecera h3 {
    font-size: 1.08rem;
    font-weight: 600;
    margin: 0;
    color: #ffffff;
    border: none;
    padding: 0;
}

.modal-instructivo-cerrar {
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
    opacity: 0.8;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.modal-instructivo-cerrar:hover {
    opacity: 1;
    transform: scale(1.15);
}

.modal-instructivo-cuerpo {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(90vh - 140px);
}

.modal-instructivo-pasos {
    margin: 0 0 16px 0;
    padding-left: 20px;
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.55;
}

.modal-instructivo-pasos li {
    margin-bottom: 8px;
}

.modal-instructivo-pasos strong {
    color: #1e293b;
}

.modal-instructivo-img-container {
    text-align: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 8px;
}

.modal-instructivo-img-container img {
    max-width: 100%;
    height: auto;
    max-height: 420px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.modal-instructivo-img-container img:hover {
    transform: scale(1.01);
}

.modal-instructivo-pie {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 20px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    flex-wrap: wrap;
}

.link-ampliar-comprobante {
    color: #2b3260;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.link-ampliar-comprobante:hover {
    color: #0f172a;
}