/* ==========================================================================
   Fijate Tools - Gestor y biblioteca de rutas GPX offline
   Variables de diseño y estilos canónicos Local-First
   ========================================================================== */

:root {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-primary: #38bdf8;
  --accent-secondary: #0284c7;
  --accent-gradient: linear-gradient(135deg, #38bdf8 0%, #2563eb 100%);
  --accent-hover: #0ea5e9;
  --border-color: #334155;
  --card-bg: #1e293b;
  --card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --chart-track-primary: #38bdf8;
  --chart-track-secondary: #f59e0b;
}

[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #e2e8f0;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --accent-primary: #0284c7;
  --accent-secondary: #0369a1;
  --accent-gradient: linear-gradient(135deg, #0284c7 0%, #1d4ed8 100%);
  --accent-hover: #0369a1;
  --border-color: #cbd5e1;
  --card-bg: #ffffff;
  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --success: #059669;
  --warning: #d97706;
  --danger: #dc2626;
  --chart-track-primary: #0284c7;
  --chart-track-secondary: #d97706;
}

/* Reset y estructura general */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
}

.mono-font {
  font-family: 'JetBrains Mono', monospace;
}

.tool-layout {
  max-width: 1200px;
  margin: 1.5rem auto 3rem;
  padding: 0 1rem;
  width: 100%;
}

.tool-with-sidebar {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  width: 100%;
}

.tool-main-content {
  flex: 1 1 0%;
  min-width: 0;
  width: 100%;
}

/* Barra lateral publicidad canónica */
.tool-ad-sidebar {
  display: none;
  width: 300px;
  flex-shrink: 0;
}

@media (min-width: 1536px) {
  .tool-ad-sidebar {
    display: block;
  }
}

.ad-sticky-box {
  position: sticky;
  top: 1.5rem;
}

/* Migas de pan canónicas */
.tool-breadcrumbs {
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.tool-breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
}

.tool-breadcrumbs li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
}

.tool-breadcrumbs a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color 0.2s;
}

.tool-breadcrumbs a:hover {
  text-decoration: underline;
}

/* Encabezado e introducción de la herramienta */
.tool-header-block {
  margin-bottom: 1.5rem;
}

.tool-title {
  font-size: 1.85rem;
  margin-bottom: 0.5rem;
}

.tool-lead {
  font-size: 1.05rem;
  color: var(--text-secondary);
}

/* Barra de estadísticas globales */
.stats-summary-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-summary-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 0.85rem;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--card-shadow);
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 0.65rem;
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 0.775rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-val {
  font-size: 1.35rem;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-primary);
}

/* Zona de arrastre de archivos (Drop Zone) */
.drop-zone-container {
  background: var(--card-bg);
  border: 2px dashed var(--border-color);
  border-radius: 0.85rem;
  padding: 2rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
  margin-bottom: 1.5rem;
}

.drop-zone-container:hover,
.drop-zone-container.drag-over {
  border-color: var(--accent-primary);
  background: rgba(56, 189, 248, 0.04);
}

.drop-zone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.drop-icon {
  width: 48px;
  height: 48px;
  color: var(--accent-primary);
}

.drop-zone-container h3 {
  font-size: 1.2rem;
}

.drop-zone-container p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.drop-zone-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 0.5rem;
}

/* Rejilla de trabajo principal (Lista vs Visor) */
.main-app-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 1.5rem;
  align-items: flex-start;
}

@media (max-width: 960px) {
  .main-app-grid {
    grid-template-columns: 1fr;
  }
}

/* Columna izquierda: Biblioteca y filtros */
.sidebar-panel {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 0.85rem;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: var(--card-shadow);
}

.panel-header-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.search-input-wrapper {
  position: relative;
  width: 100%;
}

.search-input {
  width: 100%;
  height: 42px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 0 1rem;
  color: var(--text-primary);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}

.search-input:focus {
  border-color: var(--accent-primary);
}

.filters-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-select {
  flex: 1 1 0%;
  min-width: 130px;
  max-width: 100%;
  height: 42px;
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 0 40px 0 0.75rem;
  font-size: 0.85rem;
  appearance: none;
  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='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.filter-select option {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
}

.btn-filter-toggle {
  height: 42px;
  padding: 0 0.85rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-filter-toggle.activo {
  background: rgba(245, 158, 11, 0.15);
  border-color: var(--warning);
  color: var(--warning);
}

/* Lista de rutas */
.rutas-scroll-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 580px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.item-ruta {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 0.65rem;
  padding: 0.85rem 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.item-ruta:hover {
  border-color: var(--accent-primary);
  transform: translateY(-1px);
}

.item-ruta.activo {
  border-color: var(--accent-primary);
  background: rgba(56, 189, 248, 0.08);
  box-shadow: inset 3px 0 0 var(--accent-primary);
}

.item-ruta-header {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}

.item-ruta-icono {
  font-size: 1.2rem;
  line-height: 1;
}

.item-ruta-titulos {
  flex: 1;
  min-width: 0;
}

.item-ruta-nombre {
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-ruta-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: block;
}

.btn-icon-fav {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.15rem;
  cursor: pointer;
  padding: 0.2rem;
  line-height: 1;
  transition: color 0.2s;
}

.btn-icon-fav:hover,
.btn-icon-fav.favorito {
  color: #f59e0b;
}

.item-ruta-metricas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.75rem;
}

.badge-metrica {
  background: var(--bg-tertiary);
  padding: 0.2rem 0.5rem;
  border-radius: 0.35rem;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-secondary);
}

.badge-metrica strong {
  color: var(--text-primary);
}

.badge-dificultad {
  border: 1px solid currentColor;
  background: transparent;
  font-weight: 600;
}

/* Estado vacío */
.empty-state-rutas {
  padding: 2.5rem 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-muted);
}

.empty-title {
  font-weight: 600;
  color: var(--text-primary);
}

.empty-sub {
  font-size: 0.85rem;
}

/* Columna derecha: Visor de ruta y mapa */
.viewer-panel {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 0.85rem;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  box-shadow: var(--card-shadow);
}

.viewer-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.viewer-header-info {
  flex: 1;
  min-width: 250px;
}

.viewer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Contenedor del mapa Leaflet */
.mapa-container {
  width: 100%;
  height: 420px;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid var(--border-color);
  position: relative;
  z-index: 1;
}

/* Marcadores personalizados en Leaflet */
.pin-inicio {
  background: #10b981;
  color: #ffffff;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.pin-fin {
  background: #ef4444;
  color: #ffffff;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.pin-hover-pulse {
  background: #f43f5e;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  box-shadow: 0 0 10px #f43f5e;
  animation: pulse 1.2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.9; }
  50% { transform: scale(1.4); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.9; }
}

/* Cuadrícula de telemetría de la ruta activa */
.telemetria-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.75rem;
}

.telemetria-box {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.telemetria-label {
  font-size: 0.725rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.telemetria-val {
  font-size: 1.15rem;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-primary);
}

/* Contenedor del perfil de altitud Canvas */
.perfil-altitud-wrapper {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1rem;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.perfil-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.perfil-leyenda {
  display: flex;
  gap: 1rem;
  font-size: 0.775rem;
}

.leyenda-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.leyenda-color {
  width: 12px;
  height: 4px;
  border-radius: 2px;
}

.canvas-container {
  position: relative;
  width: 100%;
  height: 180px;
}

#canvas-perfil {
  width: 100%;
  height: 100%;
  display: block;
}

.tooltip-perfil {
  position: absolute;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(8px);
  border: 1px solid var(--accent-primary);
  border-radius: 0.4rem;
  padding: 0.4rem 0.6rem;
  color: #ffffff;
  font-size: 0.75rem;
  font-family: 'JetBrains Mono', monospace;
  pointer-events: none;
  display: none;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Panel comparador de rutas */
.panel-comparador-contenedor {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 0.85rem;
  padding: 1.25rem;
  margin-top: 1.5rem;
  box-shadow: var(--card-shadow);
}

.comparador-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.tabla-comparativa-wrapper {
  overflow-x: auto;
  width: 100%;
}

.tabla-comparativa {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.tabla-comparativa th,
.tabla-comparativa td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
  text-align: left;
}

.tabla-comparativa tr:last-child td {
  border-bottom: none;
}

/* Botones y controles de acción */
.btn-principal,
.btn-secundario,
.btn-peligro {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 42px;
  padding: 0 1.25rem;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  text-decoration: none;
}

.btn-principal {
  background: var(--accent-gradient);
  color: #ffffff;
}

.btn-principal:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.btn-secundario {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secundario:hover {
  background: var(--border-color);
}

.btn-peligro {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
  border: 1px solid var(--danger);
}

.btn-peligro:hover {
  background: var(--danger);
  color: #ffffff;
}

.btn-sm {
  height: 36px;
  padding: 0 0.85rem;
  font-size: 0.825rem;
}

/* Modales accesibles */
.modal-container {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  padding: 1rem;
}

.modal-container.activo {
  opacity: 1;
  pointer-events: auto;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
}

.modal-box {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 0.85rem;
  max-width: 520px;
  width: 100%;
  padding: 1.75rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.4);
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 1.25rem;
}

.btn-modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

/* Indicador de carga */
.indicador-carga-box {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--card-bg);
  border: 1px solid var(--accent-primary);
  border-radius: 0.65rem;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: var(--card-shadow);
  z-index: 9999;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 3px solid rgba(56, 189, 248, 0.2);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.oculto {
  display: none !important;
}

/* ==========================================================================
   Guía técnica SEO y documentación educativa canónica
   ========================================================================== */
.seo-guide-section {
  margin-top: 2.5rem;
  margin-bottom: 2.5rem;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: clamp(1.25rem, 3vw, 2.25rem);
  box-shadow: var(--card-shadow);
  box-sizing: border-box;
  width: 100%;
}

.seo-guide-header {
  margin-bottom: 1.75rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1.25rem;
}

.seo-authority-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent-primary);
  border: 1px solid rgba(56, 189, 248, 0.25);
  font-size: 0.775rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  margin-bottom: 0.85rem;
}

[data-theme="light"] .seo-authority-badge {
  background: rgba(2, 132, 199, 0.1);
  color: var(--accent-secondary);
  border-color: rgba(2, 132, 199, 0.25);
}

.seo-guide-title {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.seo-guide-subtitle {
  font-size: clamp(0.92rem, 1.5vw, 1rem);
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 920px;
}

/* Cuadrícula de tarjetas didácticas */
.seo-guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.seo-guide-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 0.85rem;
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.seo-guide-card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-2px);
}

.guide-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 0.65rem;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  margin-bottom: 0.85rem;
  user-select: none;
  flex-shrink: 0;
}

.guide-card-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.65rem;
  line-height: 1.35;
}

.guide-card-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 0.75rem;
}

.guide-card-text:last-of-type {
  margin-bottom: 0;
}

.guide-card-text strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* Lista de niveles IBP con badges */
.guide-card-list {
  list-style: none;
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.guide-card-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.guide-card-list li strong {
  color: var(--text-primary);
}

.ibp-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.18rem 0.55rem;
  border-radius: 0.35rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.ibp-facil {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.ibp-moderada {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.ibp-dificil {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.ibp-extrema {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Acordeón de preguntas frecuentes nativo */
.seo-faq-wrapper {
  margin-top: 2rem;
  border-top: 1px solid var(--border-color);
  padding-top: 1.75rem;
}

.seo-faq-section-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
}

.seo-faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.seo-faq-item {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 0.65rem;
  overflow: hidden;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.seo-faq-item[open] {
  border-color: var(--accent-primary);
}

.seo-faq-question {
  padding: 1rem 1.25rem;
  font-family: 'Outfit', sans-serif;
  font-size: 0.975rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  user-select: none;
  min-height: 44px;
  box-sizing: border-box;
  list-style: none;
}

.seo-faq-question::-webkit-details-marker {
  display: none;
}

.seo-faq-icon {
  color: var(--text-muted);
  transition: transform 0.25s ease, color 0.2s ease;
  flex-shrink: 0;
}

.seo-faq-item[open] .seo-faq-icon {
  transform: rotate(180deg);
  color: var(--accent-primary);
}

.seo-faq-answer {
  padding: 0 1.25rem 1.15rem 1.25rem;
  font-size: 0.915rem;
  line-height: 1.65;
  color: var(--text-secondary);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

[data-theme="light"] .seo-faq-answer {
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.seo-faq-answer p {
  margin-top: 0.65rem;
}

.seo-faq-answer p:first-child {
  margin-top: 0.5rem;
}

/* Adaptación móvil estricta (regla 10) */
@media (max-width: 768px) {
  .seo-guide-grid {
    grid-template-columns: 1fr;
  }

  .seo-guide-section {
    padding: 1.15rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
  }

  .seo-faq-question {
    padding: 0.85rem 1rem;
    font-size: 0.925rem;
  }

  .seo-faq-answer {
    padding: 0 1rem 1rem 1rem;
    font-size: 0.875rem;
  }
}

@media (max-width: 640px) {
  .tool-layout {
    padding: 0 0.75rem;
    margin: 1rem auto 2rem;
  }

  .stats-summary-bar {
    grid-template-columns: 1fr;
  }

  .main-app-grid {
    grid-template-columns: 1fr;
  }

  .viewer-actions {
    width: 100%;
  }

  .viewer-actions button {
    flex: 1 1 100%;
    width: 100%;
  }

  .telemetria-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mapa-container {
    height: 320px;
  }
}

