/*
 * Autor: Sergio Martinez de Unlockers Cloud
 * URL: https://1lockers.net
 *
 * Estilos compartidos para el sistema de imágenes IA fotorealistas
 * (x-visual-hero, x-visual-split, x-parallax-banner, x-service-visual-card).
 * Mobile-first: parallax y background-attachment:fixed solo desde desktop.
 */

.visual-hero {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.visual-hero__media {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.visual-hero__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(135deg, var(--visual-overlay-dark, rgba(2, 44, 22, 0.92)) 0%, rgba(4, 108, 78, 0.72) 100%);
}

.visual-hero__overlay--blue {
    background: linear-gradient(135deg, var(--visual-overlay-blue, rgba(0, 51, 102, 0.88)) 0%, rgba(0, 31, 63, 0.75) 100%);
}

.visual-hero__overlay--urgent {
    background: linear-gradient(135deg, rgba(185, 28, 28, 0.9) 0%, rgba(220, 38, 38, 0.75) 100%);
}

.visual-hero__content {
    position: relative;
    z-index: 2;
}

/* Split imagen/texto: hover zoom sutil */
.visual-split__image-wrap {
    overflow: hidden;
    border-radius: 0.75rem;
}

.visual-split__image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.visual-split__image-wrap:hover img {
    transform: scale(1.05);
}

/* Banner parallax full-width */
.visual-banner {
    position: relative;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

@media (min-width: 1024px) {
    .visual-banner--parallax {
        background-attachment: fixed;
    }
}

@media (prefers-reduced-motion: reduce) {
    .visual-banner--parallax {
        background-attachment: scroll;
    }
}

.visual-banner__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 44, 22, 0.55) 0%, rgba(2, 44, 22, 0.85) 100%);
}

.visual-banner__content {
    position: relative;
    z-index: 1;
}

/* Card de servicio con imagen superior */
.visual-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    border-radius: 0.75rem;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e5e7eb;
    transition: box-shadow 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.visual-card:hover {
    box-shadow: 0 12px 28px -8px rgba(0, 51, 102, 0.22);
    border-color: var(--visual-accent-green, #0F5132);
    transform: translateY(-2px);
}

.visual-card__image-wrap {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.visual-card__image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.visual-card:hover .visual-card__image-wrap img {
    transform: scale(1.06);
}

.visual-card__body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Respeta accesibilidad: sin movimiento si el usuario lo prefiere */
@media (prefers-reduced-motion: reduce) {
    .visual-split__image-wrap img,
    .visual-card__image-wrap img {
        transition: none;
    }
    .visual-split__image-wrap:hover img,
    .visual-card:hover .visual-card__image-wrap img {
        transform: none;
    }
}
