/* ================================================
   CONTACTO WIZARD — SprintIA
   ================================================ */

/* ================================================
   HERO MINI
   ================================================ */
.cw-hero {
    background: var(--gradient-hero);
    padding: 72px 0 60px;
    position: relative;
    overflow: hidden;
}

.cw-hero__pattern {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255,255,255,0.05) 1.5px, transparent 1.5px);
    background-size: 36px 36px;
    pointer-events: none;
}

.cw-hero__label {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.10em;
    color: var(--secondary-light);
    margin-bottom: 14px;
}

.cw-hero__title {
    font-size: clamp(1.75rem, 4vw, 2.8rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 16px;
}

.cw-hero__title-green {
    color: var(--secondary);
}

.cw-hero__subtitle {
    font-size: 1.05rem;
    color: rgba(255,255,255,0.70);
    line-height: 1.65;
    max-width: 520px;
    margin: 0 auto;
}

/* ================================================
   SECCIÓN WIZARD
   ================================================ */
.cw-section {
    background: var(--bg-light);
    padding: 48px 0 80px;
}

/* ================================================
   BARRA DE PROGRESO
   ================================================ */
.cw-progress {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}

.cw-progress__bar {
    flex: 1;
    height: 5px;
    background: rgba(15,37,71,0.12);
    border-radius: 3px;
    overflow: hidden;
}

.cw-progress__fill {
    height: 100%;
    background: var(--gradient-cta);
    border-radius: 3px;
    width: 20%; /* JS lo actualiza */
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cw-progress__label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
}

/* ================================================
   TARJETA PRINCIPAL DEL WIZARD
   ================================================ */
.cw-card {
    background: #fff;
    border: 1px solid rgba(15,37,71,0.08);
    border-radius: var(--border-radius-xl);
    padding: 40px 36px;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

/* ================================================
   PASOS — visibilidad y animación
   ================================================ */
.cw-step {
    animation: cwFadeIn 0.32s ease both;
}

.cw-step--hidden {
    display: none;
}

@keyframes cwFadeIn {
    from {
        opacity: 0;
        transform: translateX(18px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes cwFadeInBack {
    from {
        opacity: 0;
        transform: translateX(-18px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.cw-step--animating-back {
    animation: cwFadeInBack 0.32s ease both;
}

/* ================================================
   CABECERA DEL PASO
   ================================================ */
.cw-step__header {
    margin-bottom: 28px;
}

.cw-step__num {
    font-size: 3rem;
    font-weight: 900;
    line-height: 1;
    color: rgba(15,37,71,0.06);
    letter-spacing: -0.04em;
    margin-bottom: 4px;
    user-select: none;
}

.cw-step__title {
    font-size: clamp(1.15rem, 2.5vw, 1.5rem);
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.25;
    margin-bottom: 8px;
}

.cw-step__hint {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
}

/* ================================================
   OPCIONES RADIO — cards seleccionables
   ================================================ */
.cw-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 32px;
}

.cw-option {
    cursor: pointer;
    display: block;
}

/* Ocultar el radio nativo */
.cw-radio {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.cw-option__inner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1.5px solid rgba(15,37,71,0.10);
    border-radius: var(--border-radius);
    background: #fff;
    transition: var(--transition);
    position: relative;
}

    .cw-option__inner:hover {
        border-color: var(--secondary);
        background: rgba(0,168,107,0.04);
        transform: translateX(3px);
    }

/* Estado seleccionado */
.cw-option:has(.cw-radio:checked) .cw-option__inner {
    border-color: var(--secondary);
    background: rgba(0,168,107,0.06);
    box-shadow: 0 0 0 3px rgba(0,168,107,0.12);
}

/* Icono izquierdo */
.cw-option__icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--transition);
}

.cw-option:has(.cw-radio:checked) .cw-option__icon {
    background: rgba(0,168,107,0.12);
}

.cw-icon {
    width: 18px;
    height: 18px;
    color: var(--primary);
    transition: var(--transition);
}

.cw-option:has(.cw-radio:checked) .cw-icon {
    color: var(--secondary);
}

/* Texto */
.cw-option__text {
    flex: 1;
    min-width: 0;
}

    .cw-option__text strong {
        display: block;
        font-size: 0.92rem;
        font-weight: 700;
        color: var(--text-dark);
        margin-bottom: 2px;
        transition: var(--transition);
    }

    .cw-option__text span {
        display: block;
        font-size: 0.80rem;
        color: var(--text-muted);
        line-height: 1.4;
    }

/* Check derecho — oculto por defecto */
.cw-option__check {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1.5px solid rgba(15,37,71,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--transition);
    background: transparent;
}

.cw-check-icon {
    width: 13px;
    height: 13px;
    color: transparent;
    transition: var(--transition);
}

.cw-option:has(.cw-radio:checked) .cw-option__check {
    background: var(--secondary);
    border-color: var(--secondary);
}

.cw-option:has(.cw-radio:checked) .cw-check-icon {
    color: #fff;
}

/* ================================================
   NAVEGACIÓN ENTRE PASOS
   ================================================ */
.cw-step__nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 8px;
}

.cw-step__nav--back-only {
    justify-content: flex-start;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(15,37,71,0.06);
}

.cw-btn-next {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
}

.cw-btn-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    padding: 8px 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

    .cw-btn-back:hover {
        color: var(--primary);
    }

.cw-btn-icon {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

/* ================================================
   PANEL DE CIERRE DINÁMICO (paso 5)
   ================================================ */
.cw-cierre {
    background: var(--gradient-hero);
    border-radius: var(--border-radius-lg);
    padding: 32px 28px;
    margin-bottom: 28px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

    /* Patrón de puntos sobre el fondo navy */
    .cw-cierre::before {
        content: '';
        position: absolute;
        inset: 0;
        background-image: radial-gradient(circle, rgba(255,255,255,0.05) 1.5px, transparent 1.5px);
        background-size: 28px 28px;
        pointer-events: none;
    }

.cw-cierre__icon {
    width: 56px;
    height: 56px;
    background: rgba(0,168,107,0.20);
    border: 1px solid rgba(0,168,107,0.40);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    position: relative;
    z-index: 1;
}

.cw-cierre__lucide {
    width: 26px;
    height: 26px;
    color: var(--secondary-light);
}

.cw-cierre__titulo {
    font-size: 1.3rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.3;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.cw-cierre__texto {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.78);
    line-height: 1.7;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.cw-cierre__sprint {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0,168,107,0.18);
    border: 1px solid rgba(0,168,107,0.35);
    border-radius: 50px;
    padding: 6px 18px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--secondary-light);
    position: relative;
    z-index: 1;
}

/* ================================================
   SEPARADOR ENTRE CIERRE Y FORMULARIO
   ================================================ */
.cw-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 28px 0;
}

    .cw-divider::before,
    .cw-divider::after {
        content: '';
        flex: 1;
        height: 1px;
        background: rgba(15,37,71,0.10);
    }

    .cw-divider span {
        font-size: 0.80rem;
        font-weight: 600;
        color: var(--text-muted);
        white-space: nowrap;
    }

/* ================================================
   INPUTS DEL FORMULARIO (paso 5)
   ================================================ */
.cw-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 7px;
}

.cw-required {
    color: var(--secondary);
    margin-left: 2px;
}

.cw-input {
    width: 100%;
    background: var(--bg-light);
    border: 1.5px solid rgba(15,37,71,0.12);
    border-radius: 10px;
    padding: 12px 16px;
    color: var(--text-dark);
    font-size: 0.925rem;
    transition: var(--transition);
    outline: none;
}

    .cw-input::placeholder {
        color: var(--text-muted);
    }

    .cw-input:focus {
        border-color: var(--secondary);
        background: #fff;
        box-shadow: 0 0 0 3px rgba(0,168,107,0.12);
    }

    .cw-input.input-error {
        border-color: #DC3545;
        box-shadow: 0 0 0 3px rgba(220,53,69,0.10);
    }

/* ================================================
   CHECKBOX PRIVACIDAD
   ================================================ */
.cw-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.cw-checkbox {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: var(--secondary);
    cursor: pointer;
}

.cw-checkbox-text {
    font-size: 0.83rem;
    color: var(--text-muted);
    line-height: 1.55;
}

    .cw-checkbox-text a {
        color: var(--secondary);
        text-decoration: underline;
    }

/* ================================================
   BOTÓN SUBMIT
   ================================================ */
.cw-btn-submit {
    min-width: 280px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

    .cw-btn-submit:disabled {
        opacity: 0.65;
        cursor: not-allowed;
        transform: none !important;
        box-shadow: none !important;
    }

.cw-disclaimer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin: 12px 0 0;
}

/* ================================================
   DOTS DE NAVEGACIÓN
   ================================================ */
.cw-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.cw-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(15,37,71,0.15);
    transition: var(--transition);
    cursor: default;
}

.cw-dot--active {
    background: var(--secondary);
    width: 24px;
    border-radius: 4px;
}

.cw-dot--done {
    background: rgba(0,168,107,0.40);
}

/* ================================================
   RESPONSIVE — MOBILE
   ================================================ */
@media (max-width: 767.98px) {

    .cw-hero {
        padding: 56px 0 44px;
    }

    .cw-card {
        padding: 28px 20px;
    }

    .cw-cierre {
        padding: 24px 20px;
    }

    .cw-option__inner {
        padding: 12px 14px;
        gap: 12px;
    }

    .cw-option__text span {
        display: none;
    }
    /* En mobile solo el título */

    .cw-step__num {
        font-size: 2rem;
    }

    .cw-btn-submit {
        min-width: 100%;
    }

    .cw-step__nav {
        gap: 12px;
    }

    .cw-btn-next {
        flex: 1;
        justify-content: center;
    }
}

/* ================================================
   PASO 1 — Grid de sectores
   ================================================ */

.cw-options--grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (min-width: 576px) {
    .cw-options--grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Card base — reutiliza .cw-option existente,
   solo añadimos lo específico del grid de sector */
.cw-options--grid .cw-option {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    padding: 20px 12px;
    position: relative;
}

.cw-option__icon {
    font-size: 1.75rem;
    line-height: 1;
}

.cw-option__label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    line-height: 1.2;
}

/* Badge "Web especializada ↗" sobre la card de abogados */
.cw-option__badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient-cta);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    white-space: nowrap;
    padding: 2px 8px;
    border-radius: 20px;
}

/* Card especial abogados — borde verde sutil en reposo */
.cw-option--special {
    border-color: var(--secondary);
}

    .cw-option--special:hover {
        border-color: var(--secondary);
        background: rgba(0, 168, 107, 0.06);
    }

/* ================================================
   OVERLAY — Abogados
   ================================================ */

.cw-overlay {
    position: fixed;
    inset: 0;
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

    .cw-overlay[hidden] {
        display: none;
    }

.cw-overlay__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 37, 71, 0.65);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.cw-overlay__panel {
    position: relative;
    z-index: 1;
    background: #fff;
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-xl);
    padding: 40px 32px;
    max-width: 440px;
    width: 100%;
    text-align: center;
    animation: overlayIn 0.25s ease;
}

@keyframes overlayIn {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.cw-overlay__icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
    line-height: 1;
}

.cw-overlay__title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
    line-height: 1.3;
}

.cw-overlay__body {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 28px;
}

.cw-overlay__btn-primary {
    display: block;
    width: 100%;
    padding: 14px 20px;
    background: var(--gradient-cta);
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    margin-bottom: 12px;
    transition: var(--transition);
}

    .cw-overlay__btn-primary:hover {
        color: #fff;
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
    }

.cw-overlay__btn-secondary {
    display: block;
    width: 100%;
    padding: 12px 20px;
    background: transparent;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.875rem;
    border: 2px solid #e0e6ef;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

    .cw-overlay__btn-secondary:hover {
        border-color: var(--primary);
        background: rgba(15, 37, 71, 0.04);
    }

/* ================================================
   PASO 5 — Badge de sector en el cierre
   ================================================ */
.cw-cierre__sector {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(0, 168, 107, 0.1);
    color: var(--secondary-dark);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 16px;
}

/* Hint bajo el botón de envío */
.cw-submit-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 10px;
    margin-bottom: 0;
}

/* Reset y estilo base para buttons del grid */
.cw-options--grid .cw-option {
    border: 1.5px solid rgba(15, 37, 71, 0.10);
    border-radius: var(--border-radius);
    background: #fff;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 8px;
    padding: 20px 12px;
    position: relative;
    cursor: pointer;
    /* Reset estilos nativos del botón */
    -webkit-appearance: none;
    appearance: none;
    outline: none;
    box-shadow: none;
}

    .cw-options--grid .cw-option:hover {
        border-color: var(--secondary);
        background: rgba(0, 168, 107, 0.04);
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
    }

    /* Estado seleccionado — via clase JS (is-selected) */
    .cw-options--grid .cw-option.is-selected {
        border-color: var(--secondary);
        background: rgba(0, 168, 107, 0.06);
        box-shadow: 0 0 0 3px rgba(0, 168, 107, 0.12);
    }

        .cw-options--grid .cw-option.is-selected .cw-option__label {
            color: var(--secondary-dark);
        }

/* ================================================
   BOTÓN SUBMIT
   ================================================ */
.cw-btn-submit {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 32px;
    background: var(--gradient-cta);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 20px rgba(0, 168, 107, 0.30);
    letter-spacing: 0.01em;
}

    .cw-btn-submit:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 28px rgba(0, 168, 107, 0.40);
    }

    .cw-btn-submit:active {
        transform: translateY(0);
    }

    .cw-btn-submit:disabled {
        opacity: 0.65;
        cursor: not-allowed;
        transform: none !important;
        box-shadow: none !important;
    }

/* ================================================
   PRIVACIDAD — checkbox
   ================================================ */
.cw-privacy {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.cw-privacy__check {
    width: 17px;
    height: 17px;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: var(--secondary);
    cursor: pointer;
}

.cw-privacy__label {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.55;
    cursor: pointer;
}

    .cw-privacy__label a {
        color: var(--secondary);
        text-decoration: underline;
    }