/* =========================================================
   MOTOGRAPHIX V9
   HERO — ESCRITORIO / TABLET HORIZONTAL
   3 SLIDES / UNA SOLA IMAGEN POR SLIDE
   ========================================================= */

/* =========================================================
   CONTENEDOR GENERAL
   ========================================================= */

.mgx-home-hero-shell {
    width: 100%;
    overflow: hidden;
    background: #000;
}

.hero {
    position: relative;
    width: 100%;
    height: clamp(560px, 52vw, 820px);
    overflow: hidden;
    isolation: isolate;
    background: #000;
}

/* =========================================================
   TRACK / SLIDES
   ========================================================= */

.mgx-hero-track,
.mgx-hero-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.mgx-hero-track {
    background: #000;
}

.mgx-hero-slide {
    z-index: 1;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    overflow: hidden;
    background: #000;
    transition: opacity .65s ease, visibility .65s ease;
}

.mgx-hero-slide.is-active {
    z-index: 2;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* =========================================================
   IMAGEN — ESCRITORIO
   ========================================================= */

.mgx-hero-image {
    position: absolute;
    z-index: 0;
    inset: 0;
    width: 100%;
    height: 100%;

    /* Muestra más imagen en altura sin recortar fuerte */
    object-fit: contain;

    object-position:
        var(--mgx-hero-position-desktop, center center);

    background: #000;

    transform: scale(1.002);
    transform-origin: center center;

    user-select: none;
    -webkit-user-drag: none;

    transition: transform 7s ease-out;
}

.mgx-hero-slide.is-active .mgx-hero-image {
    /* Movimiento mínimo para conservar el encuadre */
    transform: scale(1.012);
}

/* =========================================================
   OVERLAY SOBRE FOTO
   ========================================================= */

.mgx-hero-image-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;

    background:
        linear-gradient(
            90deg,
            rgba(0,0,0,.90) 0%,
            rgba(0,0,0,.74) 14%,
            rgba(0,0,0,.48) 28%,
            rgba(0,0,0,.22) 42%,
            rgba(0,0,0,.06) 58%,
            rgba(0,0,0,0) 72%
        ),
        linear-gradient(
            180deg,
            rgba(0,0,0,.10) 0%,
            rgba(0,0,0,0) 52%,
            rgba(0,0,0,.08) 72%,
            rgba(0,0,0,.38) 100%
        );
}

/* =========================================================
   DEGRADADOS LATERALES
   Disimulan cualquier espacio negro dejado por contain.
   ========================================================= */

.mgx-hero-slide::before,
.mgx-hero-slide::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 2;
    width: clamp(90px, 18vw, 360px);
    pointer-events: none;
}

.mgx-hero-slide::before {
    left: 0;
    background:
        linear-gradient(
            90deg,
            #000 0%,
            rgba(0,0,0,.96) 12%,
            rgba(0,0,0,.76) 32%,
            rgba(0,0,0,.42) 58%,
            rgba(0,0,0,.12) 80%,
            rgba(0,0,0,0) 100%
        );
}

.mgx-hero-slide::after {
    right: 0;
    background:
        linear-gradient(
            270deg,
            #000 0%,
            rgba(0,0,0,.96) 12%,
            rgba(0,0,0,.76) 32%,
            rgba(0,0,0,.42) 58%,
            rgba(0,0,0,.12) 80%,
            rgba(0,0,0,0) 100%
        );
}

/* =========================================================
   CONTENIDO FLOTANTE
   ========================================================= */

.mgx-hero-content {
    position: absolute;
    z-index: 5;
    top: 50%;
    left: clamp(48px, 6.6vw, 132px);
    width: min(650px, 43vw);
    transform: translateY(-50%);
    color: #fff;
}

/* =========================================================
   TÍTULO
   ========================================================= */

.mgx-hero-heading {
    margin: 0;
    color: #fff;
    font-family:
        "Bebas Neue",
        "Arial Narrow",
        Impact,
        Haettenschweiler,
        sans-serif;
    font-weight: 400;
    text-transform: uppercase;
}

.mgx-hero-main-title {
    display: block;
    opacity: 0;
    transform: translateX(-34px);
    /* Sombra + borde negro muy fino para destacar sobre fondos claros */
    text-shadow:
        0 2px 2px rgba(0,0,0,.95),
        0 6px 18px rgba(0,0,0,.88),
        0 12px 30px rgba(0,0,0,.52);
    -webkit-text-stroke: .55px rgba(0,0,0,.82);
    paint-order: stroke fill;
}

.mgx-hero-main-title > span {
    display: block;
    width: max-content;
    max-width: 100%;
    font-size: clamp(70px, 6.2vw, 116px);
    line-height: .79;
    letter-spacing: .2px;
    white-space: nowrap;
}

.mgx-hero-main-title > span + span {
    margin-top: 9px;
}

/* =========================================================
   CATEGORÍA — CINTA ROJA INCLINADA
   ========================================================= */

.mgx-hero-category {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: max-content;
    max-width: calc(100% - 30px);

    margin-top: 28px;
    padding: 10px 25px;

    color: #fff;

    font-family:
        "Bebas Neue",
        "Arial Narrow",
        Impact,
        sans-serif;

    font-size: clamp(25px, 2vw, 36px);
    font-weight: 400;
    line-height: 1;
    letter-spacing: .8px;
    text-transform: uppercase;
    font-style: normal;
    white-space: nowrap;

    opacity: 0;
    transform: translateX(-30px);

    text-shadow:
        0 2px 2px rgba(0,0,0,.90),
        0 4px 10px rgba(0,0,0,.62);
    -webkit-text-stroke: .35px rgba(0,0,0,.72);
    paint-order: stroke fill;
    isolation: isolate;
}

/* Se inclina solamente la caja, no las letras */
.mgx-hero-category::before {
    content: "";
    position: absolute;
    z-index: -1;

    top: 0;
    right: -10px;
    bottom: 0;
    left: -10px;

    background:
        linear-gradient(
            135deg,
            #ff1c28 0%,
            #e30613 58%,
            #c9000c 100%
        );

    transform: skewX(-24deg);

    box-shadow:
        0 8px 24px rgba(0,0,0,.30),
        0 5px 18px rgba(227,6,19,.20);
}

/* =========================================================
   DESCRIPCIÓN
   ========================================================= */

.mgx-hero-text {
    max-width: 520px;
    margin: 20px 0 0;

    color: rgba(255,255,255,.90);

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: clamp(15px, 1.1vw, 18px);
    line-height: 1.5;
    font-weight: 500;

    opacity: 0;
    transform: translateY(18px);

    text-shadow:
        0 1px 2px rgba(0,0,0,1),
        0 4px 12px rgba(0,0,0,.95),
        0 8px 20px rgba(0,0,0,.58);
    -webkit-text-stroke: .18px rgba(0,0,0,.72);
    paint-order: stroke fill;
}

/* =========================================================
   ANIMACIONES
   ========================================================= */

.mgx-hero-slide.is-active .mgx-hero-main-title {
    animation:
        mgxHeroTitleIn
        .72s
        cubic-bezier(.2,.8,.2,1)
        .12s
        forwards;
}

.mgx-hero-slide.is-active .mgx-hero-category {
    animation:
        mgxHeroCategoryIn
        .68s
        cubic-bezier(.2,.8,.2,1)
        .34s
        forwards;
}

.mgx-hero-slide.is-active .mgx-hero-text {
    animation:
        mgxHeroTextIn
        .66s
        ease
        .50s
        forwards;
}

@keyframes mgxHeroTitleIn {
    from {
        opacity: 0;
        transform: translateX(-34px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes mgxHeroCategoryIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes mgxHeroTextIn {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================================
   INDICADORES
   ========================================================= */

.mgx-hero-dots {
    position: absolute;
    z-index: 20;

    left: 50%;
    bottom: 92px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    transform: translateX(-50%);
}

.mgx-hero-dot {
    width: 32px;
    height: 26px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.mgx-hero-dot::before {
    content: "";
    display: block;

    width: 8px;
    height: 8px;

    margin: auto;

    border-radius: 999px;
    background: rgba(255,255,255,.48);

    transition:
        width .25s ease,
        background .25s ease;
}

.mgx-hero-dot.is-active::before {
    width: 27px;
    background: #ed101d;
}

/* =========================================================
   BOTÓN VER CATÁLOGO
   ========================================================= */

.floating-catalog {
    position: absolute;
    z-index: 40;

    left: 50%;
    bottom: 26px;

    min-width: 230px;
    height: 54px;
    padding: 0 34px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    transform: translateX(-50%);

    border: 1px solid rgba(255,255,255,.12);
    border-radius: 999px;

    background:
        linear-gradient(
            135deg,
            #ff1825 0%,
            #e30613 55%,
            #c8000c 100%
        );

    color: #fff;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 18px;
    font-weight: 900;
    letter-spacing: .7px;

    text-decoration: none;
    text-transform: uppercase;
    white-space: nowrap;

    box-shadow:
        0 10px 26px rgba(0,0,0,.35),
        0 8px 30px rgba(227,6,19,.30);

    transition:
        transform .22s ease,
        box-shadow .22s ease,
        filter .22s ease;
}

.floating-catalog:hover {
    transform:
        translateX(-50%)
        translateY(-2px);

    filter: brightness(1.06);

    box-shadow:
        0 14px 34px rgba(0,0,0,.42),
        0 10px 34px rgba(227,6,19,.38);
}

.floating-catalog:focus-visible,
.mgx-hero-dot:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

/* =========================================================
   TABLET HORIZONTAL / ESCRITORIO PEQUEÑO
   ========================================================= */

@media (min-width: 900px) and (max-width: 1200px) {

    .hero {
        height: clamp(540px, 56vw, 700px);
    }

    .mgx-hero-content {
        left: 52px;
        width: min(520px, 46vw);
    }

    .mgx-hero-main-title > span {
        font-size: clamp(58px, 6.2vw, 80px);
    }

    .mgx-hero-category {
        font-size: clamp(23px, 2.3vw, 31px);
        padding: 9px 20px;
    }

    .mgx-hero-text {
        max-width: 450px;
    }
}

/* =========================================================
   ACCESIBILIDAD
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .mgx-hero-slide,
    .mgx-hero-image,
    .mgx-hero-main-title,
    .mgx-hero-category,
    .mgx-hero-text {
        animation: none !important;
        transition: none !important;
    }

    .mgx-hero-slide.is-active .mgx-hero-main-title,
    .mgx-hero-slide.is-active .mgx-hero-category,
    .mgx-hero-slide.is-active .mgx-hero-text {
        opacity: 1;
        transform: none;
    }
}
