/* ==========================================================
   CONTACT PAGE
   SOSMedical
========================================================== */

.contact-page,
.contact-success-page{
    background:var(--background);
}

/*
|--------------------------------------------------------------------------
| Hero
|--------------------------------------------------------------------------
*/

.contact-hero{
    position:relative;
    overflow:hidden;

    padding:100px 0;

    background:
        radial-gradient(
            circle at 85% 20%,
            rgba(0,153,216,.12),
            transparent 28%
        ),
        linear-gradient(
            135deg,
            #f9fcfe,
            #eef8fc,
            #ffffff
        );
}

.contact-hero__content{
    max-width:760px;
}

.contact-hero__eyebrow{
    color:var(--secondary);

    font-size:12px;
    font-weight:700;

    letter-spacing:.12em;
    text-transform:uppercase;
}

.contact-hero__title{
    margin-top:18px;

    font-size:clamp(46px,6vw,74px);
    line-height:1.05;
}

.contact-hero__text{
    margin-top:22px;

    color:var(--text-light);

    font-size:18px;
    line-height:1.9;
}

/*
|--------------------------------------------------------------------------
| Main
|--------------------------------------------------------------------------
*/

.contact-main{
    padding:100px 0;
}

.contact-main__grid{
    display:grid;
    grid-template-columns:380px 1fr;
    gap:40px;
}

/*
|--------------------------------------------------------------------------
| Contact cards
|--------------------------------------------------------------------------
*/

.contact-card{
    background:var(--white);

    border-radius:28px;

    border:1px solid rgba(11,35,65,.08);

    box-shadow:var(--shadow-sm);

    padding:30px;
}

.contact-card + .contact-card{
    margin-top:20px;
}

.contact-card__icon{
    width:64px;
    height:64px;

    display:flex;
    align-items:center;
    justify-content:center;

    background:rgba(0,153,216,.08);

    border-radius:18px;

    color:var(--secondary);
}

.contact-card__icon svg{
    width:28px;
    height:28px;
}

.contact-card__title{
    margin-top:18px;

    font-size:22px;
}

.contact-card__text{
    margin-top:10px;

    color:var(--text-light);

    line-height:1.8;
}

.contact-card__link{
    display:inline-flex;

    margin-top:18px;

    color:var(--secondary);
    font-weight:600;
}

/*
|--------------------------------------------------------------------------
| Form
|--------------------------------------------------------------------------
*/

.contact-form{
    background:var(--white);

    border-radius:32px;

    border:1px solid rgba(11,35,65,.08);

    box-shadow:var(--shadow-md);

    padding:45px;
}

.contact-form__header{
    margin-bottom:35px;
}

.contact-form__eyebrow{
    color:var(--secondary);

    font-size:12px;
    font-weight:700;

    letter-spacing:.12em;
    text-transform:uppercase;
}

.contact-form__title{
    margin-top:12px;

    font-size:42px;
}

.contact-form__description{
    margin-top:14px;

    color:var(--text-light);

    line-height:1.8;
}

.contact-form__grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:20px;
}

.contact-form__field{
    display:flex;
    flex-direction:column;
}

.contact-form__field--full{
    grid-column:1 / -1;
}

.contact-form__label{
    margin-bottom:8px;

    color:var(--primary);

    font-size:14px;
    font-weight:600;
}

.contact-form__required{
    color:#ef4444;
}

.contact-form__error{
    margin-top:8px;

    color:#dc2626;

    font-size:13px;
}

.contact-form__help{
    margin-top:8px;

    color:var(--text-light);

    font-size:13px;
}

.contact-form textarea{
    min-height:180px;
    resize:vertical;
}

.contact-form__checkbox{
    display:flex;
    align-items:flex-start;
    gap:12px;

    margin-top:10px;
}

.contact-form__checkbox input{
    margin-top:4px;
}

.contact-form__checkbox label{
    color:var(--text-light);

    font-size:14px;
    line-height:1.8;
}

.contact-form__actions{
    margin-top:30px;
}

/*
|--------------------------------------------------------------------------
| Alerts
|--------------------------------------------------------------------------
*/

.contact-alert{
    padding:18px 20px;

    border-radius:14px;

    margin-bottom:25px;
}

.contact-alert--success{
    color:#166534;

    background:#dcfce7;

    border:1px solid #bbf7d0;
}

.contact-alert--error{
    color:#991b1b;

    background:#fee2e2;

    border:1px solid #fecaca;
}

/*
|--------------------------------------------------------------------------
| Context card
|--------------------------------------------------------------------------
*/

.contact-context{
    margin-bottom:30px;

    padding:22px;

    background:rgba(0,153,216,.05);

    border:1px solid rgba(0,153,216,.12);

    border-radius:18px;
}

.contact-context__eyebrow{
    color:var(--secondary);

    font-size:11px;
    font-weight:700;

    text-transform:uppercase;
}

.contact-context__title{
    margin-top:10px;

    font-size:22px;
}

.contact-context__description{
    margin-top:10px;

    color:var(--text-light);

    line-height:1.8;
}

/*
|--------------------------------------------------------------------------
| Map
|--------------------------------------------------------------------------
*/

.contact-map{
    padding:0 0 110px;
}

.contact-map__frame{
    overflow:hidden;

    border-radius:28px;

    border:1px solid rgba(11,35,65,.08);

    box-shadow:var(--shadow-sm);
}

.contact-map iframe{
    width:100%;
    height:500px;
    border:0;
}

/*
|--------------------------------------------------------------------------
| Thank you page
|--------------------------------------------------------------------------
*/

.contact-success{
    padding:120px 0;
}

.contact-success__box{
    max-width:900px;

    margin:auto;

    text-align:center;

    padding:80px 50px;

    background:var(--white);

    border-radius:32px;

    border:1px solid rgba(11,35,65,.08);

    box-shadow:var(--shadow-md);
}

.contact-success__icon{
    width:90px;
    height:90px;

    margin:auto;

    display:flex;
    align-items:center;
    justify-content:center;

    background:rgba(0,182,122,.12);

    border-radius:50%;

    color:var(--success);
}

.contact-success__icon svg{
    width:40px;
    height:40px;
}

.contact-success__title{
    margin-top:25px;

    font-size:48px;
}

.contact-success__text{
    max-width:620px;

    margin:20px auto 0;

    color:var(--text-light);

    line-height:1.9;
}

.contact-success__actions{
    margin-top:35px;
}

/*
|--------------------------------------------------------------------------
| CTA
|--------------------------------------------------------------------------
*/

.contact-cta{
    padding:110px 0;
}

.contact-cta__box{
    text-align:center;

    padding:80px;

    border-radius:34px;

    background:
        linear-gradient(
            135deg,
            var(--secondary),
            #0084bc,
            var(--primary)
        );
}

.contact-cta__title{
    color:var(--white);

    font-size:clamp(34px,5vw,58px);
}

.contact-cta__text{
    max-width:700px;

    margin:20px auto 0;

    color:rgba(255,255,255,.8);

    line-height:1.9;
}

/*
|--------------------------------------------------------------------------
| Responsive
|--------------------------------------------------------------------------
*/

@media(max-width:1200px){

    .contact-main__grid{
        grid-template-columns:320px 1fr;
    }
}

@media(max-width:992px){

    .contact-main__grid{
        grid-template-columns:1fr;
    }
}

@media (max-width: 768px) {

    /*
    |--------------------------------------------------------------------------
    | Hero
    |--------------------------------------------------------------------------
    */

    .contact-hero {
        padding: 52px 0 46px;
    }

    .contact-hero__content {
        max-width: 100%;
    }

    .contact-hero__eyebrow {
        font-size: 8px;
        letter-spacing: .08em;
    }

    .contact-hero__title {
        max-width: 600px;
        margin-top: 12px;

        font-size: 32px;
        line-height: 1.08;
        letter-spacing: -.025em;

        text-wrap: balance;
    }

    .contact-hero__text {
        max-width: 580px;
        margin-top: 15px;

        font-size: 13px;
        line-height: 1.62;
    }


    /*
    |--------------------------------------------------------------------------
    | Contenido principal
    |--------------------------------------------------------------------------
    */

    .contact-main {
        padding: 58px 0;
    }

    .contact-main__grid {
        display: flex;
        flex-direction: column;
        gap: 38px;
    }


    /*
    |--------------------------------------------------------------------------
    | Formulario primero en móvil
    |--------------------------------------------------------------------------
    */

    .contact-form {
        order: 1;

        width: 100%;
        padding: 28px 22px;

        border-radius: 23px;
    }

    .contact-main__grid > aside {
        order: 2;
    }


    /*
    |--------------------------------------------------------------------------
    | Encabezado formulario
    |--------------------------------------------------------------------------
    */

    .contact-form__header {
        margin-bottom: 26px;
    }

    .contact-form__eyebrow {
        font-size: 8px;
        letter-spacing: .08em;
    }

    .contact-form__title {
        max-width: 500px;
        margin-top: 8px;

        font-size: 27px;
        line-height: 1.1;
        letter-spacing: -.02em;
    }

    .contact-form__description {
        margin-top: 10px;

        font-size: 12px;
        line-height: 1.6;
    }


    /*
    |--------------------------------------------------------------------------
    | Formulario
    |--------------------------------------------------------------------------
    */

    .contact-form__grid {
        grid-template-columns: 1fr;
        gap: 17px;
    }

    .contact-form__field--full {
        grid-column: auto;
    }

    .contact-form__label {
        margin-bottom: 6px;

        font-size: 12px;
    }

    .contact-input,
    .contact-select {
        min-height: 48px;
        padding: 10px 13px;

        font-size: 14px;

        border-radius: 11px;
    }

    .contact-textarea,
    .contact-form textarea {
        min-height: 145px;
        padding: 13px;

        font-size: 14px;
        line-height: 1.6;

        border-radius: 11px;
    }

    .contact-form__help,
    .contact-form__error {
        margin-top: 6px;

        font-size: 11px;
        line-height: 1.45;
    }


    /*
    |--------------------------------------------------------------------------
    | Checkbox
    |--------------------------------------------------------------------------
    */

    .contact-form__checkbox {
        gap: 10px;

        margin-top: 4px;
    }

    .contact-checkbox {
        width: 19px;
        height: 19px;
    }

    .contact-form__checkbox label {
        font-size: 11px;
        line-height: 1.55;
    }


    /*
    |--------------------------------------------------------------------------
    | Botón
    |--------------------------------------------------------------------------
    */

    .contact-form__actions {
        margin-top: 23px;
    }

    .contact-form__actions .btn {
        width: 100%;
        min-height: 48px;
    }


    /*
    |--------------------------------------------------------------------------
    | Alertas
    |--------------------------------------------------------------------------
    */

    .contact-alert {
        margin-bottom: 20px;
        padding: 14px 15px;

        font-size: 12px;
        line-height: 1.55;

        border-radius: 12px;
    }

    .contact-form__error-list {
        gap: 4px;

        margin-top: 9px;
        padding-left: 17px;
    }


    /*
    |--------------------------------------------------------------------------
    | Contexto de producto / marca / servicio / cotización
    |--------------------------------------------------------------------------
    */

    .contact-context {
        margin-bottom: 22px;
        padding: 17px;

        border-radius: 14px;
    }

    .contact-context__eyebrow {
        font-size: 8px;
        letter-spacing: .06em;
    }

    .contact-context__title {
        margin-top: 7px;

        font-size: 18px;
        line-height: 1.2;
    }

    .contact-context__description {
        margin-top: 7px;

        font-size: 11px;
        line-height: 1.55;
    }


    /*
    |--------------------------------------------------------------------------
    | Información de contacto
    |--------------------------------------------------------------------------
    */

    .contact-main__grid > aside {
        display: grid;
        grid-auto-columns: minmax(230px, 72vw);
        grid-auto-flow: column;
        grid-template-columns: none;
        gap: 11px;

        overflow-x: auto;
        overflow-y: hidden;

        margin-right: -14px;
        padding-right: 14px;
        padding-bottom: 11px;

        scroll-snap-type: x mandatory;
        scrollbar-width: none;

        -webkit-overflow-scrolling: touch;
    }

    .contact-main__grid > aside::-webkit-scrollbar {
        display: none;
    }

    .contact-card {
        min-height: 215px;
        padding: 22px;

        border-radius: 19px;

        scroll-snap-align: start;
    }

    /*
     * Eliminamos el margen vertical del diseño desktop
     * porque ahora las tarjetas están horizontalmente.
     */

    .contact-card + .contact-card {
        margin-top: 0;
    }

    .contact-card__icon {
        width: 50px;
        height: 50px;

        border-radius: 14px;
    }

    .contact-card__icon svg {
        width: 23px;
        height: 23px;
    }

    .contact-card__title {
        margin-top: 15px;

        font-size: 18px;
        line-height: 1.2;
    }

    .contact-card__text {
        margin-top: 8px;

        font-size: 11px;
        line-height: 1.55;
    }

    .contact-card__link {
        margin-top: 13px;

        font-size: 11px;
    }


    /*
    |--------------------------------------------------------------------------
    | Mapa
    |--------------------------------------------------------------------------
    */

    .contact-map {
        padding-bottom: 58px;
    }

    .contact-map__frame {
        border-radius: 20px;
    }

    .contact-map iframe {
        height: 340px;
    }


    /*
    |--------------------------------------------------------------------------
    | CTA
    |--------------------------------------------------------------------------
    */

    .contact-cta {
        padding: 58px 0;
    }

    .contact-cta__box {
        padding: 36px 22px;

        border-radius: 23px;
    }

    .contact-cta__title {
        max-width: 520px;
        margin-right: auto;
        margin-left: auto;

        font-size: 28px;
        line-height: 1.1;
        letter-spacing: -.025em;

        text-wrap: balance;
    }

    .contact-cta__text {
        max-width: 500px;
        margin-top: 13px;

        font-size: 12px;
        line-height: 1.6;
    }


    /*
    |--------------------------------------------------------------------------
    | Página de confirmación
    |--------------------------------------------------------------------------
    */

    .contact-success {
        padding: 58px 0;
    }

    .contact-success__box {
        padding: 40px 23px;

        border-radius: 23px;
    }

    .contact-success__icon {
        width: 68px;
        height: 68px;
    }

    .contact-success__icon svg {
        width: 31px;
        height: 31px;
    }

    .contact-success__title {
        margin-top: 19px;

        font-size: 29px;
        line-height: 1.1;
    }

    .contact-success__text {
        margin-top: 13px;

        font-size: 12px;
        line-height: 1.6;
    }

    .contact-success__actions {
        margin-top: 23px;
    }

    .contact-success__actions .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {

    /*
    |--------------------------------------------------------------------------
    | Hero
    |--------------------------------------------------------------------------
    */

    .contact-hero {
        padding: 44px 0 38px;
    }

    .contact-hero__eyebrow {
        font-size: 8px;
        letter-spacing: .07em;
    }

    .contact-hero__title {
        max-width: 360px;
        margin-top: 10px;

        font-size: 28px;
        line-height: 1.07;
        letter-spacing: -.025em;
    }

    .contact-hero__text {
        max-width: 360px;
        margin-top: 12px;

        font-size: 12px;
        line-height: 1.55;
    }


    /*
    |--------------------------------------------------------------------------
    | Contenido principal
    |--------------------------------------------------------------------------
    */

    .contact-main {
        padding: 48px 0;
    }

    .contact-main__grid {
        gap: 30px;
    }


    /*
    |--------------------------------------------------------------------------
    | Formulario
    |--------------------------------------------------------------------------
    */

    .contact-form {
        padding: 23px 17px;

        border-radius: 19px;
    }

    .contact-form__header {
        margin-bottom: 22px;
    }

    .contact-form__eyebrow {
        font-size: 8px;
        letter-spacing: .07em;
    }

    .contact-form__title {
        max-width: 350px;
        margin-top: 7px;

        font-size: 25px;
        line-height: 1.1;
    }

    .contact-form__description {
        margin-top: 8px;

        font-size: 11px;
        line-height: 1.55;
    }

    .contact-form__grid {
        gap: 14px;
    }

    .contact-form__label {
        margin-bottom: 5px;

        font-size: 11px;
    }

    .contact-input,
    .contact-select {
        min-height: 46px;
        padding: 9px 11px;

        font-size: 13px;

        border-radius: 10px;
    }

    .contact-textarea,
    .contact-form textarea {
        min-height: 130px;
        padding: 11px;

        font-size: 13px;
        line-height: 1.55;

        border-radius: 10px;
    }

    .contact-form__help,
    .contact-form__error {
        margin-top: 5px;

        font-size: 10px;
        line-height: 1.4;
    }


    /*
    |--------------------------------------------------------------------------
    | Checkbox
    |--------------------------------------------------------------------------
    */

    .contact-form__checkbox {
        gap: 9px;
    }

    .contact-checkbox {
        width: 18px;
        height: 18px;
    }

    .contact-form__checkbox label {
        font-size: 10px;
        line-height: 1.5;
    }


    /*
    |--------------------------------------------------------------------------
    | Acción formulario
    |--------------------------------------------------------------------------
    */

    .contact-form__actions {
        margin-top: 19px;
    }

    .contact-form__actions .btn {
        width: 100%;
        min-height: 46px;

        font-size: 11px;
    }


    /*
    |--------------------------------------------------------------------------
    | Alertas
    |--------------------------------------------------------------------------
    */

    .contact-alert {
        margin-bottom: 17px;
        padding: 12px 13px;

        font-size: 11px;
        line-height: 1.5;

        border-radius: 10px;
    }

    .contact-form__error-list {
        gap: 3px;

        margin-top: 7px;
        padding-left: 15px;
    }


    /*
    |--------------------------------------------------------------------------
    | Contexto
    |--------------------------------------------------------------------------
    */

    .contact-context {
        margin-bottom: 18px;
        padding: 14px;

        border-radius: 12px;
    }

    .contact-context__eyebrow {
        font-size: 7.5px;
    }

    .contact-context__title {
        margin-top: 6px;

        font-size: 16px;
        line-height: 1.18;
    }

    .contact-context__description {
        margin-top: 6px;

        font-size: 10px;
        line-height: 1.5;
    }


    /*
    |--------------------------------------------------------------------------
    | Tarjetas de contacto
    |--------------------------------------------------------------------------
    */

    .contact-main__grid > aside {
        grid-auto-columns:
            minmax(210px, 78vw);
        gap: 9px;

        margin-right: -11px;
        padding-right: 11px;
        padding-bottom: 9px;
    }

    .contact-card {
        min-height: 190px;
        padding: 18px;

        border-radius: 16px;
    }

    .contact-card__icon {
        width: 44px;
        height: 44px;

        border-radius: 12px;
    }

    .contact-card__icon svg {
        width: 20px;
        height: 20px;
    }

    .contact-card__title {
        margin-top: 12px;

        font-size: 16px;
        line-height: 1.18;
    }

    .contact-card__text {
        margin-top: 6px;

        font-size: 10px;
        line-height: 1.5;
    }

    .contact-card__link {
        margin-top: 10px;

        font-size: 10px;
    }


    /*
    |--------------------------------------------------------------------------
    | Mapa
    |--------------------------------------------------------------------------
    */

    .contact-map {
        padding-bottom: 48px;
    }

    .contact-map__frame {
        border-radius: 17px;
    }

    .contact-map iframe {
        height: 280px;
    }


    /*
    |--------------------------------------------------------------------------
    | CTA
    |--------------------------------------------------------------------------
    */

    .contact-cta {
        padding: 48px 0;
    }

    .contact-cta__box {
        padding: 29px 17px;

        border-radius: 19px;
    }

    .contact-cta__title {
        max-width: 350px;

        font-size: 25px;
        line-height: 1.1;
        letter-spacing: -.02em;
    }

    .contact-cta__text {
        max-width: 350px;
        margin-top: 10px;

        font-size: 11px;
        line-height: 1.55;
    }


    /*
    |--------------------------------------------------------------------------
    | Página de confirmación
    |--------------------------------------------------------------------------
    */

    .contact-success {
        padding: 48px 0;
    }

    .contact-success__box {
        padding: 32px 18px;

        border-radius: 19px;
    }

    .contact-success__icon {
        width: 58px;
        height: 58px;
    }

    .contact-success__icon svg {
        width: 26px;
        height: 26px;
    }

    .contact-success__title {
        margin-top: 16px;

        font-size: 25px;
        line-height: 1.1;
    }

    .contact-success__text {
        margin-top: 10px;

        font-size: 11px;
        line-height: 1.55;
    }

    .contact-success__actions {
        margin-top: 19px;
    }

    .contact-success__actions .btn {
        width: 100%;
        min-height: 45px;

        font-size: 11px;
    }
}

/*
|--------------------------------------------------------------------------
| Form controls
|--------------------------------------------------------------------------
*/

.contact-input,
.contact-select,
.contact-textarea {
    width: 100%;

    color: var(--primary);
    font-family: inherit;
    font-size: 15px;

    background: var(--white);
    border: 1px solid rgba(11, 35, 65, 0.14);
    border-radius: 13px;

    outline: none;

    transition:
        border-color var(--transition),
        box-shadow var(--transition),
        background-color var(--transition);
}

.contact-input,
.contact-select {
    min-height: 52px;
    padding: 12px 15px;
}

.contact-textarea {
    min-height: 180px;
    padding: 15px;

    line-height: 1.7;
    resize: vertical;
}

.contact-input::placeholder,
.contact-textarea::placeholder {
    color: #98a4b2;
}

.contact-input:hover,
.contact-select:hover,
.contact-textarea:hover {
    border-color: rgba(0, 153, 216, 0.35);
}

.contact-input:focus,
.contact-select:focus,
.contact-textarea:focus {
    border-color: var(--secondary);

    box-shadow:
        0 0 0 4px rgba(0, 153, 216, 0.1);
}

.contact-input.is-invalid,
.contact-select.is-invalid,
.contact-textarea.is-invalid {
    border-color: #dc2626;

    background: rgba(254, 226, 226, 0.25);
}

.contact-input.is-invalid:focus,
.contact-select.is-invalid:focus,
.contact-textarea.is-invalid:focus {
    box-shadow:
        0 0 0 4px rgba(220, 38, 38, 0.1);
}

.contact-select {
    cursor: pointer;
}

.contact-input:disabled,
.contact-select:disabled,
.contact-textarea:disabled {
    cursor: not-allowed;
    opacity: 0.65;

    background: #f3f6f8;
}

/*
|--------------------------------------------------------------------------
| Checkbox
|--------------------------------------------------------------------------
*/

.contact-checkbox {
    width: 18px;
    height: 18px;
    flex-shrink: 0;

    cursor: pointer;

    accent-color: var(--secondary);
}

.contact-form__checkbox-link {
    color: var(--secondary);
    font-weight: 600;
}

.contact-form__checkbox-link:hover {
    color: var(--primary);
}

/*
|--------------------------------------------------------------------------
| Global form error
|--------------------------------------------------------------------------
*/

.contact-form__error-list {
    display: flex;
    flex-direction: column;
    gap: 6px;

    margin-top: 12px;
    padding-left: 20px;

    list-style: disc;
}

/*
|--------------------------------------------------------------------------
| Honeypot
|--------------------------------------------------------------------------
*/

.contact-honeypot {
    position: absolute !important;

    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;

    clip: rect(0, 0, 0, 0) !important;
    clip-path: inset(50%) !important;

    white-space: nowrap !important;
}

#contactForm {
    scroll-margin-top: calc(var(--header-height) + 24px);
}
