/* V2 - Portada embudo: dos mitades pantalla, imagen + contenido (sin cajas anidadas) */

.v2-funnel {
    --v2-funnel-accent: #ff6e00;
    --v2-funnel-footer-safe: clamp(88px, 11vh, 112px);
    width: 100%;
    margin: 0;
    min-height: 100svh;
    background: #000;
}

.v2-funnel__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    min-height: 100svh;
}

/* Mitad = bloque visual; solo el CTA enlaza */
.v2-funnel__panel {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100svh;
    padding: clamp(2rem, 5vw, 3.5rem);
    overflow: hidden;
    color: inherit;
    border: none;
    cursor: default;
}

/* Suavizar unión central (sin línea dura) */
.v2-funnel__panel--industrial::after,
.v2-funnel__panel--audiovisual::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: min(14vw, 140px);
    z-index: 2;
    pointer-events: none;
}

.v2-funnel__panel--industrial::after {
    right: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.42) 100%);
}

.v2-funnel__panel--audiovisual::before {
    left: 0;
    background: linear-gradient(270deg, transparent 0%, rgba(0, 0, 0, 0.42) 100%);
}

.v2-funnel__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    pointer-events: none;
    transform: scale(1);
    transform-origin: center center;
    transition:
        transform 1.45s ease-in-out,
        filter 1.45s ease-in-out;
}

.v2-funnel__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 1;
    transition: opacity 1.45s ease-in-out;
    background: linear-gradient(
        118deg,
        rgba(0, 0, 0, 0.82) 0%,
        rgba(0, 0, 0, 0.55) 45%,
        rgba(0, 0, 0, 0.72) 100%
    );
}

.v2-funnel__panel--audiovisual .v2-funnel__overlay {
    background: linear-gradient(
        242deg,
        rgba(0, 0, 0, 0.82) 0%,
        rgba(0, 0, 0, 0.52) 45%,
        rgba(0, 0, 0, 0.74) 100%
    );
}

.v2-funnel__panel:hover .v2-funnel__bg {
    transform: scale(1.018);
    filter: brightness(1.04) contrast(1.02);
}

.v2-funnel__panel:hover .v2-funnel__overlay {
    opacity: 0.9;
}

.v2-funnel__content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 26rem;
    text-align: left;
}

.v2-funnel__kicker {
    display: inline-block;
    align-self: flex-start;
    margin: 0 0 14px;
    padding: 6px 12px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #e0e0e0;
}

.v2-funnel__title {
    display: block;
    margin: 0 0 14px;
    padding-left: 0.7rem;
    border-left: 2px solid var(--v2-funnel-accent);
    color: #fff;
    font-size: clamp(1.55rem, 2.8vw, 2.35rem);
    font-weight: 600;
    line-height: 1.14;
    letter-spacing: -0.02em;
}

.v2-funnel__lead {
    display: block;
    margin: 0 0 1.5rem;
    color: #d4d4d4;
    font-size: clamp(0.98rem, 1.45vw, 1.08rem);
    line-height: 1.6;
}

.v2-funnel__cta {
    position: relative;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    min-height: 48px;
    padding: 0 24px;
    border-radius: 999px;
    background: var(--v2-funnel-accent);
    color: #fff !important;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none !important;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(255, 110, 0, 0.35);
    transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.v2-funnel__cta:hover,
.v2-funnel__cta:focus-visible {
    background: #d95e00;
    box-shadow: 0 10px 26px rgba(255, 110, 0, 0.42);
}

.v2-funnel__cta:focus-visible {
    outline: 2px solid #fff !important;
    outline-offset: 3px;
}

/* Portada embudo: ancho completo */
body.iagofer-funnel-home #primary.site-main,
body.iagofer-funnel-home article.page,
body.iagofer-funnel-home .entry-content,
body.iagofer-funnel-home .wp-block-post-content {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.iagofer-funnel-home .entry-content > *:last-child,
body.iagofer-funnel-home .wp-block-post-content > *:last-child {
    margin-bottom: 0 !important;
}

body.iagofer-funnel-home,
body.iagofer-funnel-home #page.site {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

/* Una sola pantalla en escritorio: sin scroll por el footer en el flujo */
@media (min-width: 901px) {
    body.iagofer-funnel-home {
        overflow: hidden;
        height: 100svh;
    }
}

body.iagofer-funnel-home #page.site {
    position: relative;
    min-height: 100svh;
    background: #000;
}

@media (min-width: 901px) {
    body.iagofer-funnel-home #page.site {
        height: 100svh;
        max-height: 100svh;
        overflow: hidden;
    }
}

body.iagofer-funnel-home #primary.site-main {
    position: relative;
    z-index: 1;
    padding-top: 0 !important;
}

@media (min-width: 901px) {
    body.iagofer-funnel-home #primary.site-main,
    body.iagofer-funnel-home article.page,
    body.iagofer-funnel-home .entry-content,
    body.iagofer-funnel-home .wp-block-post-content {
        height: 100%;
        min-height: 0;
    }
}

/* Imagen a sangre bajo el header fijo; logo encima con scrim suave */
body.iagofer-funnel-home #main-header {
    min-height: 80px;
    padding: 12px 0 10px;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.62) 0%,
        rgba(0, 0, 0, 0.28) 58%,
        transparent 100%
    );
    border-bottom: none;
    box-shadow: none;
}

body.iagofer-funnel-home .header-inner-wrap--funnel {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 0 24px;
}

body.iagofer-funnel-home .header-inner-wrap--funnel .site-logo img {
    max-height: clamp(52px, 10vw, 72px);
    max-width: min(320px, 78vw);
    width: auto;
    height: auto;
    filter: drop-shadow(0 2px 14px rgba(0, 0, 0, 0.55));
}

/* Footer fijo como el header: imagen detrás, textos encima (sin franja negra) */
body.iagofer-funnel-home.iagofer-v2-front-page #colophon.site-footer,
body.iagofer-funnel-home #colophon.site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    margin-top: 0 !important;
    padding: 16px 0 18px !important;
    border-top: none !important;
    box-shadow: none !important;
    background-color: transparent !important;
    background-image: linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.7) 0%,
        rgba(0, 0, 0, 0.34) 52%,
        transparent 100%
    ) !important;
    background-repeat: no-repeat !important;
    pointer-events: auto;
}

body.iagofer-funnel-home .site-footer .footer-bottom,
body.iagofer-funnel-home .site-footer .footer-bottom .container {
    background: transparent !important;
}

body.iagofer-funnel-home .entry-footer {
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
}

body.iagofer-funnel-home .footer-legal a {
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.75);
}

body.iagofer-funnel-home .footer-bottom p {
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.75);
}

body.iagofer-funnel-home .v2-funnel,
body.iagofer-funnel-home .v2-funnel__grid {
    min-height: 100svh;
}

@media (min-width: 901px) {
    body.iagofer-funnel-home .v2-funnel,
    body.iagofer-funnel-home .v2-funnel__grid {
        height: 100svh;
        max-height: 100svh;
    }

    body.iagofer-funnel-home .v2-funnel__panel {
        min-height: 0;
        height: 100%;
        padding-bottom: calc(clamp(2rem, 5vw, 3.5rem) + var(--v2-funnel-footer-safe));
    }
}

body.iagofer-funnel-home .v2-funnel {
    background: transparent;
}

body.iagofer-funnel-home .entry-content,
body.iagofer-funnel-home .wp-block-post-content {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

@media (max-width: 900px) {
    body.iagofer-funnel-home,
    body.iagofer-funnel-home #page.site {
        overflow-x: hidden;
        height: auto;
        min-height: 100svh;
    }

    body.iagofer-funnel-home .entry-content,
    body.iagofer-funnel-home .wp-block-post-content,
    body.iagofer-funnel-home .entry-content .wp-block-html {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* En móvil el footer va al final del scroll (no tapa los CTAs) */
    body.iagofer-funnel-home.iagofer-v2-front-page #colophon.site-footer,
    body.iagofer-funnel-home #colophon.site-footer {
        position: relative !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        margin-top: 0 !important;
        padding-top: 16px !important;
    }

    body.iagofer-funnel-home .v2-funnel,
    body.iagofer-funnel-home .v2-funnel__grid {
        min-height: auto;
        height: auto;
    }

    .v2-funnel__grid {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .v2-funnel__panel {
        min-height: clamp(400px, 56svh, 500px);
        padding: clamp(5.25rem, 13vw, 6rem) clamp(1.25rem, 5vw, 1.75rem) clamp(1.75rem, 4.5vw, 2.25rem);
        align-items: flex-end;
        justify-content: flex-start;
    }

    .v2-funnel__panel--industrial::after,
    .v2-funnel__panel--audiovisual::before {
        top: auto;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: min(12vh, 88px);
    }

    .v2-funnel__panel--industrial::after {
        background: linear-gradient(0deg, transparent 0%, rgba(0, 0, 0, 0.42) 100%);
    }

    .v2-funnel__panel--audiovisual::before {
        display: none;
    }

    .v2-funnel__panel--audiovisual::after {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: min(10vh, 72px);
        z-index: 2;
        pointer-events: none;
        background: linear-gradient(180deg, rgba(0, 0, 0, 0.38) 0%, transparent 100%);
    }

    .v2-funnel__content {
        max-width: none;
        width: 100%;
    }

    .v2-funnel__title {
        font-size: clamp(1.4rem, 5.2vw, 1.8rem);
    }

    .v2-funnel__lead {
        font-size: clamp(0.92rem, 3.6vw, 1.02rem);
        margin-bottom: 1.25rem;
    }

    .v2-funnel__cta {
        width: 100%;
        max-width: 100%;
        justify-content: center;
        text-align: center;
        padding-left: 18px;
        padding-right: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .v2-funnel__panel:hover .v2-funnel__bg {
        transform: none;
        filter: brightness(1.03);
    }

    .v2-funnel__bg,
    .v2-funnel__overlay,
    .v2-funnel__cta {
        transition: none;
    }
}
