:root {
    --yellow: #FFC405;
    --black: #000000;
    --bg: #FFC405;
    --text: #000000;
    --muted: rgba(0, 0, 0, 0.35);
    --dim: rgba(0, 0, 0, 0.08);
    --font-heading: 'Lexend', sans-serif;
    --font-body: 'Public Sans', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    height: 100%;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg);
    color: var(--black);
    min-height: 100dvh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* ─── APP WRAPPER ─────────────────────────────────── */
#app {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 20px;
    max-width: 720px;
    margin: 0 auto;
    width: 100%;
}

/* ─── PROGRESS BAR ────────────────────────────────── */
.progress-container {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 4px;
    background: rgba(0, 0, 0, 0.1);
    z-index: 1000;
}
.progress-bar {
    height: 100%;
    background: var(--black);
    width: 0%;
    transition: width 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}

/* ─── HEADER ──────────────────────────────────────── */
.main-header {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3rem 0 2rem;
    gap: 1.5rem;
}

.text-logo {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--black);
}

.lang-selector {
    display: flex;
    gap: 0;
    border: 1px solid var(--muted);
    border-radius: 8px;
    overflow: hidden;
}

.lang-btn {
    padding: 6px 18px;
    border: none;
    background: transparent;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    color: var(--muted);
    transition: all 0.2s;
}
.lang-btn:first-child {
    border-right: 1px solid var(--muted);
}
.lang-btn.active {
    background: var(--black);
    color: var(--yellow);
}

/* ─── STEP CONTENT ────────────────────────────────── */
#step-content {
    flex: 1;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0 3rem;
}

.step-screen {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    animation: appear 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

@keyframes appear {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ─── STEP LABEL ──────────────────────────────────── */
.step-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 1.8rem;
}

/* ─── QUESTION TITLE ──────────────────────────────── */
h2 {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    font-weight: 700;
    letter-spacing: -1px;
    line-height: 1.1;
    color: var(--black);
    margin-bottom: 3rem;
}

.step-subtitle {
    font-size: 1.1rem;
    color: var(--muted);
    margin-top: -2rem;
    margin-bottom: 3rem;
    line-height: 1.6;
}

/* ─── INPUT ───────────────────────────────────────── */
.input-group {
    width: 100%;
    margin-bottom: 3rem;
    position: relative;
}

.input-icon {
    position: absolute;
    left: 0;
    top: 24px;
    color: var(--muted);
    transition: color 0.3s;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"] {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--muted);
    font-size: 2rem;
    padding: 14px 0;
    font-family: var(--font-heading);
    font-weight: 700;
    outline: none;
    text-align: center;
    color: var(--black);
    caret-color: var(--black);
    transition: border-color 0.3s;
}

.input-group.has-icon input {
    padding-left: 40px;
    text-align: left;
}

.input-group.has-icon input:focus + .input-hint,
.input-group.has-icon input:focus ~ .input-icon {
    color: var(--black);
}

/* Ocultar flechas del input number para que sea más minimalista */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] {
  -moz-appearance: textfield;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus {
    border-bottom-color: var(--black);
}

/* Selectores y Calendario con fondo negro y letras amarillas */
.custom-select-black,
.custom-date-black {
    width: 100%;
    background-color: var(--black) !important;
    color: var(--yellow) !important;
    border: none;
    border-bottom: 2px solid var(--yellow);
    font-size: 2rem;
    padding: 14px 0 14px 40px;
    font-family: var(--font-heading);
    font-weight: 700;
    outline: none;
    appearance: none; /* Elimina flecha nativa */
    border-radius: 8px 8px 0 0;
    transition: all 0.3s;
}

.custom-select-black option {
    background-color: var(--black);
    color: var(--yellow);
    font-size: 1.2rem;
}

/* Estilo para el icono del calendario en navegadores webkit */
.custom-date-black::-webkit-calendar-picker-indicator {
    filter: invert(81%) sepia(88%) saturate(1412%) hue-rotate(352deg) brightness(102%) contrast(106%);
    cursor: pointer;
}

input::placeholder {
    color: rgba(0, 0, 0, 0.2);
    font-weight: 400;
}

.input-hint {
    font-size: 0.9rem;
    color: var(--muted);
    margin-top: 1rem;
}

.custom-textarea {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--muted);
    font-size: 1.8rem;
    padding: 15px 0;
    font-family: var(--font-heading);
    font-weight: 700;
    outline: none;
    color: var(--black);
    text-align: center;
    min-height: 120px;
    resize: none;
    transition: border-color 0.3s;
}

.custom-textarea:focus {
    border-bottom-color: var(--black);
}

.custom-textarea::placeholder {
    color: rgba(0, 0, 0, 0.2);
    font-weight: 400;
}

/* ─── DATE PICKER (3 selectores) ─────────────────── */
.date-picker-row {
    display: flex;
    gap: 12px;
    width: 100%;
    margin-bottom: 1.5rem;
}
.date-picker-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.date-picker-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--muted);
}
.date-picker-col .custom-select-black {
    padding: 14px 8px;
    font-size: 1.3rem;
    text-align: center;
    border-radius: 8px 8px 0 0;
}

/* ─── BUTTONS ─────────────────────────────────────── */
.btn-primary {
    background: var(--black);
    color: var(--yellow);
    border: none;
    padding: 20px 52px;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 196, 5, 0.1);
    opacity: 0;
    transition: opacity 0.2s;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.btn-primary:hover:not(:disabled)::after { opacity: 1; }

.btn-primary:active:not(:disabled) {
    transform: translateY(0) scale(0.97);
}

.btn-primary:disabled {
    opacity: 0.2;
    cursor: not-allowed;
}

.btn-back {
    background: transparent;
    border: 1px solid var(--muted);
    color: var(--black);
    width: 44px; height: 44px;
    border-radius: 4px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 2.5rem;
    transition: all 0.2s;
    align-self: flex-start;
}
.btn-back:hover {
    background: var(--black);
    color: var(--yellow);
    border-color: var(--black);
}

/* ─── PLAN CARDS ──────────────────────────────────── */
.plans-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    margin-bottom: 3rem;
}

.plan-card {
    border: 1px solid var(--muted);
    padding: 22px 28px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.25s;
    text-align: left;
}

.plan-card:hover {
    border-color: var(--black);
    background: var(--dim);
}

.plan-card.active {
    background: var(--black);
    border-color: var(--black);
}
.plan-card.active .plan-name,
.plan-card.active .plan-price,
.plan-card.active .plan-desc {
    color: var(--yellow);
}

.plan-name {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--black);
}

.plan-price {
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--black);
    white-space: nowrap;
}

.plan-desc {
    font-size: 0.85rem;
    color: var(--muted);
    margin-top: 4px;
}

/* ─── DUAL UPLOAD ─────────────────────────────────── */
.upload-dual-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    width: 100%;
    margin-bottom: 3rem;
}

.file-upload-wrapper {
    position: relative;
    cursor: pointer;
    display: block;
}

.file-upload-input {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    opacity: 0.01;
    cursor: pointer;
    z-index: 10;
}

.file-upload-box {
    border: 1px dashed var(--muted);
    border-radius: 4px;
    padding: 40px 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--muted);
    transition: all 0.25s;
}

.file-upload-box:hover { border-color: var(--black); color: var(--black); }

.file-upload-box.has-file {
    border-style: solid;
    border-color: var(--black);
    color: var(--black);
    background: var(--dim);
}

.file-upload-box span { font-size: 0.85rem; font-weight: 600; }

/* ─── SEPA / CONTRACT ─────────────────────────────── */
.contract-iframe-wrapper {
    position: relative;
    width: 100%;
    height: 480px;
    border: 1px solid var(--muted);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.contract-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    background: #fff;
}

.contract-iframe-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent, rgba(255, 196, 5, 0.95));
    padding: 2rem 1.5rem 1.5rem;
    display: flex;
    justify-content: flex-end;
}

.btn-open-contract {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--black);
    color: var(--yellow);
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.2s;
}
.btn-open-contract:hover { opacity: 0.85; }

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 2rem;
    cursor: pointer;
    color: var(--black);
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.95rem;
}

.checkbox-container input[type="checkbox"] {
    width: 20px; height: 20px;
    border: 1px solid var(--black);
    background: transparent;
    appearance: none;
    cursor: pointer;
    border-radius: 2px;
    flex-shrink: 0;
    position: relative;
}

.checkbox-container input[type="checkbox"]:checked {
    background: var(--black);
}

.checkbox-container input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 5px; top: 2px;
    width: 6px; height: 10px;
    border: 2px solid var(--yellow);
    border-left: none; border-top: none;
    transform: rotate(45deg);
}

/* ─── SIGNATURE ───────────────────────────────────── */
#signature-canvas {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid var(--muted);
    border-radius: 4px;
    width: 100%; height: 200px;
    caret-color: var(--black);
}

.btn-secondary-sm {
    background: transparent;
    border: none;
    color: var(--muted);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 8px 0;
    transition: color 0.2s;
}
.btn-secondary-sm:hover { color: var(--black); }

/* ─── SUCCESS ─────────────────────────────────────── */
.success-icon {
    width: 80px; height: 80px;
    border: 2px solid var(--black);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 2rem;
}

/* ─── RESPONSIVE ──────────────────────────────────── */
@media (max-width: 600px) {
    h2 { font-size: 2rem; }
    input[type="text"],
    input[type="email"],
    input[type="tel"] { font-size: 1.6rem; }
    .upload-dual-grid { grid-template-columns: 1fr; }
    .btn-primary { width: 100%; justify-content: center; }
}

/* Ocultar el badge flotante de reCAPTCHA */
.grecaptcha-badge {
    visibility: hidden !important;
}
