/* =====================================================
   informame.info — Stylesheet principal
   Paleta: inspirada en bandera RD (azul, rojo) + blancos
   Tipografía: moderna, legible, con carácter
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Source+Serif+4:wght@600;700&display=swap');

:root {
  /* Bandera RD adaptada */
  --azul-rd: #0F4C81;
  --azul-rd-dark: #0A3661;
  --azul-rd-light: #2563AB;
  --rojo-rd: #CE1126;
  --rojo-rd-dark: #A50E1F;

  /* Neutros */
  --bg: #F7F8FA;
  --surface: #FFFFFF;
  --surface-2: #F1F3F6;
  --border: #E2E5EA;
  --text: #1A2233;
  --text-2: #4B5563;
  --text-3: #6B7280;
  --muted: #9CA3AF;

  /* Estados */
  --success: #16A34A;
  --warning: #EAB308;
  --danger: #DC2626;
  --info: #0EA5E9;

  /* Categorías */
  --cat-seguridad: #DC2626;
  --cat-infra: #EA580C;
  --cat-limpieza: #CA8A04;
  --cat-servicios: #16A34A;
  --cat-transito: #2563EB;
  --cat-salud: #9333EA;
  --cat-otros: #6B7280;

  /* Sombras */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.12);

  /* Radios */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-full: 9999px;

  /* Espaciado */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-8: 48px;

  /* Transiciones */
  --t: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* =====================================================
   Tipografía
===================================================== */
h1, h2, h3, h4 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text);
}

h1 { font-size: clamp(28px, 5vw, 40px); }
h2 { font-size: clamp(22px, 4vw, 28px); }
h3 { font-size: 20px; }
h4 { font-size: 17px; }

p { color: var(--text-2); }

a {
  color: var(--azul-rd);
  text-decoration: none;
  transition: color var(--t);
}
a:hover { color: var(--azul-rd-dark); text-decoration: underline; }

/* =====================================================
   Header / Nav
===================================================== */
.app-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.92);
}

.nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--sp-3) var(--sp-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: 'Source Serif 4', serif;
  font-weight: 700;
  font-size: 20px;
  color: var(--azul-rd);
  text-decoration: none;
}

.brand-mark {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--azul-rd), var(--azul-rd-light));
  border-radius: var(--r-sm);
  display: grid;
  place-items: center;
  color: white;
  font-weight: 800;
}

.brand-mark::before {
  content: 'i';
  font-style: italic;
  font-size: 20px;
}

.brand-tag {
  font-size: 11px;
  font-weight: 500;
  color: var(--rojo-rd);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-left: 6px;
}

.nav-links {
  display: flex;
  gap: var(--sp-4);
  list-style: none;
}

.nav-links a {
  color: var(--text-2);
  font-weight: 500;
  font-size: 15px;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  transition: all var(--t);
}

.nav-links a:hover, .nav-links a.active {
  color: var(--azul-rd);
  background: var(--surface-2);
  text-decoration: none;
}

.nav-cta {
  display: flex;
  gap: var(--sp-2);
  align-items: center;
}

@media (max-width: 768px) {
  .nav-links { display: none; }
}

/* =====================================================
   Botones
===================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 10px 20px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--t);
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
}

.btn-primary {
  background: var(--azul-rd);
  color: white;
}
.btn-primary:hover {
  background: var(--azul-rd-dark);
  color: white;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn-danger {
  background: var(--rojo-rd);
  color: white;
}
.btn-danger:hover { background: var(--rojo-rd-dark); color: white; text-decoration: none; }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover {
  background: var(--surface-2);
  text-decoration: none;
}

.btn-block { width: 100%; }
.btn-lg { padding: 14px 28px; font-size: 17px; }
.btn-sm { padding: 6px 12px; font-size: 13px; }

/* =====================================================
   Forms
===================================================== */
.field {
  margin-bottom: var(--sp-4);
}
.field label {
  display: block;
  font-weight: 500;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 6px;
}
.field .hint {
  font-size: 13px;
  color: var(--text-3);
  margin-top: 4px;
}

input[type="text"], input[type="email"], input[type="password"],
input[type="tel"], input[type="number"], select, textarea {
  width: 100%;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 15px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text);
  transition: all var(--t);
  outline: none;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--azul-rd);
  box-shadow: 0 0 0 4px rgba(15, 76, 129, 0.1);
}

textarea { resize: vertical; min-height: 100px; font-family: inherit; }

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-2);
  cursor: pointer;
  font-size: 14px;
  color: var(--text-2);
}
.checkbox input { margin-top: 4px; cursor: pointer; }

.error-msg {
  color: var(--danger);
  font-size: 13px;
  margin-top: 4px;
}

/* =====================================================
   Cards y contenedores
===================================================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--sp-4);
}
.container-narrow {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 var(--sp-4);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
}

.card-clickable {
  cursor: pointer;
  transition: all var(--t);
}
.card-clickable:hover {
  border-color: var(--azul-rd-light);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

/* =====================================================
   Hero / landing
===================================================== */
.hero {
  position: relative;
  padding: var(--sp-8) 0 var(--sp-6);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(15, 76, 129, 0.08), transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -100px;
  left: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(206, 17, 38, 0.06), transparent 70%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--sp-8);
  align-items: center;
  position: relative;
  z-index: 1;
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: var(--sp-5); }
}

.hero h1 {
  font-size: clamp(32px, 6vw, 56px);
  margin-bottom: var(--sp-4);
}
.hero h1 .accent {
  color: var(--azul-rd);
  position: relative;
}
.hero h1 .accent::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 8px;
  background: var(--rojo-rd);
  opacity: 0.2;
  transform: skewX(-8deg);
  z-index: -1;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(15, 76, 129, 0.08);
  color: var(--azul-rd);
  border-radius: var(--r-full);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: var(--sp-4);
  letter-spacing: 0.02em;
}
.hero-tag::before {
  content: '🇩🇴';
  font-size: 14px;
}

.hero p.lead {
  font-size: 19px;
  color: var(--text-2);
  margin-bottom: var(--sp-5);
  max-width: 540px;
}

.hero-actions {
  display: flex;
  gap: var(--sp-3);
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  gap: var(--sp-5);
  margin-top: var(--sp-6);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--border);
}

.hero-stat strong {
  display: block;
  font-family: 'Source Serif 4', serif;
  font-size: 28px;
  color: var(--azul-rd);
  font-weight: 700;
}
.hero-stat span {
  font-size: 13px;
  color: var(--text-3);
}

.hero-visual {
  background: linear-gradient(135deg, var(--azul-rd) 0%, var(--azul-rd-dark) 100%);
  border-radius: var(--r-xl);
  padding: var(--sp-6);
  color: white;
  position: relative;
  overflow: hidden;
  min-height: 380px;
  box-shadow: var(--shadow-lg);
}

.hero-visual::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--rojo-rd), white, var(--azul-rd-light));
}

.hero-visual h3 {
  color: white;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.9;
  margin-bottom: var(--sp-3);
}

.mock-report {
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--r-md);
  padding: var(--sp-3);
  margin-bottom: var(--sp-3);
  animation: slideIn 0.6s ease backwards;
}
.mock-report:nth-child(2) { animation-delay: 0.15s; }
.mock-report:nth-child(3) { animation-delay: 0.3s; }
.mock-report:nth-child(4) { animation-delay: 0.45s; }

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

.mock-cat {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 4px;
}

/* =====================================================
   Reportes (cards)
===================================================== */
.report-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--sp-4);
}

.report-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: all var(--t);
  cursor: pointer;
}
.report-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--azul-rd-light);
}

.report-image {
  width: 100%;
  height: 180px;
  background: var(--surface-2);
  position: relative;
}
.report-image img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.report-image-empty {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 36px;
}

.report-cat-badge {
  position: absolute;
  top: var(--sp-2);
  left: var(--sp-2);
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  padding: 4px 10px;
  border-radius: var(--r-sm);
  font-size: 12px;
  font-weight: 600;
}

.report-status {
  position: absolute;
  top: var(--sp-2);
  right: var(--sp-2);
  padding: 4px 10px;
  border-radius: var(--r-sm);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.status-recibido { background: #FEF3C7; color: #92400E; }
.status-en_revision { background: #DBEAFE; color: #1E40AF; }
.status-en_proceso { background: #E0E7FF; color: #3730A3; }
.status-resuelto { background: #D1FAE5; color: #065F46; }

.report-body {
  padding: var(--sp-4);
}

.report-title {
  font-family: 'Source Serif 4', serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.3;
}

.report-meta {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 13px;
  color: var(--text-3);
  margin-bottom: var(--sp-3);
}

.report-stats {
  display: flex;
  gap: var(--sp-3);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-2);
}

.report-stats span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* =====================================================
   Auth pages
===================================================== */
.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: var(--sp-4);
  background: linear-gradient(135deg, #F7F8FA 0%, #E8EFF7 100%);
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border-radius: var(--r-xl);
  padding: var(--sp-6);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

.auth-card .brand {
  justify-content: center;
  margin-bottom: var(--sp-4);
}

.auth-card h1 {
  text-align: center;
  font-size: 26px;
  margin-bottom: var(--sp-2);
}

.auth-card .lead {
  text-align: center;
  color: var(--text-3);
  margin-bottom: var(--sp-5);
  font-size: 14px;
}

.auth-card .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
}
@media (max-width: 480px) {
  .auth-card .form-row { grid-template-columns: 1fr; }
}

.auth-footer {
  text-align: center;
  margin-top: var(--sp-4);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-3);
}

/* =====================================================
   Toast / Alerts
===================================================== */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.toast {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--azul-rd);
  border-radius: var(--r-md);
  padding: var(--sp-3) var(--sp-4);
  box-shadow: var(--shadow-lg);
  min-width: 280px;
  max-width: 400px;
  animation: toastIn 0.3s ease;
  font-size: 14px;
}
.toast-success { border-left-color: var(--success); }
.toast-error { border-left-color: var(--danger); }
.toast-warning { border-left-color: var(--warning); }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(100%); }
  to { opacity: 1; transform: translateX(0); }
}

/* =====================================================
   Cookie banner
===================================================== */
.cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  padding: var(--sp-4);
  z-index: 9000;
  display: none;
}
.cookie-banner.show { display: block; }

.cookie-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
@media (min-width: 768px) {
  .cookie-content { flex-direction: row; align-items: center; }
}

.cookie-text {
  flex: 1;
  font-size: 14px;
  color: var(--text-2);
}

.cookie-actions {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
}

/* =====================================================
   FAB (botón flotante de crear reporte)
===================================================== */
.fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--rojo-rd);
  color: white;
  border: none;
  box-shadow: var(--shadow-lg);
  font-size: 32px;
  cursor: pointer;
  z-index: 50;
  display: grid;
  place-items: center;
  transition: all var(--t);
}
.fab:hover {
  transform: scale(1.05);
  background: var(--rojo-rd-dark);
}

/* =====================================================
   Footer
===================================================== */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: var(--sp-6) var(--sp-4) var(--sp-4);
  margin-top: var(--sp-8);
}
.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: var(--sp-5);
}
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.footer h4 {
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--sp-3);
}
.footer ul { list-style: none; }
.footer li { margin-bottom: 6px; }
.footer a {
  color: var(--text-3);
  font-size: 14px;
}
.footer a:hover { color: var(--azul-rd); }

.footer-bottom {
  max-width: 1200px;
  margin: var(--sp-5) auto 0;
  padding-top: var(--sp-4);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-2);
  font-size: 13px;
  color: var(--text-3);
}

/* =====================================================
   Utilidades
===================================================== */
.text-center { text-align: center; }
.mt-1 { margin-top: var(--sp-1); }
.mt-2 { margin-top: var(--sp-2); }
.mt-3 { margin-top: var(--sp-3); }
.mt-4 { margin-top: var(--sp-4); }
.mt-5 { margin-top: var(--sp-5); }
.mb-3 { margin-bottom: var(--sp-3); }
.mb-4 { margin-bottom: var(--sp-4); }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-2 { gap: var(--sp-2); }
.gap-3 { gap: var(--sp-3); }
.gap-4 { gap: var(--sp-4); }
.hidden { display: none !important; }

.spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(0,0,0,0.1);
  border-top-color: var(--azul-rd);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* =====================================================
   Mapa (Leaflet overrides)
===================================================== */
#map {
  width: 100%;
  height: 60vh;
  min-height: 400px;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  overflow: hidden;
}

.leaflet-container { font-family: inherit !important; }

/* =====================================================
   Avisos legales / cajas de info
===================================================== */
.info-box {
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: var(--r-md);
  padding: var(--sp-3) var(--sp-4);
  font-size: 14px;
  color: #1E40AF;
  margin: var(--sp-3) 0;
}

.warn-box {
  background: #FEF3C7;
  border: 1px solid #FDE68A;
  border-radius: var(--r-md);
  padding: var(--sp-3) var(--sp-4);
  font-size: 14px;
  color: #92400E;
  margin: var(--sp-3) 0;
}

.warn-box strong { display: block; margin-bottom: 4px; }

/* =====================================================
   Slot de anuncios (Adsterra)
===================================================== */
.ad-slot {
  margin: var(--sp-5) 0;
  padding: var(--sp-3);
  background: var(--surface-2);
  border-radius: var(--r-md);
  text-align: center;
  min-height: 100px;
  display: grid;
  place-items: center;
  position: relative;
}
.ad-slot::before {
  content: 'PUBLICIDAD';
  position: absolute;
  top: 4px;
  left: 8px;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.1em;
}
