/* ==========================================================================
   HERO LIBRANZA - CorpoKredit Landing Style
   ========================================================================== */

.fc-hero-libranza {
    position: relative;
    min-height: 100vh;
    overflow: hidden;

    display: flex;
    align-items: center;

    padding: clamp(140px, 14vw, 190px) 0 0;

    color: #ffffff;
    background: var(--fc-secondary);

    isolation: isolate;
}

/* Fondo video / imagen */

.fc-hero-libranza__media {
    position: absolute;
    inset: 0;
    z-index: -4;

    overflow: hidden;

    background: var(--fc-secondary);
}

.fc-hero-libranza__video {
    width: 100%;
    height: 100%;

    object-fit: cover;

    opacity: 0.62;
    filter: saturate(0.95) contrast(1.05) brightness(0.95);
}

/* Overlay azul oscuro */

.fc-hero-libranza__overlay {
    position: absolute;
    inset: 0;
    z-index: -3;

    background:
        radial-gradient(
            circle at center,
            rgba(var(--fc-primary-rgb), 0.10) 0%,
            rgba(var(--fc-primary-rgb), 0.18) 28%,
            rgba(var(--fc-secondary-rgb), 0.62) 58%,
            rgba(var(--fc-secondary-rgb), 0.92) 100%
        ),
        linear-gradient(
            180deg,
            rgba(var(--fc-secondary-rgb), 0.42) 0%,
            rgba(var(--fc-secondary-rgb), 0.70) 72%,
            rgba(var(--fc-secondary-rgb), 0.94) 100%
        );

    pointer-events: none;
}

.fc-hero-libranza::before {
    content: '';

    position: absolute;
    inset: 0;
    z-index: -2;

    background:
        radial-gradient(
            ellipse at center,
            rgba(var(--fc-primary-rgb), 0.20) 0%,
            rgba(var(--fc-primary-rgb), 0.10) 34%,
            transparent 68%
        );

    pointer-events: none;
}

/* Redes laterales */

.fc-hero-libranza__social {
    position: absolute;
    left: clamp(22px, 3vw, 54px);
    top: 50%;
    z-index: 4;

    display: flex;
    flex-direction: column;
    gap: 12px;

    transform: translateY(-50%);
}

.fc-hero-libranza__social a {
    width: 28px;
    height: 28px;

    display: grid;
    place-items: center;

    border-radius: 999px;

    color: var(--fc-secondary);
    background: #ffffff;
    text-decoration: none;

    font-size: 0.88rem;

    transition:
        transform 0.22s ease,
        background-color 0.22s ease,
        color 0.22s ease;
}

.fc-hero-libranza__social a:hover {
    transform: translateY(-2px);
    color: #ffffff;
    background: var(--fc-accent);
}

/* Contenedor */

.fc-hero-libranza__container {
    position: relative;
    z-index: 2;

    width: 100%;

    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Texto */

.fc-hero-libranza__content {
    max-width: 980px;
    margin: 0 auto 34px;

    text-align: center;
}

.fc-hero-libranza__label {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 18px;
    padding: 7px 16px;

    border-radius: 999px;

    color: #ffffff;
    background: rgba(var(--fc-accent-rgb), 0.16);
    border: 1px solid rgba(var(--fc-accent-rgb), 0.30);

    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.075em;
    text-transform: uppercase;
}

.fc-hero-libranza h1 {
    max-width: 980px;

    margin: 0 auto 22px;

    color: #ffffff;

    font-size: clamp(2.6rem, 5.5vw, 5.2rem);
    line-height: 1.02;
    letter-spacing: -0.06em;
    font-weight: 900;
}

.fc-hero-libranza h1 span,
.fc-hero-libranza h1 strong {
    color: var(--fc-accent);
}

.fc-hero-libranza p {
    max-width: 680px;

    margin: 0 auto;

    color: rgba(255, 255, 255, 0.88);

    font-size: clamp(1.02rem, 1.4vw, 1.2rem);
    line-height: 1.45;
    font-weight: 700;
}

/* Beneficios */

.fc-hero-libranza__benefits {
    --fc-benefit-blue: var(--fc-primary, #1689ed);
    --fc-benefit-orange: var(--fc-accent, #ed9700);

    width: min(1080px, calc(100% - 32px));

    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0;

    margin: 0 auto 56px;
    padding: 34px 28px 32px;

    border-radius: 30px;

    color: #5f6871;
    background: #ffffff;

    border: 1px solid rgba(var(--fc-primary-rgb), 0.18);
    box-shadow:
        0 18px 45px rgba(var(--fc-secondary-rgb), 0.16),
        0 4px 12px rgba(var(--fc-secondary-rgb), 0.08);

    overflow: hidden;
}

.fc-hero-libranza__benefit {
    position: relative;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0;

    min-width: 0;
    padding: 0 clamp(18px, 2.5vw, 38px);

    text-align: center;
}

.fc-hero-libranza__benefit:not(:first-child)::before {
    content: '';

    position: absolute;
    top: 2px;
    bottom: 2px;
    left: 0;

    width: 1px;
    background: rgba(var(--fc-primary-rgb), 0.50);
}

.fc-hero-libranza__benefit-icon {
    position: relative;

    width: 112px;
    min-width: 112px;
    height: 112px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 auto;
    margin: 0 auto 30px;

    color: var(--fc-benefit-blue);
    background: #ffffff;
    border: 4px solid currentColor;
    border-radius: 50%;

    font-size: 2.55rem;
    line-height: 1;
}

.fc-hero-libranza__benefit:nth-child(even) .fc-hero-libranza__benefit-icon {
    color: var(--fc-benefit-orange);
}

.fc-hero-libranza__benefit-icon::after {
    content: '';

    position: absolute;
    left: 50%;
    bottom: -18px;

    width: 64px;
    height: 5px;

    border-radius: 999px;
    background: currentColor;
    transform: translateX(-50%);
}

.fc-hero-libranza__benefit-icon > i {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    color: #111111;
    font-size: inherit;
}

.fc-hero-libranza__benefit-icon-img {
    width: 58px;
    height: 58px;

    display: block;

    object-fit: contain;
    object-position: center;
}

.fc-hero-libranza__benefit-icon-fallback {
    display: none;
}

.fc-hero-libranza__benefit strong {
    display: block;

    margin: 0 auto 10px;

    color: var(--fc-benefit-blue);

    font-size: clamp(1.12rem, 1.6vw, 1.55rem);
    line-height: 1.12;
    font-weight: 500;
    letter-spacing: -0.025em;
}

.fc-hero-libranza__benefit p {
    max-width: 285px;
    margin: 0 auto;

    color: #656d75;

    font-size: 0.94rem;
    line-height: 1.28;
    font-weight: 500;
}

/* Media luna naranja - escritorio */

.fc-hero-libranza__cta-wrap {
    position: relative;

    width: min(760px, 92vw);
    height: 170px;

    display: flex;
    justify-content: center;
    align-items: flex-start;

    margin: 0 auto;

    overflow: hidden;
}

.fc-hero-libranza__cta-wrap::before {
    content: '';

    position: absolute;
    left: 50%;
    bottom: -185px;

    width: min(760px, 92vw);
    height: 320px;

    border-radius: 50% 50% 0 0;

    background: var(--fc-accent);

    transform: translateX(-50%);

    pointer-events: none;
}

/* Botón */

.fc-hero-libranza__cta {
    position: relative;
    z-index: 2;

    min-height: 58px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;

    margin-top: 85px;
    padding: 0 38px;

    border: 0;
    border-radius: 999px;
    outline: none;

    color: #ffffff;
    background: var(--fc-primary);
    text-decoration: none;

    font-size: clamp(1rem, 1.5vw, 1.3rem);
    font-weight: 900;

    box-shadow: 0 18px 42px rgba(var(--fc-secondary-rgb), 0.22);

    -webkit-tap-highlight-color: transparent;

    transition:
        transform 0.22s ease,
        background-color 0.22s ease,
        box-shadow 0.22s ease;
}

.fc-hero-libranza__cta:hover {
    transform: translateY(-2px);
    color: #ffffff;
    background: var(--fc-accent);
    box-shadow: 0 22px 54px rgba(var(--fc-secondary-rgb), 0.28);
}

.fc-hero-libranza__cta:focus,
.fc-hero-libranza__cta:active,
.fc-hero-libranza__cta:focus-visible {
    outline: none;
}

.fc-hero-libranza__cta::before,
.fc-hero-libranza__cta::after {
    content: none;
    display: none;
}

.fc-hero-libranza__cta i {
    font-size: 1.05em;
}

/* ==========================================================================
   ANIMACIONES
   ========================================================================== */

@keyframes fcHeroLibranzaFadeUp {
    0% {
        opacity: 0;
        transform: translateY(26px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fcHeroCtaPulse {
    0% {
        transform: translateY(0) scale(1);
        box-shadow: 0 0 0 0 rgba(var(--fc-primary-rgb), 0.24);
    }

    50% {
        transform: translateY(-2px) scale(1.02);
        box-shadow: 0 0 0 10px rgba(var(--fc-primary-rgb), 0.07);
    }

    100% {
        transform: translateY(0) scale(1);
        box-shadow: 0 0 0 0 rgba(var(--fc-primary-rgb), 0);
    }
}

.fc-hero-libranza__label,
.fc-hero-libranza h1,
.fc-hero-libranza p,
.fc-hero-libranza__benefits,
.fc-hero-libranza__cta-wrap,
.fc-hero-libranza__social {
    opacity: 0;
    animation-name: fcHeroLibranzaFadeUp;
    animation-duration: 0.85s;
    animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
    animation-fill-mode: forwards;
}

.fc-hero-libranza__label {
    animation-delay: 0.12s;
}

.fc-hero-libranza h1 {
    animation-delay: 0.24s;
}

.fc-hero-libranza p {
    animation-delay: 0.36s;
}

.fc-hero-libranza__benefits {
    animation-delay: 0.48s;
}

.fc-hero-libranza__cta-wrap {
    animation-delay: 0.62s;
}

.fc-hero-libranza__social {
    animation-delay: 0.74s;
}

.fc-hero-libranza__cta {
    animation: fcHeroCtaPulse 2.8s ease-in-out 1.4s infinite;
}

.fc-hero-libranza__cta:hover {
    animation-play-state: paused;
}

/* ==========================================================================
   RESPONSIVE TABLET
   ========================================================================== */

@media (max-width: 1020px) {
    .fc-hero-libranza {
        min-height: auto;
        padding-top: 136px;
    }

    .fc-hero-libranza__benefits {
        width: min(920px, calc(100% - 32px));
        grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
        padding: 30px 20px;
    }

    .fc-hero-libranza__benefit {
        padding-inline: 22px;
    }

    .fc-hero-libranza__benefit-icon {
        width: 96px;
        min-width: 96px;
        height: 96px;
        font-size: 2.15rem;
    }

    .fc-hero-libranza__social {
        display: none;
    }
}

/* ==========================================================================
   RESPONSIVE MÓVIL
   ========================================================================== */

@media (max-width: 680px) {
    .fc-hero-libranza {
        min-height: 100svh;
        padding-top: 118px;
        padding-bottom: 78px;
        align-items: flex-start;
        background: var(--fc-secondary);
    }

    .fc-hero-libranza__container {
        min-height: calc(100svh - 118px);
        justify-content: flex-start;
    }

    .fc-hero-libranza__media,
    .fc-hero-libranza__overlay,
    .fc-hero-libranza::before {
        bottom: 0;
    }

    .fc-hero-libranza__content {
        margin-bottom: 28px;
    }

    .fc-hero-libranza h1 {
        font-size: clamp(2.4rem, 12vw, 3.6rem);
        letter-spacing: -0.05em;
    }

    .fc-hero-libranza p {
        font-size: 1rem;
        font-weight: 600;
    }

    .fc-hero-libranza__benefits {
        width: calc(100% - 44px);
        grid-template-columns: 1fr;
        gap: 0;

        margin-left: auto;
        margin-right: auto;
        margin-bottom: 24px;

        padding: 8px 24px;
        border-radius: 28px;
    }

    .fc-hero-libranza__benefit {
        padding: 28px 8px 32px;
    }

    .fc-hero-libranza__benefit:not(:first-child)::before {
        top: 0;
        right: 10%;
        bottom: auto;
        left: 10%;

        width: auto;
        height: 1px;
    }

    .fc-hero-libranza__benefit-icon {
        width: 96px;
        min-width: 96px;
        height: 96px;
        margin-bottom: 29px;
    }

    .fc-hero-libranza__benefit strong {
        max-width: 290px;
        font-size: 1.3rem;
    }

    .fc-hero-libranza__benefit p {
        max-width: 300px;
        font-size: 0.9rem;
    }

    /* En móvil se elimina la media luna naranja */
    .fc-hero-libranza__cta-wrap::before,
    .fc-hero-libranza__cta-wrap::after {
        content: none;
        display: none;
    }

    .fc-hero-libranza__cta-wrap {
        width: 100%;
        height: auto;
        min-height: 0;

        margin: 22px auto 0;
        padding: 0 20px;

        overflow: visible;
        background: transparent;
        border: 0;
        box-shadow: none;
    }

    .fc-hero-libranza__cta {
        width: 100%;
        max-width: 280px;

        min-height: 54px;
        margin-top: 0;
        margin-bottom: 0;
        padding: 0 28px;

        background: var(--fc-primary);
        color: #ffffff;

        border: 0;
        box-shadow: none;
        outline: none;

        font-size: 1rem;

        animation: fcHeroCtaPulseMobile 2.8s ease-in-out 1.4s infinite;
    }

    .fc-hero-libranza__cta:hover,
    .fc-hero-libranza__cta:focus,
    .fc-hero-libranza__cta:active,
    .fc-hero-libranza__cta:focus-visible {
        background: var(--fc-accent);
        color: #ffffff;
        box-shadow: none;
        outline: none;
    }
}

/* Loop móvil sin sombra para evitar línea visual */

@media (max-width: 680px) {
    @keyframes fcHeroCtaPulseMobile {
        0%,
        100% {
            transform: translateY(0) scale(1);
            box-shadow: none;
        }

        50% {
            transform: translateY(-2px) scale(1.015);
            box-shadow: none;
        }
    }

    .fc-hero-libranza + section,
    .fc-hero-libranza + .fc-page-widget {
        margin-top: -1px;
    }
}

/* Respeto a usuarios con reducción de movimiento */

@media (prefers-reduced-motion: reduce) {
    .fc-hero-libranza__label,
    .fc-hero-libranza h1,
    .fc-hero-libranza p,
    .fc-hero-libranza__benefits,
    .fc-hero-libranza__cta-wrap,
    .fc-hero-libranza__social,
    .fc-hero-libranza__cta {
        opacity: 1;
        animation: none;
        transform: none;
    }
}