﻿/* =========================================
   IMPORTACIÓN DE FUENTES SF PRO
   ========================================= */
@font-face {
    font-family: 'SF Pro Display';
    src: url('../../fonts/SF-Pro-Display-Light.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'SF Pro Display';
    src: url('../../fonts/SF-Pro-Display-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'SF Pro Rounded';
    src: url('../../fonts/SF-Pro-Rounded-Semibold.otf') format('opentype');
    font-weight: 600;
    font-style: normal;
}

/* =========================================
   VARIABLES Y RESET
   ========================================= */
:root {
    --itson-blue-light: #006BD5;
    --itson-blue-dark: #014A94;
    --itson-gray-bg: #F5F6F8;
    --itson-gray-border: #D0D1D3;
}

html {
    scroll-behavior: smooth;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Tipografía base (Light para textos generales) */
body {
    font-family: 'SF Pro Display', Arial, sans-serif;
    font-weight: 300;
    color: #333;
    line-height: 1.6;
    background-color: #fff;
}

/* Párrafos, spans, textos auxiliares */
p, span, .desc-texto-ajustado, .contacto p, .footer {
    font-family: 'SF Pro Display', Arial, sans-serif;
    font-weight: 300;
    color: #333;
}

/* Títulos principales: Bold real (700) */
h1, h2, h3, h4, .seccion-titulo, .becas h2, .contacto h2 {
    font-family: 'SF Pro Display', Arial, sans-serif !important;
    font-weight: 700 !important;
    color: var(--itson-blue-light);
}

/* =========================================
   HEADER (logotipo + título + botón)
   ========================================= */
.header {
    background: var(--itson-blue-light);
    color: #fff;
    padding: 0.5rem 0;
    min-height: 60px;
}

    .header .container {
        width: 90%;
        margin: auto;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    /* El H1 contiene imagen y texto; en desktop van en línea */
    .header h1 {
        display: flex;
        align-items: center;
        gap: 15px;
        font-weight: 300 !important; /* Light para el texto del logo */
        font-size: 1.2rem;
        color: white;
        margin: 0;
    }

    .header .container img {
        max-height: 55px;
        width: auto;
        object-fit: contain;
    }

/* Botón "Quiero aplicar" con SF Pro Rounded */
.btn-quiero-aplicar {
    font-family: 'SF Pro Rounded', Arial, sans-serif;
    font-weight: 600;
    background-color: #ffffff;
    color: var(--itson-blue-light);
    padding: 8px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

    .btn-quiero-aplicar:hover {
        background-color: #f0f0f0;
        color: var(--itson-blue-dark);
        transform: scale(1.05);
    }

/* =========================================
   ACCESO INICIAR SESIÓN
   ========================================= */

/* Inicio de sesión: esquina superior derecha */
.header {
    position: relative;
}

.btn-iniciar-sesion {
    position: absolute;
    top: 4px;
    right: 18px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 25px;
    z-index: 20;
    transition: all 0.2s ease;
}

    .btn-iniciar-sesion:hover {
        color: #ffffff;
        transform: scale(1.1);
    }


/* ===== RESPONSIVE HEADER (móvil): columna, logo arriba, título centro, botón abajo ===== */
@media (max-width: 768px) {
    .header {
        padding: 15px 0;
    }

        .header .container {
            flex-direction: column;
            gap: 12px;
        }

        .header h1 {
            flex-direction: column;
            text-align: center;
            gap: 8px;
        }

        .header .container img {
            max-height: 50px;
        }

    .btn-quiero-aplicar {
        margin-top: 5px;
    }
    .header-acciones {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
    }
}

/* =========================================
   BANNER / CARRUSEL 
   ========================================= */
.banner {
    margin-top: 0;
    padding-top: 0;
    padding-bottom: 0;
    overflow: hidden;
    background-color: transparent;
}

.carousel, .carousel-inner {
    background-color: transparent;
}
/* Desktop: altura fija y imagen de fondo cubriendo */
.carousel-item {
    height: 300px;
    background-color: transparent;
}

    .carousel-item img {
        width: 100%;
        height: 100%;
        object-fit: cover; 
    }
/* Móvil: imagen completa sin recortes y sin fondo oscuro */
@media (max-width: 768px) {
    .carousel-item {
        height: auto;
        background-color: transparent;
    }

        .carousel-item img {
            height: auto;
            object-fit: contain;
            background-color: transparent;
        }
}

/* =========================================
   DESCRIPCIÓN
   ========================================= */
.descripcion {
    background-color: #ffffff;
    padding: 60px 0;
}



#txtDescripcion {
    font-family: 'SF Pro Display', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 400; 
    font-size: 1rem;
    line-height: 1.7;
    text-align: justify;
    color: #1a1a1a; 
    margin: 0;
}
    #txtDescripcion .resaltado-itson {
        font-weight: 700;
        color: #000000; /* Negro puro */
    }

    #txtDescripcion b, #txtDescripcion strong {
        font-weight: 700;
        color: #000;
    }

/* =========================================
   BECAS DISPONIBLES 
   ========================================= */
.becas {
    padding: 40px 0;
    background: #f9f9f9;
    text-align: center;
}

    .becas h2 {
        font-size: 2rem;
        margin-bottom: 30px;
        color: var(--itson-blue-light);
    }
/* Contenedor de tarjetas: se respeta el .row de Bootstrap */
.contenido.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 ;
    /*margin: 0 -12px;*/
}
/* Cada tarjeta (debe tener clase col-md-4) */

.beca {
    position: relative;
    width: 100%;
    max-width: 320px; 
    height: 220px; 
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
    transition: 0.3s;
    cursor: pointer;
    background-color: #fff;
    margin: 0 auto 20px auto; /* 🔥 centrado */
}
    .beca:hover {
        transform: scale(1.02);
    }

.icono-beca {
    width: 100%;
    height: 100%;
    /*object-fit: cover;*/
    object-fit: cover;
    background-color: #fff;
    display: block;
}

.acciones {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 12px;
    background: rgba(0,0,0,0.6);
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Botones principales */
.acciones .btn {
    width: 80%;
    padding: 8px 12px;
    font-size: 0.85rem;
}

/* Botón aplicar (más chico y discreto) */

.beca:hover .acciones {
    opacity: 1;
}
/* Botones dentro de tarjetas (SF Pro Rounded) */
.acciones .btn,
.btn-tarjeta-beca {
    font-family: 'SF Pro Rounded', Arial, sans-serif !important;
    font-weight: 600 !important;
    border-radius: 50px;
    background: white;
    color: var(--itson-blue-light);
    border: none;
    padding: 8px 12px;
    font-size: 0.85rem;
    width: 85%;
}

    .acciones .btn:hover {
        background: var(--itson-blue-light);
        color: white;
    }

.btn-aplicar {
    width: 55% !important;
    font-size: 0.75rem;
    padding: 6px 10px;
    background: var(--itson-blue-light);
    color: white;
}
#becas {
    scroll-margin-top: 100px;
}


#Convocatorias {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 320px));
    justify-content: center; /* 🔥 esto las centra */
    gap: 20px;
}
.contenedor-beca {
    text-align: center;
}

.titulo-beca {
    background: #f5f7fa;
    padding: 6px 10px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    color: #333;
    display: inline-block;
}

.sin-becas {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    /*padding: 60px 20px;*/
    padding: 90px 20px;
}

.sin-becas-card {
    /* background: #f9fafb;*/
    background: #ffffff;
    padding: 40px 35px;
    /*border: 1px solid #e5e7eb;*/
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    /*border-top: 3px solid rgba(0, 107, 213, 0.6);*/
    border-top: 4px solid var(--itson-blue-light);
    text-align: center;
    max-width: 420px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInCard 0.5s ease forwards;
    position: relative;
    overflow: hidden;
}
    .sin-becas-card::before {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient( to bottom, rgba(0, 107, 213, 0.04), transparent 40% );
        pointer-events: none;
    }


    /* Efecto sutil */
    .sin-becas-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 15px 40px rgba(0,0,0,0.12);
    }

/* Ícono */
/*.sin-becas-icon {
    width: 80px;
    margin-bottom: 20px;
    opacity: 0.85;
}*/

.sin-becas-icon {
    font-size: 50px;
    width: 70px;
    color: var(--itson-blue-light);
    margin-bottom: 15px;
    opacity: 0.8;
    filter: none;
}

/* Título */
.sin-becas-card h3 {
    font-family: 'SF Pro Display', Arial, sans-serif;
    font-weight: 600;
    /*font-size: 1.6rem;*/
    font-size: 1.8rem;
    /*color: var(--itson-blue-dark);*/
    color: var(--itson-blue-light); /* más coherente con el resto */
    /*margin-bottom: 10px;*/
    margin-bottom: 8px;
}

/* Texto */
.sin-becas-card p {
    font-family: 'SF Pro Display', Arial, sans-serif;
    font-weight: 300;
    font-size: 0.95rem;
    color: #64748b;
    line-height: 1.5;
    margin: 0;
    margin-top: 5px;
}



.estadisticas {
    background: #f5f6f8;
    /*padding: 80px 20px;*/
    padding: 40px 20px;
    font-family: 'SF Pro Display', Arial, sans-serif;
}

/* Contenedor */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1100px;
    margin: 0 auto;
}

/* Tarjeta */
.stat {
    background: #fff;
    border-radius: 20px;
    /*padding: 40px 25px;*/
    padding: 45px 30px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    transition: all 0.25s ease;
    min-height: 320px; /* $*/
    display: flex;
    flex-direction: column;
    justify-content: center;
}

    /* Hover elegante */
    .stat:hover {
        transform: translateY(-8px);
        box-shadow: 0 15px 35px rgba(0,0,0,0.12);
    }

    /* Texto superior */
    .stat span {
        display: block;
        font-size: 1.1rem;
        color: var(--itson-blue-dark);
        
        margin-bottom: 10px;
    }

    /* NÚMERO GRANDE (protagonista) */
   /* .stat h3 {
        font-size: clamp(3.5rem, 6vw, 5rem);
        font-weight: 800;
        color: #1565C0;
        margin: 10px 0;
        letter-spacing: 1px;
    }*/
    .stat h3 {
        /*font-size: clamp(1.8rem, 5vw, 5rem);*/
        /*font-size: clamp(1.7rem, 4vw, 4.5rem);*/
        font-weight: 800;
        color: #1565C0;
        margin: 10px 0;
        letter-spacing: 1px;
        line-height: 1.1;
        word-break: break-word;
        overflow-wrap: break-word;
        font-size:40px;
    }


    /* Descripción */
    .stat p {
        font-size: 1rem;
        color: #555;
        margin-top: 10px;
        line-height: 1.5;
    }



.contacto-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.contacto h3 {
    font-family: 'SF Pro Display', Arial, sans-serif;
    font-weight: 700;
    color: #fff;
}

.contacto p {
    font-family: 'SF Pro Display', Arial, sans-serif;
    font-weight: 300;
    color: #f0f0f0;
    line-height: 1.5;
}



/* Diálogo centrado vertical y horizontalmente */
.modal-dialog.modal-lg {
    display: flex;
    align-items: center;
    min-height: calc(100% - 2rem);
    margin: 1rem auto;
}



@media (min-width: 992px) {
    .modal-lg {
        max-width: 650px;
    }
}
/* Contenido del modal */
.modal-content.info-modal-content {
    border: none;
    border-radius: 32px;
    /* padding: 2rem 2rem 1.5rem;*/
    padding: 1.5rem 1.5rem 1.2rem;
    background: #fff;
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
}
/* Botón cerrar (X) bien visible */
.info-modal-close {
    position: absolute;
    top: 1rem;
    right: 1.2rem;
    background: transparent;
    border: none;
    font-size: 1.6rem;
    line-height: 1;
    opacity: 0.5;
    transition: opacity 0.2s;
    z-index: 10;
}

    .info-modal-close:hover {
        opacity: 1;
    }
/* Título de la beca */
#tituloConvocatoria {
    font-family: 'SF Pro Display', Arial, sans-serif;
    font-weight: 700;
    /*font-size: 1.8rem;*/
    font-size: 1.5rem;
    color: var(--itson-blue-light);
    text-align: center;
    margin: 0 0 2rem 0;
    padding-right: 1.5rem; /* Para que no choque con la X */
}
/* Cada fila (Fechas, Beneficiados, Beneficios) */
.info-row {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    /* margin-bottom: 2rem;*/
    margin-bottom: 1.2rem;
    flex-wrap: wrap;
}
/* Ícono */
.info-icon-col {
    flex-shrink: 0;
    width: 48px;
    text-align: center;
}

    .info-icon-col i {
        /* font-size: 1.8rem;*/
        font-size: 1.4rem;
        color: var(--itson-blue-light);
    }
/* Etiqueta (Fechas, Beneficiados, Beneficios) */
.info-label-col {
    flex-shrink: 0;
    width: 110px;
    font-family: 'SF Pro Display', Arial, sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: #1a1a1a;
    line-height: 1.4;
}
/* Contenedor del contenido (texto, badges) */
.info-row .col {
    flex: 1;
    font-family: 'SF Pro Display', Arial, sans-serif;
    font-weight: 300;
    /*font-size: 0.95rem;*/
    font-size: 0.9rem;
    line-height: 1.5;
    color: #333;
}
/* Texto justificado para la descripción de beneficios */
#terceraSeccion {
    text-align: justify;
}
/* Badges (beneficiados) */
#listaSeccion {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
}

 .cerrar-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #333;
}

.badge {
    font-family: 'SF Pro Rounded', Arial, sans-serif;
    font-weight: 600;
    background-color: var(--itson-blue-light);
    color: white;
    border-radius: 40px;
    /*padding: 5px 14px;
    font-size: 0.8rem;*/
    padding: 4px 12px;
    font-size: 0.75rem;
    display: inline-block;
}

/* =========================================
   PORTAL INSTITUCIONAL
   ========================================= */

.portal-institucional {
    background: #f5f6f8;
    padding: 30px 20px 50px;
}

.portal-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 50px;
    flex-wrap: wrap;
}

/* Imagen izquierda */
.portal-descubre {
    max-width: 420px;
    width: 100%;
    height: auto;
    display: block;
}

/* Contenedor botón */
.portal-boton-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Link botón */
.portal-btn-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s ease;
    text-decoration: none;
}

    .portal-btn-link:hover {
        transform: translateY(-3px) scale(1.02);
    }

/* Imagen botón */
.portal-btn-img {
    max-width: 320px;
    width: 100%;
    height: auto;
    display: block;
}

/* Flecha */
.portal-arrow {
    position: absolute;
    right: 28px;
    width: 28px;
    height: auto;
}

/* =========================================
   RESPONSIVE
   ========================================= */

@media (max-width: 768px) {

    .portal-container {
        flex-direction: column;
        gap: 25px;
        text-align: center;
    }

    .portal-descubre {
        max-width: 320px;
    }

    .portal-btn-img {
        max-width: 280px;
    }

    .portal-arrow {
        right: 24px;
        width: 24px;
    }
}

/* Ajuste para pantallas pequeñas */
@media (max-width: 768px) {
    .info-row {
        flex-direction: column;
        gap: 0.5rem;
    }

    .info-icon-col, .info-label-col {
        width: auto;
    }

    .modal-content.info-modal-content {
        padding: 1.5rem;
    }

    #tituloConvocatoria {
        font-size: 1.4rem;
    }
}

/* =========================================
   LOADER (Potro)
   ========================================= */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

    #loader img {
        max-width: 150px;
    }

    #loader .text {
        margin-top: 15px;
        font-family: 'SF Pro Display', Arial, sans-serif;
        font-weight: 300;
        color: var(--itson-blue-light);
    }

/* =========================================
   FOOTER
   ========================================= */


.contacto {
    background: var(--itson-blue-light);
    color: white;
    padding: 60px 20px;
    padding: 15px;
    font-family: 'SF Pro Display', Arial, sans-serif; 
}

    .contacto h2 {
        text-align: left;
        font-size: 2rem;
        margin-bottom: 40px;
        font-weight: 600;
        color: #fff;
    }

.contacto-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
}

    .contacto-grid h3 {
        font-size: 1.1rem;
        font-weight: 700;
        margin-bottom: 10px;


    }

    .contacto-grid p {
        font-size: 0.9rem;
        line-height: 1.5;
        margin: 0;
    }

@keyframes fadeInCard {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

