﻿body {
    background-color: rgba(0, 0, 0, 0.5);
    background-image: url('../../images/backgrounds/formularios_inscripcion/fondoEstudiantes.png');
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Estilos Compactos y Responsive */
.course-info-card {
    background: linear-gradient(79deg, rgba(25, 40, 84, 1) 0%, rgba(0, 49, 84, 1) 57%);
    border-radius: 10px;
    padding: 10px 12px;
    color: white;
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.3);
}

.course-icon {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-right: 10px;
}

.course-title {
    font-weight: bold;
    font-size: 0.95rem;
    color: #bbd000;
}

.course-meta .badge {
    padding: 3px 8px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.65rem;
}

/* Progress Steps Compactos */
.progress-container {
    background: white;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}

.progress-steps {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.step-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 12px;
    transition: all 0.3s;
}

.step-item.active .step-circle {
    background: linear-gradient(25deg, rgba(73, 147, 204, 1) 0%, rgba(25, 40, 84, 1) 50%);
    color: white;
    transform: scale(1.05);
}

.step-item.completed .step-circle {
    background: #bbd000;
    color: white;
}

.step-label {
    margin-top: 3px;
    font-size: 9px;
    font-weight: 500;
    color: #666;
}

.step-line {
    flex: 1;
    height: 2px;
    background: #e0e0e0;
    margin: 0 3px;
}

.progress-bar-modern {
    height: 3px;
    background: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(25deg, rgba(187, 208, 0, 1) 0%, rgba(25, 40, 84, 1) 50%);
    transition: width 0.3s ease;
}

/* FORMULARIO MÁS COMPACTO */
.form-step {
    display: none;
    flex-direction: column;
    height: 285px;
    position: relative;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

    .form-step.active {
        display: flex !important;
    }

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Encabezado más compacto */
.step-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 4px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 5px;
    flex-shrink: 0;
    height: 30px;
}
/* Pie de navegación */
.step-footer {
    margin-top: 0;
    padding-top: 6px;
    border-top: 1px solid #f0f0f0;
    flex-shrink: 0;
    height: 40px;
    min-height: 40px;
    background: white;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.step-title {
    font-weight: 600;
    color: #333;
    font-size: 0.85rem;
}

.step-badge {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 20px;
    font-size: 9px;
    color: #666;
}

/* Contenido del paso */
.step-content {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 4px 0 0;
    margin: 0 0 3px 0;
    max-height: none;
    width: 100%;
    box-sizing: border-box;
}

/* Contenedor del contenido del paso - OCUPA EL ESPACIO RESTANTE */
.step-content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0; /* Importante para que funcione el overflow */
}

/* Form Groups Compactos */
.form-group-modern {
    margin-bottom: 0.3rem;
}

.form-label {
    font-weight: 500;
    color: #555;
    font-size: 0.68rem;
    margin-bottom: 1px;
    line-height: 1.2;
}

.form-control-sm, .form-select-sm {
    border: 1.5px solid #e0e0e0;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 0.8rem;
    height: 32px;
}

    .form-control-sm:focus, .form-select-sm:focus {
        border-color: #4993cc;
        box-shadow: 0 0 0 2px rgba(73, 147, 204, 0.1);
    }

/* BOTONES UNIFORMES PARA TODOS LOS PASOS */
.btn-uniform {
    padding: 6px 16px;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 100px;
    height: 34px;
}

    .btn-uniform.btn-primary {
        background: linear-gradient(25deg, rgba(73, 147, 204, 1) 0%, rgba(25, 40, 84, 1) 50%);
        color: white;
        box-shadow: 0 2px 5px rgba(102, 126, 234, 0.2);
    }

        .btn-uniform.btn-primary:hover:not(:disabled) {
            transform: translateY(-1px);
            box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
        }

        .btn-uniform.btn-primary:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

    .btn-uniform.btn-secondary {
        background: #f0f0f0;
        color: #666;
        box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    }

        .btn-uniform.btn-secondary:hover {
            background: #e0e0e0;
            transform: translateY(-1px);
        }

    .btn-uniform.btn-success {
        background: linear-gradient(25deg, rgba(73, 147, 204, 1) 0%, rgba(25, 40, 84, 1) 50%);
        color: white;
        box-shadow: 0 2px 5px rgba(40, 167, 69, 0.2);
    }

        .btn-uniform.btn-success:hover:not(:disabled) {
            transform: translateY(-1px);
            box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
        }

        .btn-uniform.btn-success:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

/* BOTÓN DE BÚSQUEDA */
.btn-search {
    background: linear-gradient(25deg, rgba(73, 147, 204, 1) 0%, rgba(25, 40, 84, 1) 50%);
    color: white;
    border: none;
    border-radius: 0 6px 6px 0;
    padding: 0 15px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    height: 32px;
    min-width: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .btn-search:hover:not(:disabled) {
        background: linear-gradient(25deg, rgba(73, 147, 204, 1) 0%, rgba(25, 40, 84, 1) 50%);
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
    }

    .btn-search:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

/* Estilos para Select2 */
.select2-container {
    z-index: 9999;
    width: 100% !important;
}

.select2-container--default .select2-selection--single {
    height: 32px !important;
    border: 1.5px solid #e0e0e0 !important;
    border-radius: 6px !important;
    padding: 3px 8px !important;
}

    .select2-container--default .select2-selection--single .select2-selection__rendered {
        line-height: 22px !important;
        font-size: 0.8rem !important;
    }

    .select2-container--default .select2-selection--single .select2-selection__arrow {
        height: 30px !important;
    }

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background: linear-gradient(135deg, #4993cc 0%, #192854 100%) !important;
}

.select2-dropdown {
    border: 1.5px solid #4993cc !important;
    border-top: none !important;
    border-radius: 0 0 6px 6px !important;
    box-shadow: 0 3px 8px rgba(0,0,0,0.1) !important;
}

.select2-search__field {
    border: 1px solid #e0e0e0 !important;
    border-radius: 4px !important;
    padding: 4px !important;
    font-size: 0.8rem !important;
}

    .select2-search__field:focus {
        border-color: #4993cc !important;
        outline: none !important;
        box-shadow: 0 0 0 2px rgba(73, 147, 204, 0.1) !important;
    }

/* Estilos para búsqueda de participante */
#cuiInput {
    border: 1.5px solid #e0e0e0;
    border-radius: 6px 0 0 6px;
    padding: 0 8px;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    font-family: monospace;
    height: 32px;
}

    #cuiInput:focus {
        border-color: #4993cc;
        box-shadow: 0 0 0 2px rgba(73, 147, 204, 0.1);
        outline: none;
    }

    #cuiInput.error {
        border-color: #dc3545;
        background-color: #fff8f8;
    }

.input-group {
    display: flex;
    align-items: center;
}

.input-group-text {
    height: 32px;
    border-radius: 6px 0 0 6px;
    background: #f8f9fa;
}

/* Botón de registro como enlace */
.btn-outline-success {
    border: 1px solid #bbd000;
    color: #bbd000;
    background: white;
    padding: 4px 12px;
    font-size: 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

    .btn-outline-success:hover {
        background: #bbd000;
        color: #192854;
        text-decoration: none;
    }

/* ========== PASO 3 - COHORTE MEJORADO Y CENTRADO ========== */
/* ========== PASO 3 - COHORTE MEJORADO Y CENTRADO ========== */

/* Contenedor principal del grid - CENTRADO VERTICALMENTE */
.cohortes-grid {
    display: grid;
    gap: 12px;
    width: 100%;
    margin: 0 auto;
    /* escritorio */
    grid-template-columns: repeat(2, minmax(280px, 1fr));
}

/* Para centrar el grid cuando hay pocos elementos */
#step3 .step-content-wrapper {
    width: 100%;
    height: 100%;
}


/* Wrapper para cada card */
.cohorte-card-wrapper {
    position: relative;
    width: 100%;
    max-width: none;
    margin: 0 auto; /* Centra la card si es la única */
}

/* Ocultar el radio input original pero mantenerlo accesible */
.cohorte-radio-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Estilo base de la card */
.cohorte-card {
    display: block;
    position: relative;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 14px 14px 14px 45px; /* Más espacio para la animación del check */
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); /* Transición suave */
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    height: 100%;
}

    /* Check con animación */
    .cohorte-card .cohorte-check {
        position: absolute;
        left: 14px;
        top: 50%;
        transform: translateY(-50%) scale(0.8);
        color: #bbd000;
        font-size: 1.3rem;
        opacity: 0;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

/* Check cuando está seleccionado - con animación de rebote suave */
.cohorte-radio-input:checked + .cohorte-card .cohorte-check {
    opacity: 1;
    transform: translateY(-50%) scale(1);
    animation: checkPop 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes checkPop {
    0% {
        transform: translateY(-50%) scale(0.4);
        opacity: 0;
    }

    60% {
        transform: translateY(-50%) scale(1.15);
    }

    100% {
        transform: translateY(-50%) scale(1);
        opacity: 1;
    }
}

/* Hover effect */
.cohorte-card:hover {
    border-color: #4993cc;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(73, 147, 204, 0.2);
}

/* Estado seleccionado */
.cohorte-radio-input:checked + .cohorte-card {
    border-color: #bbd000;
    background: linear-gradient(to bottom right, #ffffff, #f0fff4);
    box-shadow: 0 6px 14px rgba(187, 208, 0, 0.2);
    transform: translateY(-2px);
}

/* Header de la card */
.cohorte-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.cohorte-codigo {
    font-weight: 700;
    font-size: 0.95rem;
    color: #333;
    letter-spacing: 0.3px;
}

.cohorte-badge {
    background: linear-gradient(135deg, #4993cc 0%, #192854 100%);
    color: white;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 600;
}

/* Contenedor de información */
.cohorte-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: #555;
    font-size: 0.75rem;
    line-height: 1.4;
}

    .info-item i {
        color: #4993cc;
        width: 14px;
        font-size: 0.75rem;
        margin-top: 3px;
    }

.info-text {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.info-label {
    font-weight: 600;
    color: #666;
    min-width: 65px;
}

/* Scroll personalizado */
.cohortes-grid::-webkit-scrollbar {
    width: 6px;
}

.cohortes-grid::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.cohortes-grid::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #4993cc 0%, #192854 100%);
    border-radius: 10px;
}

    .cohortes-grid::-webkit-scrollbar-thumb:hover {
        background: linear-gradient(135deg, #192854 0%, #4993cc 100%);
    }

/* Media queries */
@media (max-width: 768px) {
    .cohortes-grid {
        grid-template-columns: 1fr;
        max-height: 240px;
        gap: 10px;
    }

    .cohorte-card-wrapper {
        max-width: 240px;
    }

    .cohorte-card {
        padding: 12px 12px 12px 40px;
    }

        .cohorte-card .cohorte-check {
            transform: translateY(-50%) scale(0.5);
        }
}

@media (max-width: 576px) {
    .cohortes-grid {
        grid-template-columns: minmax(200px, 220px);
        max-height: 220px;
    }

    .cohorte-card-wrapper {
        max-width: 220px;
    }

    .cohorte-card {
        padding: 10px 10px 10px 35px;
    }

    .cohorte-codigo {
        font-size: 0.85rem;
    }

    .info-item {
        font-size: 0.7rem;
    }
}

#cohorteContainer {
    min-height: 80px; /* evita el salto */
    transition: all 0.3s ease;
}

/* ================================
   CONTENEDOR FIJO (CLAVE)
================================ */
#mensajeCohorteWrapper {
    min-height: 42px; /* reserva espacio SIEMPRE */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
}

/* ================================
   MENSAJE
================================ */
.mensaje-cohorte {
    opacity: 0;
    transform: translateY(-5px);
    transition: all 0.25s ease;
    pointer-events: none;
    background: linear-gradient(135deg, #fff3cd, #fff9e6);
    border-left: 4px solid #bbd000;
    border-radius: 8px;
    color: #856404;
    font-size: 0.8rem;
    padding: 6px 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

    /* ACTIVO */
    .mensaje-cohorte.activo {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }










/* Ajustes específicos para cada paso */

/* PASO 0 - Participante */
#step0 .step-content {
    padding: 5px 0;
}

/* PASO 1 - Laboral */
#step1 .step-content {
    padding: 5px 0;
}

/* PASO 2 - Ubicación */
#step2 .step-content {
    padding: 5px 0;
}

/* PASO 3 - Cohorte */
#step3 .step-content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
}

#step3 .cohortes-grid {
    width: 100%;
}

/* En pantallas pequeñas */
@media (max-width: 576px) {
    .form-step {
        height: 310px;
    }

    .step-content {
        max-height: none;
    }
}



/**/
.modal-header {
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
    border-bottom: 2px solid transparent;
    border-image: linear-gradient(90deg, #4993cc, #192854);
    border-image-slice: 1;
    padding: 1rem 1.5rem;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 15px;
}

    .modal-header::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: linear-gradient(90deg, #bbd000, #4993cc, #bbd000);
        background-size: 200% 100%;
        animation: gradientMove 3s ease infinite;
    }

@keyframes gradientMove {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.modal-title-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    z-index: 1;
    flex: 1;
    min-width: 0; /* Permite que el texto se contraiga si es necesario */
}

/* Icono animado - más compacto */
.modal-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #4993cc 0%, #192854 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(73, 147, 204, 0.3);
    animation: iconPulse 2s ease infinite;
    position: relative;
    flex-shrink: 0; /* Evita que el icono se encoja */
}

    .modal-icon::after {
        content: '';
        position: absolute;
        width: 100%;
        height: 100%;
        border-radius: 50%;
        background: inherit;
        opacity: 0.5;
        z-index: -1;
        animation: iconRipple 2s ease infinite;
    }

@keyframes iconPulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

@keyframes iconRipple {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }

    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

/* Contenedor del texto del título */
.modal-title-content {
    display: flex;
    flex-direction: column;
    min-width: 0; /* Permite que el texto se contraiga */
    flex: 1;
}

/* Fila superior del título */
.modal-title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 2px;
}

/* Título con efecto degradado - más compacto */
.modal-title-text {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #333, #4993cc, #192854);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: titleGradient 5s ease infinite;
    letter-spacing: 0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 250px;
}

@keyframes titleGradient {
    0%, 100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

/* Badge - más compacto */
.modal-badge {
    background: linear-gradient(135deg, #4993cc15 0%, #19285415 100%);
    color: #4993cc;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    border: 1px solid #4993cc30;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

    .modal-badge i {
        font-size: 0.6rem;
    }

/* Subtítulo */
.modal-subtitle {
    color: #666;
    font-size: 0.7rem;
    display: block;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 350px;
}

/* ========== BOTÓN DE CERRAR ANIMADO ========== */
.btn-close-custom {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(73, 147, 204, 0.1);
    border: 2px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4993cc;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    text-decoration: none;
    flex-shrink: 0; /* Evita que el botón se encoja */
    margin-left: auto; /* Empuja el botón hacia la derecha */
}

    .btn-close-custom::before {
        content: '';
        position: absolute;
        width: 100%;
        height: 100%;
        background: linear-gradient(135deg, #4993cc 0%, #192854 100%);
        border-radius: 50%;
        transform: scale(0);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: -1;
    }

    .btn-close-custom:hover {
        color: white;
        transform: rotate(90deg) scale(1.1);
        border-color: #4993cc;
        box-shadow: 0 4px 12px rgba(73, 147, 204, 0.4);
    }

        .btn-close-custom:hover::before {
            transform: scale(1);
        }

    .btn-close-custom:active {
        transform: rotate(180deg) scale(0.95);
    }

    .btn-close-custom i {
        transition: all 0.3s ease;
        font-size: 1rem;
    }

    .btn-close-custom:hover i {
        transform: scale(0.9);
    }

    .btn-close-custom::after {
        content: '';
        position: absolute;
        width: 100%;
        height: 100%;
        background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, transparent 70%);
        opacity: 0;
        transition: opacity 0.3s ease;
        pointer-events: none;
    }

    .btn-close-custom:hover::after {
        opacity: 0.3;
        animation: particles 1s ease infinite;
    }

@keyframes particles {
    0%, 100% {
        transform: scale(1);
        opacity: 0.3;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.1;
    }
}

/* Línea decorativa inferior */
.modal-header-decoration {
    position: absolute;
    bottom: 0;
    left: 15%;
    right: 15%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #4993cc, #192854, #4993cc, transparent);
    animation: lineWidth 4s ease infinite;
}

@keyframes lineWidth {
    0%, 100% {
        left: 15%;
        right: 15%;
        opacity: 0.7;
    }

    50% {
        left: 25%;
        right: 25%;
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .modal-header {
        padding: 0.8rem 1rem;
        gap: 10px;
    }

    .modal-title-wrapper {
        gap: 10px;
    }

    .modal-icon {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .modal-title-text {
        font-size: 1rem;
        max-width: 180px;
    }

    .modal-badge {
        padding: 2px 6px;
        font-size: 0.6rem;
    }

    .modal-subtitle {
        font-size: 0.65rem;
        max-width: 250px;
    }

    .btn-close-custom {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .modal-title-text {
        max-width: 140px;
    }

    .modal-badge {
        display: none; /* Ocultar badge en móviles muy pequeños */
    }

    .modal-subtitle {
        max-width: 180px;
    }
}


/**/
/* ========== BOTÓN DE BÚSQUEDA MEJORADO ========== */
.btn-search-step0 {
    background: linear-gradient(25deg, rgba(73, 147, 204, 1) 0%, rgba(25, 40, 84, 1) 100%);
    color: white;
    border: none;
    border-radius: 0 8px 8px 0;
    padding: 0 18px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 32px;
    min-width: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(25, 40, 84, 0.25);
    letter-spacing: 0.3px;
}

    /* Brillo transparente */
    .btn-search-step0::before {
        content: '';
        position: absolute;
        top: 0;
        left: -120%;
        width: 60%;
        height: 100%;
        background: linear-gradient( 120deg, transparent, rgba(255, 255, 255, 0.35), transparent );
        transform: skewX(-20deg);
        transition: left 0.6s ease;
    }

    .btn-search-step0:hover {
        transform: translateY(-1px);
        box-shadow: 0 6px 12px rgba(25, 40, 84, 0.35);
    }

        .btn-search-step0:hover::before {
            left: 140%;
        }

    .btn-search-step0:active {
        transform: translateY(1px);
        box-shadow: 0 2px 4px rgba(25, 40, 84, 0.2);
    }

    .btn-search-step0:disabled {
        opacity: 0.5;
        cursor: not-allowed;
        pointer-events: none;
        filter: grayscale(0.5);
    }

    .btn-search-step0 i {
        font-size: 0.85rem;
        transition: transform 0.2s ease;
    }

    .btn-search-step0:hover i {
        transform: scale(1.1);
    }

    /* Estado de carga */
    .btn-search-step0.loading {
        pointer-events: none;
        opacity: 0.8;
    }

        .btn-search-step0.loading i {
            animation: spin 1s linear infinite;
        }

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Versión compacta para móviles */
@media (max-width: 576px) {
    .btn-search-step0 {
        min-width: 50px;
        padding: 0 12px;
    }

        .btn-search-step0 span {
            display: none; /* Ocultar texto en móviles */
        }

        .btn-search-step0 i {
            font-size: 1rem;
        }
}

/*MODAL DE REGISTRO*/
/* Asegurar que el modal esté por encima de todo */
.modal {
    z-index: 1050;
}

.modal-backdrop {
    z-index: 1040;
}

/* Estilos para el formulario dentro del modal */
#formRegistroRapido .form-label {
    font-weight: 500;
    font-size: 0.8rem;
    color: #555;
    margin-bottom: 2px;
}

#formRegistroRapido .form-control {
    border: 1.5px solid #e0e0e0;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 0.85rem;
    height: 38px;
}

    #formRegistroRapido .form-control:focus {
        border-color: #4993cc;
        box-shadow: 0 0 0 2px rgba(73, 147, 204, 0.1);
    }

    #formRegistroRapido .form-control[readonly] {
        background-color: #f8f9fa;
        cursor: not-allowed;
    }
#btnConfirmar:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    filter: grayscale(0.2);
}





/*ESTILOS COHORTES SELECCIONADAS*/

/* Estado seleccionado */
.cohorte-card.selected {
    border: 2px solid #198754;
    background: #f0fff4;
    box-shadow: 0 0 0 4px rgba(25, 135, 84, 0.15);
    transform: translateY(-2px);
    transition: all 0.25s ease;
}

    /* Mostrar check */
    .cohorte-card.selected .check-circle {
        background: #198754;
        color: #fff;
        transform: scale(1);
    }

    /* Código de cohorte destacado */
    .cohorte-card.selected .cohorte-codigo {
        color: #198754;
        font-weight: 700;
    }

    /* Badge de modalidad */
    .cohorte-card.selected .cohorte-badge {
        background: #198754;
        color: white;
    }

/* Hover cuando NO está seleccionada */
.cohorte-card:not(.selected):hover {
    cursor: pointer;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,.08);
}

.cohorte-card.selected::after {
    content: "SELECCIONADA";
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: #198754;
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 20px;
}

.cohorte-card {
    position: relative;
}


































/* =========================================
   MODAL DE INSCRIPCIÓN - DISEÑO COMPACTO
   ========================================= */

/* Contenedor principal del modal */
.modal-dialog {
    margin: 0.5rem auto;
    max-width: 850px;
}

.modal-content {
    border: none;
    border-radius: 12px;
    overflow: hidden;
}

/* Encabezado */
.modal-header {
    padding: 0.55rem 0.9rem;
    min-height: auto;
}

.modal-title {
    margin: 0;
    font-size: 1rem;
    line-height: 1.2;
}

.modal-title-text {
    font-size: 1rem;
    line-height: 1.2;
}

.modal-subtitle {
    margin-top: 2px;
    font-size: 0.68rem;
    line-height: 1.2;
}

.modal-icon {
    width: 32px;
    height: 32px;
    font-size: 0.95rem;
    flex-shrink: 0;
}

/* Cuerpo del modal */
.modal-body {
    padding: 0.5rem 0.75rem;
}

/* Información del curso */
.course-info-card {
    padding: 6px 10px;
    margin-bottom: 6px;
    border-radius: 8px;
}

.course-icon {
    width: 30px;
    height: 30px;
    font-size: 15px;
    flex-shrink: 0;
}

.course-info-card h5,
.course-info-card h6 {
    margin-bottom: 2px;
    font-size: 0.82rem;
}

.course-info-card p {
    margin-bottom: 2px;
    font-size: 0.72rem;
    line-height: 1.3;
}

/* Indicador de progreso */
.progress-container {
    padding: 6px 8px;
    margin-bottom: 5px;
}

.progress-steps {
    margin-bottom: 4px;
    gap: 4px;
}

.step-circle {
    width: 24px;
    height: 24px;
    font-size: 10px;
}

.step-label {
    margin-top: 3px;
    font-size: 0.62rem;
    line-height: 1.1;
}

.progress-bar,
.progress-line {
    height: 3px;
}

/* Contenedor de cada paso */
.form-step {
    display: none;
    flex-direction: column;
    position: relative;
    width: 100%;
    height: 280px;
    min-height: 0;
    box-sizing: border-box;
    overflow: hidden;
}

    .form-step.active {
        display: flex !important;
    }

/* Título de cada paso */
.step-header {
    height: 28px;
    min-height: 28px;
    padding-bottom: 3px;
    margin-bottom: 5px;
    flex-shrink: 0;
}

.step-title {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.2;
}

/* Área interna del formulario */
.step-content-wrapper {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.step-content {
    flex: 1 1 auto;
    min-height: 0;
    max-height: 210px;
    width: 100%;
    box-sizing: border-box;
    padding: 0 4px 0 0;
    margin: 0 0 3px;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Pie de cada paso */
.step-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    height: 38px;
    min-height: 38px;
    padding-top: 5px;
    margin-top: auto;
    border-top: 1px solid #e5e7eb;
    background: #fff;
    flex-shrink: 0;
}

    /* Contenedor de botones */
    .step-footer > .d-flex {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        gap: 10px;
    }

    /* Evitar que los botones se deformen */
    .step-footer .btn-uniform {
        flex-shrink: 0;
    }

/* Campos del formulario */
.form-group,
.form-group-modern {
    margin-bottom: 0.35rem;
}

    .form-label,
    .form-group-modern label {
        display: block;
        margin-bottom: 2px;
        font-size: 0.68rem;
        line-height: 1.2;
        font-weight: 600;
    }

.form-control,
.form-select,
.form-control-sm,
.form-select-sm,
#cuiInput {
    min-height: 28px;
    height: 30px;
    padding: 4px 8px;
    font-size: 0.76rem;
    line-height: 1.2;
    border-radius: 5px;
}

textarea.form-control {
    height: auto;
    min-height: 60px;
    resize: vertical;
}

.form-text,
.invalid-feedback,
.valid-feedback {
    margin-top: 2px;
    font-size: 0.66rem;
    line-height: 1.2;
}

/* Botones */
.btn,
.btn-uniform {
    min-height: 30px;
    padding: 5px 12px;
    font-size: 0.75rem;
    line-height: 1.2;
    border-radius: 5px;
}

.btn-uniform {
    height: 30px;
    min-width: 85px;
}

/* Tarjetas de selección de cohorte */
.cohorte-card {
    padding: 8px 10px;
    margin-bottom: 6px;
    border-radius: 7px;
}

    .cohorte-card h5,
    .cohorte-card h6 {
        margin-bottom: 3px;
        font-size: 0.8rem;
    }

    .cohorte-card p {
        margin-bottom: 3px;
        font-size: 0.7rem;
        line-height: 1.3;
    }

.cohorte-grid {
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
}

/* Filas y columnas: reducir separación vertical */
.row {
    --bs-gutter-y: 0.45rem;
}

    .row > * {
        min-width: 0;
    }

/* Iconos dentro de los campos */
.input-group-text {
    padding: 4px 8px;
    font-size: 0.75rem;
}

/* Alertas y mensajes */
.alert {
    padding: 6px 10px;
    margin-bottom: 6px;
    font-size: 0.73rem;
    line-height: 1.3;
}

small,
.small {
    font-size: 0.68rem;
}

/* Evitar que el contenido se salga del modal */
.modal-body *,
.step-content * {
    box-sizing: border-box;
}

.step-content img {
    max-width: 100%;
    height: auto;
}

/* =========================================
   TABLET Y MÓVIL
   ========================================= */

@media (max-width: 768px) {
    .modal-dialog {
        margin: 0.4rem;
        max-width: none;
    }

    .modal-header {
        padding: 0.5rem 0.65rem;
    }

    .modal-body {
        padding: 0.45rem 0.6rem;
    }

    .course-info-card {
        padding: 6px 8px;
    }

    .progress-container {
        padding: 5px 4px;
    }

    .step-label {
        font-size: 0.58rem;
    }

    .form-step {
        height: 290px;
    }

    .step-content {
        max-height: 220px;
    }

    .cohorte-grid {
        max-height: 180px;
    }
}

/* =========================================
   MÓVILES PEQUEÑOS
   ========================================= */

@media (max-width: 576px) {
    .modal-dialog {
        margin: 0.3rem;
    }

    .modal-header {
        padding: 0.45rem 0.55rem;
    }

    .modal-title,
    .modal-title-text {
        font-size: 0.9rem;
    }

    .modal-subtitle {
        font-size: 0.62rem;
    }

    .modal-body {
        padding: 0.4rem 0.5rem;
    }

    .course-info-card {
        padding: 5px 7px;
        margin-bottom: 5px;
    }

    .progress-container {
        padding: 4px 2px;
        margin-bottom: 4px;
    }

    .step-circle {
        width: 22px;
        height: 22px;
        font-size: 9px;
    }

    .step-label {
        font-size: 0.54rem;
    }

    .form-step {
        height: 300px;
    }

    .step-header {
        height: 27px;
        min-height: 27px;
        margin-bottom: 4px;
    }

    .step-content {
        max-height: 230px;
        padding-right: 3px;
    }

    .step-footer {
        height: 36px;
        min-height: 36px;
        padding-top: 4px;
    }

    .form-group,
    .form-group-modern {
        margin-bottom: 0.3rem;
    }

        .form-label,
        .form-group-modern label {
            font-size: 0.65rem;
        }

    .form-control,
    .form-select,
    .form-control-sm,
    .form-select-sm,
    #cuiInput {
        height: 29px;
        min-height: 29px;
        padding: 3px 7px;
        font-size: 0.74rem;
    }

    .btn,
    .btn-uniform {
        min-height: 29px;
        height: 29px;
        padding: 4px 9px;
        font-size: 0.7rem;
    }

    .cohorte-grid {
        max-height: 170px;
    }
}
