* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: "DM Sans", Arial, sans-serif; background: #f4f1ec; color: #1f1f2e; line-height: 1.5; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; }
img { max-width: 100%; }

.quote-page { min-height: 100vh; padding: 28px; }

/* ─── HERO centrado (foto teñida + aurora + card de cristal) ─── */
.hero {
  max-width: 1280px; min-height: 480px; margin: 0 auto; border-radius: 30px;
  position: relative; overflow: hidden;
  background:
    linear-gradient(135deg, rgba(73,20,145,.88), rgba(72,55,180,.64)),
    url("https://images.unsplash.com/photo-1500530855697-b586d89ba3ee?auto=format&fit=crop&w=1800&q=80") center/cover;
  box-shadow: 0 24px 60px rgba(0,0,0,.18);
  display: grid; place-items: center; padding: 44px 24px;
}
.hero-bg-shape {
  position: absolute; width: 560px; height: 560px; left: 55px; top: 50%; transform: translateY(-50%);
  background: url("https://images.unsplash.com/photo-1526778548025-fa2f459cd5c1?auto=format&fit=crop&w=1200&q=80") center/cover;
  opacity: .22; border-radius: 52% 48% 63% 37% / 42% 48% 52% 58%; filter: saturate(1.2);
}
.hero-logo-watermark {
  position: absolute; inset: 0; margin: auto; width: min(78%, 620px); height: 68%;
  background-size: contain; background-position: center; background-repeat: no-repeat;
  opacity: .07; pointer-events: none; z-index: 1;
}

.hero-content-card {
  position: relative; z-index: 2; width: min(540px, calc(100% - 40px)); padding: 32px 36px;
  border: 1.5px solid rgba(255,255,255,.45); border-radius: 28px;
  background: rgba(255,255,255,.05); backdrop-filter: blur(9px); -webkit-backdrop-filter: blur(9px);
  text-align: center; color: #fff; text-shadow: 0 1px 14px rgba(0,0,0,.5);
}
.hero-content-card h1 { font-size: clamp(1.4rem, 3.2vw, 2.1rem); font-weight: 700; line-height: 1.1; margin-bottom: 4px; }
/* Eslogan / descripción corta del cotizador — letra elegante (serif itálica). */
.cot-eslogan {
  font-family: "Playfair Display", Georgia, serif; font-style: italic;
  font-size: clamp(1rem, 2.2vw, 1.2rem); line-height: 1.4;
  color: rgba(255,255,255,.92); max-width: 440px; margin: 2px auto 0;
}
.agent-slogan { font-size: 1rem; color: rgba(255,255,255,.9); margin-bottom: 12px; }
.agent-description { max-width: 460px; margin: 0 auto 20px; color: rgba(255,255,255,.82); line-height: 1.6; }

.agent-logo {
  width: 92px; height: 92px; margin: 0 auto 16px; border-radius: 24px;
  background: var(--color-secundario); color: #1c163f;
  display: grid; place-items: center; font-size: 2.3rem; font-weight: 900; overflow: hidden;
  box-shadow: 0 14px 34px rgba(0,0,0,.22);
}
.agent-logo img { width: 100%; height: 100%; object-fit: cover; }
.agent-logo--halo { position: relative; overflow: visible; background: transparent; box-shadow: none; }
.agent-logo--halo img { position: relative; z-index: 2; border-radius: 20px; }
.agent-logo--halo::before {
  content: ""; position: absolute; inset: -5px; border-radius: 28px; z-index: 0;
  background: conic-gradient(from 0deg, #ff4b2b, #b000ff, var(--color-principal), #2ad0ff, #ff4b2b);
  animation: halo-spin 5s linear infinite; filter: saturate(1.25);
}
.agent-logo--halo::after {
  content: ""; position: absolute; inset: 0; border-radius: 22px; z-index: 1;
  background: var(--color-secundario); box-shadow: 0 14px 34px rgba(0,0,0,.28);
}
@keyframes halo-spin { to { transform: rotate(1turn); } }
@media (prefers-reduced-motion: reduce) { .agent-logo--halo::before { animation: none; } }

.social-title {
  display: inline-block; margin-bottom: 14px; padding: 11px 24px; border-radius: 12px;
  background: linear-gradient(90deg, #ff4b2b, #b000ff); color: #fff; font-weight: 900; font-size: 1.05rem;
}
.social-icons { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.social-icons:empty { display: none; }
.social-icon-btn {
  width: 48px; height: 48px; border-radius: 15px; background: #fff; color: var(--color-principal);
  display: grid; place-items: center; box-shadow: 0 10px 22px rgba(0,0,0,.18);
  text-decoration: none; transition: transform .15s, box-shadow .15s;
}
.social-icon-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 28px rgba(0,0,0,.22); }
.social-icon-btn svg { width: 26px; height: 26px; }

/* ─── Tarjeta de presentación (descripción del cotizador) ─── */
.intro-card {
  position: relative; max-width: 1120px; margin: 26px auto 0; background: #fff;
  border-radius: 24px; padding: 30px 34px 30px 42px; box-shadow: 0 14px 40px rgba(0,0,0,.08); overflow: hidden;
}
.intro-accent { position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: linear-gradient(180deg, var(--color-principal), var(--color-secundario)); }
.intro-rich { color: #2d2d3d; line-height: 1.7; font-size: 1.02rem; }
.intro-rich > *:first-child { margin-top: 0; }
.intro-rich > *:last-child { margin-bottom: 0; }
.intro-rich p { margin: 0 0 10px; }
.intro-rich strong, .intro-rich b { color: var(--color-principal); }
.intro-rich ul, .intro-rich ol { margin: 10px 0; padding-left: 22px; }
.intro-rich li { margin-bottom: 6px; }
.intro-rich a { color: var(--color-principal); font-weight: 600; text-decoration: underline; word-break: break-word; }
.intro-rich h1, .intro-rich h2, .intro-rich h3, .intro-rich h4 { margin: 16px 0 6px; line-height: 1.25; font-weight: 800; color: #1f1f2e; }
.intro-rich > h1:first-child, .intro-rich > h2:first-child, .intro-rich > h3:first-child { margin-top: 0; }
.intro-rich h1 { font-size: 1.6rem; }
.intro-rich h2 { font-size: 1.32rem; }
.intro-rich h3 { font-size: 1.14rem; }
.intro-rich img { max-width: 100%; height: auto; border-radius: 12px; }

/* ─── Tarjeta del formulario (POR PASOS) ─── */
.form-card { max-width: 1120px; margin: 26px auto 0; background: #fff; border-radius: 28px; box-shadow: 0 18px 50px rgba(0,0,0,.1); overflow: hidden; }
.form-header { padding: 30px 36px 22px; border-bottom: 1px solid #f1f1f5; }
.form-header h3 { font-size: 1.9rem; margin-bottom: 8px; }
.form-header p { color: #747486; line-height: 1.5; }
.progress { height: 6px; margin-top: 18px; overflow: hidden; border-radius: 99px; background: #ececf2; }
.progress-bar { width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--color-principal), var(--color-secundario)); transition: width .35s ease; }
.steps-count { margin-top: 8px; font-size: 11.5px; font-weight: 700; color: var(--color-principal); }

.step { display: none; padding: 28px 36px 4px; animation: fadeIn .3s ease both; }
.step.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.field { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.field-full { grid-column: 1 / -1; }
label { font-size: .9rem; font-weight: 700; color: #2d2d3d; }
label span { color: #d94b4b; }

input, textarea, select {
  width: 100%; border: 1px solid #e2e2ea; border-radius: 14px; padding: 14px 16px; font: inherit;
  background: #fbfbfd; color: #1f1f2e; outline: none; transition: .2s; -webkit-appearance: none; appearance: none;
}
textarea { min-height: 92px; resize: vertical; }
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px;
}
input:focus, textarea:focus, select:focus { border-color: var(--color-principal); background: #fff; box-shadow: 0 0 0 4px rgba(75,50,184,.1); }
input.invalid, select.invalid, textarea.invalid { border-color: #d94b4b; box-shadow: 0 0 0 4px rgba(217,75,75,.1); }

.option-group { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.option-card { display: flex; align-items: center; gap: 12px; background: #fbfbfd; border: 1px solid #e2e2ea; border-radius: 14px; padding: 14px 16px; cursor: pointer; transition: .2s; }
.option-card:hover { border-color: var(--color-principal); }
.option-card input { width: auto; }
.option-card:has(input:checked) { border-color: var(--color-principal); background: rgba(75,50,184,.08); }
.option-card span { font-size: .88rem; color: #2d2d3d; }

.cf-wrap { display: flex; justify-content: center; padding: 12px 36px 0; }
.form-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 18px 36px 8px; }
.btn { min-height: 50px; display: inline-flex; justify-content: center; align-items: center; gap: 8px; border: 0; border-radius: 16px; cursor: pointer; padding: 14px 24px; font-weight: 800; transition: transform .15s, box-shadow .15s; }
.btn:hover { transform: translateY(-1px); }
.btn-back { color: #8b8b9b; background: transparent; }
.btn-back:hover { color: #2d2d3d; background: #f1f1f7; }
.btn-next, .btn-submit { margin-left: auto; color: #fff; background: linear-gradient(135deg, var(--color-principal), var(--color-secundario)); box-shadow: 0 14px 30px rgba(75,50,184,.22); }
.btn-next:hover, .btn-submit:hover { box-shadow: 0 16px 32px rgba(75,50,184,.3); }
.btn-submit { min-width: 200px; }
.privacy { padding: 6px 36px 26px; text-align: center; color: #8b8b9b; font-size: 11px; }
.privacy span { color: #d94b4b; }
.spam-box { margin: 30px 36px; padding: 24px; text-align: center; background: #fef2f2; border: 1px solid #fecaca; border-radius: 16px; }

/* ─── Phone widget ─── */
.pw-wrap { position: relative; }
.pw-row { position: relative; display: flex; align-items: center; border: 1px solid #e2e2ea; border-radius: 14px; background: #fbfbfd; transition: border-color .2s, box-shadow .2s; }
.pw-row:focus-within { border-color: var(--color-principal); background: #fff; box-shadow: 0 0 0 4px rgba(75,50,184,.1); }
.pw-row.pw-invalid { border-color: #ef4444 !important; background: #fff7f7 !important; box-shadow: 0 0 0 3px rgba(239,68,68,.1) !important; }
.pw-trigger { display: flex; align-items: center; gap: 5px; padding: 0 12px; height: 52px; background: transparent; border: none; border-right: 1px solid #e2e2ea; border-radius: 13px 0 0 13px; cursor: pointer; font-size: 13px; font-weight: 700; color: #2d2d3d; white-space: nowrap; min-width: 90px; flex-shrink: 0; }
.pw-trigger:hover { background: #f1f5f9; }
.pw-flag { font-size: 20px; line-height: 1; }
.pw-code { font-size: 13px; }
.pw-arrow { font-size: 10px; color: #94a3b8; }
.pw-num { flex: 1; border: none !important; background: transparent !important; box-shadow: none !important; border-radius: 0 13px 13px 0 !important; padding: 14px 16px; font: inherit; font-size: 15px; outline: none; min-width: 0; width: auto; }
.pw-err { display: none; color: #dc2626; font-size: 12px; margin-top: 5px; font-weight: 600; }
.pw-err.show { display: block; }
.pw-dropdown { display: none; position: absolute; top: calc(100% + 6px); left: 0; width: 290px; max-width: calc(100vw - 32px); background: #fff; border: 1px solid #e2e2ea; border-radius: 14px; box-shadow: 0 12px 32px rgba(0,0,0,.14); z-index: 300; overflow: hidden; }
.pw-dropdown.open { display: block; }
.pw-search { width: 100% !important; padding: 10px 14px !important; border: none !important; border-bottom: 1px solid #f1f5f9 !important; border-radius: 0 !important; font-size: 13px !important; background: #f8fafc !important; box-shadow: none !important; outline: none; }
.pw-list { max-height: 220px; overflow-y: auto; list-style: none !important; padding: 4px 0; margin: 0; }
.pw-list li { list-style: none !important; }
.pw-item { display: flex !important; align-items: center; gap: 8px; padding: 9px 14px; cursor: pointer; font-size: 13px; transition: background .1s; list-style: none !important; }
.pw-item:hover { background: #f0f4ff; }
.pw-item.pw-active { background: #ede9ff; }
.pw-item-f { font-size: 18px; width: 24px; text-align: center; flex-shrink: 0; font-style: normal; }
.pw-item-c { color: var(--color-principal, #4B32B8); font-weight: 700; font-size: 12px; min-width: 42px; }
.pw-item-n { color: #475569; font-size: 12px; flex: 1; }

/* ─── Responsive ─── */
@media (max-width: 760px) {
  .quote-page { padding: 14px; }
  .hero { min-height: 520px; padding: 32px 16px; }
  .hero-bg-shape { width: 360px; height: 360px; left: -80px; }
  .hero-content-card { padding: 26px 22px; }
  .hero-logo-watermark { width: 112%; height: 56%; opacity: .05; }
  .intro-card { margin-top: 16px; padding: 22px 22px 22px 28px; border-radius: 20px; }
  .form-card { border-radius: 22px; }
  .form-header { padding: 24px 20px 18px; }
  .form-header h3 { font-size: 1.5rem; }
  .step { padding: 22px 20px 4px; }
  .form-grid, .option-group { grid-template-columns: 1fr; }
  .form-actions { padding: 16px 20px 6px; }
  .cf-wrap { padding: 12px 20px 0; }
  .btn-submit { min-width: 0; flex: 1; }
  .privacy { padding: 6px 20px 20px; }
  /* iOS: evita zoom al enfocar (requiere >=16px) */
  input, textarea, select, .pw-num { font-size: 16px; }
}
