/*
 * 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,
        rgba(12, 74, 110, 0.9) 0%,
        rgba(15, 118, 110, 0.78) 52%,
        rgba(2, 6, 23, 0.88) 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: ratio 4:3 con spacer interno (evita colapso si picture es absolute) */
.visual-split__image-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 0.75rem;
    width: 100%;
    max-width: 100%;
}

/* Enlace CRO sobre la foto: debe ocupar el ratio 4:3 (si no, picture absolute colapsa a 0px) */
.visual-split__image-wrap > .visual-split__image-link {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: block;
    border-radius: inherit;
}

/* Spacer en flujo normal: garantiza altura aunque picture/img sean absolute */
.visual-split__image-wrap::before {
    content: "";
    display: block;
    /* Mobile: 16:9 to shorten the split photo; desktop keeps 4:3 */
    padding-bottom: 56.25%;
}

@media (min-width: 768px) {
    .visual-split__image-wrap::before {
        padding-bottom: 75%; /* 4:3 */
    }
}

.visual-split__image-wrap picture {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
}

.visual-split__image-wrap img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    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 center;
    background-repeat: no-repeat;
    overflow: hidden;
    isolation: isolate;
}

.visual-banner__bg {
    position: absolute;
    inset: -8%;
    z-index: 0;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    will-change: transform;
    transform: translate3d(0, 0, 0) scale(1.08);
}

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

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

    .visual-banner__bg {
        inset: 0;
        transform: none !important;
    }
}

/* Overlays cinematográficos: dejan respirar la foto IA sin perder legibilidad */
.visual-banner__overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.visual-banner__overlay--green {
    background:
        linear-gradient(180deg, rgba(2, 44, 22, 0.45) 0%, rgba(2, 44, 22, 0.72) 55%, rgba(1, 26, 15, 0.88) 100%),
        radial-gradient(ellipse 90% 70% at 50% 100%, rgba(0, 0, 0, 0.35) 0%, transparent 70%);
}

.visual-banner__overlay--blue {
    background:
        linear-gradient(180deg, rgba(0, 51, 102, 0.4) 0%, rgba(0, 31, 63, 0.75) 55%, rgba(0, 20, 40, 0.9) 100%),
        radial-gradient(ellipse 90% 70% at 50% 100%, rgba(0, 0, 0, 0.35) 0%, transparent 70%);
}

.visual-banner__overlay--dark {
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.5) 0%, rgba(15, 23, 42, 0.82) 100%),
        radial-gradient(ellipse 80% 60% at 50% 50%, transparent 0%, rgba(0, 0, 0, 0.4) 100%);
}

/* Premium: para secciones de confianza — más luz en el centro, viñeta suave */
.visual-banner__overlay--premium {
    background:
        linear-gradient(115deg, rgba(1, 26, 15, 0.82) 0%, rgba(2, 44, 22, 0.42) 42%, rgba(0, 51, 102, 0.38) 100%),
        radial-gradient(ellipse 70% 55% at 65% 45%, rgba(255, 255, 255, 0.07) 0%, transparent 65%),
        radial-gradient(ellipse 120% 80% at 50% 100%, rgba(0, 0, 0, 0.45) 0%, transparent 55%);
}

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

/* Panel glass para bloques de confianza (home trust banner) */
.visual-banner__panel {
    margin-inline: auto;
    max-width: 40rem;
    padding: clamp(1.75rem, 4vw, 2.5rem) clamp(1.25rem, 4vw, 2rem);
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(2, 44, 22, 0.28);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow:
        0 24px 48px -16px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.visual-banner__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.92);
}

.visual-banner__eyebrow-dot {
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 9999px;
    background: var(--mt-accent-strong, #14b8a6);
    box-shadow: 0 0 10px var(--mt-accent-glow, rgba(20, 184, 166, 0.55));
}

.visual-banner__title {
    font-size: clamp(1.75rem, 4.5vw, 2.5rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: #fff;
    text-wrap: balance;
}

.visual-banner__lead {
    margin-top: 1rem;
    font-size: clamp(1rem, 2.2vw, 1.125rem);
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.88);
    text-wrap: pretty;
}

.visual-banner__metrics {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.625rem;
    margin-top: 1.5rem;
    padding: 0;
    list-style: none;
}

.visual-banner__metric {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 0.9rem;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.07);
    font-size: 0.8125rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    white-space: nowrap;
}

.visual-banner__metric i {
    font-size: 0.75rem;
    color: #6ee7b7;
}

.visual-banner__actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.75rem;
}

@media (min-width: 480px) {
    .visual-banner__actions {
        flex-direction: row;
        flex-wrap: wrap;
    }
}

.visual-banner__btn {
    display: inline-flex;
    min-height: 3rem;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.visual-banner__btn:focus-visible {
    outline: 2px solid var(--mt-accent, #2dd4bf);
    outline-offset: 3px;
}

.visual-banner__btn--primary {
    background: linear-gradient(135deg, var(--mt-accent-strong, #14b8a6) 0%, var(--mt-accent-hover, #0d9488) 100%);
    color: #ffffff;
    box-shadow: 0 10px 28px -8px var(--mt-accent-glow, rgba(20, 184, 166, 0.4));
}

.visual-banner__btn--primary:hover {
    background: linear-gradient(135deg, var(--mt-accent, #2dd4bf) 0%, var(--mt-accent-strong, #14b8a6) 100%);
    transform: translateY(-1px);
    box-shadow: 0 14px 32px -10px rgba(0, 0, 0, 0.5);
}

.visual-banner__btn--ghost {
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    backdrop-filter: blur(6px);
}

.visual-banner__btn--ghost:hover {
    border-color: rgba(255, 255, 255, 0.55);
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-1px);
}

/* 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;
    /* Mobile: shorter crop so 2-col grids do not dominate scroll */
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

@media (min-width: 640px) {
    .visual-card__image-wrap {
        aspect-ratio: 16 / 10;
    }
}

.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: 0.75rem 0.7rem 0.85rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.visual-card__title {
    margin: 0 0 0.35rem;
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.25;
    color: #003366;
}

.visual-card__excerpt {
    margin: 0 0 0.5rem;
    flex-grow: 1;
    font-size: 0.7rem;
    line-height: 1.4;
    color: #475569;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}

.visual-card__more {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: #0d9488;
}

@media (min-width: 640px) {
    .visual-card__body {
        padding: 1.5rem;
    }

    .visual-card__title {
        margin-bottom: 0.5rem;
        font-size: 1.125rem;
    }

    .visual-card__excerpt {
        margin-bottom: 1rem;
        font-size: 0.875rem;
        line-height: 1.5;
        -webkit-line-clamp: unset;
        display: block;
        overflow: visible;
    }

    .visual-card__more {
        font-size: 0.875rem;
        gap: 0.5rem;
    }
}

/* 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;
    }
}

/* Hero fotorealista: blanco solo en tipografía; CTAs llevan color propio (no usar selector *) */
.visual-hero .visual-hero__content :where(h1, h2, h3, h4, p, li, strong) {
    color: #ffffff;
}

/* Badge y CTAs del hero — Midnight Trust */
.visual-hero .hero-badge {
    color: var(--mt-deep, #020617) !important;
    background: var(--mt-accent-strong, #14b8a6);
    border-color: rgba(2, 6, 23, 0.22) !important;
}

.visual-hero .hero-badge__dot {
    background: var(--mt-deep, #020617);
}

.visual-hero .hero-accent {
    color: var(--mt-accent, #2dd4bf) !important;
}

.visual-hero .hero-cta-stack {
    width: 100%;
    max-width: 28rem;
}

.visual-hero .hero-cta {
    display: flex;
    min-height: 3.25rem;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: 0.375rem;
    padding: 0.75rem 1rem;
    text-align: center;
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1.25;
    text-decoration: none;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

@media (min-width: 768px) {
    .visual-hero .hero-cta {
        font-size: 0.875rem;
    }
}

.visual-hero .hero-cta--primary {
    color: #ffffff !important;
    background: linear-gradient(135deg, var(--mt-accent-strong, #14b8a6) 0%, var(--mt-accent-hover, #0d9488) 100%);
    border: 1px solid rgba(45, 212, 191, 0.35);
    box-shadow: 0 4px 20px var(--mt-accent-glow, rgba(20, 184, 166, 0.35));
}

.visual-hero .hero-cta--primary:hover {
    background: linear-gradient(135deg, var(--mt-accent, #2dd4bf) 0%, var(--mt-accent-strong, #14b8a6) 100%);
    box-shadow: 0 6px 24px rgba(20, 184, 166, 0.45);
}

.visual-hero .hero-cta--solid-light {
    color: var(--mt-deep, #020617) !important;
    background-color: #ffffff;
}

.visual-hero .hero-cta--solid-light:hover {
    background-color: #f1f5f9;
}

.visual-hero .hero-cta--outline {
    color: #ffffff !important;
    background-color: rgb(255 255 255 / 0.06);
    border: 1px solid rgb(255 255 255 / 0.32);
    backdrop-filter: blur(4px);
}

.visual-hero .hero-cta--outline:hover {
    background-color: rgb(255 255 255 / 0.12);
}

.visual-hero .hero-cta-links {
    margin: 0;
    padding-top: 0.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: rgb(255 255 255 / 0.88) !important;
}

.visual-hero .hero-cta-links a {
    color: var(--mt-text-on-dark, #e2e8f0) !important;
    text-decoration: none;
    border-bottom: 1px solid rgba(45, 212, 191, 0.45);
    padding-bottom: 1px;
}

.visual-hero .hero-cta-links a:hover {
    color: #ffffff !important;
    border-bottom-color: #ffffff;
}

.visual-hero .hero-cta-links span[aria-hidden="true"] {
    margin: 0 0.5rem;
    color: rgb(255 255 255 / 0.45) !important;
}

.visual-hero .hero-aux-link {
    color: var(--mt-text-on-dark, #e2e8f0) !important;
}

.visual-hero .hero-aux-link span {
    color: inherit !important;
}

.visual-hero .hero-aux-link:hover {
    color: #ffffff !important;
}

/* Sección experiencia CRO — contraste garantizado en cualquier landing */
.service-experience-showcase {
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    color: #1f2937;
}

.service-experience-showcase .experience-title {
    color: #111827;
}

.service-experience-showcase .experience-intro,
.service-experience-showcase .experience-trust,
.service-experience-showcase .experience-highlight {
    color: #4b5563;
}

.service-experience-showcase .experience-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
}

.service-experience-showcase .experience-showcase-cta {
    color: #ffffff;
}
