/* SismosChile.cl — styles.css
 * Telemetría Sísmica SaaS Premium Sobrio.
 * Referencia: valor-uf.cl y valoruma.com.
 * Sin emojis en producción. Radius 4px-6px.
 * Font-mono para todos los datos numéricos y marcas temporales.
 * 320px responsive verified.
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@500;600;700&display=swap');

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

:root {
  /* Dark mode (Predeterminado) */
  --bg: #090d16;
  --bg-subtle: #0d1320;
  --card-bg: #111726;
  --card-bg-hover: #161e30;
  --card-bg-active: #1c273d;
  --border: #1e293b;
  --border-strong: #334155;
  
  --text-main: #f8fafc;
  --text-muted: #cbd5e1;
  --text-sub: #94a3b8;
  --text-dim: #64748b;

  --accent: #38bdf8;
  --accent-hover: #7dd3fc;
  --accent-bg: rgba(56, 189, 248, 0.08);
  --accent-border: rgba(56, 189, 248, 0.2);

  /* Escala de Magnitud Sísmica */
  --mag-micro: #06b6d4;     /* M < 3.0 */
  --mag-menor: #10b981;     /* M 3.0 - 4.4 */
  --mag-ligero: #f59e0b;    /* M 4.5 - 5.4 */
  --mag-moderado: #f97316;  /* M 5.5 - 6.4 */
  --mag-fuerte: #ef4444;    /* M 6.5 - 7.4 */
  --mag-mayor: #c084fc;     /* M >= 7.5 */

  /* Bordes y Sombras Sobrias */
  --radius-sm: 4px;
  --radius: 6px;
  --max-width: 1200px;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Consolas, monospace;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.35);
  --shadow-md: 0 4px 12px 0 rgba(0, 0, 0, 0.45);
  --transition: 150ms ease;
}

/* Light Mode Override */
:root[data-theme="light"] {
  --bg: #f8fafc;
  --bg-subtle: #f1f5f9;
  --card-bg: #ffffff;
  --card-bg-hover: #f8fafc;
  --card-bg-active: #f1f5f9;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  
  --text-main: #0f172a;
  --text-muted: #334155;
  --text-sub: #64748b;
  --text-dim: #94a3b8;

  --accent: #0284c7;
  --accent-hover: #0369a1;
  --accent-bg: rgba(2, 132, 199, 0.08);
  --accent-border: rgba(2, 132, 199, 0.2);

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px 0 rgba(0, 0, 0, 0.08);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.num, .mono, time, .stat-value, .mag-badge, .coord-badge, .date-badge {
  font-family: var(--font-mono);
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

.hidden { display: none !important; }

/* ==================== HEADER ==================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(9, 13, 22, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

:root[data-theme="light"] .site-header {
  background-color: rgba(248, 250, 252, 0.92);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-main);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.brand:hover { text-decoration: none; }

.brand-icon {
  width: 28px;
  height: 28px;
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-text {
  font-weight: 800;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  font-size: 1rem;
}

.brand-text span { color: var(--accent); }

.header-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.725rem;
  font-weight: 600;
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.live-badge .pulse-dot {
  width: 6px;
  height: 6px;
  background-color: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.primary-nav a {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.primary-nav a:hover, .primary-nav a.active {
  color: var(--text-main);
  background-color: var(--card-bg-hover);
  text-decoration: none;
}

.theme-toggle {
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
}

.theme-toggle:hover {
  color: var(--text-main);
  border-color: var(--border-strong);
  background-color: var(--card-bg-hover);
}

.theme-toggle .theme-icon-light { display: none; }
.theme-toggle .theme-icon-dark { display: inline-block; }
:root[data-theme="light"] .theme-toggle .theme-icon-light { display: inline-block; }
:root[data-theme="light"] .theme-toggle .theme-icon-dark { display: none; }

/* ==================== BOTÓN HAMBURGUESA & DRAWER MÓVIL ==================== */
.hamburger-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  gap: 5px;
  padding: 9px;
  transition: all var(--transition);
}

.hamburger-btn:hover {
  background: var(--card-bg-hover);
  border-color: var(--border-strong);
}

.hamburger-bar {
  width: 100%;
  height: 2px;
  background-color: var(--text-main);
  border-radius: 2px;
  transition: transform 200ms ease, opacity 200ms ease;
}

.hamburger-btn.is-open .hamburger-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger-btn.is-open .hamburger-bar:nth-child(2) {
  opacity: 0;
}

.hamburger-btn.is-open .hamburger-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Backdrop */
.mobile-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(9, 13, 22, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 250ms ease;
}

.mobile-drawer-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* Drawer */
.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 320px;
  max-width: 85vw;
  background: var(--card-bg);
  border-left: 1px solid var(--border);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
}

.mobile-drawer.is-open {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.drawer-close-btn {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--text-sub);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
}

.drawer-close-btn:hover {
  color: var(--text-main);
  background: var(--card-bg-hover);
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.drawer-section-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-sub);
  letter-spacing: 0.08em;
  margin-top: 4px;
}

.drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.drawer-nav.grid-2col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.drawer-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  transition: all var(--transition);
}

.drawer-link:hover {
  background: var(--card-bg-hover);
  border-color: var(--border-strong);
  color: var(--accent);
  text-decoration: none;
}

.drawer-link svg {
  color: var(--accent);
}

.drawer-link-sub {
  display: flex;
  align-items: center;
  padding: 8px 10px;
  color: var(--text-sub);
  font-size: 0.825rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  transition: all var(--transition);
}

.drawer-link-sub:hover {
  color: var(--text-main);
  border-color: var(--border-strong);
  text-decoration: none;
}

.drawer-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg-subtle);
}

@media (max-width: 900px) {
  .desktop-only { display: none !important; }
}

@media (min-width: 901px) {
  .hamburger-btn { display: none !important; }
}

/* ==================== HERO SECTION ==================== */
.hero {
  padding: 28px 0 20px;
  border-bottom: 1px solid var(--border);
  background: radial-gradient(circle at 50% 0%, rgba(56, 189, 248, 0.05) 0%, transparent 70%);
}

.hero-header {
  margin-bottom: 20px;
}

.hero-title {
  font-size: clamp(1.5rem, 4.5vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-main);
  line-height: 1.15;
  margin-bottom: 6px;
}

.hero-desc {
  font-size: 0.95rem;
  color: var(--text-sub);
  max-width: 68ch;
}

/* ==================== WIDGET INSTANTÁNEO "¿SENTISTE UN TEMBLOR?" ==================== */
.instant-checker-card {
  background: var(--card-bg);
  border: 1px solid var(--accent-border);
  background-image: linear-gradient(180deg, var(--accent-bg) 0%, transparent 100%);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}

.instant-checker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.instant-checker-title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-main);
}

.instant-checker-title h2 {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.instant-checker-title svg {
  color: var(--accent);
}

.instant-checker-desc {
  font-size: 0.875rem;
  color: var(--text-sub);
  margin-bottom: 16px;
}

.instant-checker-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent);
  color: #090d16;
  font-weight: 700;
  font-size: 0.875rem;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  min-height: 44px;
  transition: all var(--transition);
}

.btn-primary-action:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.instant-select-wrapper {
  flex: 1;
  min-width: 220px;
}

.input-select, .input-text {
  width: 100%;
  background: var(--bg-subtle);
  border: 1px solid var(--border-strong);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  min-height: 44px;
  outline: none;
  transition: border-color var(--transition);
}

.input-select:focus, .input-text:focus {
  border-color: var(--accent);
}

.instant-result-box {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  line-height: 1.4;
}

.instant-result-box.status-yes {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #10b981;
}

.instant-result-box.status-no {
  background: rgba(100, 116, 139, 0.12);
  border: 1px solid rgba(100, 116, 139, 0.3);
  color: var(--text-muted);
}

/* ==================== STATS GRID ==================== */
.hero-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

@media (max-width: 768px) {
  .hero-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 400px) {
  .hero-stats-grid {
    grid-template-columns: 1fr;
  }
}

.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color var(--transition);
}

.stat-card:hover { border-color: var(--border-strong); }

.stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-sub);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stat-value {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.1;
}

.stat-foot {
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* ==================== DESTACADO Y ENJAMBRES ==================== */
.featured-box {
  margin: 20px 0;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 16px 20px;
}

.featured-box.has-quake { border-left-color: var(--mag-ligero); }

.featured-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 12px;
  flex-wrap: wrap;
}

.featured-tag {
  font-family: var(--font-mono);
  font-size: 0.725rem;
  font-weight: 700;
  color: var(--text-sub);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.featured-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.featured-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.mag-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  border-radius: var(--radius-sm);
  line-height: 1;
  text-align: center;
}

.mag-badge.lg { font-size: 1.4rem; padding: 8px 14px; min-width: 68px; }
.mag-badge.md { font-size: 1.05rem; padding: 6px 12px; min-width: 52px; }
.mag-badge.sm { font-size: 0.85rem; padding: 4px 8px; min-width: 42px; }

/* Magnitudes */
.mag-micro { background: rgba(6, 182, 212, 0.15); color: var(--mag-micro); border: 1px solid rgba(6, 182, 212, 0.3); }
.mag-menor { background: rgba(16, 185, 129, 0.15); color: var(--mag-menor); border: 1px solid rgba(16, 185, 129, 0.3); }
.mag-ligero { background: rgba(245, 158, 11, 0.15); color: var(--mag-ligero); border: 1px solid rgba(245, 158, 11, 0.3); }
.mag-moderado { background: rgba(249, 115, 22, 0.15); color: var(--mag-moderado); border: 1px solid rgba(249, 115, 22, 0.4); }
.mag-fuerte { background: rgba(239, 68, 68, 0.18); color: var(--mag-fuerte); border: 1px solid rgba(239, 68, 68, 0.4); }
.mag-mayor { background: rgba(192, 132, 252, 0.2); color: var(--mag-mayor); border: 1px solid rgba(192, 132, 252, 0.4); }

.featured-details h3 { font-size: 1.05rem; font-weight: 700; color: var(--text-main); margin-bottom: 2px; }
.featured-details p { font-size: 0.85rem; color: var(--text-sub); }

/* ==================== FICHA DE SISMO TELEMETRÍA ==================== */
.quake-detail-header {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin: 20px 0 28px;
}

.detail-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 18px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

@media (max-width: 768px) {
  .detail-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }
}

.detail-metric {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color var(--transition);
}

.detail-metric:hover {
  border-color: var(--border-strong);
}

.detail-metric-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-sub);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.detail-metric-value {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.25;
}

/* ==================== SECCIONES ==================== */
.section { padding: 28px 0; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
  flex-wrap: wrap;
}

.section-title {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.section-sub { font-size: 0.85rem; color: var(--text-sub); margin-top: 2px; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.825rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  white-space: nowrap;
  min-height: 40px;
}

.btn-secondary:hover {
  background: var(--card-bg-hover);
  color: var(--text-main);
  border-color: var(--border-strong);
  text-decoration: none;
}

/* ==================== MAPA LEAFLET ==================== */
.map-wrapper {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.map-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
  flex-wrap: wrap;
  background: var(--bg-subtle);
}

.map-filter-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.map-filter-label { font-size: 0.8rem; font-weight: 600; color: var(--text-sub); }

.btn-filter {
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--text-sub);
  font-family: var(--font-mono);
  font-size: 0.775rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  min-height: 36px;
  transition: all var(--transition);
}

.btn-filter:hover, .btn-filter.active {
  background: var(--accent);
  color: #090d16;
  border-color: var(--accent);
}

.map-container { height: 420px; width: 100%; background: #0d1320; }

.leaflet-container { background-color: #0b0f19 !important; font-family: var(--font-sans) !important; }
.leaflet-popup-content-wrapper {
  background: #111726 !important;
  color: #f8fafc !important;
  border: 1px solid #334155 !important;
  border-radius: 6px !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5) !important;
  padding: 4px !important;
}
.leaflet-popup-tip { background: #111726 !important; border: 1px solid #334155 !important; }

.popup-quake { padding: 6px 8px; }
.popup-quake-title { font-size: 0.9rem; font-weight: 700; margin-bottom: 2px; }
.popup-quake-meta { font-size: 0.775rem; color: #cbd5e1; margin-bottom: 6px; }
.popup-quake-link { font-size: 0.775rem; font-weight: 600; color: var(--accent); }

/* ==================== HERRAMIENTAS 2 & 3: DUAL GRID ==================== */
.tools-dual-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (max-width: 768px) {
  .tools-dual-grid {
    grid-template-columns: 1fr;
  }
}

.tool-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.tool-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-main);
  margin-bottom: 4px;
}

.tool-card-head h3 { font-size: 1.1rem; font-weight: 800; }
.tool-card-head svg { color: var(--accent); }

.tool-card-desc { font-size: 0.85rem; color: var(--text-sub); margin-bottom: 14px; }

.tool-label {
  display: block;
  font-size: 0.775rem;
  font-weight: 600;
  color: var(--text-sub);
  margin-bottom: 4px;
}

.calc-inputs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}

.calc-presets {
  margin-bottom: 12px;
}

.preset-buttons {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.btn-preset {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.725rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
}

.btn-preset:hover {
  background: var(--card-bg-hover);
  color: var(--text-main);
  border-color: var(--border-strong);
}

.tool-result-box {
  margin-top: auto;
  padding: 12px 14px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  line-height: 1.4;
}

/* ==================== LISTA Y FEED ==================== */
.quake-feed { display: flex; flex-direction: column; gap: 8px; }

.quake-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  transition: all var(--transition);
  text-decoration: none !important;
}

.quake-card:hover {
  background: var(--card-bg-hover);
  border-color: var(--border-strong);
  transform: translateX(2px);
}

.quake-main-info { display: flex; flex-direction: column; gap: 2px; }
.quake-location { font-size: 0.95rem; font-weight: 700; color: var(--text-main); }
.quake-subtext { font-size: 0.8rem; color: var(--text-sub); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.quake-time-col { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.quake-date { font-size: 0.85rem; font-weight: 600; color: var(--text-main); }
.quake-time-sub { font-size: 0.75rem; color: var(--text-sub); }

@media (max-width: 640px) {
  .quake-card {
    grid-template-columns: auto 1fr;
    gap: 10px;
    padding: 12px;
  }
  .quake-time-col {
    grid-column: 2;
    text-align: left;
    align-items: flex-start;
  }
}

/* ==================== GRID CIUDADES ==================== */
.cities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}

.city-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-decoration: none !important;
  transition: all var(--transition);
  min-height: 54px;
}

.city-card:hover {
  background: var(--card-bg-hover);
  border-color: var(--border-strong);
}

.city-name { font-size: 0.9rem; font-weight: 700; color: var(--text-main); }
.city-meta { font-size: 0.75rem; color: var(--text-sub); }

/* ==================== EDUCACIÓN SECCIÓN ==================== */
.edu-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

@media (max-width: 480px) {
  .edu-hub-grid {
    grid-template-columns: 1fr;
  }
}

.edu-hub-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-decoration: none !important;
  transition: all var(--transition);
}

.edu-hub-card:hover {
  background: var(--card-bg-hover);
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.edu-hub-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
}

.edu-hub-card p {
  font-size: 0.875rem;
  color: var(--text-sub);
  line-height: 1.5;
}

.edu-article-body {
  max-width: 800px;
  margin: 0 auto;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-muted);
}

.edu-article-body p {
  margin-bottom: 1.25rem;
}

.edu-article-body h2 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 1.8rem 0 0.8rem;
  letter-spacing: -0.02em;
}

.edu-article-body h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 1.4rem 0 0.6rem;
}

.edu-article-body ul, .edu-article-body ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.edu-article-body li {
  margin-bottom: 0.5rem;
}

.edu-article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  font-size: 0.875rem;
}

.edu-article-body th {
  background: var(--bg-subtle);
  color: var(--text-main);
  font-weight: 700;
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}

.edu-article-body td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}

.edu-article-body tr:last-child td {
  border-bottom: none;
}

/* Accordion FAQ */
.faq-accordion-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-item {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color var(--transition);
}

.faq-item:hover {
  border-color: var(--border-strong);
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 700;
  padding: 14px 16px;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  outline: none;
  min-height: 48px;
}

.faq-question svg {
  color: var(--text-sub);
  transition: transform var(--transition);
  flex-shrink: 0;
}

.faq-item.is-open .faq-question svg {
  transform: rotate(180deg);
  color: var(--accent);
}

.faq-answer {
  padding: 0 16px 14px;
  font-size: 0.9rem;
  color: var(--text-sub);
  line-height: 1.6;
  display: none;
}

.faq-item.is-open .faq-answer {
  display: block;
}

/* ==================== PÁGINAS ESTÁTICAS CARDS ==================== */
.static-content-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  max-width: 900px;
  margin: 0 auto 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.static-section-box h2 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.static-section-box p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 8px;
}

.static-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (max-width: 768px) {
  .static-grid-2 {
    grid-template-columns: 1fr;
  }
}

.static-box-highlight {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.styled-icon-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.styled-icon-list li {
  position: relative;
  padding-left: 20px;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.styled-icon-list li::before {
  content: "•";
  position: absolute;
  left: 4px;
  top: 0;
  color: var(--accent);
  font-size: 1.2rem;
  line-height: 1;
}

.contact-email-box {
  margin-top: 14px;
  padding: 14px;
  background: var(--card-bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
}

.contact-email-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.contact-email-code {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent);
}

.emergency-number-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 0.85rem;
  color: var(--text-main);
}

/* ==================== FOOTER ==================== */
.site-footer {
  margin-top: auto;
  background: var(--bg-subtle);
  border-top: 1px solid var(--border);
  padding: 36px 0 20px;
  font-size: 0.85rem;
  color: var(--text-sub);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 28px;
  margin-bottom: 28px;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

.footer-col h4 {
  font-size: 0.825rem;
  font-weight: 700;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

.footer-links { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-links a { color: var(--text-sub); padding: 2px 0; }
.footer-links a:hover { color: var(--text-main); }

.footer-bottom {
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.775rem;
  color: var(--text-dim);
}

.info-box {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin: 24px 0;
}

.info-box h3 { font-size: 0.95rem; font-weight: 700; color: var(--text-main); margin-bottom: 4px; }
.info-box p { font-size: 0.85rem; color: var(--text-sub); line-height: 1.5; }
