/* ==========================================================
   MANOSALVA — MARCAS
   ========================================================== */


/* ==========================================================
   BASE
   ========================================================== */

.ms-brands {
    position: relative;

    padding:
        clamp(54px, 6vw, 82px)
        clamp(20px, 4vw, 64px);

    overflow: hidden;

    background: #ffffff;
}


.ms-brands *,
.ms-brands *::before,
.ms-brands *::after {
    box-sizing: border-box;
}


.ms-brands__inner {
    width: min(100%, 1420px);
    margin: 0 auto;
}


/* ==========================================================
   CABECERA
   ========================================================== */

.ms-brands__header {
    max-width: 820px;

    margin:
        0 auto
        clamp(30px, 4vw, 46px);

    text-align: center;
}


.ms-brands__eyebrow {
    margin-bottom: 8px;

    font-size: 13px;
    font-weight: 800;
    line-height: 1.2;

    letter-spacing: 0.12em;
    text-transform: uppercase;

    color: #ed1c2e;
}


.ms-brands__title {
    position: relative;

    width: fit-content;
    max-width: 100%;

    margin: 0 auto 14px;
    padding-bottom: 12px;

    font-size: clamp(30px, 3vw, 44px);
    font-weight: 800;
    line-height: 1.08;

    color: #10234b;
}


.ms-brands__title::after {
    content: "";

    position: absolute;
    left: 50%;
    bottom: 0;

    width: 70px;
    height: 4px;

    border-radius: 999px;

    background: #ed1c2e;

    transform: translateX(-50%);
}


.ms-brands__description {
    max-width: 720px;

    margin: 0 auto;

    font-size: clamp(15px, 1.1vw, 17px);
    line-height: 1.55;

    color: #5a6575;
}


/* ==========================================================
   GRID BASE
   ========================================================== */

.ms-brands__grid {
    display: grid;

    gap: clamp(14px, 1.5vw, 22px);
}


.ms-brands__item {
    min-width: 0;
}


.ms-brands__item-inner {
    display: flex;

    width: 100%;
    height: 100%;

    text-decoration: none;

    color: inherit;
}


/* ==========================================================
   LOGO
   ========================================================== */

.ms-brands__logo {
    display: flex;
    align-items: center;
    justify-content: center;
}


.ms-brands__logo-image {
    display: block;

    max-width: 100%;
    max-height: 100%;

    object-fit: contain;
}


/* ==========================================================
   VARIANTE: STRIP
   Franja compacta para páginas de servicio
   ========================================================== */

.ms-brands--strip {
    padding-top: clamp(38px, 4vw, 54px);
    padding-bottom: clamp(38px, 4vw, 54px);

    background:
        linear-gradient(
            180deg,
            #ffffff 0%,
            #f8fbfe 100%
        );
}


.ms-brands--strip .ms-brands__header {
    margin-bottom: 28px;
}


.ms-brands--strip .ms-brands__grid {
    grid-template-columns:
        repeat(
            auto-fit,
            minmax(170px, 1fr)
        );
}


.ms-brands--strip .ms-brands__item-inner {
    flex-direction: column;
    align-items: center;
    justify-content: center;

    min-height: 132px;

    padding: 20px 18px;

    text-align: center;

    border:
        1px solid
        rgba(7, 59, 112, 0.08);

    border-radius: 16px;

    background:
        rgba(255, 255, 255, 0.98);

    box-shadow:
        0 10px 28px
        rgba(15, 48, 84, 0.06);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}


.ms-brands--strip
.ms-brands__item.has-link
.ms-brands__item-inner:hover {

    transform: translateY(-3px);

    border-color:
        rgba(7, 83, 154, 0.16);

    box-shadow:
        0 16px 34px
        rgba(15, 48, 84, 0.1);
}


.ms-brands--strip .ms-brands__logo {
    width: 100%;
    height: 70px;
}


.ms-brands--strip .ms-brands__logo-image {
    width: auto;
    max-width: 150px;
    max-height: 62px;
}


.ms-brands--strip .ms-brands__content {
    margin-top: 10px;
}


.ms-brands--strip .ms-brands__name {
    margin: 0;

    font-size: 15px;
    font-weight: 700;
    line-height: 1.25;

    color: #10234b;
}


/*
 * La variante compacta no muestra
 * descripción ni CTA.
 */

.ms-brands--strip
.ms-brands__brand-description,

.ms-brands--strip
.ms-brands__cta {
    display: none;
}


/* ==========================================================
   VARIANTE: FEATURED
   Página principal de marcas
   ========================================================== */

.ms-brands--featured {
    background:
        linear-gradient(
            180deg,
            #f5f9fd 0%,
            #eef5fb 100%
        );
}


.ms-brands--featured .ms-brands__grid {
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
}


.ms-brands--featured .ms-brands__item-inner {
    flex-direction: column;

    overflow: hidden;

    border:
        1px solid
        rgba(7, 59, 112, 0.09);

    border-radius: 20px;

    background: #ffffff;

    box-shadow:
        0 12px 34px
        rgba(15, 48, 84, 0.08);

    transition:
        transform 0.22s ease,
        box-shadow 0.22s ease,
        border-color 0.22s ease;
}


.ms-brands--featured
.ms-brands__item.has-link
.ms-brands__item-inner:hover {

    transform: translateY(-4px);

    border-color:
        rgba(7, 83, 154, 0.18);

    box-shadow:
        0 18px 42px
        rgba(15, 48, 84, 0.12);
}


/* Logo destacado */

.ms-brands--featured .ms-brands__logo {
    width: 100%;
    height: 150px;

    padding: 30px;

    border-bottom:
        1px solid
        rgba(7, 59, 112, 0.07);

    background:
        linear-gradient(
            145deg,
            #ffffff,
            #f5f9fd
        );
}


.ms-brands--featured .ms-brands__logo-image {
    width: auto;

    max-width: 190px;
    max-height: 90px;
}


/* Contenido */

.ms-brands--featured .ms-brands__content {
    display: flex;
    flex-direction: column;

    flex: 1;

    padding: 24px 24px 26px;
}


.ms-brands--featured .ms-brands__name {
    margin: 0 0 10px;

    font-size: clamp(20px, 1.5vw, 24px);
    font-weight: 800;
    line-height: 1.2;

    color: #10234b;
}


.ms-brands--featured
.ms-brands__brand-description {

    margin: 0 0 22px;

    font-size: 14px;
    line-height: 1.55;

    color: #5a6575;
}


.ms-brands--featured .ms-brands__cta {
    display: inline-flex;
    align-items: center;

    gap: 7px;

    width: fit-content;

    margin-top: auto;

    font-size: 14px;
    font-weight: 800;

    color: #ed1c2e;
}


.ms-brands__cta-arrow {
    transition:
        transform 0.2s ease;
}


.ms-brands__item.has-link
.ms-brands__item-inner:hover
.ms-brands__cta-arrow {

    transform: translateX(4px);
}


/* ==========================================================
   TABLET
   ========================================================== */

@media (max-width: 991.98px) {

    .ms-brands--featured .ms-brands__grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}


/* ==========================================================
   MÓVIL
   ========================================================== */

@media (max-width: 767.98px) {

    .ms-brands {
        padding:
            46px
            16px;
    }


    .ms-brands__header {
        margin-bottom: 26px;
    }


    .ms-brands__title {
        font-size:
            clamp(28px, 8vw, 34px);
    }


    /*
     * Strip:
     * mantenemos dos logos por fila.
     */

    .ms-brands--strip .ms-brands__grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 10px;
    }


    .ms-brands--strip
    .ms-brands__item-inner {

        min-height: 112px;

        padding: 16px 10px;
    }


    .ms-brands--strip
    .ms-brands__logo {

        height: 58px;
    }


    .ms-brands--strip
    .ms-brands__logo-image {

        max-width: 120px;
        max-height: 52px;
    }


    .ms-brands--strip
    .ms-brands__name {

        font-size: 13px;
    }


    /*
     * Featured:
     * una tarjeta por fila.
     */

    .ms-brands--featured
    .ms-brands__grid {

        grid-template-columns: 1fr;
    }


    .ms-brands--featured
    .ms-brands__logo {

        height: 130px;
        padding: 24px;
    }


    .ms-brands--featured
    .ms-brands__content {

        padding: 20px;
    }

}