/* =========================================================
   MOTOGRAPHIX V9 — FOOTER ÚNICO RESPONSIVE
   Desktop normal / Mobile acordeón
   ========================================================= */

.mgx-site-footer {
    width: 100%;
    color: #fff;
    background: #000;
    border-top: 1px solid rgba(255,255,255,.07);
}

.mgx-site-footer__inner {
    width: min(94%, 1500px);
    margin: 0 auto;
    padding: 58px 0 42px;

    display: grid;
    grid-template-columns: minmax(270px, 1.7fr) 1fr 1.25fr 1.25fr;
    gap: 38px;
    align-items: start;
}


/* =========================================================
   BRAND
   ========================================================= */

.mgx-site-footer__logo img {
    width: 225px;
    max-width: 100%;
    height: auto;
    display: block;
}

.mgx-site-footer__brand p {
    max-width: 360px;
    margin: 18px 0 0;

    color: rgba(255,255,255,.62);
    font-size: 13px;
    font-weight: 550;
    line-height: 1.65;
}

.mgx-site-footer__social {
    margin-top: 20px;

    display: flex;
    gap: 8px;
}

.mgx-site-footer__social a {
    width: 40px;
    height: 40px;

    display: grid;
    place-items: center;

    color: #fff;
    background: rgba(255,255,255,.045);
    border: 1px solid rgba(255,255,255,.085);
    border-radius: 50%;

    text-decoration: none;
}

.mgx-site-footer__icon {
    width: 19px;
    height: 19px;

    display: block;

    fill: none;
    stroke: currentColor;
}


/* =========================================================
   GROUPS — DESKTOP
   ========================================================= */

.mgx-site-footer__group {
    min-width: 0;
}

.mgx-site-footer__toggle {
    width: 100%;
    margin: 0 0 7px;
    padding: 0;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;

    color: #fff;
    background: transparent;
    border: 0;

    text-align: left;
    font: inherit;

    cursor: default;
}

.mgx-site-footer__toggle > span {
    color: #fff;

    font-size: 11px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: 1.15px;

    text-transform: uppercase;
}

.mgx-site-footer__toggle::after {
    content: "";

    width: 30px;
    height: 2px;
    margin-top: 9px;

    position: absolute;

    display: block;

    background: #e30613;
    border-radius: 999px;
}

/* En escritorio no necesitamos flecha. */
.mgx-site-footer__chevron {
    display: none;
}

.mgx-site-footer__group-body {
    margin-top: 18px;

    display: flex;
    flex-direction: column;
    gap: 11px;
}

.mgx-site-footer__group-body > a {
    width: fit-content;

    color: rgba(255,255,255,.60);

    font-size: 12px;
    font-weight: 600;
    line-height: 1.45;

    text-decoration: none;
}


/* =========================================================
   CONTACTO
   ========================================================= */

.mgx-site-footer__contact .mgx-site-footer__group-body > a {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.mgx-site-footer__contact .mgx-site-footer__group-body > a .mgx-site-footer__icon {
    width: 16px;
    height: 16px;
    margin-top: 1px;
    flex: 0 0 16px;

    color: #e30613;
}


/* =========================================================
   LEGAL
   ========================================================= */

.mgx-site-footer__legal {
    width: min(94%, 1500px);
    margin: 0 auto;
    padding: 20px 0 26px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;

    border-top: 1px solid rgba(255,255,255,.07);

    color: rgba(255,255,255,.42);

    font-size: 9px;
    font-weight: 600;
}

.mgx-site-footer__legal nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
}

.mgx-site-footer__legal a {
    color: rgba(255,255,255,.48);
    text-decoration: none;
}


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

@media (hover:hover) and (pointer:fine) {

    .mgx-site-footer a:hover {
        color: #fff;
    }

    .mgx-site-footer__social a:hover {
        background: #e30613;
        border-color: #e30613;
    }
}


/* =========================================================
   MOBILE / TABLET — ACORDEÓN
   ========================================================= */

@media (max-width: 899px) {

    .mgx-site-footer {
        padding-top: 0;
    }

    .mgx-site-footer__inner {
        width: calc(100% - 24px);
        margin: 0 auto;
        padding: 34px 0 16px;

        display: block;
    }


    /* Marca siempre visible */

    .mgx-site-footer__brand {
        padding: 0 8px 26px;

        text-align: center;
    }

    .mgx-site-footer__logo {
        display: flex;
        justify-content: center;
    }

    .mgx-site-footer__logo img {
        width: min(230px, 72vw);
        margin: 0 auto;
    }

    .mgx-site-footer__brand p {
        max-width: 430px;
        margin: 13px auto 0;

        color: rgba(255,255,255,.58);

        font-size: 11px;
        line-height: 1.55;
    }

    .mgx-site-footer__social {
        margin-top: 16px;
        justify-content: center;
    }

    .mgx-site-footer__social a {
        width: 37px;
        height: 37px;
    }


    /* Cada grupo se convierte en barra desplegable */

    .mgx-site-footer__group {
        margin: 0 0 8px;

        overflow: hidden;

        background:
            linear-gradient(
                145deg,
                rgba(255,255,255,.055),
                rgba(255,255,255,.022)
            );

        border: 1px solid rgba(255,255,255,.085);
        border-radius: 17px;

        box-shadow:
            inset 0 1px 0 rgba(255,255,255,.035);
    }

    .mgx-site-footer__toggle {
        min-height: 58px;
        margin: 0;
        padding: 0 16px;

        cursor: pointer;
    }

    .mgx-site-footer__toggle > span {
        font-size: 11px;
        letter-spacing: .85px;
    }

    .mgx-site-footer__toggle::after {
        display: none;
    }

    .mgx-site-footer__chevron {
        width: 18px;
        height: 18px;

        display: block;

        color: rgba(255,255,255,.56);

        transition: transform .22s ease;
    }

    .mgx-site-footer__toggle[aria-expanded="true"]
    .mgx-site-footer__chevron {
        transform: rotate(180deg);
    }


    /* Cerrado por defecto */

    .mgx-site-footer__group-body {
        max-height: 0;
        margin: 0;
        padding: 0 16px;

        overflow: hidden;

        opacity: 0;

        display: flex;
        gap: 0;

        transition:
            max-height .28s ease,
            opacity .20s ease,
            padding .28s ease;
    }

    .mgx-site-footer__group.is-open
    .mgx-site-footer__group-body {
        max-height: 430px;
        padding: 0 16px 14px;

        opacity: 1;
    }

    .mgx-site-footer__group-body > a {
        width: 100%;
        min-height: 43px;
        padding: 0 2px;

        display: flex;
        align-items: center;

        color: rgba(255,255,255,.68);

        border-top: 1px solid rgba(255,255,255,.055);

        font-size: 11px;
        line-height: 1.35;
    }

    .mgx-site-footer__contact
    .mgx-site-footer__group-body > a {
        min-height: 49px;

        align-items: center;
    }


    /* Legal compacto */

    .mgx-site-footer__legal {
        width: calc(100% - 24px);
        margin: 8px auto 0;

        padding:
            17px 4px
            calc(104px + env(safe-area-inset-bottom));

        flex-direction: column;
        justify-content: center;
        gap: 11px;

        text-align: center;

        font-size: 8px;
    }

    .mgx-site-footer__legal nav {
        justify-content: center;
        gap: 7px 12px;
    }
}


/* =========================================================
   VERY SMALL MOBILE
   ========================================================= */

@media (max-width: 390px) {

    .mgx-site-footer__inner {
        width: calc(100% - 18px);
    }

    .mgx-site-footer__toggle {
        min-height: 55px;
        padding-left: 14px;
        padding-right: 14px;
    }

    .mgx-site-footer__group-body {
        padding-left: 14px;
        padding-right: 14px;
    }

    .mgx-site-footer__group.is-open
    .mgx-site-footer__group-body {
        padding-left: 14px;
        padding-right: 14px;
    }
}


/* Sin animaciones si el usuario lo solicita */

@media (prefers-reduced-motion: reduce) {

    .mgx-site-footer__chevron,
    .mgx-site-footer__group-body {
        transition: none !important;
    }
}
