/* =========================================================
   MOTOGRAPHIX V9
   HERO FIJO — MÓVIL / TABLET VERTICAL
   Imagen independiente: hero-mobile.webp

   - Textos centrados.
   - CTA fijo dentro del hero, justo encima del dock.
   - Botón en Montserrat 900.
   ========================================================= */

@media (max-width: 899px) {

    .mgx-home-hero-shell {
        width: 100%;
        overflow: hidden;
        background: #000;
    }

    .hero {
        position: relative;
        width: 100%;

        /*
         * El hero usa el viewport dinámico real.
         * Así el CTA y el dock comparten la misma referencia
         * vertical en iPhone, Android y navegadores con barras
         * que aparecen/desaparecen.
         */
        height: 100dvh;
        min-height: 620px;
        max-height: none;

        /*
         * Geometría del dock.
         * El dock real usa:
         * bottom: max(12px, env(safe-area-inset-bottom))
         * min-height: 70px
         */
        --mgx-dock-bottom:
            max(12px, env(safe-area-inset-bottom));
        --mgx-dock-height: 70px;
        --mgx-hero-cta-gap: 14px;

        overflow: hidden;
        isolation: isolate;
        background: #000;
    }

    /* =====================================================
       IMAGEN MÓVIL INDEPENDIENTE
       ===================================================== */

    .mgx-hero-picture,
    .mgx-hero-image {
        position: absolute;
        inset: 0;
        display: block;
        width: 100%;
        height: 100%;
    }

    .mgx-hero-picture {
        z-index: 0;
        overflow: hidden;
        background: #000;
    }

    .mgx-hero-image {
        object-fit: cover;
        object-position:
            var(--mgx-hero-position-mobile, center center);
        transform: none;
        transform-origin: center center;
    }

    /* =====================================================
       OVERLAY MÓVIL
       Más uniforme arriba para que el bloque centrado
       siempre tenga buen contraste.
       ===================================================== */

    .mgx-hero-image-overlay {
        position: absolute;
        z-index: 2;
        inset: 0;
        pointer-events: none;

        background:
            linear-gradient(
                180deg,
                rgba(0,0,0,.78) 0%,
                rgba(0,0,0,.60) 13%,
                rgba(0,0,0,.38) 27%,
                rgba(0,0,0,.16) 42%,
                rgba(0,0,0,.04) 56%,
                rgba(0,0,0,0) 64%
            ),
            linear-gradient(
                180deg,
                rgba(0,0,0,0) 53%,
                rgba(0,0,0,.06) 64%,
                rgba(0,0,0,.18) 73%,
                rgba(0,0,0,.46) 84%,
                rgba(0,0,0,.82) 94%,
                #000 100%
            );
    }

    /* =====================================================
       CONTENIDO MÓVIL
       El contenedor ocupa todo el hero para que podamos
       centrar textos y fijar el CTA independientemente.
       ===================================================== */

    .mgx-hero-content {
        position: absolute;
        z-index: 5;
        inset: 0;

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

        color: #fff;
        text-align: center;

        pointer-events: none;
    }

    .mgx-hero-copy {
        position: absolute;
        top: 102px;
        left: 50%;

        width: calc(100% - 44px);
        max-width: 350px;

        transform: translateX(-50%);
        text-align: center;

        pointer-events: auto;
    }

        /* =====================================================
       STICKERS PARA MOTOS
       ===================================================== */

    .mgx-hero-heading {
        width: 100%;
        margin: 0;
        text-align: center;
    }

    .mgx-hero-main-title {
        display: flex;
        flex-direction: column;
        align-items: center;

        width: 100%;
        margin: 0;

        text-align: center;

        text-shadow:
            0 2px 2px rgba(0,0,0,.98),
            0 5px 14px rgba(0,0,0,.92),
            0 10px 24px rgba(0,0,0,.58);

        -webkit-text-stroke: .55px rgba(0,0,0,.86);
        paint-order: stroke fill;
    }

    .mgx-hero-main-title > span {
        display: block;
        width: max-content;
        max-width: 100%;

        margin-left: auto;
        margin-right: auto;

        font-size: clamp(47px, 13vw, 66px);
        line-height: .82;
        letter-spacing: 0;
        white-space: nowrap;
        text-align: center;
    }

    .mgx-hero-main-title > span + span {
        margin-top: 5px;
    }

    /* =====================================================
       CATEGORÍA — CINTA ROJA CENTRADA
       ===================================================== */

    .mgx-hero-category {
        position: relative;

        display: inline-flex;
        align-items: center;
        justify-content: center;

        width: max-content;
        max-width: calc(100vw - 64px);

        margin:
            20px
            auto
            0;

        padding: 8px 18px;

        color: #fff;

        font-family:
            "Bebas Neue",
            "Arial Narrow",
            Impact,
            sans-serif;

        font-size: clamp(22px, 6vw, 29px);
        font-weight: 400;
        line-height: 1;
        letter-spacing: .7px;
        text-transform: uppercase;
        white-space: nowrap;

        text-align: center;

        text-shadow:
            0 2px 2px rgba(0,0,0,.92),
            0 4px 9px rgba(0,0,0,.68);

        -webkit-text-stroke: .35px rgba(0,0,0,.76);
        paint-order: stroke fill;
        isolation: isolate;
    }

    .mgx-hero-category::before {
        content: "";
        position: absolute;
        z-index: -1;

        top: 0;
        right: -8px;
        bottom: 0;
        left: -8px;

        background:
            linear-gradient(
                135deg,
                #ff1630 0%,
                #f0001a 56%,
                #c90012 100%
            );

        transform: skewX(-24deg);

        box-shadow:
            0 8px 24px rgba(0,0,0,.30),
            0 5px 18px rgba(227,6,19,.20);
    }

    /* =====================================================
       SUBTÍTULO CENTRADO
       ===================================================== */

    .mgx-hero-text {
        width: min(88vw, 330px);
        max-width: 330px;

        margin: 15px auto 0;

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

        font-family:
            "Montserrat",
            var(--mgx-font-ui),
            Arial,
            sans-serif;

        font-size: clamp(13px, 3.5vw, 15px);
        font-weight: 600;
        line-height: 1.45;

        text-align: center;

        text-shadow:
            0 1px 2px rgba(0,0,0,1),
            0 3px 9px rgba(0,0,0,.98),
            0 7px 16px rgba(0,0,0,.62);
    }

    /* =====================================================
       CTA FIJO SOBRE EL DOCK
       ===================================================== */

    .mgx-hero-cta {
        position: absolute;

        left: 50%;
        bottom:
            calc(
                var(--mgx-dock-bottom)
                + var(--mgx-dock-height)
                + var(--mgx-hero-cta-gap)
            );

        width: min(86vw, 380px);
        min-height: 54px;

        margin: 0;
        padding: 0 18px;

        display: inline-flex;
        align-items: center;
        justify-content: center;

        box-sizing: border-box;

        border: 1px solid rgba(255,255,255,.30);
        border-radius: 999px;

        background:
            linear-gradient(
                180deg,
                rgba(255,255,255,.20) 0%,
                rgba(255,255,255,.04) 34%,
                rgba(255,255,255,0) 46%
            ),
            linear-gradient(
                135deg,
                #ff1730 0%,
                #f00018 48%,
                #d00012 100%
            );

        color: #fff;
        text-decoration: none;

        font-family:
            "Montserrat",
            var(--mgx-font-ui),
            Arial,
            sans-serif;

        font-size: clamp(15px, 4.2vw, 18px);
        font-weight: 900;
        line-height: 1;
        letter-spacing: .35px;
        text-transform: uppercase;

        opacity: 1;

        transform: translateX(-50%) !important;
        animation: none !important;

        pointer-events: auto;

        box-shadow:
            inset 0 1px 0 rgba(255,255,255,.28),
            0 10px 30px rgba(255,0,30,.38),
            0 12px 28px rgba(0,0,0,.34);

        -webkit-backdrop-filter:
            blur(10px)
            saturate(135%);

        backdrop-filter:
            blur(10px)
            saturate(135%);
    }

    .mgx-hero-cta-label {
        display: block;
        width: 90%;

        margin: 0 auto;

        text-align: center;
        white-space: nowrap;
    }
}


/* =========================================================
   MÓVILES PEQUEÑOS
   ========================================================= */

@media (max-width: 480px) {

    .hero {
        min-height: 590px;
    }

    .mgx-hero-copy {
        top: 98px;
        width: calc(100% - 36px);
        max-width: 320px;
    }

    .mgx-hero-main-title > span {
        font-size:
            clamp(43px, 13vw, 57px);
    }

    .mgx-hero-category {
        margin-top: 17px;
        padding: 7px 16px;

        font-size:
            clamp(20px, 5.7vw, 25px);
    }

    .mgx-hero-text {
        width: min(86vw, 300px);
        margin-top: 13px;
        font-size: 13px;
        line-height: 1.45;
    }

    .mgx-hero-cta {
        bottom:
            calc(
                var(--mgx-dock-bottom)
                + var(--mgx-dock-height)
                + var(--mgx-hero-cta-gap)
            );

        width: min(86vw, 350px);
        min-height: 52px;

        padding: 0 20px;

        font-size:
            clamp(14px, 4vw, 17px);
    }
}


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

@media (min-width: 600px) and (max-width: 899px) {

    .mgx-hero-copy {
        top: 110px;
        width: calc(100% - 84px);
        max-width: 430px;
    }

    .mgx-hero-main-title > span {
        font-size:
            clamp(62px, 10vw, 82px);
    }

    .mgx-hero-category {
        margin-top: 22px;
        padding: 9px 22px;

        font-size:
            clamp(27px, 4.5vw, 35px);
    }

    .mgx-hero-text {
        width: min(72vw, 380px);
        max-width: 380px;

        margin-top: 17px;

        font-size: 16px;
    }

    .mgx-hero-cta {
        bottom:
            calc(
                var(--mgx-dock-bottom)
                + var(--mgx-dock-height)
                + var(--mgx-hero-cta-gap)
            );

        width: min(62vw, 410px);
        min-height: 56px;

        font-size: 17px;
    }
}
