/* Autos Esquivel — tratamiento común para fotografías públicas.
 * Las fotografías editoriales son de formato medio; se muestran a su altura
 * natural en los heroes para evitar ampliaciones horizontales agresivas.
 * El contenido conserva sus capas de contraste, pero la imagen ya no queda
 * enterrada bajo filtros oscuros ni blur que simula pixelación.
 */

.public-site-rebuild .ae-hero__poster,
html[data-theme="light"] .public-site-rebuild .ae-hero__poster,
html[data-theme="dark"] .public-site-rebuild .ae-hero__poster {
    filter: saturate(.98) contrast(1.02) brightness(.98) !important;
    image-rendering: auto !important;
}

.public-site-rebuild .ae-hero__video iframe,
html[data-theme="light"] .public-site-rebuild .ae-hero__video iframe,
html[data-theme="dark"] .public-site-rebuild .ae-hero__video iframe {
    filter: saturate(1.04) contrast(1.02) brightness(1.06) !important;
}

.public-site-rebuild .ae-hero__media-shade,
html[data-theme="light"] .public-site-rebuild .ae-hero__media-shade,
html[data-theme="dark"] .public-site-rebuild .ae-hero__media-shade {
    background:
        linear-gradient(90deg,
            rgba(3, 4, 5, .84) 0%,
            rgba(3, 4, 5, .70) 18%,
            rgba(3, 4, 5, .48) 38%,
            rgba(3, 4, 5, .24) 60%,
            rgba(3, 4, 5, .18) 84%,
            rgba(3, 4, 5, .24) 100%),
        linear-gradient(180deg, rgba(3, 4, 5, .08), rgba(3, 4, 5, .32)) !important;
}

/* Fondos de secciones: mejora de exposición sin afectar textos ni controles. */
[data-public-home-hero]::before,
.ae-about-hero::before,
.ae-about-business::before,
.ae-financing-overview::before,
.ae-financing-simulator::before,
.ae-financing-institutions::before,
.ae-financing-products::before,
.ae-sell-page__rail::before,
.ae-sell-page__faq::before,
.ae-contact__branch-section::before,
.ae-contact__workspace::before,
.ae-contact__info-grid::before {
    filter: saturate(1.04) contrast(1.02) brightness(1.12) !important;
}

/* La foto de relleno del hero Nosotros no necesita desenfoque: ese blur
 * era la principal fuente de apariencia pixelada al ampliar la toma. */
.ae-about-hero__visual::after {
    filter: saturate(.94) brightness(.92) !important;
    opacity: .42 !important;
}

.ae-about-hero__visual::before {
    filter: saturate(1.02) contrast(1.02) brightness(1.08) !important;
}

/* Vende tu auto: conserva la foto alineada a la derecha a su proporción
 * natural; el lado izquierdo queda libre para el copy y no se pixela. */
.ae-sell-page .ae-sell-page__hero-media,
html[data-theme="light"] .ae-sell-page .ae-sell-page__hero-media,
html[data-theme="dark"] .ae-sell-page .ae-sell-page__hero-media {
    filter: saturate(1.06) contrast(1.02) brightness(1.18) !important;
    background-image:
        linear-gradient(90deg, rgba(5, 7, 9, .88) 0%, rgba(5, 7, 9, .70) 34%, rgba(5, 7, 9, .30) 68%, rgba(5, 7, 9, .52) 100%),
        linear-gradient(180deg, rgba(5, 7, 9, .08), rgba(5, 7, 9, .56)),
        url('/images/comercial/1.webp') !important;
    background-position: center, center, right center !important;
    background-size: 100% 100%, 100% 100%, auto 100% !important;
    image-rendering: auto !important;
}

.ae-sell-page .ae-sell-page__inspection-media img,
.ae-sell-page .ae-sell-page__showcase-media img {
    filter: saturate(.96) contrast(1.04) brightness(.96) !important;
    image-rendering: auto !important;
}

/* Contacto y explorador de categorías tenían filtros de exposición demasiado
 * agresivos en dark mode. */
.ae-contact__hero-media {
    filter: saturate(.96) contrast(1.04) brightness(.96) !important;
    image-rendering: auto !important;
}

.category-explorer .category-card__media img {
    filter: saturate(.96) contrast(1.03) brightness(.94) !important;
    image-rendering: auto !important;
}

.category-explorer .category-card__shade {
    background: rgba(0, 0, 0, .18) !important;
    box-shadow: inset 0 -200px 110px rgba(0, 0, 0, .68), inset 0 70px 70px rgba(0, 0, 0, .12) !important;
}

@media (max-width: 720px) {
    .public-site-rebuild .ae-hero__media-shade {
        background:
            linear-gradient(180deg, rgba(3, 4, 5, .25) 0%, rgba(3, 4, 5, .36) 42%, rgba(3, 4, 5, .66) 78%, rgba(3, 4, 5, .82) 100%),
            linear-gradient(90deg, rgba(3, 4, 5, .46), rgba(3, 4, 5, .12)) !important;
    }

    .public-site-rebuild .ae-hero__poster,
    html[data-theme="light"] .public-site-rebuild .ae-hero__poster,
    html[data-theme="dark"] .public-site-rebuild .ae-hero__poster {
        filter: saturate(.96) contrast(1.03) brightness(.92) !important;
    }

    .ae-sell-page .ae-sell-page__hero-media,
    html[data-theme="light"] .ae-sell-page .ae-sell-page__hero-media,
    html[data-theme="dark"] .ae-sell-page .ae-sell-page__hero-media {
        background-image:
            linear-gradient(180deg, rgba(5, 7, 9, .28) 0%, rgba(5, 7, 9, .40) 42%, rgba(5, 7, 9, .68) 100%),
            linear-gradient(90deg, rgba(5, 7, 9, .48), rgba(5, 7, 9, .14)),
            url('/images/comercial/1.webp') !important;
        background-position: center, center, 76% center !important;
        background-size: 100% 100%, 100% 100%, auto 100% !important;
        filter: saturate(1.04) contrast(1.02) brightness(1.12) !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .public-site-rebuild .ae-hero__poster,
    .ae-sell-page .ae-sell-page__hero-media {
        transform: none !important;
    }
}
