/* ==========================================================================
   reparabien — sitio público
   Mismo azul de marca que el panel técnico (#005DE5), pero con un tono
   más cálido y humano: fondo casi-blanco (no crema), acento naranja de
   urgencia/acción, y Plus Jakarta Sans para el cuerpo de texto en vez
   de Inter — el panel técnico es una herramienta de trabajo; esto es
   la puerta de entrada para alguien con un problema en su casa.
   ========================================================================== */

:root {
  --pub-blue: #005de5;
  --pub-blue-dark: #0047b3;
  --pub-blue-tint: #eaf1ff;
  --pub-ink: #12182b;
  --pub-ink-soft: #5b6478;
  --pub-paper: #faf9f6;
  --pub-surface: #ffffff;
  --pub-border: #e8e6e1;
  --pub-orange: #ff6b35;
  --pub-orange-dark: #e85a28;
  --pub-orange-tint: #fff1ea;
  --pub-mint: #16a672;
  --pub-mint-tint: #e3f8ef;

  --pub-radius-sm: 10px;
  --pub-radius-md: 16px;
  --pub-radius-lg: 24px;
  --pub-shadow: 0 4px 16px rgba(18, 24, 43, 0.06);
  --pub-shadow-md: 0 16px 40px rgba(18, 24, 43, 0.12);

  --bs-primary: var(--pub-blue);
  --bs-primary-rgb: 0, 93, 229;
  --bs-body-font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  --bs-body-color: var(--pub-ink);
  --bs-border-color: var(--pub-border);
  --bs-border-radius: var(--pub-radius-sm);
  --bs-border-radius-lg: var(--pub-radius-md);
}

body {
  background: var(--pub-paper);
  color: var(--pub-ink);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .pub-display {
  font-family: 'Space Grotesk', 'Plus Jakarta Sans', sans-serif;
  letter-spacing: -0.015em;
  color: var(--pub-ink);
  font-weight: 700;
}

a { color: var(--pub-blue); text-decoration: none; }

.pub-dot::before { content: '.'; color: var(--pub-orange); font-weight: 700; }

/* ---------------------------------------------------------------------- */
/* Botones                                                                  */
/* ---------------------------------------------------------------------- */
.btn { font-weight: 600; border-radius: var(--pub-radius-sm); }

.btn-primary {
  background-color: var(--pub-blue);
  border-color: var(--pub-blue);
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
  background-color: var(--pub-blue-dark) !important;
  border-color: var(--pub-blue-dark) !important;
}

.btn-cta {
  background: var(--pub-orange);
  border: none;
  color: #fff;
  font-weight: 700;
  padding: .85rem 1.6rem;
  border-radius: var(--pub-radius-sm);
  font-size: 1.02rem;
  box-shadow: 0 8px 20px rgba(255, 107, 53, .28);
}
.btn-cta:hover { background: var(--pub-orange-dark); color: #fff; }

.btn:focus-visible, a:focus-visible, .form-control:focus-visible, .form-select:focus-visible {
  outline: 3px solid var(--pub-blue-tint);
  outline-offset: 2px;
}
.form-control:focus, .form-select:focus {
  border-color: var(--pub-blue);
  box-shadow: 0 0 0 0.2rem rgba(0, 93, 229, 0.12);
}

/* ---------------------------------------------------------------------- */
/* Navbar pública                                                           */
/* ---------------------------------------------------------------------- */
.pub-navbar {
  background: var(--pub-surface);
  border-bottom: 1px solid var(--pub-border);
  padding: .85rem 0;
  position: sticky;
  top: 0;
  z-index: 1020;
}
.pub-navbar .pub-brand { display: flex; align-items: center; gap: .55rem; font-weight: 700; font-size: 1.15rem; }
.pub-navbar .pub-brand img { height: 32px; width: 32px; border-radius: 8px; }
.pub-avatar {
  width: 34px; height: 34px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--pub-blue-tint);
}

/* ---------------------------------------------------------------------- */
/* Hero                                                                     */
/* ---------------------------------------------------------------------- */
.pub-hero { padding: 4.5rem 0 4rem; overflow: hidden; }
.pub-hero h1 { font-size: clamp(2.1rem, 4.5vw, 3.4rem); line-height: 1.06; margin-bottom: 1.1rem; }
.pub-hero .lead { color: var(--pub-ink-soft); font-size: 1.15rem; max-width: 30rem; }
.pub-hero-badges { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.6rem; }
.pub-hero-badge {
  display: flex; align-items: center; gap: .45rem;
  background: var(--pub-surface); border: 1px solid var(--pub-border);
  border-radius: 999px; padding: .4rem .85rem; font-size: .82rem; font-weight: 600;
  color: var(--pub-ink-soft);
}
.pub-hero-badge i { color: var(--pub-mint); }

/* Firma visual: mockup de conversación de WhatsApp, el mecanismo real
   del producto (el técnico contacta al cliente directo por WhatsApp) */
.pub-chat-mock {
  background: var(--pub-surface);
  border: 1px solid var(--pub-border);
  border-radius: var(--pub-radius-lg);
  box-shadow: var(--pub-shadow-md);
  padding: 1.4rem;
  max-width: 380px;
  margin-left: auto;
  position: relative;
}
.pub-chat-mock::before {
  content: '';
  position: absolute; inset: -14px -14px auto auto; width: 90px; height: 90px;
  background: var(--pub-orange-tint); border-radius: 50%; z-index: -1;
}
.pub-chat-head {
  display: flex; align-items: center; gap: .6rem; padding-bottom: .9rem;
  border-bottom: 1px solid var(--pub-border); margin-bottom: .9rem;
}
.pub-chat-head .pub-chat-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--pub-blue-tint); color: var(--pub-blue-dark);
  display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.pub-chat-head strong { display: block; font-size: .92rem; }
.pub-chat-head span { font-size: .76rem; color: var(--pub-mint); font-weight: 600; }

.pub-bubble {
  border-radius: 14px; padding: .6rem .85rem; font-size: .87rem; margin-bottom: .5rem;
  max-width: 88%; line-height: 1.35;
}
.pub-bubble-in { background: #f1f3f8; color: var(--pub-ink); border-bottom-left-radius: 4px; }
.pub-bubble-out {
  background: var(--pub-mint-tint); color: #0e6b4a; margin-left: auto;
  border-bottom-right-radius: 4px;
}
.pub-bubble-time { font-size: .68rem; color: var(--pub-ink-soft); margin: -.3rem 0 .6rem; }

/* ---------------------------------------------------------------------- */
/* Barra de confianza (promesas de proceso, no cifras infladas)            */
/* ---------------------------------------------------------------------- */
.pub-trust { border-top: 1px solid var(--pub-border); border-bottom: 1px solid var(--pub-border); background: var(--pub-surface); padding: 1.6rem 0; }
.pub-trust-item { display: flex; align-items: center; gap: .7rem; }
.pub-trust-item .icon {
  width: 40px; height: 40px; border-radius: 10px; background: var(--pub-blue-tint);
  color: var(--pub-blue-dark); display: flex; align-items: center; justify-content: center; font-size: 1.05rem; flex-shrink: 0;
}
.pub-trust-item strong { display: block; font-size: .9rem; }
.pub-trust-item span { font-size: .8rem; color: var(--pub-ink-soft); }

/* ---------------------------------------------------------------------- */
/* Especialidades                                                          */
/* ---------------------------------------------------------------------- */
.pub-especialidad-card {
  background: var(--pub-surface); border: 1px solid var(--pub-border); border-radius: var(--pub-radius-md);
  padding: 1.4rem 1.1rem; text-align: center; height: 100%; transition: transform .15s ease, box-shadow .15s ease;
  display: block; color: var(--pub-ink);
}
.pub-especialidad-card:hover { transform: translateY(-3px); box-shadow: var(--pub-shadow-md); color: var(--pub-ink); }
.pub-especialidad-card .icon {
  width: 52px; height: 52px; margin: 0 auto .8rem; border-radius: 14px;
  background: var(--pub-blue-tint); color: var(--pub-blue-dark);
  display: flex; align-items: center; justify-content: center; font-size: 1.4rem;
}
.pub-especialidad-card strong { font-size: .92rem; }

/* ---------------------------------------------------------------------- */
/* Cómo funciona (secuencia real: sí amerita numeración)                   */
/* ---------------------------------------------------------------------- */
.pub-step { position: relative; padding-left: 3.2rem; }
.pub-step .num {
  position: absolute; left: 0; top: 0; width: 2.4rem; height: 2.4rem; border-radius: 50%;
  background: var(--pub-ink); color: #fff; font-family: 'Space Grotesk', sans-serif; font-weight: 700;
  display: flex; align-items: center; justify-content: center; font-size: 1.05rem;
}
.pub-step:nth-child(2) .num { background: var(--pub-blue); }
.pub-step:nth-child(3) .num { background: var(--pub-orange); }
.pub-step h3 { font-size: 1.1rem; margin-bottom: .35rem; }
.pub-step p { color: var(--pub-ink-soft); font-size: .92rem; margin-bottom: 0; }

/* ---------------------------------------------------------------------- */
/* CTA banda final                                                         */
/* ---------------------------------------------------------------------- */
.pub-cta-band {
  background: linear-gradient(135deg, var(--pub-blue) 0%, #002d8a 100%);
  border-radius: var(--pub-radius-lg); color: #fff; padding: 3rem 2.5rem;
}
.pub-cta-band h2 { color: #fff; }
.pub-cta-band p { color: rgba(255,255,255,.8); }

/* ---------------------------------------------------------------------- */
/* Footer                                                                   */
/* ---------------------------------------------------------------------- */
.pub-footer { background: var(--pub-ink); color: rgba(255,255,255,.65); padding: 2.5rem 0 1.5rem; font-size: .87rem; }
.pub-footer a { color: rgba(255,255,255,.85); }
.pub-footer a:hover { color: #fff; }

/* ---------------------------------------------------------------------- */
/* Wizard "pedir un técnico"                                               */
/* ---------------------------------------------------------------------- */
.pub-wizard-card {
  background: var(--pub-surface); border: 1px solid var(--pub-border); border-radius: var(--pub-radius-lg);
  box-shadow: var(--pub-shadow); padding: 2rem; max-width: 640px; margin: 0 auto;
}
.pub-wizard-steps { display: flex; gap: .4rem; margin-bottom: 1.8rem; }
.pub-wizard-steps .bar { flex: 1; height: 4px; border-radius: 999px; background: var(--pub-border); }
.pub-wizard-steps .bar.done { background: var(--pub-blue); }

.pub-choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .7rem; }
.pub-choice {
  border: 2px solid var(--pub-border); border-radius: var(--pub-radius-sm); background: var(--pub-surface);
  padding: 1rem .6rem; text-align: center; cursor: pointer; font-size: .86rem; font-weight: 600;
  transition: border-color .15s ease, background .15s ease;
}
.pub-choice .icon { font-size: 1.3rem; display: block; margin-bottom: .4rem; color: var(--pub-blue-dark); }
.pub-choice:hover { border-color: var(--pub-blue); }
.pub-choice.selected { border-color: var(--pub-blue); background: var(--pub-blue-tint); }

.pub-urgencia-toggle { display: flex; gap: .6rem; }
.pub-urgencia-opt {
  flex: 1; border: 2px solid var(--pub-border); border-radius: var(--pub-radius-sm); padding: .8rem;
  text-align: center; cursor: pointer; font-weight: 600; font-size: .9rem;
}
.pub-urgencia-opt.selected[data-value="1"] { border-color: var(--pub-orange); background: var(--pub-orange-tint); color: var(--pub-orange-dark); }
.pub-urgencia-opt.selected[data-value="0"] { border-color: var(--pub-blue); background: var(--pub-blue-tint); color: var(--pub-blue-dark); }

.pub-dropzone {
  border: 2px dashed var(--pub-border); border-radius: var(--pub-radius-md); padding: 1.6rem;
  text-align: center; color: var(--pub-ink-soft); cursor: pointer; font-size: .88rem;
}
.pub-dropzone.dragover { border-color: var(--pub-blue); background: var(--pub-blue-tint); }
.pub-preview-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; margin-top: .8rem; }
.pub-preview-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; border: 1px solid var(--pub-border); }

.pub-google-btn {
  display: flex; align-items: center; justify-content: center; gap: .6rem;
  border: 1px solid var(--pub-border); background: #fff; border-radius: var(--pub-radius-sm);
  padding: .75rem 1rem; font-weight: 600; width: 100%; color: var(--pub-ink);
}
.pub-google-btn:hover { background: #f8f9fb; color: var(--pub-ink); }

/* ---------------------------------------------------------------------- */
/* Mi cuenta                                                                */
/* ---------------------------------------------------------------------- */
.pub-solicitud-card {
  background: var(--pub-surface); border: 1px solid var(--pub-border); border-radius: var(--pub-radius-md);
  padding: 1.3rem 1.4rem; box-shadow: var(--pub-shadow); margin-bottom: 1rem;
}
.pub-badge-estado { font-weight: 600; font-size: .76rem; padding: .3rem .6rem; border-radius: 999px; }
.pub-badge-abierta { background: var(--pub-mint-tint); color: #0e6b4a; }
.pub-badge-cerrada { background: #f1f3f8; color: var(--pub-ink-soft); }
.pub-badge-urgente { background: var(--pub-orange-tint); color: var(--pub-orange-dark); }

.pub-tecnico-row {
  display: flex; align-items: center; justify-content: space-between; gap: .8rem;
  padding: .7rem 0; border-top: 1px solid var(--pub-border);
}
.pub-badge-contacto { font-size: .74rem; font-weight: 600; padding: .25rem .55rem; border-radius: 999px; }
.pub-badge-pendiente { background: #fef2e0; color: #a3670c; }
.pub-badge-contactado { background: var(--pub-blue-tint); color: var(--pub-blue-dark); }
.pub-badge-presupuesto { background: #f1e6ff; color: #6a3bb5; }
.pub-badge-trabajo_realizado { background: var(--pub-mint-tint); color: #0e6b4a; }

.pub-empty-state { text-align: center; padding: 3rem 1.5rem; color: var(--pub-ink-soft); }
.pub-empty-state i { font-size: 2.2rem; color: var(--pub-blue-tint); margin-bottom: .75rem; }

.pub-skeleton {
  background: linear-gradient(90deg, #eef1f6 25%, #e4e9f2 37%, #eef1f6 63%);
  background-size: 400% 100%; animation: pub-shimmer 1.4s ease infinite; border-radius: var(--pub-radius-md);
}
@keyframes pub-shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

.pub-toast-stack { position: fixed; top: 1rem; right: 1rem; z-index: 1080; }

@media (prefers-reduced-motion: reduce) {
  .pub-especialidad-card, .pub-skeleton { animation: none !important; transition: none !important; }
}
