/* =============================================
   ÚNETE — Página de afiliación
   Izquierda Española
   ============================================= */

/* ── Fuente (heredada de cabecera, re-declarada por si se carga independiente) ── */
@font-face {
    font-family: 'RedditSans';
    src: url('/wp-content/themes/astra-child/fonts/RedditSans-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
}
@font-face {
    font-family: 'RedditSans';
    src: url('/wp-content/themes/astra-child/fonts/RedditSans-Italic-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: italic;
}

/* ── Variables ── */
:root {
    --rojo: #e52c21;
    --rojo-oscuro: #c41f15;
    --rojo-suave: rgba(229, 44, 33, 0.08);
    --rojo-borde: rgba(229, 44, 33, 0.2);
    --texto: #1a1a1a;
    --texto-suave: #4a4a4a;
    --borde: #e2e2e2;
    --fondo-campo: #fafafa;
    --fondo-bloque: #ffffff;
    --radio: 10px;
    --sombra: 0 2px 12px rgba(0,0,0,0.07);
    --font: 'RedditSans', sans-serif;
}

/* ── Reset mínimo para la página ── */
.unete-main * {
    box-sizing: border-box;
}

.unete-main {
    font-family: var(--font);
    color: var(--texto);
    background: #f5f4f2;
}

/* ── Screen-reader only ── */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* ════════════════════════════════════════
   HERO
════════════════════════════════════════ */
.unete-hero {
    position: relative;
    background: var(--rojo);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    /* Full-bleed: funciona cuando el padre tiene overflow:hidden (ast-container) */
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

/* Fondo decorativo: aspas */
.hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.aspas-wrapper {
    position: absolute;
    /* Esquina inferior derecha, asomando dramáticamente */
    right: -220px;
    bottom: -220px;
    width: 900px;
    height: 900px;
    pointer-events: none;
}

.aspa {
    position: absolute;
    transform-origin: 50% 50%;
    animation: girar-molino 22s linear infinite;
}

.aspa-1 {
    width: 820px;
    height: 820px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(0deg);
    animation-duration: 36s;
    animation-name: girar-molino;
}

.aspa-2 {
    width: 540px;
    height: 540px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(15deg);
    animation-duration: 24s;
    animation-name: girar-molino;
}

.aspa-3 {
    width: 310px;
    height: 310px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-10deg);
    animation-duration: 16s;
    animation-name: girar-molino;
}

@keyframes girar-molino {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to   { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Líneas de viento */
.hero-viento {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
}

.v-linea {
    position: absolute;
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.28) 30%, rgba(255,255,255,0.38) 50%, rgba(255,255,255,0.28) 70%, transparent 100%);
    animation: viento-mover 3.5s ease-in-out infinite;
    border-radius: 3px;
    filter: blur(0.5px);
}

/* 10 líneas: alturas, velocidades y posiciones variadas */
.v-linea:nth-child(1)  { width: 55%; height: 4px; top:  9%; left: -20%; animation-delay: 0s;    animation-duration: 3.8s; }
.v-linea:nth-child(2)  { width: 30%; height: 2px; top: 18%; left: -10%; animation-delay: 0.5s;  animation-duration: 2.9s; }
.v-linea:nth-child(3)  { width: 65%; height: 5px; top: 28%; left: -30%; animation-delay: 1.1s;  animation-duration: 4.4s; }
.v-linea:nth-child(4)  { width: 25%; height: 2px; top: 38%; left:  -5%; animation-delay: 0.3s;  animation-duration: 3.2s; }
.v-linea:nth-child(5)  { width: 50%; height: 3px; top: 47%; left: -25%; animation-delay: 1.8s;  animation-duration: 4.0s; }
.v-linea:nth-child(6)  { width: 70%; height: 4px; top: 56%; left: -15%; animation-delay: 0.9s;  animation-duration: 5.1s; }
.v-linea:nth-child(7)  { width: 35%; height: 2px; top: 64%; left: -20%; animation-delay: 2.3s;  animation-duration: 3.5s; }
.v-linea:nth-child(8)  { width: 45%; height: 3px; top: 73%; left:  -8%; animation-delay: 0.6s;  animation-duration: 4.7s; }
.v-linea:nth-child(9)  { width: 60%; height: 4px; top: 82%; left: -30%; animation-delay: 1.5s;  animation-duration: 3.9s; }
.v-linea:nth-child(10) { width: 28%; height: 2px; top: 91%; left: -12%; animation-delay: 2.7s;  animation-duration: 4.2s; }

@keyframes viento-mover {
    0%   { transform: translateX(0);     opacity: 0; }
    10%  { opacity: 1; }
    80%  { opacity: 0.85; }
    100% { transform: translateX(140vw); opacity: 0; }
}

/* Inner hero */
.hero-inner {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 5vw 4rem;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 4rem;
}


.hero-titulo {
    font-size: clamp(3rem, 7vw, 6rem);
    font-weight: 800;
    line-height: 1.0;
    color: white;
    margin: 0 0 1.5rem;
    letter-spacing: -0.02em;
}

.hero-titulo em {
    font-style: italic;
    font-weight: 300;
    color: rgba(255,255,255,0.75);
}

.hero-subtitulo {
    font-size: clamp(1rem, 1.8vw, 1.2rem);
    font-weight: 400;
    color: rgba(255,255,255,0.82);
    line-height: 1.6;
    margin: 0 0 2.5rem;
    max-width: 600px;
}

.br-desktop { display: block; }

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: white;
    color: var(--rojo) !important;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 0.85rem 1.8rem;
    border-radius: 8px;
    transition: background 0.18s, transform 0.18s, box-shadow 0.18s;
    box-shadow: 0 4px 20px rgba(0,0,0,0.18);
}

.hero-cta:hover,
.hero-cta:focus {
    background: rgba(255,255,255,0.92) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(0,0,0,0.24);
    outline: none;
}

/* Cifras hero */
.hero-cifras {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    flex-wrap: wrap;
}

.cifra {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cifra-num {
    font-size: 1.8rem;
    font-weight: 800;
    color: white;
    line-height: 1;
    letter-spacing: -0.02em;
}

.cifra-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: rgba(255,255,255,0.6);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.cifra-sep {
    width: 1px;
    height: 36px;
    background: rgba(255,255,255,0.2);
}

/* Scroll indicator */
.hero-scroll-indicator {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-scroll-indicator span {
    display: block;
    width: 1.5px;
    height: 60px;
    background: linear-gradient(180deg, rgba(255,255,255,0.5) 0%, transparent 100%);
    animation: scroll-pulso 2s ease-in-out infinite;
}

@keyframes scroll-pulso {
    0%, 100% { transform: scaleY(1); opacity: 0.5; }
    50%       { transform: scaleY(0.6); opacity: 1; }
}



/* ════════════════════════════════════════
   SECCIÓN FORMULARIO
════════════════════════════════════════ */
.unete-form-section {
    padding: 5rem 5vw 6rem;
}

.form-layout {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 3rem;
    align-items: start;
}

/* ── Lateral ── */
.form-lateral {
    position: relative;
}

.lateral-sticky {
    position: sticky;
    top: 100px;
    background: white;
    border-radius: var(--radio);
    padding: 2rem 1.5rem;
    box-shadow: var(--sombra);
    border-top: 3px solid var(--rojo);
}

.lateral-icono {
    margin-bottom: 1.25rem;
}

.lateral-titulo {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--texto);
    margin: 0 0 1rem;
}

.lateral-lista {
    list-style: none;
    margin: 0 0 1.5rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.lateral-lista li {
    font-size: 0.88rem;
    color: var(--texto-suave);
    padding-left: 1.2rem;
    position: relative;
    line-height: 1.45;
}

.lateral-lista li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 5px;
    height: 5px;
    background: var(--rojo);
    border-radius: 50%;
}

.lateral-nota {
    font-size: 0.8rem;
    color: var(--texto-suave);
    background: var(--rojo-suave);
    border-radius: 6px;
    padding: 0.85rem;
    line-height: 1.5;
    border-left: 2.5px solid var(--rojo);
}

.lateral-nota strong {
    display: block;
    color: var(--rojo);
    margin-bottom: 0.35rem;
    font-size: 0.85rem;
}

/* ── Formulario contenedor ── */
.form-contenedor {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.form-cabecera {
    padding-bottom: 0.25rem;
}

.form-titulo {
    font-size: 2rem;
    font-weight: 800;
    color: var(--texto);
    margin: 0 0 0.5rem;
    letter-spacing: -0.02em;
}

.form-subtitulo {
    font-size: 0.88rem;
    color: var(--texto-suave);
    margin: 0;
}

.form-subtitulo span {
    color: var(--rojo);
    font-weight: 700;
}

/* ── Bloques del formulario ── */
.form-bloque {
    background: var(--fondo-bloque);
    border: none;
    border-radius: var(--radio);
    padding: 0 2rem 1.75rem;
    margin: 0;
    box-shadow: var(--sombra);
    position: relative;
    animation: bloque-entrar 0.4s ease both;
    min-inline-size: 0;
}

/* Sin la línea roja flotante — el border-radius del legend ya hace de cabecera */
.form-bloque::before {
    display: none;
}

@keyframes bloque-entrar {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.form-bloque:nth-child(2) { animation-delay: 0.05s; }
.form-bloque:nth-child(3) { animation-delay: 0.10s; }
.form-bloque:nth-child(4) { animation-delay: 0.15s; }
.form-bloque:nth-child(5) { animation-delay: 0.20s; }

/* Separación visual entre tarjetas — el gap del flex no es suficiente
   porque el legend sale del flujo normal del fieldset */
.form-bloque + .form-bloque {
    margin-top: 1rem;
}

.bloque-legend {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: calc(100% + 4rem);
    margin-left: -2rem;
    margin-right: -2rem;
    padding: 1.1rem 2rem 1rem;
    margin-bottom: 1.5rem;
    border-top: 3px solid rgba(229,44,33,0.3);
    border-bottom: 1px solid var(--borde);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--texto-suave);
    background: #f9f8f6;
    border-radius: var(--radio) var(--radio) 0 0;
    float: none;
    /* Compensar que el browser sube el legend al borde del fieldset */
    margin-top: 0;
}

.bloque-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--rojo);
    color: white;
    border-radius: 50%;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0;
    flex-shrink: 0;
}

/* ── Cuota ── */
.cuota-opciones {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1.25rem;
}

.cuota-label {
    cursor: pointer;
    user-select: none;
}

.cuota-label input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.cuota-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 70px;
    padding: 0.55rem 1rem;
    border: 1.5px solid var(--borde);
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--texto);
    background: white;
    transition: border-color 0.15s, background 0.15s, color 0.15s, transform 0.1s;
    cursor: pointer;
}

.cuota-btn em {
    font-style: normal;
    color: var(--rojo);
    margin-left: 1px;
}

.cuota-label input[type="radio"]:checked + .cuota-btn,
.cuota-btn.destacada {
    border-color: var(--rojo);
    background: var(--rojo);
    color: white;
}

.cuota-label input[type="radio"]:checked + .cuota-btn em {
    color: rgba(255,255,255,0.8);
}

.cuota-label:hover .cuota-btn {
    border-color: var(--rojo);
    color: var(--rojo);
    transform: translateY(-1px);
}

.cuota-label input[type="radio"]:checked + .cuota-btn {
    border-color: var(--rojo);
    background: var(--rojo);
    color: white;
    transform: none;
}

.cuota-label input[type="radio"]:focus-visible + .cuota-btn {
    outline: 2px solid var(--rojo);
    outline-offset: 2px;
}

.cuota-otro {
    margin-bottom: 1rem;
}

.cuota-otro-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.input-otro {
    width: 160px;
    padding: 0.55rem 2.2rem 0.55rem 0.9rem;
    border: 1.5px solid var(--borde);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: var(--font);
    color: var(--texto);
    background: var(--fondo-campo);
    transition: border-color 0.15s;
    -moz-appearance: textfield;
}

.input-otro::-webkit-outer-spin-button,
.input-otro::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

.input-otro:focus {
    outline: none;
    border-color: var(--rojo);
    background: white;
}

.euro-sign {
    position: absolute;
    right: 0.7rem;
    color: var(--texto-suave);
    font-weight: 500;
    font-size: 0.95rem;
    pointer-events: none;
}

.cuota-nota {
    font-size: 0.78rem;
    color: var(--texto-suave);
    line-height: 1.5;
    margin: 0;
    padding-top: 0.5rem;
    border-top: 1px solid var(--borde);
}

/* ── Campos genéricos ── */
.campo-grupo {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.4rem;
}

.campo-grupo:last-child {
    margin-bottom: 0;
}

.campo {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1 1 180px;
    min-width: 140px;
}

.campo-full  { flex: 1 1 100%; }
.campo-wide  { flex: 2 1 240px; }
.campo-narrow { flex: 0 1 120px; min-width: 100px; }

.campo-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--texto-suave);
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.req {
    color: var(--rojo);
    font-weight: 700;
}

.campo-input {
    padding: 0.65rem 0.9rem;
    border: 1.5px solid var(--borde);
    border-radius: 8px;
    font-size: 0.92rem;
    font-family: var(--font);
    color: var(--texto);
    background: var(--fondo-campo);
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
}

.campo-input:focus {
    outline: none;
    border-color: var(--rojo);
    background: white;
    box-shadow: 0 0 0 3px var(--rojo-borde);
}

.campo-input:valid:not(:placeholder-shown):not(select) {
    border-color: #4caf50;
}

.campo-input::placeholder {
    color: #b0b0b0;
    font-style: italic;
}

.campo-select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10' fill='none' stroke='%234a4a4a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='1,3 5,7 9,3'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.2rem;
}

.campo-hint {
    font-size: 0.75rem;
    color: #888;
    margin: 3px 0 0;
    line-height: 1.4;
}

/* Fecha */
.fecha-wrap {
    display: flex;
    gap: 0.6rem;
}

.fecha-select { flex: 1; }

/* Teléfono */
.tel-wrap {
    display: flex;
    gap: 0.5rem;
}

.prefijo-select {
    flex: 0 0 105px;
    font-size: 0.82rem;
}

/* ── Bloque legal — checkboxes ── */
.bloque-legal {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.check-label {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    cursor: pointer;
    user-select: none;
}

.check-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.check-custom {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border: 1.5px solid var(--borde);
    border-radius: 4px;
    background: var(--fondo-campo);
    margin-top: 1px;
    transition: border-color 0.15s, background 0.15s;
    position: relative;
}

.check-label input[type="checkbox"]:checked + .check-custom {
    background: var(--rojo);
    border-color: var(--rojo);
}

.check-label input[type="checkbox"]:checked + .check-custom::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 6px;
    width: 5px;
    height: 9px;
    border: 2px solid white;
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
}

.check-label input[type="checkbox"]:focus-visible + .check-custom {
    outline: 2px solid var(--rojo);
    outline-offset: 2px;
}

.check-texto {
    font-size: 0.88rem;
    color: var(--texto-suave);
    line-height: 1.55;
}

.check-texto a {
    color: var(--rojo);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Captcha */
.captcha-wrap {
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* ── Submit ── */
.form-submit {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
    padding-top: 0.5rem;
}

.btn-enviar {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--rojo);
    color: white !important;
    border: none;
    border-radius: 10px;
    padding: 1rem 2.5rem;
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: background 0.18s, transform 0.18s, box-shadow 0.18s;
    box-shadow: 0 4px 16px rgba(229, 44, 33, 0.35);
}

.btn-enviar:hover,
.btn-enviar:focus {
    background: var(--rojo-oscuro);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(229, 44, 33, 0.45);
    outline: none;
}

.btn-enviar:active {
    transform: translateY(0);
}

.btn-enviar-ico {
    flex-shrink: 0;
}

.form-aviso {
    font-size: 0.78rem;
    color: #999;
    text-align: center;
    margin: 0;
    line-height: 1.5;
}

.form-aviso a {
    color: var(--texto-suave);
    text-decoration: underline;
}

/* ════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════ */
@media (max-width: 900px) {
    .form-layout {
        grid-template-columns: 1fr;
    }

    .lateral-sticky {
        position: static;
        display: grid;
        grid-template-columns: auto 1fr;
        gap: 0 1.5rem;
        align-items: start;
    }

    .lateral-icono { grid-row: 1; }
    .lateral-titulo { grid-row: 1; align-self: center; }
    .lateral-lista { grid-column: 1 / -1; }
    .lateral-nota  { grid-column: 1 / -1; }
}

@media (max-width: 700px) {
    .hero-inner { padding: 2rem 5vw 3rem; }
    .hero-titulo { font-size: clamp(2.4rem, 10vw, 3.5rem); }
    .hero-cifras { gap: 1.5rem; }
    .cifra-sep { display: none; }
    .aspas-wrapper { width: 480px; height: 480px; right: -160px; bottom: -160px; opacity: 0.6; }
    .aspa-1 { width: 420px; height: 420px; }
    .aspa-2 { width: 280px; height: 280px; }
    .aspa-3 { width: 160px; height: 160px; }

    .unete-form-section { padding: 3rem 4vw 4rem; }
    .form-bloque { padding: 0 1.25rem 1.5rem; }
    .bloque-legend { width: calc(100% + 2.5rem); margin-left: -1.25rem; margin-right: -1.25rem; padding: 1rem 1.25rem; }

    .campo-grupo { gap: 0.75rem; }
    .campo { flex-basis: 100%; }
    .campo-narrow { flex: 1 1 45%; }

    .lateral-sticky {
        display: flex;
        flex-direction: column;
    }

    .br-desktop { display: none; }

    .fecha-wrap { flex-wrap: wrap; }
    .tel-wrap { flex-wrap: wrap; }
    .prefijo-select { flex: 0 0 100%; }

    .btn-enviar { width: 100%; justify-content: center; }
}

@media (max-width: 480px) {
    .cuota-opciones { gap: 0.5rem; }
    .cuota-btn { min-width: 60px; padding: 0.5rem 0.75rem; font-size: 0.92rem; }
}