body {
    padding-top: 0% !important;
}

:root {
    --mx: 1440px;
    --pad: clamp(16px, 3vw, 32px);
    --blue1: #0a5ea0;
    --blue2: #0b7bbf;
    --white: #fff;
    --orange: #ff8e28;
}

/* ===== Hero + video ===== */
.hero {
    position: relative;
    min-height: 100svh;
    color: var(--white);
    overflow: clip;
}

.hero__bg {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.hero__video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: translateZ(0);
}

.hero__overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero__overlay.overlay_cdmx {
    background: linear-gradient(
            90deg,
            rgba(10, 94, 160, 0.85) 0%,
            rgba(11, 123, 191, 0.35) 45%,
            rgba(11, 123, 191, 0.08) 70%
        ),
        radial-gradient(
            1000px 600px at 15% 20%,
            rgba(0, 0, 0, 0.35),
            transparent 60%
        );
}

.hero__overlay.overlay_gdl {
    background: linear-gradient(
            90deg,
            #0880b4 5%,
            #03a591 30%,
            rgba(3, 165, 145, 0.51) 45%,
            rgba(11, 123, 191, 0.08) 70%
        ),
        radial-gradient(
            1000px 600px at 15% 20%,
            rgba(0, 0, 0, 0.35),
            transparent 60%
        );
}

/* Contenido */
.hero__container {
    width: min(var(--mx), 90%);
    margin-inline: auto;
    padding: var(--pad);
    display: grid;
    gap: clamp(12px, 2.5vw, 24px);
    min-height: 72svh;
    /* align-content: start; */
    align-content: space-between;
}

.hero__top {
    display: flex;
    justify-content: flex-start;
}

.hero__logo {
    width: clamp(200px, 18vw, 320px);
    height: auto;
}

.hero__copy {
    /* margin-top: 12vh; */
}

/* Título con animación */
.hero__title {
    font-size: clamp(34px, 7vw, 68px);
    line-height: 1.05;
    font-weight: 800;
    margin: 0 0 0.6rem;
    opacity: 0;
    transform: translateY(16px);
}

.hero__title span {
    color: #bfe7ff;
    font-weight: 900;
}

.anim-reveal.is-in {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

@media (prefers-reduced-motion: reduce) {
    .hero__title {
        opacity: 1;
        transform: none;
    }
}

div.btn {
    width: -webkit-fill-available;
    border: none;
    display: flex;
    justify-content: center;
}

.btn-20 {
    border-width: 0px !important;
    max-width: 314px !important;
    width: 100% !important;

    font-size: 22px;
    font-weight: 800;
    line-height: normal;
    padding-inline: 1rem;
}

.conecta-textos {
    color: #fff;
    text-shadow: 4px 4px 20px #01558c;
    font-style: normal;
}

.conecta-text-uno {
    font-weight: 800;
    font-size: clamp(40px, 20vw, 128px);
    line-height: 1.2;
    margin-bottom: 0%;
}

.conecta-text-dos,
.conecta-text-tres {
    font-weight: 400;
    font-size: clamp(25px, 8vw, 60px);
    line-height: 1.5;
    margin-bottom: 0%;
}

.conecta-text-gdl {
    font-size: clamp(25px, 7vw, 60px);
}

.conecta-text-tres {
    padding-bottom: 25px;
}

.conecta-text-dos span {
    font-weight: 900;
}

/* Pequeños ajustes responsive del hero */
@media (max-width: 640px) {
    .hero__container {
        width: min(var(--mx), 100%);
        text-align: center;
    }

    .hero__title {
        margin-inline: auto;
    }

    .conecta-text-tres {
        text-align: right;
        width: 90%;
    }
}

@media (min-width: 640px) {
    .conecta-text-dos {
        margin-left: -5%;
    }

    .conecta-text-tres {
        padding-left: 150px;
        padding-bottom: 0px;
    }

    div.btn {
        margin-left: 200px;
        justify-content: flex-start;
    }
}

/* ------------- Información ----------- */
.informacion {
    margin-inline: 25px;
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    text-align: start;
    flex-direction: column;
}

.titulo-info {
    margin-top: 2rem;
    font-size: 36px;
    font-style: normal;
    font-weight: 900;
    line-height: normal;
    text-align: center;
}

.titulo-info.titulo_cdmx {
    color: var(--azul-marino-medex);
}

.titulo-info.titulo_gdl {
    color: var(--turquesa-medex);
}

.texto-info {
    margin-top: 1.5rem;
    color: var(--gris-oscuro);
    font-size: 22px;
    font-style: normal;
    font-weight: 500;
    line-height: 150%; /* 33px */
}

.texto-info span {
    color: var(--azul-marino-medex);
    font-weight: 800;
}

@media (min-width: 640px) {
    .informacion {
        text-align: center;
    }

    .texto-info {
        max-width: 915px;
    }
}

/* --------------------------------------------------- */
/* ===== base hero (mantén tu 100svh por defecto) ===== */
.hero {
    position: relative;
    min-height: 100svh;
    color: var(--white, #fff);
    overflow: clip;
    --dur: 700ms;
}
.hero__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.hero__video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hero__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
}

/* Capas de contenido */
.hero__container {
    position: relative;
    z-index: 2;
    transition: opacity 0.28s ease, transform 0.28s ease;
}
.hero__form {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-content: center;
    opacity: 0;
    transform: translateY(20px) scale(0.98);
    pointer-events: none;
    transition: opacity 0.28s ease, transform 0.28s ease;
}
.hero__wipe {
    position: absolute;
    inset: 0;
    z-index: 4;
    pointer-events: none;
    opacity: 0;
}

/* Estados de visibilidad */
.hero.is-form-open .hero__container {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
    pointer-events: none;
}
.hero.is-form-open .hero__form {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

/* Caja del formulario */
.me-form {
    width: min(1230px, 92vw);
    background: #fff;
    color: #111;
    border-radius: 4px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    /* padding: 20px; */
    /* display: grid; */
    display: flex;
    flex-direction: row-reverse;
    gap: 0.9rem;
}
.me-field {
    display: grid;
    gap: 0.35rem;
}
.me-field input,
.me-field textarea {
    padding: 0.65rem 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.6rem;
}
.me-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}
.me-primary {
    background: #ff7a00;
    color: #fff;
    border: 0;
}
.me-secondary {
    background: #e5e7eb;
    border: 0;
}
.hero__close {
    position: absolute;
    top: 12px;
    right: 14px;
    border: 0;
    background: #cbcbcb;
    color: #111;
    font-size: 33px;
    border-radius: 30px;
    width: 50px;
    height: 50px;
}

/* ===== SOLO MÓVIL: cuando el form está abierto, que .hero CREZCA y el form ENTRE AL FLUJO ===== */

.hero.is-form-open {
    min-height: auto;
    overflow: visible;
} /* <--- ya no 100vh */
.hero.is-form-open .hero__form {
    position: relative;
    inset: auto; /* <--- participa en el flujo */
    padding: clamp(16px, 4vw, 32px);
    padding-top: 3.8rem;
    padding-bottom: 3.8rem;
}
/* Si quieres ocultar por completo el bloque original en móvil cuando está abierto: */
.hero.is-form-open .hero__container {
    display: none;
} /* evita huecos y eventos */

@media (max-width: 767.98px) {
    .me-form {
        display: flex;
        flex-direction: column;
    }

    .hero__close {
        font-size: 20px;
        width: 35px;
        height: 35px;
    }
}

/* Cortina “barrido” (opcional) */
.hero__wipe {
    background: linear-gradient(
        90deg,
        rgba(0, 138, 204, 0) 0%,
        rgba(0, 138, 204, 0.75) 35%,
        rgba(0, 138, 204, 0.92) 50%,
        rgba(0, 138, 204, 0.75) 65%,
        rgba(0, 138, 204, 0) 100%
    );
    filter: blur(2px);
    transform: translateX(-110%);
    will-change: transform;
}
.hero.is-switching .hero__wipe {
    opacity: 1;
    animation: hero-wipe var(--dur) cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
@keyframes hero-wipe {
    from {
        transform: translateX(-110%);
    }
    to {
        transform: translateX(110%);
    }
}

/* ---------------------------------------------------------
    FORM CTA - ESTILOS DE LA VENTANA EMERGENTE CON EL FORM
------------------------------------------------------------*/

.logo-form {
    width: clamp(190px, 6vw, 242px);
}

.form-title {
    color: #fff;
    font-size: 58px;
    font-style: normal;
    font-weight: 300;
    line-height: 115%;
    text-align: center;
}

.form-title span {
    font-weight: 800;
}

.lista-form {
    color: var(--gris-claro);
    /* font-size: 24px; */
    font-size: clamp(16px, 3vw, 22px);
    font-style: normal;
    font-weight: 500;
    line-height: normal;
}

.lista-form span {
    color: var(--azul-marino-medex);
    font-weight: 900;
}

.lista-form li::marker {
    color: var(--azul-marino-medex);
}

.descarga-form {
    color: var(--azul-marino-medex);
    font-size: 20px;
    font-style: normal;
    font-weight: 800;
    line-height: normal;
}

.descarga-form span {
    color: var(--turquesa-medex);
    font-weight: 900;
}

.btn-container {
    display: flex;
    justify-content: center;
    margin-bottom: 50px;
}

.btn-descarga {
    background-color: var(--azul-marino-medex);
    color: #fff;
    cursor: pointer;
    height: 43px;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 314px !important;
    width: 100% !important;
    font-size: 22px;
    font-weight: 800;
    line-height: normal;
    border-radius: 99rem;
    overflow: hidden;
    box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.3);
}

.btn-descarga,
.btn-descarga:hover {
    text-decoration: none;
}

/* ========== Grid responsive ========== */
.col-form {
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    border-radius: 4px;
    box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.25);
}

.fondo_cdmx {
    background-image: url(../../../public/images/cotizadores/fondo_formCTA_cdmx.svg);
}

.fondo_gdl {
    background-image: url(../../../public/images/cotizadores/fondo_formCTA_gdl.svg);
}

.me-form-grid {
    display: grid;
    grid-template-columns: 1fr;
    /* móvil: 1 columna */
    gap: 16px 16px;
}

@media (min-width: 1024px) {
    /* desktop: 2 columnas */
    .me-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.column-2 {
    grid-column: 1 / -1;
}

/* ========== Floating label ========== */
/* Contenedor */
.fl {
    position: relative;
}

/* Control */
.fl__control {
    width: 100%;
    height: 40px;
    background: #fff;
    color: #111;
    border: 1px solid #e5e7eb;
    border-radius: 0.65rem;
    padding-inline: 14px;
    /* ≥16px evita zoom en iOS */
    padding-top: 8px;
    /* espacio para el label flotante */
    font-size: 16px;
    line-height: 1.25;
    outline: 0;
    transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
    appearance: none;
    /* limpia estilo nativo (iOS/Android) */
}

.fl__control:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.35);
}

/* Label */
.fl__label {
    position: absolute;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    background: #fff;
    padding: 0 6px;
    color: #6b7280;
    font-size: 16px;
    pointer-events: none;
    transition: transform 0.15s, top 0.15s, font-size 0.15s, color 0.15s;
    line-height: 120%;
}

/* Estado “flotando”: foco o con valor */
.fl__control:focus + .fl__label,
.fl.has-value .fl__label {
    top: -8px;
    transform: none;
    font-size: 12px;
    color: var(--azul-marino-medex);
    border-radius: 10px;
}

/* Select: flecha personalizada y mismo comportamiento */
.fl--select .fl__control {
    background-image: none;
}

.fl--select::after {
    content: '';
    position: absolute;
    right: 12px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-right: 2px solid #6b7280;
    border-bottom: 2px solid #6b7280;
    transform: translateY(-50%) rotate(45deg);
    pointer-events: none;
}

.me-error {
    color: #b91c1c;
    font-size: 12px;
    margin-top: 4px;
    display: block;
}

/* ========== Botón CTA ========== */
.btn-cta {
    display: block;
    width: 90%;
    padding: 5px 18px;
    border: 0;
    border-radius: 999px;
    font-weight: 700;
    font-size: 18px;
    background: var(--naranja-medex);
    color: #fff;
    box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.3);
    cursor: pointer;
}

.btn-cta:hover,
.btn-descarga:hover {
    filter: brightness(1.08);
}

/* Errores */
.me-error {
    color: #b91c1c;
    font-size: 12px;
    margin-top: 4px;
    display: block;
    position: absolute;
    top: -12px;
    right: 5%;
    background: white;
    padding-inline: 5px;
    border-radius: 10px;
}

.me-form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px 16px;
}

@media (min-width: 1024px) {
    .me-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.col-2 {
    grid-column: 1 / -1;
}

/* Ocultar semántico */
[hidden] {
    display: none !important;
}

.is-invalid {
    border-color: #dc3545;
    padding-right: 2.25rem;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23dc3545' viewBox='0 0 12 12'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}
