/* =====================================================================
   HABLA CON NOSOTROS — formulario paso a paso estilo Automaze
   ===================================================================== */

html, body {
    height: 100%;
    margin: 0;
}

body.lp-habla-body {
    background: #0e0f19;
    color: #f5f5f0;
    font-family: var(--font-body, 'Plus Jakarta Sans', sans-serif);
    overflow: hidden;
    position: relative;
}

/* Oculta header/footer heredados de base (si los hay) */
body.lp-habla-body > header,
body.lp-habla-body > footer,
body.lp-habla-body .footer,
body.lp-habla-body .header {
    display: none !important;
}

/* =====================================================================
   Layout principal — ocupa toda la pantalla
   ===================================================================== */
.lp-habla-app {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    background: #0e0f19;
    z-index: 100;
}

/* Top bar: progress + close */
.lp-habla-topbar {
    position: absolute;
    top: 1.5rem;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    z-index: 10;
}

.lp-habla-progress {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.55rem 1rem;
    background: color-mix(in srgb, #d4762c 22%, #0e0f19);
    color: #f5cba3;
    font-size: 0.82rem;
    font-weight: 500;
    border-radius: 999px;
    letter-spacing: 0.01em;
}

.lp-habla-progress-icon {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: conic-gradient(#d4762c calc(var(--progress, 0) * 1%), #2a2a44 0);
    flex-shrink: 0;
}

.lp-habla-progress-value { font-weight: 600; color: #fff; }

.lp-habla-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: color-mix(in srgb, #fff 6%, transparent);
    color: #b0b0c0;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
    border: none;
    cursor: pointer;
}

.lp-habla-close:hover {
    background: color-mix(in srgb, #fff 12%, transparent);
    color: #fff;
    transform: scale(1.05);
}

.lp-habla-close svg { width: 18px; height: 18px; }

/* =====================================================================
   Steps
   ===================================================================== */
.lp-habla-stage {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 6rem 2rem 2rem;
}

.lp-step {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem 2rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    opacity: 0;
    visibility: hidden;
    transform: translateY(24px);
    transition: opacity 0.45s cubic-bezier(0.22, 0.61, 0.36, 1),
                transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1),
                visibility 0s linear 0.45s;
    pointer-events: none;
}

.lp-step.is-active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity 0.55s cubic-bezier(0.22, 0.61, 0.36, 1),
                transform 0.55s cubic-bezier(0.22, 0.61, 0.36, 1),
                visibility 0s linear 0s;
    pointer-events: auto;
}

.lp-step-inner {
    width: 100%;
    max-width: 620px;
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
}

/* Welcome step: centrado con icono */
.lp-step--welcome .lp-step-inner,
.lp-step--final .lp-step-inner {
    text-align: center;
    align-items: center;
}

.lp-step-icon {
    width: 160px;
    height: auto;
    margin-bottom: 0.5rem;
    opacity: 0.95;
}

.lp-step-icon-emoji {
    font-size: 4rem;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.lp-step-title {
    font-family: var(--font-heading, 'Plus Jakarta Sans', sans-serif);
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin: 0;
    color: #fff;
}

.lp-step-sub {
    margin: 0;
    color: #9191a8;
    font-size: 1.05rem;
    line-height: 1.5;
}

/* Encabezado de pregunta */
.lp-step-number {
    margin: 0 0 0.35rem;
    color: #7a7a92;
    font-size: 0.88rem;
    font-weight: 500;
}

.lp-step-number .lp-step-required { color: #d4762c; }

.lp-step-question {
    font-family: var(--font-heading, 'Plus Jakarta Sans', sans-serif);
    font-size: clamp(1.5rem, 2.8vw, 2rem);
    font-weight: 600;
    letter-spacing: -0.015em;
    line-height: 1.2;
    margin: 0 0 1.25rem;
    color: #fff;
}

/* Inputs minimalistas — estilo Automaze */
.lp-step-inputs {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.lp-step-inputs > * { flex: 1; min-width: 200px; }

.lp-step-input,
.lp-step-textarea,
.lp-step-select {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid color-mix(in srgb, #fff 22%, transparent);
    padding: 0.85rem 0 0.85rem;
    color: #fff;
    font-size: 1.15rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s ease;
}

.lp-step-input::placeholder,
.lp-step-textarea::placeholder {
    color: #6e6e82;
    font-weight: 400;
}

.lp-step-input:focus,
.lp-step-textarea:focus,
.lp-step-select:focus {
    border-bottom-color: #d4762c;
}

.lp-step-textarea {
    resize: vertical;
    min-height: 120px;
    padding-top: 0.5rem;
    font-size: 1.05rem;
    line-height: 1.5;
}

.lp-step-select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath fill='%23b0b0c0' d='M6 7 0 1 1.4-.4 6 4.2 10.6-.4 12 1z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.25rem center;
    padding-right: 2rem;
    cursor: pointer;
}

.lp-step-select option {
    background: #1a1a2c;
    color: #fff;
}

/* Radio group — estilo tarjetas */
.lp-step-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.65rem;
    margin: 0;
}

.lp-step-option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.95rem 1.1rem;
    background: color-mix(in srgb, #fff 3%, transparent);
    border: 1px solid color-mix(in srgb, #fff 10%, transparent);
    border-radius: 10px;
    cursor: pointer;
    color: #e0e0ea;
    font-size: 1rem;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.lp-step-option:hover {
    background: color-mix(in srgb, #d4762c 10%, transparent);
    border-color: color-mix(in srgb, #d4762c 40%, transparent);
    color: #fff;
}

.lp-step-option input {
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1.5px solid color-mix(in srgb, #fff 30%, transparent);
    margin: 0;
    flex-shrink: 0;
    position: relative;
    transition: border-color 0.2s ease;
}

.lp-step-option input:checked {
    border-color: #d4762c;
}

.lp-step-option input:checked::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #d4762c;
}

.lp-step-option:has(input:checked) {
    background: color-mix(in srgb, #d4762c 14%, transparent);
    border-color: color-mix(in srgb, #d4762c 55%, transparent);
    color: #fff;
}

/* Actions */
.lp-step-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.5rem;
}

.lp-step-actions.is-centered { justify-content: center; }

.lp-btn-next {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    background: #d4762c;
    color: #fff;
    border: none;
    padding: 0.8rem 1.5rem;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
}

.lp-btn-next:hover { background: #e88535; }
.lp-btn-next:active { transform: scale(0.98); }
.lp-btn-next:disabled { opacity: 0.5; cursor: not-allowed; }

.lp-btn-next svg { width: 14px; height: 14px; }

.lp-btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: transparent;
    color: #9191a8;
    border: none;
    padding: 0.8rem 0;
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.lp-btn-back:hover { color: #fff; }

.lp-step-hint {
    color: #6e6e82;
    font-size: 0.85rem;
}

.lp-step-hint kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    padding: 0.15rem 0.4rem;
    background: color-mix(in srgb, #fff 10%, transparent);
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.78rem;
    color: #e0e0ea;
    margin: 0 0.1rem;
}

.lp-step-error {
    color: #ff7373;
    font-size: 0.88rem;
    min-height: 1rem;
    margin: 0.25rem 0 0;
}

/* =====================================================================
   Honeypot oculto
   ===================================================================== */
.lp-honeypot {
    position: absolute !important;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
}

/* Tablet / portátiles pequeños: reducir padding */
@media (max-width: 1024px) {
    .lp-step, .lp-habla-stage {
        padding: 5.5rem 1.75rem 2.5rem;
    }
    .lp-habla-topbar {
        padding: 0 1.5rem;
    }
    .lp-step-inputs {
        flex-direction: column;
    }
    .lp-step-inputs > * { min-width: 0; width: 100%; }
}

/* Mobile */
@media (max-width: 640px) {
    .lp-habla-topbar {
        padding: 0 1.25rem;
        top: 1rem;
    }
    .lp-step, .lp-habla-stage {
        padding: 5rem 1.25rem 2rem;
    }
    .lp-step {
        align-items: flex-start;
    }
    .lp-step-inner {
        margin: auto 0;
        padding-bottom: 1.5rem;
    }
    .lp-step-inputs {
        gap: 1.25rem;
    }
    .lp-step-inputs > * { min-width: 100%; }
    .lp-step-title {
        font-size: clamp(1.5rem, 6vw, 2rem);
    }
    .lp-step-question {
        font-size: clamp(1.25rem, 5vw, 1.6rem);
        margin-bottom: 0.75rem;
    }
    .lp-step-option {
        padding: 0.75rem 0.9rem;
        font-size: 0.92rem;
    }
    .lp-step-options {
        gap: 0.5rem;
    }
    .lp-step-hint {
        display: none;
    }
}

/* ── Quick contact (atajo) ─────────────────────────────────── */
.lp-quick-contact {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    text-align: center;
}

.lp-quick-contact-label {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 0.85rem;
}

.lp-quick-contact-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
}

.lp-quick-contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.6rem 1rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 9999px;
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.lp-quick-contact-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.24);
    transform: translateY(-1px);
}

.lp-quick-contact-btn svg {
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.7);
}

.lp-quick-contact-btn:hover svg { color: #ffffff; }

@media (max-width: 600px) {
    .lp-quick-contact-grid {
        flex-direction: column;
        align-items: stretch;
    }
    .lp-quick-contact-btn {
        justify-content: center;
    }
}

/* ── Service cards (segmentación welcome) ─────────────────── */
.lp-service-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-top: 1.5rem;
    width: 100%;
    max-width: 560px;
}

.lp-service-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 0.85rem;
    padding: 1rem 1.1rem;
    color: #ffffff;
    cursor: pointer;
    text-align: left;
    transition: all 0.18s ease;
    font-family: inherit;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.lp-service-card:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(212, 118, 44, 0.5);
    transform: translateY(-2px);
}

.lp-service-card-price {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #d4762c;
}

.lp-service-card-name {
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
}

.lp-service-card-desc {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.4;
}

.lp-btn-secondary {
    background: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: rgba(255, 255, 255, 0.8) !important;
}

.lp-btn-secondary:hover {
    border-color: rgba(255, 255, 255, 0.4) !important;
    background: rgba(255, 255, 255, 0.04) !important;
}

@media (max-width: 600px) {
    .lp-service-cards { grid-template-columns: 1fr; }
}
