/* =====================================================
   CONTACTO SPNEXT
===================================================== */

#contacto.contact-section {
    position: relative;
    isolation: isolate;

    padding: var(--section-space) 0;

    overflow: hidden;

    border-top: 1px solid rgba(148, 163, 184, 0.1);

    background:
        radial-gradient(circle at 10% 15%,
            rgba(37, 99, 235, 0.26),
            transparent 30%),
        radial-gradient(circle at 90% 85%,
            rgba(139, 92, 246, 0.2),
            transparent 32%),
        linear-gradient(135deg,
            #020617 0%,
            #0f172a 55%,
            #111c32 100%);

    color: var(--white);
}


/* =====================================================
   CUADRÍCULA DECORATIVA
===================================================== */

#contacto.contact-section::before {
    content: "";

    position: absolute;
    inset: 0;
    z-index: -2;

    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px,
            transparent 1px),
        linear-gradient(90deg,
            rgba(255, 255, 255, 0.035) 1px,
            transparent 1px);

    background-size: 48px 48px;

    mask-image:
        linear-gradient(to bottom,
            transparent,
            black 15%,
            black 85%,
            transparent);

    -webkit-mask-image:
        linear-gradient(to bottom,
            transparent,
            black 15%,
            black 85%,
            transparent);

    pointer-events: none;
}


/* =====================================================
   BRILLOS DECORATIVOS
===================================================== */

.contact-glow {
    position: absolute;
    z-index: -1;

    border-radius: 50%;

    filter: blur(105px);

    pointer-events: none;
}

.contact-glow-1 {
    top: -140px;
    left: -100px;

    width: 380px;
    height: 380px;

    background: rgba(37, 99, 235, 0.24);
}

.contact-glow-2 {
    right: -130px;
    bottom: -160px;

    width: 430px;
    height: 430px;

    background: rgba(139, 92, 246, 0.18);
}


/* =====================================================
   ENCABEZADO
===================================================== */

.contact-section-header {
    margin-bottom: 50px;
}

.contact-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;

    margin-bottom: 18px;
    padding: 8px 17px;

    border: 1px solid rgba(6, 182, 212, 0.3);
    border-radius: var(--radius-pill);

    background: rgba(6, 182, 212, 0.1);
    color: #a5f3fc;

    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.contact-badge i {
    color: var(--secondary);

    font-size: 0.8rem;
}

.contact-title {
    max-width: 850px;

    margin: 0 auto 18px;

    color: var(--white);

    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.03em;
}

.contact-title .text-gradient {
    background:
        linear-gradient(90deg,
            #60a5fa,
            var(--secondary),
            #c4b5fd);

    background-clip: text;
    -webkit-background-clip: text;

    color: transparent;

    -webkit-text-fill-color: transparent;
}

.contact-subtitle {
    max-width: 760px;

    margin: 0 auto;

    color: #94a3b8;

    font-size: 0.98rem;
    line-height: 1.8;
}


/* =====================================================
   TARJETAS GENERALES
===================================================== */

.contact-info-card,
.contact-form-card {
    height: 100%;

    border-radius: var(--radius-md);

    box-shadow:
        0 25px 60px rgba(2, 6, 23, 0.25);

    transition:
        transform var(--transition-normal),
        border-color var(--transition-normal),
        box-shadow var(--transition-normal);
}

.contact-info-card:hover,
.contact-form-card:hover {
    transform: translateY(-4px);
}


/* =====================================================
   TARJETA DE INFORMACIÓN
===================================================== */

.contact-info-card {
    position: relative;

    padding: 31px 28px;

    overflow: hidden;

    border: 1px solid rgba(148, 163, 184, 0.17);

    background:
        linear-gradient(145deg,
            rgba(255, 255, 255, 0.075),
            rgba(255, 255, 255, 0.025));

    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.contact-info-card::before {
    content: "";

    position: absolute;
    top: 0;
    right: 28px;
    left: 28px;

    height: 3px;

    border-radius: 0 0 10px 10px;

    background:
        linear-gradient(90deg,
            var(--primary),
            var(--secondary),
            var(--accent));
}


/* =====================================================
   ENCABEZADO DE INFORMACIÓN
===================================================== */

.contact-info-header {
    margin-bottom: 27px;
}

.contact-info-header>span {
    display: block;

    margin-bottom: 7px;

    color: var(--secondary);

    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.contact-info-header h3 {
    margin-bottom: 11px;

    color: var(--white);

    font-size: 1.32rem;
    font-weight: 750;
    line-height: 1.4;
}

.contact-info-header p {
    margin: 0;

    color: #94a3b8;

    font-size: 0.82rem;
    line-height: 1.7;
}


/* =====================================================
   CANALES DE CONTACTO
===================================================== */

.contact-channel {
    display: flex;
    align-items: center;
    gap: 14px;

    width: 100%;

    margin-bottom: 12px;
    padding: 15px 16px;

    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 15px;

    background: rgba(255, 255, 255, 0.045);
    color: inherit;

    transition:
        transform var(--transition-normal),
        border-color var(--transition-normal),
        background-color var(--transition-normal),
        box-shadow var(--transition-normal);
}

a.contact-channel:hover,
a.contact-channel:focus-visible {
    border-color: rgba(6, 182, 212, 0.32);

    background: rgba(37, 99, 235, 0.12);
    color: inherit;

    transform: translateX(4px);

    box-shadow: 0 12px 28px rgba(2, 6, 23, 0.16);
}

.contact-channel-static {
    cursor: default;
}


/* Iconos */

.contact-channel-icon {
    width: 46px;
    height: 46px;

    display: grid;
    place-items: center;
    flex: 0 0 auto;

    border-radius: 13px;

    color: var(--white);

    font-size: 1.15rem;

    box-shadow: 0 9px 22px rgba(2, 6, 23, 0.22);

    transition:
        transform var(--transition-normal),
        box-shadow var(--transition-normal);
}

.contact-channel-icon i {
    display: block;

    color: inherit;

    font-size: inherit;
    line-height: 1;
}

a.contact-channel:hover .contact-channel-icon {
    transform: rotate(-4deg) scale(1.04);
}

.contact-whatsapp-icon {
    background:
        linear-gradient(135deg,
            #16a34a,
            #22c55e);
}

.contact-email-icon {
    background:
        linear-gradient(135deg,
            var(--primary),
            var(--accent));
}

.contact-location-icon {
    background:
        linear-gradient(135deg,
            #ea580c,
            var(--warning));
}

.contact-meeting-icon {
    background:
        linear-gradient(135deg,
            #0891b2,
            var(--secondary));
}


/* Contenido del canal */

.contact-channel-content {
    display: block;
    flex: 1;
    min-width: 0;
}

.contact-channel-content small,
.contact-channel-content strong {
    display: block;
}

.contact-channel-content small {
    margin-bottom: 3px;

    color: #94a3b8;

    font-size: 0.65rem;
    line-height: 1.35;
}

.contact-channel-content strong {
    overflow-wrap: anywhere;

    color: var(--white);

    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.45;
}

.contact-channel-arrow {
    flex: 0 0 auto;

    color: #64748b;

    font-size: 0.75rem;

    transition:
        color var(--transition-normal),
        transform var(--transition-normal);
}

a.contact-channel:hover .contact-channel-arrow {
    color: var(--secondary);

    transform: translateX(3px);
}


/* =====================================================
   PASOS POSTERIORES
===================================================== */

.contact-next-steps {
    margin-top: 26px;
    padding: 20px;

    border: 1px solid rgba(6, 182, 212, 0.17);
    border-radius: 16px;

    background:
        linear-gradient(135deg,
            rgba(6, 182, 212, 0.07),
            rgba(37, 99, 235, 0.055));
}

.contact-next-steps-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    margin-bottom: 15px;

    color: #cffafe;

    font-size: 0.76rem;
    font-weight: 700;
}

.contact-next-steps-title i {
    color: var(--secondary);

    font-size: 0.83rem;
}

.contact-next-steps ol {
    display: grid;
    gap: 11px;

    margin: 0;
    padding: 0;

    list-style: none;
}

.contact-next-steps li {
    display: flex;
    align-items: flex-start;
    gap: 10px;

    color: #94a3b8;

    font-size: 0.73rem;
    line-height: 1.55;
}

.contact-next-steps li>span {
    width: 23px;
    height: 23px;

    display: grid;
    place-items: center;
    flex: 0 0 auto;

    border: 1px solid rgba(6, 182, 212, 0.2);
    border-radius: 50%;

    background: rgba(6, 182, 212, 0.1);
    color: var(--secondary);

    font-size: 0.61rem;
    font-weight: 700;
}


/* =====================================================
   MENSAJE DE PRIVACIDAD
===================================================== */

.contact-trust {
    display: flex;
    align-items: flex-start;
    gap: 12px;

    margin-top: 18px;
    padding: 16px;

    border: 1px solid rgba(16, 185, 129, 0.17);
    border-radius: 15px;

    background: rgba(16, 185, 129, 0.065);
}

.contact-trust-icon {
    width: 39px;
    height: 39px;

    display: grid;
    place-items: center;
    flex: 0 0 auto;

    border-radius: 12px;

    background:
        linear-gradient(135deg,
            #059669,
            var(--success));

    color: var(--white);

    font-size: 0.95rem;

    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.2);
}

.contact-trust-icon i {
    display: block;

    color: inherit;

    font-size: inherit;
    line-height: 1;
}

.contact-trust p {
    margin: 0;

    color: #a7f3d0;

    font-size: 0.7rem;
    line-height: 1.6;
}


/* =====================================================
   TARJETA DEL FORMULARIO
===================================================== */

.contact-form-card {
    position: relative;

    padding: 31px 30px;

    overflow: hidden;

    border: 1px solid rgba(226, 232, 240, 0.92);

    background: rgba(255, 255, 255, 0.98);

    color: var(--text);
}

.contact-form-card::before {
    content: "";

    position: absolute;
    top: 0;
    right: 30px;
    left: 30px;

    height: 3px;

    border-radius: 0 0 10px 10px;

    background:
        linear-gradient(90deg,
            var(--primary),
            var(--secondary),
            var(--accent));
}


/* =====================================================
   ENCABEZADO DEL FORMULARIO
===================================================== */

.contact-form-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 22px;

    margin-bottom: 27px;
}

.contact-form-header>div:first-child {
    flex: 1;
    min-width: 0;
}

.contact-form-header>div:first-child>span {
    display: block;

    margin-bottom: 5px;

    color: var(--primary);

    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.contact-form-header h3 {
    margin-bottom: 7px;

    color: var(--dark);

    font-size: 1.35rem;
    font-weight: 750;
    line-height: 1.4;
}

.contact-form-header p {
    margin: 0;

    color: var(--text-light);

    font-size: 0.76rem;
    line-height: 1.6;
}

.contact-form-icon {
    width: 54px;
    height: 54px;

    display: grid;
    place-items: center;
    flex: 0 0 auto;

    border-radius: 15px;

    background:
        linear-gradient(135deg,
            var(--primary),
            var(--accent));

    color: var(--white);

    font-size: 1.25rem;

    box-shadow:
        0 12px 27px rgba(37, 99, 235, 0.24);
}

.contact-form-icon i {
    display: block;

    color: inherit;

    font-size: inherit;
    line-height: 1;
}


/* =====================================================
   CAMPOS DEL FORMULARIO
===================================================== */

.contact-form-card .form-floating {
    position: relative;
}

.contact-form-card .form-control,
.contact-form-card .form-select {
    min-height: 58px;

    border: 1px solid var(--border);
    border-radius: 13px;

    background-color: var(--light);
    color: var(--dark-2);

    font-size: 0.84rem;

    box-shadow: none;

    transition:
        border-color var(--transition-normal),
        background-color var(--transition-normal),
        box-shadow var(--transition-normal);
}

.contact-form-card .form-control:hover,
.contact-form-card .form-select:hover {
    border-color: rgba(37, 99, 235, 0.3);

    background-color: var(--white);
}

.contact-form-card .form-control:focus,
.contact-form-card .form-select:focus {
    border-color: var(--primary);

    background-color: var(--white);

    box-shadow:
        0 0 0 0.22rem rgba(37, 99, 235, 0.11);
}

.contact-form-card .form-control::placeholder {
    color: transparent;
}

.contact-form-card .form-floating>label {
    display: flex;
    align-items: center;

    color: var(--text-light);

    font-size: 0.76rem;
}

.contact-form-card .form-floating>label i {
    color: var(--primary);

    font-size: 0.75rem;
}

.contact-form-card .form-control:focus~label,
.contact-form-card .form-control:not(:placeholder-shown)~label,
.contact-form-card .form-select~label {
    color: var(--primary);
}


/* Select */

.contact-form-card .form-select {
    cursor: pointer;
}


/* Textarea */

.contact-form-card textarea.form-control {
    min-height: 175px;

    padding-top: 24px;

    resize: vertical;
}


/* =====================================================
   VALIDACIÓN NATIVA
===================================================== */

.contact-form-card .form-control:required:valid,
.contact-form-card .form-select:required:valid {
    border-color: rgba(16, 185, 129, 0.42);
}

.contact-form-card .form-control:focus:invalid,
.contact-form-card .form-select:focus:invalid {
    border-color: rgba(239, 68, 68, 0.58);

    box-shadow:
        0 0 0 0.22rem rgba(239, 68, 68, 0.1);
}


/* =====================================================
   CONTADOR DE CARACTERES
===================================================== */

.contact-character-counter {
    margin-top: 7px;

    color: var(--text-light);

    font-size: 0.66rem;
    text-align: right;
}

.contact-character-counter span {
    color: var(--primary);

    font-weight: 700;
}


/* =====================================================
   CONSENTIMIENTO
===================================================== */

.contact-consent {
    display: flex;
    align-items: flex-start;
    gap: 9px;

    margin-top: 3px;
    padding: 14px 15px;

    border: 1px solid var(--border);
    border-radius: 13px;

    background: var(--light);
}

.contact-consent .form-check-input {
    width: 18px;
    height: 18px;

    flex: 0 0 auto;

    margin: 2px 0 0;

    border-color: #94a3b8;

    cursor: pointer;
}

.contact-consent .form-check-input:checked {
    border-color: var(--primary);

    background-color: var(--primary);
}

.contact-consent .form-check-input:focus {
    border-color: var(--primary);

    box-shadow:
        0 0 0 0.2rem rgba(37, 99, 235, 0.12);
}

.contact-consent .form-check-label {
    color: var(--text-light);

    font-size: 0.72rem;
    line-height: 1.6;

    cursor: pointer;
}

.contact-consent .form-check-label a {
    color: var(--primary);

    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.contact-consent .form-check-label a:hover {
    color: var(--primary-dark);
}


/* =====================================================
   CAMPO HONEYPOT
===================================================== */

.contact-honeypot {
    position: absolute !important;
    left: -9999px !important;

    width: 1px !important;
    height: 1px !important;

    overflow: hidden !important;

    opacity: 0 !important;
    pointer-events: none !important;
}


/* =====================================================
   BOTÓN DE ENVÍO
===================================================== */

.contact-submit {
    width: 100%;

    display: flex;
    align-items: center;
    justify-content: space-between;

    min-height: 54px;
    padding-right: 22px;
    padding-left: 22px;

    border-radius: 14px;
}

.contact-submit-text,
.contact-submit-loading {
    display: inline-flex;
    align-items: center;
    gap: 9px;
}

.contact-submit-loading[hidden] {
    display: none;
}

.contact-submit-arrow {
    transition: transform var(--transition-normal);
}

.contact-submit:hover .contact-submit-arrow {
    transform: translateX(5px);
}

.contact-submit:disabled {
    cursor: not-allowed;

    opacity: 0.72;

    transform: none;
}


/* =====================================================
   RESPUESTA DEL FORMULARIO
===================================================== */

.contact-response {
    display: none;

    margin-top: 18px;
    padding: 15px 17px;

    border: 1px solid transparent;
    border-radius: 13px;

    font-size: 0.76rem;
    line-height: 1.6;
}

.contact-response:not(:empty) {
    display: block;
}

.contact-response.is-info {
    border-color: rgba(6, 182, 212, 0.25);

    background: rgba(6, 182, 212, 0.09);
    color: #0e7490;
}

.contact-response.is-success {
    border-color: rgba(16, 185, 129, 0.28);

    background: rgba(16, 185, 129, 0.09);
    color: #047857;
}

.contact-response.is-error {
    border-color: rgba(239, 68, 68, 0.26);

    background: rgba(239, 68, 68, 0.08);
    color: #b91c1c;
}


/* =====================================================
   RESPONSIVE: TABLET
===================================================== */

@media (max-width: 991.98px) {

    #contacto.contact-section {
        padding: 85px 0;
    }

    .contact-section-header {
        margin-bottom: 42px;
    }

    .contact-info-card,
    .contact-form-card {
        height: auto;
    }

}


/* =====================================================
   RESPONSIVE: MÓVIL
===================================================== */

@media (max-width: 767.98px) {

    .contact-info-card,
    .contact-form-card {
        padding: 27px 24px;
    }

    .contact-form-header {
        gap: 15px;
    }

    .contact-form-icon {
        width: 50px;
        height: 50px;

        border-radius: 14px;

        font-size: 1.15rem;
    }

}


/* =====================================================
   RESPONSIVE: CELULARES PEQUEÑOS
===================================================== */

@media (max-width: 575.98px) {

    #contacto.contact-section {
        padding: 72px 0;
    }

    .contact-section-header {
        margin-bottom: 34px;
    }

    .contact-badge {
        max-width: 100%;

        font-size: 0.66rem;
    }

    .contact-title {
        font-size: 2rem;
    }

    .contact-subtitle {
        font-size: 0.87rem;
    }

    .contact-info-card,
    .contact-form-card {
        padding: 24px 19px;

        border-radius: 18px;
    }

    .contact-info-card::before {
        right: 20px;
        left: 20px;
    }

    .contact-form-card::before {
        right: 20px;
        left: 20px;
    }

    .contact-info-header h3,
    .contact-form-header h3 {
        font-size: 1.13rem;
    }

    .contact-channel {
        gap: 11px;

        padding: 13px;
    }

    .contact-channel-icon {
        width: 43px;
        height: 43px;

        border-radius: 12px;

        font-size: 1.05rem;
    }

    .contact-channel-content strong {
        font-size: 0.76rem;
    }

    .contact-channel-arrow {
        display: none;
    }

    .contact-next-steps {
        padding: 17px 15px;
    }

    .contact-trust {
        padding: 14px;
    }

    .contact-form-header {
        align-items: flex-start;
    }

    .contact-form-icon {
        width: 46px;
        height: 46px;

        font-size: 1.05rem;
    }

    .contact-form-card .form-control,
    .contact-form-card .form-select {
        font-size: 0.8rem;
    }

    .contact-form-card textarea.form-control {
        min-height: 165px;
    }

    .contact-consent {
        padding: 13px;
    }

}


/* =====================================================
   CELULARES MUY PEQUEÑOS
===================================================== */

@media (max-width: 359.98px) {

    .contact-form-header {
        flex-direction: column-reverse;
    }

    .contact-channel {
        align-items: flex-start;
    }

    .contact-channel-content {
        padding-top: 2px;
    }

    .contact-trust {
        flex-direction: column;
    }

}