/* ============================================================
   COMPONENTE
   COMUNIDAD USAM
============================================================ */


/* ============================================================
   1. SECCIÓN
============================================================ */

.comunidad-section {
    padding: 20px 0 80px;

    background: #eeeeee;
}


/* ============================================================
   2. TÍTULO Y DESCRIPCIÓN
============================================================ */

.comunidad-title {
    margin-bottom: 10px;

    text-align: center;

    color: #134582;

    font-size: 38px;
    font-weight: 800;
}


.comunidad-description {
    width: 90%;
    max-width: 900px;

    margin:
        0
        auto
        50px;

    text-align: center;

    color: #134582;

    font-size: 14px;

    line-height: 1.5;
}


/* ============================================================
   3. GRID PRINCIPAL
============================================================ */

.comunidad-grid {
    width: 90%;
    max-width: 1200px;

    margin: 0 auto;

    display: grid;

    grid-template-columns:
        1.2fr
        .1fr
        1fr;

    gap: 0;
}


/* ============================================================
   4. DESTACADO
============================================================ */

.comunidad-feature {
    position: relative;

    height: 520px;

    overflow: hidden;
}


/* ============================================================
   4.1 IMAGEN
============================================================ */

.comunidad-feature > img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    transition:
        opacity 500ms var(--ease-smooth),
        transform 700ms var(--ease-smooth);
}


/* ============================================================
   4.2 PANEL DE INFORMACIÓN
============================================================ */

.comunidad-feature-content {
    position: absolute;

    top: 0;
    right: 0;

    width: min(380px, 55%);
    height: 100%;

    padding:82px
        30px
        30px;

    background:
        rgba(3, 25, 73, .77);

    color: #ffffff;

    z-index: 2;

    transition:
        opacity 500ms var(--ease-smooth),
        transform 650ms var(--ease-smooth);
}


.comunidad-feature-content h3 {
    margin:
        0
        0
        10px;

    font-size: 20px;
    font-weight: 700;

    line-height: 1.2;
}


.comunidad-feature-content span {
    display: block;

    margin-bottom: 12px;

    font-size: 14px;

    line-height: 1.4;
}


.comunidad-feature-content p {
    margin-bottom: 22px;

    font-size: 14px;

    line-height: 1.5;
}


/* ============================================================
   4.3 ESTADO DE CAMBIO
============================================================ */

.comunidad-feature.is-changing > img {
    opacity: .18;

    transform:
        scale(1.018);
}


.comunidad-feature.is-changing
.comunidad-feature-content {
    opacity: 0;

    transform:
        translateX(8px);
}


/* ============================================================
   5. ACCIONES
============================================================ */

.feature-actions {
    display: flex;
    align-items: center;

    gap: 18px;
}


.feature-btn {
    display: inline-block;

    padding: 9px 22px;

    background: #9b242d;

    color: #ffffff;

    border-radius: 20px;

    font-weight: 600;

    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);
}


.feature-video {
    display: flex;
    align-items: center;

    gap: 6px;

    color: #ffffff;

    font-weight: 500;

    text-decoration: none;

    transition:
        opacity var(--motion-base) var(--ease-soft),
        transform var(--motion-base) var(--ease-soft);
}


.feature-video i {
    transition:
        transform var(--motion-base) var(--ease-soft);
}


/* ============================================================
   5.1 HOVER
============================================================ */

@media (hover: hover) and (pointer: fine) {

    .feature-btn:hover {
        background: #7f1e26;

        transform:
            translateY(-2px);

        box-shadow:
            0 5px 12px
            rgba(0, 0, 0, .16);
    }


    .feature-video:hover {
        opacity: .82;

        transform:
            translateX(2px);
    }


    .feature-video:hover i {
        transform:
            scale(1.08);
    }

}


/* ============================================================
   6. CONTROLES
============================================================ */

.comunidad-controls {
    display: flex;
    flex-direction: column;
    justify-content: space-between;

    padding: 0 6px;
}


.comunidad-arrow {
    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    background: transparent !important;

    border: 0 !important;

    box-shadow: none !important;

    cursor: pointer;
}


.comunidad-arrow i {
    color: #9b242d;

    font-size: 34px;

    transition:
        color var(--motion-base) var(--ease-soft),
        transform var(--motion-base) var(--ease-soft);
}


@media (hover: hover) and (pointer: fine) {

    .comunidad-arrow:hover i {
        color: #134582;
    }


    .comunidad-arrow.up:hover i {
        transform:
            translateY(-2px);
    }


    .comunidad-arrow.down:hover i {
        transform:
            translateY(2px);
    }

}


/* ============================================================
   7. LISTADO
============================================================ */

.comunidad-list {
    display: flex;
    flex-direction: column;

    gap: 25px;
}


.comunidad-item {
    display: flex;

    gap: 15px;

    padding-bottom: 20px;

    border-bottom:
        1px solid
        #134582;

    min-width: 0;

    transition:
        transform var(--motion-base) var(--ease-soft),
        opacity var(--motion-base) var(--ease-soft);
}


/*
 * Durante una reorganización del listado,
 * los elementos utilizan una transición más larga.
 */

.comunidad-list.is-reordering
.comunidad-item {
    transition:
        transform 650ms var(--ease-smooth),
        opacity 500ms var(--ease-smooth);
}


.comunidad-item img {
    width: 120px;
    height: 90px;

    flex:
        0
        0
        120px;

    object-fit: cover;

    transition:
        transform var(--motion-slow) var(--ease-soft);
}


.item-text {
    min-width: 0;
}


.item-text h4 {
    margin:
        0
        0
        1px;

    color: #134582;

    font-size: 15px;
    font-weight: 700;

    line-height: 1.3;

    transition:
        transform var(--motion-base) var(--ease-soft);
}


.item-text span {
    color: #134582;

    font-size: 13px;
    font-weight: 600;

    line-height: 1.35;
}


.item-text p {
    margin:
        3px
        0;

    font-size: 13px;

    line-height: 1.4;
}


.item-text a {
    color: #9b242d;

    font-size: 13px;
    font-weight: 700;

    text-decoration: none;

    transition:
        color var(--motion-base) var(--ease-soft);
}


@media (hover: hover) and (pointer: fine) {

    .comunidad-item:hover {
        transform:
            translateX(3px);
    }


    .comunidad-item:hover img {
        transform:
            scale(1.025);
    }


    .comunidad-item:hover
    .item-text h4 {
        transform:
            translateX(2px);
    }


    .item-text a:hover {
        color: #134582;
    }

}
/* ============================================================
   8. VER TODAS LAS NOTICIAS
============================================================ */

.comunidad-more {
    width: 90%;
    max-width: 1200px;

    margin:
        42px
        auto
        0;

    display: flex;
    justify-content: center;
}


.comunidad-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 8px;

    padding:
        10px
        24px;

    background: #9b242d;

    color: #ffffff;

    border-radius: 22px;

    font-size: 13px;
    font-weight: 700;

    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);
}


.comunidad-more-btn i {
    font-size: 18px;

    transition:
        transform var(--motion-base) var(--ease-soft);
}


@media (hover: hover) and (pointer: fine) {

    .comunidad-more-btn:hover {
        background: #134582;

        transform:
            translateY(-2px);

        box-shadow:
            0 5px 12px
            rgba(0, 0, 0, .14);
    }


    .comunidad-more-btn:hover i {
        transform:
            translateX(3px);
    }

}

/* ============================================================
   8. TABLET
   601px - 992px
============================================================ */

@media (min-width: 601px) and (max-width: 992px) {

    .comunidad-section {
        padding:
            20px
            0
            60px;
    }


    .comunidad-title {
        font-size: 34px;
    }


    .comunidad-description {
        margin-bottom: 40px;

        font-size: 13px;
    }


    .comunidad-grid {
        width: 88%;

        grid-template-columns: 1fr;
    }


    .comunidad-feature {
        height: 430px;

        overflow: hidden;
    }


    .comunidad-feature > img {
        height: 100%;
    }


    .comunidad-feature-content {
        position: absolute;

        top: 0;
        right: 0;

        width: 48%;
        height: 100%;

        margin: 0;

        padding:
            30px
            30px
            30px;
    }


    .comunidad-feature-content h3 {
        font-size: 22px;
    }


    .comunidad-controls {
        flex-direction: row;

        justify-content: center;

        gap: 35px;

        margin:
            22px
            0
            28px;

        padding: 0;
    }


    .comunidad-arrow.up i,
    .comunidad-arrow.down i {
        transform:
            rotate(-90deg);
    }


    .comunidad-list {
        display: grid;

        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap:
            26px
            30px;
    }


    .comunidad-item {
        align-items: flex-start;
    }


    .comunidad-item img {
        width: 105px;
        height: 82px;

        flex-basis: 105px;
    }

}


/* ============================================================
   9. MÓVIL
   <= 600px
============================================================ */

@media (max-width: 600px) {

    .comunidad-section {
        padding:
            15px
            0
            45px;
    }


    .comunidad-title {
        font-size: 31px;
    }


    .comunidad-description {
        width: 88%;

        margin-bottom: 32px;

        font-size: 13px;
    }


    .comunidad-grid {
        width: 90%;

        grid-template-columns: 1fr;
    }


    .comunidad-feature {
        display: flex;
        flex-direction: column;

        height: auto;

        overflow: hidden;
    }


    .comunidad-feature > img {
        width: 100%;
        height: 280px;

        object-position: center;
    }


    .comunidad-feature-content {
        position: relative;

        top: auto;
        right: auto;

        width: 100%;
        height: auto;

        margin: 0;

        padding:
            24px
            22px;

        background:
            rgba(3, 25, 73, .96);
    }


    .comunidad-feature-content h3 {
        font-size: 21px;
    }


    .comunidad-feature-content span,
    .comunidad-feature-content p {
        font-size: 13px;
    }


    .comunidad-feature.is-changing
    .comunidad-feature-content {
        transform:
            translateY(4px);
    }


    .feature-actions {
        flex-wrap: wrap;

        gap: 12px;
    }


    .feature-btn {
        padding:
            8px
            18px;

        font-size: 13px;
    }


    .feature-video {
        font-size: 13px;
    }


    .comunidad-controls {
        flex-direction: row;

        justify-content: center;

        gap: 34px;

        margin:
            20px
            0
            24px;

        padding: 0;
    }


    .comunidad-arrow.up i,
    .comunidad-arrow.down i {
        transform:
            rotate(-90deg);
    }


    .comunidad-list {
        display: flex;
        flex-direction: column;

        gap: 18px;
    }


    .comunidad-item {
        gap: 12px;

        padding-bottom: 16px;
    }


    .comunidad-item img {
        width: 100px;
        height: 78px;

        flex-basis: 100px;
    }


    .item-text h4 {
        font-size: 14px;
    }


    .item-text span,
    .item-text p,
    .item-text a {
        font-size: 12px;
    }

}


/* ============================================================
   10. MÓVIL MUY PEQUEÑO
   <= 380px
============================================================ */

@media (max-width: 380px) {

    .comunidad-title {
        font-size: 28px;
    }


    .comunidad-feature > img {
        height: 240px;
    }


    .comunidad-feature-content {
        padding:
            20px
            18px;
    }


    .comunidad-item img {
        width: 82px;
        height: 70px;

        flex-basis: 82px;
    }

}