/* Contactanos: formulario.
   Todo queda dentro de .cto-page para no tocar el resto del sitio (tambien en micrositios).
   El color sale del --primary de cada tema o micrositio (con un azul de respaldo).
   Mismo estilo que viajes a medida. */

.cto-page {
    --cto-p: var(--primary, #1a73e8);
    --cto-p-soft: color-mix(in srgb, var(--cto-p) 9%, #ffffff);
    --cto-p-tint: color-mix(in srgb, var(--cto-p) 6%, #ffffff);
    --cto-p-line: color-mix(in srgb, var(--cto-p) 30%, #ffffff);
    --cto-ink: #1f2a37;
    --cto-muted: #6b7280;
    --cto-line: #dde2e8;
    --cto-err: #c2261c;
    --cto-radius: 12px;
    color: var(--cto-ink);
    font-family: inherit;
    font-size: 14px;
    line-height: 1.45;
    padding-bottom: 40px;
}

/* Navegadores sin color-mix(): tonos fijos neutros */
@supports not (color: color-mix(in srgb, red, blue)) {
    .cto-page {
        --cto-p-soft: #eef2f7;
        --cto-p-tint: #f4f6fa;
        --cto-p-line: #c9d3e0;
    }
}

.cto-page *,
.cto-page *::before,
.cto-page *::after {
    box-sizing: border-box;
}

.cto-page [hidden] {
    display: none !important;
}

/* ---------- Encabezado ---------- */

.cto-hero {
    background: var(--cto-p-tint);
    box-shadow: 0 0 0 100vmax var(--cto-p-tint);
    clip-path: inset(0 -100vmax);
    padding: 34px 0 30px;
    margin-bottom: 26px;
}

.cto-hero__in {
    max-width: 860px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cto-hero__kicker {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--cto-p);
}

.cto-page .cto-hero__title {
    margin: 0;
    font-size: 30px;
    font-weight: 800;
    line-height: 1.1;
    color: var(--cto-ink);
}

.cto-hero__lead {
    margin: 0;
    font-size: 15px;
    color: var(--cto-muted);
    max-width: 60ch;
}

/* Texto propio de la agencia (CONTACTO_TEXTO) */
.cto-intro {
    max-width: 860px;
    margin: 0 auto 18px;
    color: var(--cto-muted);
}

/* ---------- Aviso de error ---------- */

.cto-alert {
    max-width: 860px;
    margin: 0 auto 18px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 14px 16px;
    border: 1px solid #f3c4c0;
    background: #fdecea;
    color: #8a1c14;
    border-radius: var(--cto-radius);
}

.cto-alert .fa {
    font-size: 20px;
    margin-top: 1px;
}

/* ---------- Producto consultado ---------- */

.cto-prod {
    max-width: 860px;
    margin: 0 auto 18px;
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
    background: #ffffff;
    border: 1px solid var(--cto-line);
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.cto-prod--solo {
    grid-template-columns: minmax(0, 1fr);
}

.cto-prod__img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 10px;
}

.cto-prod__kicker {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--cto-p);
}

/* Titulo con selector fuerte: algunos temas de micrositio pintan los h3 de blanco */
.cto-page .cto-prod .cto-prod__title {
    margin: 4px 0 8px;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.25;
    color: var(--cto-ink);
}

.cto-prod__text {
    font-size: 13px;
    color: var(--cto-muted);
    max-height: 7.5em;
    overflow: hidden;
}

/* ---------- Formulario ---------- */

.cto {
    max-width: 860px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.cto-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.cto-card {
    background: #ffffff;
    border: 1px solid var(--cto-line);
    border-radius: 14px;
    padding: 22px 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.cto-card__head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cto-card__icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--cto-p-soft);
    color: var(--cto-p);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    font-size: 16px;
}

.cto-page .cto-card__head h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.2;
    color: var(--cto-ink);
}

.cto-card__head h3 small {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    font-weight: 500;
    color: var(--cto-muted);
}

.cto-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.cto-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

.cto-page .cto-field > label {
    display: block;
    margin: 0;
    max-width: none;
    font-size: 13px;
    font-weight: 600;
    color: var(--cto-ink);
}

.cto-page .cto-field > label::first-letter {
    text-transform: uppercase;
}

.cto-input {
    position: relative;
    display: block;
}

.cto-page .cto-input input,
.cto-page .cto-input select,
.cto-page .cto-input textarea {
    display: block;
    width: 100%;
    min-height: 44px;
    margin: 0;
    padding: 10px 40px 10px 13px;
    border: 1px solid var(--cto-line);
    border-radius: 10px;
    background: #ffffff;
    box-shadow: none;
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    color: var(--cto-ink);
}

.cto-page .cto-input select {
    -webkit-appearance: none;
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #6b7280 50%), linear-gradient(135deg, #6b7280 50%, transparent 50%);
    background-position: calc(100% - 19px) 19px, calc(100% - 14px) 19px;
    background-size: 5px 5px;
    background-repeat: no-repeat;
}

.cto-page .cto-input textarea {
    min-height: 150px;
    padding-right: 13px;
    resize: vertical;
    line-height: 1.45;
}

.cto-input > .fa {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #8a94a3;
    pointer-events: none;
}

.cto-page .cto-input input::placeholder,
.cto-page .cto-input textarea::placeholder {
    color: #9aa3af;
}

.cto-page .cto-input input:focus,
.cto-page .cto-input select:focus,
.cto-page .cto-input textarea:focus {
    outline: 2px solid var(--cto-p-line);
    outline-offset: 0;
    border-color: var(--cto-p);
}

.cto-page .cto-input [aria-invalid="true"] {
    border-color: var(--cto-err);
}

.cto-err {
    font-size: 12px;
    font-weight: 500;
    color: var(--cto-err);
}

.cto-link {
    font-size: 12.5px;
    color: var(--cto-p);
}

/* ---------- Envio ---------- */

.cto-send {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding-top: 4px;
}

.cto-captcha {
    margin: 0 auto;
}

.cto-page .cto-send__btn {
    width: 100%;
    max-width: 420px;
    min-height: 52px;
    margin: 0;
    border: 0;
    border-radius: var(--cto-radius);
    background: var(--cto-p);
    color: #ffffff;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.cto-page .cto-send__btn:hover {
    filter: brightness(.94);
}

.cto-page .cto-send__btn:focus-visible {
    outline: 3px solid var(--cto-p-line);
    outline-offset: 2px;
}

.cto-page .cto-send__btn[disabled] {
    opacity: .7;
    cursor: wait;
}

.cto-send__safe {
    font-size: 12px;
    color: var(--cto-muted);
}

/* ---------- Gracias (cuando el formulario responde en la misma pagina) ---------- */

.cto-thanks {
    max-width: 620px;
    margin: 40px auto;
    padding: 36px 28px;
    border: 1px solid var(--cto-line);
    border-radius: 16px;
    background: #ffffff;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.cto-thanks__mark {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--cto-p-soft);
    color: var(--cto-p);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
}

.cto-page .cto-thanks__title {
    margin: 0;
    font-size: 26px;
    font-weight: 800;
    color: var(--cto-ink);
}

.cto-thanks__msg {
    font-size: 15px;
    color: var(--cto-muted);
    max-width: 48ch;
}

.cto-page .cto-thanks__btn {
    margin-top: 6px;
    padding: 11px 20px;
    border: 1px solid var(--cto-line);
    border-radius: 10px;
    background: #ffffff;
    color: var(--cto-ink);
    font-weight: 600;
    text-decoration: none;
}

.cto-page .cto-thanks__btn:hover {
    border-color: var(--cto-p);
    color: var(--cto-p);
}

/* ---------- Celular ---------- */

@media (max-width: 767px) {
    .cto-hero {
        padding: 24px 0 22px;
        margin-bottom: 16px;
    }

    .cto-page .cto-hero__title {
        font-size: 24px;
    }

    .cto {
        gap: 14px;
    }

    .cto-card {
        padding: 18px 16px;
        gap: 16px;
    }

    .cto-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }

    .cto-prod {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cto-page * {
        transition: none !important;
    }
}
