/* ═══════════════════════════════════════════════════════════════
   /contacto — rediseño orientado a conversión (nov 2026)
   Mismo lenguaje que los heroes de servicios: foto de Marbella con velo
   azul marino y texto blanco. El formulario vive DENTRO del hero (en
   móvil, justo después del H1 y los accesos rápidos). Base = móvil.
   Solo se carga en esta plantilla (functions.php). Prefijo: ct-
   ═══════════════════════════════════════════════════════════════ */

/* ── Hero ── */
.hero.ct-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "copy" "alt" "form";
    row-gap: 22px;
    column-gap: clamp(32px, 5vw, 80px);
    min-height: 0;
    padding: calc(var(--header-h) + 18px) 16px 44px;
    overflow-x: clip;
    background: #0b1f45;
}

.hero.ct-hero::before { content: none; }

.hero.ct-hero::after {
    height: 100%;
    background: radial-gradient(70% 30% at 50% 100%, rgba(7, 87, 248, 0.28), transparent 70%);
}

.ct-hero-bg {
    position: absolute;
    inset: 0;
    z-index: -2;
    overflow: hidden;
    pointer-events: none;
}

.ct-hero-bg img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: 60% 40%;
}

.ct-hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(9, 26, 60, 0.82) 0%, rgba(9, 26, 60, 0.9) 40%, #0b1f45 78%);
}

/* ── Copy ── */
.ct-hero-copy {
    grid-area: copy;
    max-width: 600px;
    color: #fff;
    text-shadow: 0 2px 18px rgba(4, 14, 36, 0.35);
}

.ct-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    padding: 6px 12px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.10);
    color: #dbe8ff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-shadow: none;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.ct-eyebrow .live-dot { margin: 0; }

.ct-hero h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(32px, 9vw, 60px);
    line-height: 1.02;
}

.ct-hero .h1-grad {
    display: block;
    animation: none; /* el brillo heredado (h1Shine) no se ve con un solo degradado */
    background: linear-gradient(100deg, #5b97ff 5%, #8dbaff 55%, #c3dbff 95%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: none;
}

.ct-lead {
    max-width: 540px;
    margin: 14px 0 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: 15.5px;
    line-height: 1.55;
}

.ct-lead strong { color: #fff; }

.ct-benefits {
    display: none;
    gap: 8px;
    margin: 20px 0 0;
    padding: 0;
    list-style: none;
}

.ct-benefits li {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}

.ct-benefits svg {
    flex: none;
    padding: 3px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    width: 20px;
    height: 20px;
}

/* Persona que responde + nota de Google */
.ct-person {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
    text-shadow: none;
}

.ct-person > img {
    flex: none;
    width: 46px;
    height: 46px;
    border: 2px solid rgba(255, 255, 255, 0.85);
    border-radius: 999px;
    object-fit: cover;
    object-position: 50% 20%;
}

.ct-person > div { display: grid; min-width: 0; line-height: 1.3; }
.ct-person > div > strong { color: #fff; font-size: 14px; }
.ct-person > div > span { color: rgba(255, 255, 255, 0.7); font-size: 12.5px; }

.ct-rating {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    padding: 7px 10px;
    border-radius: 12px;
    background: #fff;
    color: var(--fg);
    text-decoration: none;
    box-shadow: 0 8px 22px rgba(3, 10, 30, 0.25);
}

.ct-rating-g { display: inline-flex; width: 16px; height: 16px; flex: none; }
.ct-rating-g svg { width: 100%; height: 100%; }
.ct-rating-num { font-size: 14px; font-weight: 800; }

.ct-stars { display: inline-flex; gap: 1px; color: #fbbc04; }
.ct-stars svg { width: 12px; height: 12px; }

.ct-hero .screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ── Canales alternativos ── */
.ct-alt { grid-area: alt; }

.ct-alt-title {
    margin: 0 0 9px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.ct-alt-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.ct-alt-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    padding: 12px 6px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    text-align: center;
    text-decoration: none;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.ct-alt-item:hover {
    border-color: rgba(255, 255, 255, 0.34);
    background: rgba(255, 255, 255, 0.14);
    transform: translateY(-2px);
}

.ct-alt-ico {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.12);
}

.ct-alt-item--wa .ct-alt-ico { background: #25d366; }

.ct-alt-txt { display: grid; gap: 2px; line-height: 1.25; }
.ct-alt-txt strong { font-size: 13.5px; }
.ct-alt-txt small { color: rgba(255, 255, 255, 0.68); font-size: 11px; }

/* ── Tarjeta del formulario ── */
.ct-card {
    grid-area: form;
    position: relative;
    padding: 22px 18px 20px;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 30px 70px rgba(2, 8, 28, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.6);
    color: var(--fg);
    scroll-margin-top: calc(var(--header-h) + 12px);
}

.ct-card::before {
    content: '';
    position: absolute;
    inset: 0 22px auto;
    height: 3px;
    border-radius: 0 0 3px 3px;
    background: linear-gradient(90deg, var(--accent), #5b97ff);
}

.ct-card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 4px 12px;
    margin-bottom: 16px;
}

.ct-card-head h2 {
    margin: 0;
    font-size: clamp(22px, 5.6vw, 27px);
    line-height: 1.15;
}

.ct-card-head p {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin: 0;
    color: var(--accent);
    font-size: 13px;
    font-weight: 700;
}

.ct-alert {
    display: grid;
    gap: 10px;
    margin-bottom: 16px;
    padding: 12px 14px;
    border: 1px solid #f5c2c0;
    border-radius: 12px;
    background: #fff4f3;
    color: #a1201b;
    font-size: 14px;
    font-weight: 600;
}

.ct-alert p { margin: 0; }
.ct-alert .btn { justify-self: start; }

.ct-form { display: grid; gap: 18px; }

.ct-hp {
    position: absolute !important;
    left: -9999px;
    user-select: none;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.ct-step {
    display: grid;
    gap: 10px;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.ct-step legend {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 10px;
    padding: 0;
    color: var(--fg);
    font-size: 15px;
    font-weight: 750;
}

.ct-step-n {
    display: inline-grid;
    place-items: center;
    flex: none;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 12.5px;
    font-weight: 800;
}

.ct-opt { color: var(--muted); font-size: 13px; font-weight: 500; }

/* Servicios: tarjetas seleccionables */
.ct-services {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.ct-service { position: relative; display: block; cursor: pointer; }

.ct-service input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.ct-service-body {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 100%;
    min-height: 64px;
    padding: 11px 10px;
    border: 1.5px solid var(--border);
    border-radius: 14px;
    background: #f8faff;
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.ct-service:hover .ct-service-body { border-color: #b9cdf7; }

.ct-service-ico {
    display: grid;
    place-items: center;
    flex: none;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #fff;
    color: var(--accent);
    box-shadow: 0 2px 8px rgba(9, 32, 88, 0.08);
}

.ct-service-txt { display: grid; gap: 1px; min-width: 0; line-height: 1.25; }
.ct-service-txt strong { font-size: 13.5px; }
.ct-service-txt small { color: var(--muted); font-size: 11.5px; }

.ct-service-tick {
    position: absolute;
    top: -7px;
    right: -7px;
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.ct-service-tick svg { width: 13px; height: 13px; stroke-width: 3; }

.ct-service input:checked + .ct-service-body {
    border-color: var(--accent);
    background: var(--accent-soft);
    box-shadow: 0 0 0 3px rgba(7, 87, 248, 0.12);
}

.ct-service input:checked + .ct-service-body .ct-service-tick { opacity: 1; transform: scale(1); }
.ct-service input:focus-visible + .ct-service-body { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Campos */
.ct-row { display: grid; gap: 10px; }

.ct-field { display: grid; gap: 6px; }

.ct-field label {
    color: var(--fg);
    font-size: 13.5px;
    font-weight: 650;
}

.ct-field input,
.ct-field textarea {
    width: 100%;
    min-height: 50px;
    padding: 12px 14px;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    background: #f8faff;
    color: var(--fg);
    font: inherit;
    font-size: 16px; /* ≥16px: iOS no hace zoom al enfocar */
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.ct-field textarea { min-height: 92px; resize: vertical; line-height: 1.5; }

.ct-field input::placeholder,
.ct-field textarea::placeholder { color: #9aa1b1; }

.ct-field input:focus,
.ct-field textarea:focus {
    border-color: var(--accent);
    background: #fff;
    outline: none;
    box-shadow: 0 0 0 4px rgba(7, 87, 248, 0.12);
}

.ct-field input[aria-invalid="true"],
.ct-check input[aria-invalid="true"] {
    border-color: #d93025;
    background: #fff6f6;
}

.ct-hint { margin: -2px 0 0; color: var(--muted); font-size: 12.5px; }

.ct-err {
    margin: 0;
    color: #c5221f;
    font-size: 13px;
    font-weight: 600;
}

.ct-err[hidden] { display: none; }

.ct-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
    cursor: pointer;
}

.ct-check input {
    flex: none;
    width: 20px;
    height: 20px;
    margin: 1px 0 0;
    accent-color: var(--accent);
}

.ct-check a { color: var(--accent); font-weight: 600; }

.ct-form > .ct-err { margin-top: -10px; }

.ct-submit {
    min-height: 56px;
    font-size: 16px;
    box-shadow: 0 14px 30px rgba(7, 87, 248, 0.32);
}

.ct-submit.is-sending { opacity: 0.75; cursor: progress; }

.ct-reassure {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: -6px 0 0;
    color: var(--muted);
    font-size: 12.5px;
    text-align: center;
}

/* ── Confirmación ── */
.ct-success { display: grid; gap: 14px; padding: 6px 0; outline: none; }

.ct-success-ico {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 999px;
    background: #e7f8ee;
    color: #17a34a;
}

.ct-success h2 { margin: 0; font-size: clamp(22px, 5.6vw, 28px); }
.ct-success > p { margin: 0; color: var(--muted); }

.ct-success-steps {
    display: grid;
    gap: 10px;
    margin: 4px 0;
    padding: 14px;
    border-radius: 14px;
    background: #f5f8ff;
    list-style: none;
}

.ct-success-steps li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--fg);
    font-size: 14px;
    font-weight: 600;
}

.ct-success-steps span {
    display: grid;
    place-items: center;
    flex: none;
    width: 24px;
    height: 24px;
    border: 1.5px solid #c9d6f2;
    border-radius: 999px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.ct-success-steps .is-done span { border-color: #17a34a; background: #17a34a; color: #fff; }

.ct-success-fast { display: grid; gap: 10px; padding-top: 6px; border-top: 1px solid var(--border); }
.ct-success-fast p { margin: 0; color: var(--fg); font-size: 14px; font-weight: 600; }

.ct-btn-wa {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 50px;
    border: 0;
    background: #25d366;
    color: #fff;
}

.ct-btn-wa:hover { background: #1ebe5b; color: #fff; }

.ct-success-link { color: var(--accent); font-size: 14px; font-weight: 700; text-decoration: none; }

/* ── Qué pasa después ── */
.ct-steps {
    position: relative;
    display: grid;
    gap: 14px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0;
    list-style: none;
}

.ct-steps-item {
    position: relative;
    display: grid;
    gap: 10px;
    padding: 22px 20px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.ct-steps-when {
    justify-self: start;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.ct-steps-ico {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent), #4b8bff);
    color: #fff;
    box-shadow: 0 10px 22px rgba(7, 87, 248, 0.28);
}

.ct-steps-item h3 { margin: 4px 0 0; font-size: 18px; }
.ct-steps-item p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.6; }

/* Reseñas */
.ct-reviews {
    display: grid;
    gap: 14px;
    max-width: 1100px;
    margin: 28px auto 0;
}

.ct-reviews-score {
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 6px;
    padding: 22px;
    border-radius: 18px;
    background: linear-gradient(160deg, #0b1f45, #0a3a9a);
    color: #fff;
    text-align: center;
    text-decoration: none;
}

.ct-reviews-score .ct-rating-g { width: 30px; height: 30px; padding: 5px; border-radius: 999px; background: #fff; }
.ct-reviews-score strong { font-size: 40px; line-height: 1; }
.ct-reviews-score .ct-stars svg { width: 16px; height: 16px; }
.ct-reviews-score small { color: rgba(255, 255, 255, 0.78); font-size: 13px; }

.ct-review {
    display: grid;
    align-content: start;
    gap: 10px;
    margin: 0;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.ct-review blockquote { margin: 0; }

.ct-review blockquote p {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: var(--fg);
    font-size: 14.5px;
    line-height: 1.6;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
}

.ct-review figcaption { color: var(--muted); font-size: 13px; }
.ct-review figcaption strong { color: var(--fg); }

/* Cal.com: el aviso va encima del iframe (no antes) y contacto.js lo
   quita cuando el calendario está listo. */
#gl-cal-embed { position: relative; }
.ct-cal-loading {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: grid;
    place-items: center;
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.cal-note a { color: var(--accent); font-weight: 700; }

/* ── Color propio por canal y por servicio ──
   --c = color del icono · --c2 = segundo tono del degradado · --c-soft = fondo suave */
.ct-alt-item--wa    { --c: #25d366; --c2: #12a84b; }
.ct-alt-item--tel   { --c: #3b82f6; --c2: #0757f8; }
.ct-alt-item--video { --c: #8b5cf6; --c2: #6d28d9; }

.ct-alt-item .ct-alt-ico,
.ct-alt-item--wa .ct-alt-ico {
    background: linear-gradient(135deg, var(--c, rgba(255,255,255,.2)), var(--c2, rgba(255,255,255,.1)));
    box-shadow: 0 8px 18px -6px var(--c, transparent);
    color: #fff;
}

.ct-alt-item:hover { border-color: var(--c, rgba(255,255,255,.34)); }

.ct-service--web-seo        { --c: #0757f8; --c2: #3b82f6; --c-soft: rgba(7, 87, 248, 0.09); }
.ct-service--redes-sociales { --c: #e1306c; --c2: #f77737; --c-soft: rgba(225, 48, 108, 0.08); }
.ct-service--web-redes      { --c: #7c3aed; --c2: #c026d3; --c-soft: rgba(124, 58, 237, 0.08); }
.ct-service--facturacion    { --c: #0d9488; --c2: #14b8a6; --c-soft: rgba(13, 148, 136, 0.08); }
.ct-service--no-claro       { --c: #f59e0b; --c2: #f97316; --c-soft: rgba(245, 158, 11, 0.10); }

.ct-service .ct-service-ico {
    background: linear-gradient(135deg, var(--c), var(--c2));
    color: #fff;
    box-shadow: 0 6px 14px -5px var(--c);
}

.ct-service:hover .ct-service-body { border-color: var(--c); }

.ct-service input:checked + .ct-service-body {
    border-color: var(--c);
    background: var(--c-soft);
    box-shadow: 0 0 0 3px var(--c-soft);
}

.ct-service .ct-service-tick { background: var(--c); }
.ct-service input:focus-visible + .ct-service-body { outline-color: var(--c); }

/* Burbuja global de WhatsApp oculta mientras se ve el formulario (contacto.js) */
.wa-pulse { transition: opacity 0.25s ease, transform 0.2s ease !important; }
.ct-form-visible .wa-pulse { opacity: 0; pointer-events: none; }

/* Móvil: pasos y nota de Google más compactos (icono a la izquierda) */
@media (max-width: 640px) {
    .ct-steps-item {
        grid-template-columns: 46px minmax(0, 1fr);
        column-gap: 14px;
        row-gap: 4px;
        padding: 18px 16px;
    }
    .ct-steps-ico { grid-row: 1 / span 3; grid-column: 1; }
    .ct-steps-when, .ct-steps-item h3, .ct-steps-item p { grid-column: 2; }
    .ct-steps-item h3 { margin: 4px 0 0; font-size: 16.5px; }
    .ct-steps-item p { font-size: 14px; }

    .ct-reviews-score {
        grid-template-columns: auto auto 1fr;
        justify-items: start;
        align-items: center;
        gap: 4px 12px;
        padding: 16px 18px;
        text-align: left;
    }
    .ct-reviews-score .ct-rating-g { grid-row: 1 / span 2; }
    .ct-reviews-score strong { grid-row: 1 / span 2; font-size: 34px; }
    .ct-reviews-score .ct-stars, .ct-reviews-score small { grid-column: 3; }
}

/* ═══ ≥480px ═══ */
@media (min-width: 480px) {
    .ct-row { grid-template-columns: 1fr 1fr; }
    .ct-card { padding: 26px 24px 22px; }
    .ct-service-body { padding: 12px; }
}

/* ═══ ≥641px ═══ */
@media (min-width: 641px) {
    .hero.ct-hero { padding: calc(var(--header-h) + 36px) 32px 64px; }
    .ct-benefits { display: grid; }
    .ct-alt-list { grid-template-columns: repeat(3, minmax(0, 170px)); }
    .ct-steps { grid-template-columns: repeat(3, 1fr); }
    .ct-reviews { grid-template-columns: 220px 1fr 1fr; }
}

/* ═══ Escritorio: copy + canales a la izquierda, formulario a la derecha ═══ */
@media (min-width: 1000px) {
    .hero.ct-hero {
        grid-template-columns: minmax(0, 1fr) minmax(0, 540px);
        grid-template-rows: auto 1fr;
        grid-template-areas: "copy form" "alt form";
        align-items: start;
        row-gap: 34px;
        padding: calc(var(--header-h) + 48px) max(32px, calc((100vw - 1240px) / 2)) 80px;
    }

    .ct-hero-bg::after {
        background: linear-gradient(90deg, rgba(9, 26, 60, 0.92) 0%, rgba(9, 26, 60, 0.78) 50%, rgba(9, 26, 60, 0.5) 100%),
                    linear-gradient(180deg, rgba(9, 26, 60, 0) 60%, #0b1f45 100%);
    }

    .ct-hero-copy { padding-top: 12px; }
    .ct-lead { font-size: 17px; }
    .ct-person { max-width: 520px; }

    .ct-alt-list { grid-template-columns: minmax(0, 1fr); max-width: 380px; gap: 10px; }

    .ct-alt-item {
        flex-direction: row;
        gap: 14px;
        padding: 12px 16px;
        text-align: left;
    }

    .ct-alt-item:hover { transform: translateX(4px); }
    .ct-alt-txt strong { font-size: 15px; }
    .ct-alt-txt small { font-size: 12.5px; }

    .ct-card { padding: 30px 30px 26px; }

    /* Línea que une los 3 pasos */
    .ct-steps::before {
        content: '';
        position: absolute;
        top: 72px;
        left: 12%;
        right: 12%;
        height: 2px;
        background: linear-gradient(90deg, transparent, #c9d6f2 15%, #c9d6f2 85%, transparent);
    }
}

@media (prefers-reduced-motion: reduce) {
    .ct-alt-item,
    .ct-service-body,
    .ct-service-tick { transition: none; }
}

.ct-review figcaption strong a { color: inherit; text-decoration: none; }
.ct-review figcaption strong a:hover { color: var(--accent); text-decoration: underline; }
