/* ── Radar de Vivienda ───────────────────────────────────────── */

.radar-hero {
  background: linear-gradient(135deg, #0f1b2d 0%, #1a1a2e 60%, #0f3460 100%);
  padding: clamp(3rem,8vh,6rem) 0 clamp(2.5rem,6vh,5rem);
  text-align: center;
}
.radar-hero-badge {
  display: inline-block;
  background: oklch(55% 0.18 250 / 0.25);
  border: 1px solid oklch(55% 0.18 250 / 0.4);
  color: oklch(80% 0.12 250);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 100px;
  margin-bottom: 1.25rem;
}
.radar-hero-title {
  font-size: clamp(2.2rem,5vw,3.5rem);
  font-weight: 800;
  color: #fff;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}
.radar-hero-sub {
  font-size: clamp(1rem,1.8vw,1.2rem);
  color: oklch(80% 0 0);
  margin: 0 auto 2.5rem;
  max-width: 560px;
  line-height: 1.6;
}
.radar-hero-stats {
  display: flex;
  justify-content: center;
  gap: clamp(1rem,3vw,3rem);
  flex-wrap: wrap;
}
.radar-stat { text-align: center; }
.radar-stat-n { display: block; font-size: 1rem; font-weight: 700; color: #e94560; }
.radar-stat-l { display: block; font-size: 0.72rem; color: oklch(65% 0 0); margin-top: 2px; }

/* ── Aviso requisito ────────────────────────────────────────── */
.radar-aviso {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: oklch(55% 0.18 60 / 0.1);
  border: 1px solid oklch(65% 0.18 60 / 0.35);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin: 2rem 0 0;
}
.radar-aviso-icon { font-size: 1.2rem; flex-shrink: 0; margin-top: 1px; }
.radar-aviso-body { font-size: 0.875rem; color: oklch(80% 0 0); line-height: 1.6; }
.radar-aviso-body strong { color: oklch(90% 0.12 60); }
.radar-aviso-link { display: inline-block; margin-left: 0.75rem; color: #e94560; font-weight: 600; font-size: 0.82rem; text-decoration: none; white-space: nowrap; }
.radar-aviso-link:hover { text-decoration: underline; }

/* ── Cómo funciona ───────────────────────────────────────────── */
.radar-como { padding: clamp(3rem,6vh,5rem) 0; }
.radar-section-title {
  font-size: clamp(1.4rem,2.5vw,1.9rem);
  font-weight: 700;
  margin: 0 0 2rem;
  text-align: center;
}
.radar-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px,1fr));
  gap: 1.5rem;
}
.radar-step {
  background: oklch(100% 0 0 / 0.03);
  border: 0.5px solid oklch(100% 0 0 / 0.08);
  border-radius: 14px;
  padding: 1.75rem 1.5rem;
}
.radar-step-n {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #e94560;
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
}
.radar-step h3 { font-size: 1rem; font-weight: 700; margin: 0 0 .5rem; }
.radar-step p  { font-size: 0.875rem; color: oklch(65% 0 0); margin: 0; line-height: 1.6; }

/* ── Formulario ──────────────────────────────────────────────── */
.radar-form-section {
  background: oklch(100% 0 0 / 0.02);
  border-top: 0.5px solid oklch(100% 0 0 / 0.06);
  border-bottom: 0.5px solid oklch(100% 0 0 / 0.06);
  padding: clamp(3rem,6vh,5rem) 0;
}
.radar-form-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem,5vw,5rem);
  align-items: start;
}
@media (max-width: 768px) { .radar-form-wrap { grid-template-columns: 1fr; } }

.radar-form-left h2 { font-size: clamp(1.3rem,2.2vw,1.7rem); font-weight: 700; margin: 0 0 .75rem; }
.radar-form-left p  { color: oklch(65% 0 0); margin: 0 0 1.5rem; font-size: 0.9rem; }
.radar-checklist { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.radar-checklist li { font-size: 0.875rem; color: oklch(70% 0 0); padding-left: 1.5rem; position: relative; }
.radar-checklist li::before { content: '✓'; position: absolute; left: 0; color: #e94560; font-weight: 700; }

.radar-form { background: oklch(100% 0 0 / 0.04); border: 0.5px solid oklch(100% 0 0 / 0.1); border-radius: 16px; padding: 2rem; display: flex; flex-direction: column; gap: 1.25rem; }

/* Bloques internos del formulario */
.rf-bloque { display: flex; flex-direction: column; gap: 1rem; padding-bottom: 1.25rem; border-bottom: 0.5px solid oklch(100% 0 0 / 0.08); }
.rf-bloque:last-of-type { border-bottom: none; padding-bottom: 0; }
.rf-bloque-label { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: #e94560; }

/* Radio ¿para quién? */
.rf-para-opts { display: flex; gap: 1rem; flex-wrap: wrap; }
.rf-para-opt { display: flex; align-items: center; gap: 8px; font-size: 0.875rem; color: oklch(80% 0 0); cursor: pointer; background: oklch(100% 0 0 / 0.04); border: 0.5px solid oklch(100% 0 0 / 0.12); border-radius: 8px; padding: 10px 16px; transition: border-color .15s; }
.rf-para-opt:has(input:checked) { border-color: #e94560; background: oklch(52% 0.205 9 / 0.08); }
.rf-para-opt input[type=radio] { accent-color: #e94560; }
.rf-para-nota { font-size: 0.75rem; color: oklch(55% 0 0); margin: 0; line-height: 1.5; }

.rf-row { display: flex; flex-direction: column; gap: 6px; }
.rf-row-half { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 480px) { .rf-row-half { grid-template-columns: 1fr; } }
.rf-row label { font-size: 0.8rem; font-weight: 600; color: oklch(75% 0 0); }
.rf-req { color: #e94560; }
.rf-opt { color: oklch(55% 0 0); font-weight: 400; }
.rf-row input, .rf-row select {
  background: oklch(100% 0 0 / 0.06);
  border: 0.5px solid oklch(100% 0 0 / 0.15);
  border-radius: 8px;
  padding: 10px 12px;
  color: inherit;
  font-size: 0.9rem;
  transition: border-color .15s;
  width: 100%;
  box-sizing: border-box;
}
.rf-row input:focus, .rf-row select:focus { outline: none; border-color: #e94560; }
.rf-row select option { background: #1a1a2e; color: #fff; }
.rf-legal { flex-direction: column; }
.rf-check-label { display: grid; grid-template-columns: 16px 1fr; gap: 10px; align-items: flex-start; font-size: 0.78rem; color: oklch(60% 0 0); cursor: pointer; line-height: 1.5; width: 100%; }
.rf-check-label input[type=checkbox] { margin-top: 2px; accent-color: #e94560; width: 16px; }
.rf-check-label a { color: #e94560; }
.rf-error { background: oklch(40% 0.15 25 / 0.15); border: 1px solid oklch(55% 0.18 25 / 0.4); border-radius: 8px; padding: 10px 14px; font-size: 0.85rem; color: oklch(75% 0.12 25); }
.rf-submit {
  background: #e94560; color: #fff;
  border: none; border-radius: 10px;
  padding: 14px 24px;
  font-size: 1rem; font-weight: 700;
  cursor: pointer; transition: background .15s, transform .1s;
  margin-top: .25rem;
}
.rf-submit:hover:not(:disabled) { background: #c73652; }
.rf-submit:active:not(:disabled) { transform: scale(0.98); }
.rf-submit:disabled { opacity: 0.6; cursor: not-allowed; }
.rf-nota { font-size: 0.72rem; color: oklch(50% 0 0); text-align: center; margin: 0; width: 100%; }

/* ── Éxito ───────────────────────────────────────────────────── */
.radar-success { text-align: center; padding: 3rem 2rem; }
.radar-success-icon { width: 56px; height: 56px; background: oklch(45% 0.15 145 / 0.2); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: oklch(65% 0.18 145); margin: 0 auto 1.25rem; }
.radar-success h2 { font-size: 1.6rem; margin: 0 0 .75rem; }
.radar-success p { color: oklch(70% 0 0); margin: 0 0 .5rem; max-width: 480px; margin-inline: auto; }
.radar-success-sub { font-size: 0.85rem !important; color: oklch(55% 0 0) !important; }

/* ── Historial de alertas ────────────────────────────────────── */
.radar-historial { padding: clamp(3rem,6vh,5rem) 0; }
.radar-alerta-list { display: flex; flex-direction: column; gap: 1rem; }
.radar-alerta-card { background: oklch(100% 0 0 / 0.03); border: 0.5px solid oklch(100% 0 0 / 0.08); border-radius: 12px; padding: 1.25rem 1.5rem; }
.radar-alerta-meta { display: flex; align-items: center; gap: 10px; margin-bottom: .5rem; }
.radar-alerta-tipo { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; background: oklch(55% 0.18 25 / 0.15); color: #e94560; padding: 3px 10px; border-radius: 100px; }
.radar-alerta-fecha { font-size: 0.75rem; color: oklch(55% 0 0); }
.radar-alerta-card h3 { font-size: 1rem; font-weight: 700; margin: 0 0 .4rem; }
.radar-alerta-card p  { font-size: 0.875rem; color: oklch(65% 0 0); margin: 0 0 .75rem; line-height: 1.5; }
.radar-alerta-link { font-size: 0.82rem; color: #e94560; font-weight: 600; text-decoration: none; }
.radar-alerta-link:hover { text-decoration: underline; }
.radar-empty { text-align: center; padding: 2.5rem; background: oklch(100% 0 0 / 0.03); border: 0.5px solid oklch(100% 0 0 / 0.08); border-radius: 12px; color: oklch(60% 0 0); font-size: 0.9rem; }
.radar-empty strong { color: oklch(80% 0 0); }

/* ── Widget portada ──────────────────────────────────────────── */
.radar-portada-widget {
  background: linear-gradient(135deg, #0f1b2d, #1a1a2e);
  border: 1px solid oklch(55% 0.18 250 / 0.25);
  border-radius: 16px;
  padding: 2rem 2.25rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}
.radar-portada-icon { font-size: 2rem; flex-shrink: 0; }
.radar-portada-copy { flex: 1; min-width: 220px; }
.radar-portada-copy strong { display: block; font-size: 1.05rem; font-weight: 700; color: #fff; margin-bottom: .3rem; }
.radar-portada-copy span { font-size: 0.85rem; color: oklch(65% 0 0); line-height: 1.5; }
.radar-portada-btn {
  background: #e94560; color: #fff;
  border: none; border-radius: 8px;
  padding: 12px 20px;
  font-size: 0.9rem; font-weight: 700;
  text-decoration: none; white-space: nowrap;
  transition: background .15s;
}
.radar-portada-btn:hover { background: #c73652; }

/* ── Historial alertas mejorado ───────────────────── */
.radar-alerta-list { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 700px) { .radar-alerta-list { grid-template-columns: 1fr; } }

.radar-alerta-card {
  background: oklch(100% 0 0 / 0.03);
  border: 0.5px solid oklch(100% 0 0 / 0.08);
  border-radius: 14px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  transition: border-color 200ms;
}
.radar-alerta-card:hover { border-color: oklch(100% 0 0 / 0.16); }

.radar-alerta-meta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.radar-badge-enviada {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  background: oklch(55% 0.18 145 / 0.12); color: #4ade80;
  padding: 3px 10px; border-radius: 100px;
}
.radar-badge-enviada::before { content: '●'; font-size: .5rem; }
.radar-alerta-tipo { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; background: oklch(55% 0.18 25 / 0.12); color: #e94560; padding: 3px 10px; border-radius: 100px; }
.radar-alerta-fecha { font-size: 0.72rem; color: oklch(50% 0 0); margin-left: auto; }

.radar-alerta-card h3 { font-size: 0.95rem; font-weight: 700; margin: 0; line-height: 1.4; }
.radar-alerta-card p  { font-size: 0.83rem; color: oklch(62% 0 0); margin: 0; line-height: 1.55; flex: 1; }

.radar-alerta-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: .5rem; border-top: 1px solid oklch(100% 0 0 / 0.06); }
.radar-alerta-municipio { font-size: 0.75rem; color: oklch(55% 0 0); }
.radar-alerta-municipio::before { content: '📍 '; }
.radar-alerta-link { font-size: 0.78rem; color: #e94560; font-weight: 600; text-decoration: none; }
.radar-alerta-link:hover { text-decoration: underline; }
