/* ============================================================
   HOME.CSS
   Página de inicio USAM
============================================================ */


/* ============================================================
   COMPONENTES UTILIZADOS POR HOME
============================================================ */

@import url('../components/orgullo-carousel.css?v=1.2.0.0');
@import url('../components/comunidad.css?v=1.2.0.17');
@import url('../components/investigacion-vinculacion.css?v=1.2.0.0');


/* ============================================================
   1. CARDS PRINCIPALES
============================================================ */

.usam-cards-section {
    background:
        linear-gradient(
            to bottom,
            #e6f4fa 0%,
            #e6f4fa 65%,
            transparent 65%,
            transparent 100%
        );

    padding: 50px 0;

    margin-top: -49px;
}


.usam-cards-grid {
    width: 92%;
    max-width: 1280px;

    margin: 0 auto;

    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 18px;
}


/* ============================================================
   1.1 TARJETA
============================================================ */

.usam-card {
    display: flex;
    flex-direction: column;

    overflow: hidden;

    background: #ffffff;

    border-radius: 16px;

    box-shadow:
        0 4px 12px
        rgba(0, 0, 0, .12);

    transition:
        transform var(--motion-base) var(--ease-soft),
        box-shadow var(--motion-base) var(--ease-soft);
}


.usam-card:hover {
    transform:
        translateY(-4px);

    box-shadow:
        0 10px 24px
        rgba(0, 0, 0, .16);
}


/* ============================================================
   1.2 IMAGEN
============================================================ */

.usam-card-img {
    position: relative;

    width: 100%;
    height: 250px;

    overflow: hidden;

    border-radius:
        15px
        15px
        0
        0;
}


.usam-card-img img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    transition:
        transform var(--motion-slow) var(--ease-soft);
}


.usam-card:hover .usam-card-img img {
    transform:
        scale(1.025);
}


/* ============================================================
   1.3 BANDA DE TÍTULO
============================================================ */

.usam-card-title {
    position: absolute;

    left: 0;
    bottom: 7px;

    width: 100%;

    padding: 12px 18px;

    background:
        rgba(8, 26, 64, .88);

    color: #ffffff;

    font-size: 16px;
    font-weight: 600;

    letter-spacing: .5px;
}

/* ============================================================
   1.4 CUERPO DE LA TARJETA
   ============================================================ */

.usam-card-body {
    flex: 1;

    display: flex;
    flex-direction: column;
    align-items: flex-start;

    padding:
        0
        16px
        22px;

    background: #134582;
    color: #ffffff;
}

/* ============================================================
   1.4.1 TÍTULO

   Se reserva espacio equivalente a dos líneas para que
   los textos comiencen aproximadamente a la misma altura.
   ============================================================ */

.usam-card-body h3,
.usam-card-body h4 {
    width: 93%;
    min-height: 2.4em;
    display: flex;
    align-items: center;
    margin:
        14px
        0
        0
        9px;

    font-size: 17px;
    font-weight: 600;
    line-height: 1.2;
}


/* ============================================================
   1.4.2 DESCRIPCIÓN
   ============================================================ */

.usam-card-body p {
    width: 100%;

    margin:
        0
        0
        18px;

    font-size: 13px;
    padding: 8px;
    opacity: .92;
}

/* Cuando las 4 tarjetas empiezan a quedar estrechas */
@media (max-width: 1250px) {

    .usam-card-body p {
        text-align: left;
    }

}


/* ============================================================
   1.5 BOTÓN

   margin-top:auto garantiza que todos los botones queden
   alineados en la parte inferior aunque cambie la cantidad
   de texto de cada tarjeta.
   ============================================================ */

.usam-btn {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    align-self: flex-start;

    margin-top: auto;

    min-height: 38px;

    padding:
        8px
        18px;

    background: #ffffff;
    color: #134582;

    border-radius: 20px;

    font-size: 14px;
    font-weight: 600;
    line-height: 1;

    text-decoration: none;
}


/* ============================================================
   HOVER
   ============================================================ */

.usam-btn:hover {

    background:
        #0c2c60;

    color:
        #ffffff;

    transform:
        translateY(
            -1px
        );
}

/* ============================================================
   2. EDUCACIÓN
============================================================ */

.edu-section {
    padding: 0;
}


/* ============================================================
   2.1 TÍTULO Y DESCRIPCIÓN
============================================================ */

.edu-title {
    margin-bottom: 10px;

    text-align: center;

    color: #9b242d;

    font-size: 40px;
    font-weight: 700;
}


.edu-description {
    width: 90%;
    max-width: 850px;

    margin:
        0
        auto
        40px;

    text-align: center;

    color: #444444;

    font-size: 14px;

    line-height: 1.5;
}


/* ============================================================
   2.2 GRID
============================================================ */

.edu-grid {
    width: 90%;
    max-width: 1200px;

    margin: 0 auto;

    display: flex;

    align-items: stretch;
}


/* ============================================================
   2.3 IMAGEN IZQUIERDA
============================================================ */

.edu-left {
    flex: 1;

    overflow: hidden;
}


.edu-left img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    transition:
        transform 900ms var(--ease-soft);
}


.edu-grid:hover .edu-left img {
    transform:
        scale(1.015);
}


/* ============================================================
   2.4 COLUMNA DERECHA
============================================================ */

.edu-right {
    flex: 1;

    display: flex;
    flex-direction: column;

    gap: 10px;
}


/* ============================================================
   2.5 ITEMS
============================================================ */

.edu-item {
    position: relative;

    padding: 7px 19px;

    transition:
        background-color var(--motion-base) var(--ease-soft),
        transform var(--motion-base) var(--ease-soft),
        box-shadow var(--motion-base) var(--ease-soft);
}


.edu-item:nth-child(odd) {
    background: #efefef;
}


.edu-item:nth-child(even) {
    background: #ffffff;
}


.edu-item:hover {
    transform:
        translateX(4px);

    box-shadow:
        -4px
        0
        0
        rgba(155, 36, 45, .10);
}


/* ============================================================
   2.6 TÍTULOS
============================================================ */

.edu-item h3 {
    display: flex;
    align-items: center;

    gap: 8px;

    margin:
        0
        0
        10px;

    color: #9b242d;

    font-size: 19px;
    font-weight: 700;

    transition:
        color var(--motion-base) var(--ease-soft),
        transform var(--motion-base) var(--ease-soft);
}


.edu-item h3::before {
    content: "›";

    color: #9b242d;

    font-size: 22px;

    transition:
        transform var(--motion-base) var(--ease-soft);
}


.edu-item:hover h3 {
    transform:
        translateX(2px);
}


.edu-item:hover h3::before {
    transform:
        translateX(3px);
}


/* ============================================================
   2.7 TEXTO
============================================================ */

.edu-item p {
    margin-bottom: 9px;

    color: #444444;

    font-size: 14px;

    line-height: 1.45;

    transition:
        color var(--motion-base) var(--ease-soft),
        opacity var(--motion-base) var(--ease-soft);
}


/* ============================================================
   2.8 BOTÓN

   Compatibilidad:
   - Diseño original: button
   - Vista actual: .edu-btn
============================================================ */

.edu-item button,
.edu-btn {
    display: inline-block;

    padding: 6px 18px;

    background: #083c6b;

    color: #ffffff;

    border: 0;
    border-radius: 18px;

    font-family: inherit;
    font-size: 13px;
    font-weight: 400;

    line-height: normal;

    cursor: pointer;

    text-decoration: none;

    transition:
        background-color var(--motion-base) var(--ease-soft),
        transform var(--motion-base) var(--ease-soft),
        box-shadow var(--motion-base) var(--ease-soft);
}


.edu-item button:hover,
.edu-btn:hover {
    background: #052645;

    color: #ffffff;

    transform:
        translateX(2px);

    box-shadow:
        0 4px 10px
        rgba(8, 60, 107, .16);
}


/* ============================================================
   3. EXPERIENCIA USAM
============================================================ */

.exp-section {
    padding: 10px 0 0;

    background: #ffffff;

    text-align: center;
}


/* ============================================================
   3.1 TÍTULO Y DESCRIPCIÓN
============================================================ */

.exp-title {
    margin-bottom: 10px;

    color: #003b71;

    font-size: 38px;
    font-weight: 700;
}


.exp-description {
    width: 90%;
    max-width: 750px;

    margin:
        0
        auto
        40px;

    color: #134581;

    font-size: 15px;

    line-height: 1.5;
}


/* ============================================================
   3.2 GRID
============================================================ */

.exp-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 0;
}


.exp-large {
    grid-column:
        span 2;
}


/* ============================================================
   3.3 ITEM
============================================================ */

.exp-item {
    position: relative;

    height: 422px;

    overflow: hidden;
}


/* ============================================================
   3.4 IMAGEN
============================================================ */

.exp-item img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    transition:
        transform 800ms var(--ease-soft);
}


/* ============================================================
   3.5 OVERLAY
============================================================ */

.exp-overlay {
    position: absolute;

    inset: 0;

    background:
        rgba(0, 25, 68, .55);

    transition:
        background-color var(--motion-slow) var(--ease-soft),
        opacity var(--motion-base) var(--ease-soft);
}


/* ============================================================
   3.6 FRANJA INFERIOR
============================================================ */

.exp-strip {
    position: absolute;

    left: 0;
    bottom: 0;

    width: 100%;
    height: 60px;

    background:
        rgba(8, 69, 131, .22);

    z-index: 2;

    transition:
        background-color var(--motion-slow) var(--ease-soft);
}


/* ============================================================
   3.7 TEXTO
============================================================ */

.exp-text {
    position: absolute;

    left: 20px;
    bottom: 10px;

    color: #ffffff;

    font-size: 18px;
    font-weight: 700;

    line-height: 1.2;

    z-index: 3;

    transition:
        transform var(--motion-base) var(--ease-soft),
        opacity var(--motion-base) var(--ease-soft);
}


/* ============================================================
   3.8 ÍCONO +
============================================================ */

.exp-plus {
    position: absolute;

    right: 20px;
    bottom: 10px;

    color: #ffffff;

    font-size: 28px;
    font-weight: 700;

    line-height: 1;

    z-index: 3;

    transition:
        transform var(--motion-slow) var(--ease-soft),
        opacity var(--motion-base) var(--ease-soft);
}


/* ============================================================
   3.9 HOVER
============================================================ */

.exp-item:hover img {
    transform:
        scale(1.025);
}


.exp-item:hover .exp-overlay {
    background:
        rgba(0, 25, 68, .47);
}


.exp-item:hover .exp-text {
    transform:
        translateX(3px);
}


.exp-item:hover .exp-plus {
    transform:
        rotate(45deg);
}


/* ============================================================
   4. ACCESO GLOBAL
============================================================ */

.acceso-global {
    background: #ffffff;
}


/* ============================================================
   4.1 ENCABEZADO
============================================================ */

.acceso-head {
    padding:
        22px
        20px
        40px;

    text-align: center;
}


.acceso-title {
    margin-bottom: 10px;

    color: #0b4f9c;

    font-size: 38px;
    font-weight: 800;
}


.acceso-desc {
    width: 90%;
    max-width: 920px;

    margin: 0 auto;

    color: #0b4f9c;

    font-size: 13px;

    line-height: 1.55;
}


/* ============================================================
   4.2 BLOQUE GRIS
============================================================ */

.acceso-wrap {
    width: 100%;

    padding:
        40px
        0
        45px;

    background: #eeeeee;
}


/* ============================================================
   4.3 CONTENIDO INTERNO
============================================================ */

.acceso-inner {
    width: 90%;
    max-width: 1200px;

    margin: 0 auto;

    display: grid;

    grid-template-columns:
        1fr
        1.25fr;

    gap: 45px;

    align-items: flex-start;
}


/* ============================================================
   4.4 COLUMNA IZQUIERDA
============================================================ */

.acceso-item {
    margin-bottom: 30px;

    text-align: left;
}


.acceso-tag {
    display: inline-block;

    margin-bottom: 6px;

    padding: 2px 10px;

    background: #b8002d;

    color: #ffffff;

    border-radius: 10px;

    font-size: 10px;
    font-weight: 700;

    transition:
        transform var(--motion-base) var(--ease-soft),
        background-color var(--motion-base) var(--ease-soft);
}


.acceso-item:hover .acceso-tag {
    transform:
        translateX(3px);
}


/*
 * Compatibilidad:
 * El diseño inicial utilizaba h4.
 * La vista semántica puede utilizar h3 sin cambiar apariencia.
 */

.acceso-item h3,
.acceso-item h4 {
    margin:
        0
        0
        3px;

    color: #0b4f9c;

    font-size: 16px;
    font-weight: 700;

    line-height: normal;

    transition:
        transform var(--motion-base) var(--ease-soft);
}


.acceso-item:hover h3,
.acceso-item:hover h4 {
    transform:
        translateX(3px);
}


/* ============================================================
   4.5 LOGOS
============================================================ */

.acceso-right {
    display: grid;

    grid-template-columns:
        repeat(6, minmax(0, 1fr));

    column-gap: 10px;
    row-gap: 8px;

    align-items: center;
}


.acceso-right img {
    width: 100%;

    max-height: 94px;

    object-fit: contain;

    filter:
        grayscale(100%);

    opacity: .85;

    transition:
        filter var(--motion-base) var(--ease-soft),
        opacity var(--motion-base) var(--ease-soft),
        transform var(--motion-base) var(--ease-soft);
}


.acceso-right img:hover {
    filter:
        grayscale(0%);

    opacity: 1;

    transform:
        scale(1.035);
}


/* ============================================================
   5. RESPONSIVE HOME
============================================================ */


/* ============================================================
   5.1 TABLET / LAPTOP PEQUEÑA
   <= 1279px
============================================================ */

@media (max-width: 1279px) {

    .usam-cards-grid,
    .edu-grid,
    .acceso-inner {
        width: 90%;
    }

}


/* ============================================================
   5.2 TABLET
   <= 992px
============================================================ */

@media (max-width: 992px) {

    /* ========================================================
       CARDS
    ======================================================== */

    .usam-cards-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }


    /* ========================================================
       EDUCACIÓN
    ======================================================== */

    .edu-title {
        font-size: 34px;
    }


    .edu-description {
        margin-bottom: 32px;
    }


    /*
     * En tablet mantenemos el concepto visual
     * de dos columnas.
     *
     * Imagen: 45%
     * Contenido: 55%
     */

    .edu-left {
        flex:
            0
            0
            45%;
    }


    .edu-right {
        flex:
            0
            0
            55%;
    }


    /* ========================================================
       EXPERIENCIA
    ======================================================== */

    .exp-title {
        font-size: 34px;
    }


    .exp-description {
        margin-bottom: 32px;

        font-size: 14px;
    }


    .exp-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }


    .exp-large {
        grid-column:
            span 2;
    }


    .exp-item {
        height: 360px;
    }


    /* ========================================================
       ACCESO GLOBAL
    ======================================================== */

    .acceso-inner {
        grid-template-columns:
            .85fr
            1.15fr;

        gap: 30px;
    }


    .acceso-right {
        grid-template-columns:
            repeat(4, minmax(0, 1fr));
    }

}


/* ============================================================
   5.3 MÓVIL GRANDE
   <= 768px
============================================================ */

@media (max-width: 768px) {

    /* ========================================================
       EDUCACIÓN
    ======================================================== */

    .edu-grid {
        flex-direction: column;
    }


    .edu-left,
    .edu-right {
        flex:
            0
            0
            auto;

        width: 100%;
    }


    /*
     * El banner conserva su diseño,
     * pero limita su altura para evitar
     * ocupar una pantalla completa.
     */

    .edu-left {
        height: 340px;
    }


    .edu-left img {
        height: 100%;

        object-fit: cover;
        object-position: center top;
    }


    .edu-right {
        gap: 0;
    }


    .edu-item {
        padding:
            18px
            20px;
    }


    /*
     * En dispositivos táctiles se eliminan
     * desplazamientos que solo tienen sentido
     * con hover.
     */

    .edu-item:hover {
        transform: none;

        box-shadow: none;
    }


    .edu-grid:hover .edu-left img {
        transform: none;
    }

}


/* ============================================================
   5.4 MÓVIL
   <= 600px
============================================================ */

@media (max-width: 600px) {

    /* ========================================================
       CARDS
    ======================================================== */

    .usam-cards-section {
        padding:
            36px
            0;
    }


    .usam-cards-grid {
        width: 88%;

        grid-template-columns: 1fr;

        gap: 22px;
    }


    .usam-card-img {
        height: 210px;
    }


    .usam-card-title {
        font-size: 14px;
    }


    .usam-card-body h3,
    .usam-card-body h4 {
        font-size: 16px;
    }


    .usam-card-body p {
        font-size: 13px;
    }


    /* ========================================================
       EDUCACIÓN
    ======================================================== */

    .edu-title {
        font-size: 30px;
    }


    .edu-description {
        width: 88%;

        margin-bottom: 28px;

        font-size: 13px;
    }


    .edu-grid {
        width: 100%;
    }


    .edu-left {
        height: 320px;
    }


    .edu-item h3 {
        font-size: 17px;
    }


    .edu-item p {
        font-size: 13px;
    }


    /* ========================================================
       EXPERIENCIA
    ======================================================== */

    .exp-title {
        font-size: 30px;
    }


    .exp-description {
        width: 88%;

        margin-bottom: 28px;

        font-size: 13px;
    }


    .exp-grid {
        grid-template-columns: 1fr;
    }


    .exp-large {
        grid-column:
            span 1;
    }


    .exp-item {
        height: 320px;
    }


    .exp-text {
        left: 16px;
        bottom: 11px;

        font-size: 16px;
    }


    .exp-plus {
        right: 16px;
        bottom: 10px;

        font-size: 25px;
    }


    /* ========================================================
       ACCESO GLOBAL
    ======================================================== */

    .acceso-head {
        padding:
            26px
            18px
            32px;
    }


    .acceso-title {
        font-size: 30px;
    }


    .acceso-desc {
        width: 100%;

        font-size: 12px;
    }


    .acceso-wrap {
        padding:
            32px
            0
            36px;
    }


    .acceso-inner {
        width: 88%;

        grid-template-columns: 1fr;

        gap: 28px;
    }


    .acceso-left {
        order: 1;
    }


    .acceso-right {
        order: 2;

        grid-template-columns:
            repeat(3, minmax(0, 1fr));

        gap: 10px;
    }


    .acceso-item {
        margin-bottom: 22px;
    }

}


/* ============================================================
   5.5 MÓVIL MUY PEQUEÑO
   <= 380px
============================================================ */

@media (max-width: 380px) {

    .usam-cards-grid {
        width: 90%;
    }


    .usam-card-img {
        height: 190px;
    }


    .edu-title,
    .exp-title,
    .acceso-title {
        font-size: 27px;
    }


    .edu-left {
        height: 290px;
    }


    .exp-item {
        height: 285px;
    }


    .acceso-right {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}