/* ==========================================================================
   Fijate Tools - Catálogo Oficial de Señales de Tráfico DGT
   Estilos corporativos y arquitectura responsive adaptativa
   ========================================================================== */

:root {
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Outfit', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Paleta cromática modo oscuro por defecto */
  --bg-page: #0b0f17;
  --bg-card: #131b2a;
  --bg-card-hover: #182337;
  --bg-elevated: #1e293b;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(56, 189, 248, 0.3);

  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --accent-primary: #38bdf8;
  --accent-primary-hover: #0ea5e9;
  --accent-glow: rgba(56, 189, 248, 0.15);

  --badge-novedad-bg: rgba(239, 68, 68, 0.15);
  --badge-novedad-text: #f87171;
  --badge-novedad-border: rgba(239, 68, 68, 0.35);

  --badge-puntos-bg: rgba(245, 158, 11, 0.15);
  --badge-puntos-text: #fbbf24;

  --badge-success-bg: rgba(34, 197, 94, 0.15);
  --badge-success-text: #4ade80;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --shadow-card: 0 4px 20px -2px rgba(0, 0, 0, 0.5);
  --shadow-modal: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

[data-theme="light"] {
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-elevated: #e2e8f0;
  --border-color: rgba(0, 0, 0, 0.08);
  --border-highlight: rgba(2, 132, 199, 0.3);

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;

  --accent-primary: #0284c7;
  --accent-primary-hover: #0369a1;
  --accent-glow: rgba(2, 132, 199, 0.1);

  --badge-novedad-bg: #fee2e2;
  --badge-novedad-text: #dc2626;
  --badge-novedad-border: #fca5a5;

  --badge-puntos-bg: #fef3c7;
  --badge-puntos-text: #d97706;

  --badge-success-bg: #dcfce7;
  --badge-success-text: #16a34a;

  --shadow-card: 0 4px 16px -2px rgba(15, 23, 42, 0.08);
  --shadow-modal: 0 20px 40px -10px rgba(15, 23, 42, 0.2);
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-page);
  color: var(--text-main);
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6,
.brand-title,
.section-title,
.hero-title,
.faq-section-title,
.modal-title {
  font-family: var(--font-heading);
  letter-spacing: -0.02em;
}

.mono,
.code-badge,
.boe-meta-tag,
.stat-mono {
  font-family: var(--font-mono);
}

/* Layout canónico */
.tool-layout {
  max-width: 1200px;
  margin: 1.5rem auto 3rem;
  padding: 0 1rem;
  box-sizing: border-box;
  flex: 1 0 auto;
}

.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%;
}

/* ==========================================================================
   Banner Hero y Radar Normativo BOE
   ========================================================================== */

.hero-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 1.75rem 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.hero-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #d32f2f, #fbc02d, #1565c0, #38bdf8);
}

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

.hero-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.25;
}

.hero-desc {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 850px;
}

/* Radar Normativo del BOE en vivo */
.boe-radar-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  margin-top: 1.25rem;
  font-size: 0.875rem;
}

.boe-radar-status {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-main);
  font-weight: 500;
}

.pulse-dot {
  width: 10px;
  height: 10px;
  background-color: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  animation: pulseGreen 2s infinite;
  flex-shrink: 0;
}

@keyframes pulseGreen {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.boe-meta-tag {
  color: var(--accent-primary);
  font-weight: 600;
}

.btn-refresh-boe {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.7rem;
  font-size: 0.8rem;
  font-family: var(--font-main);
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 36px;
}

.btn-refresh-boe:hover {
  background: var(--bg-card);
  color: var(--text-main);
  border-color: var(--accent-primary);
}

.btn-refresh-boe.spinning svg {
  animation: spin 1s linear infinite;
}

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

/* ==========================================================================
   Navegación de Modos / Vistas principales
   ========================================================================== */

.view-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-card);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.65rem 1.25rem;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 44px;
}

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

.tab-btn.active {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
  box-shadow: 0 4px 14px var(--accent-glow);
}

/* ==========================================================================
   Controles: Buscador y Filtros por Categoría
   ========================================================================== */

.controls-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-card);
}

.search-row {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  align-items: center;
}

.search-input-wrapper {
  position: relative;
  flex: 1 1 0%;
  min-width: 0;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
}

.search-input {
  width: 100%;
  height: 48px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0 3rem 0 2.85rem;
  font-family: var(--font-main);
  font-size: 0.95rem;
  color: var(--text-main);
  transition: all 0.2s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.search-clear-btn {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 0.35rem;
  display: none;
  border-radius: 50%;
}

.search-clear-btn:hover {
  color: var(--text-main);
  background: var(--border-color);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip {
  background: var(--bg-elevated);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  padding: 0.45rem 0.95rem;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.chip:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
  border-color: var(--border-highlight);
}

.chip.active {
  background: var(--text-main);
  color: var(--bg-page);
  border-color: var(--text-main);
  font-weight: 600;
}

.chip-novedades {
  background: var(--badge-novedad-bg);
  color: var(--badge-novedad-text);
  border-color: var(--badge-novedad-border);
}

.chip-novedades.active {
  background: #dc2626;
  color: #ffffff;
  border-color: #dc2626;
}

/* Barra de resultados */
.results-summary-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.results-count-badge {
  font-weight: 700;
  color: var(--text-main);
}

/* ==========================================================================
   Grid de Señales (Tarjetas visuales)
   ========================================================================== */

.signs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.sign-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.sign-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-primary);
  box-shadow: 0 12px 24px -6px rgba(0, 0, 0, 0.4);
}

.sign-card-badge-top {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: flex;
  gap: 0.4rem;
}

.badge-novedad {
  background: var(--badge-novedad-bg);
  color: var(--badge-novedad-text);
  border: 1px solid var(--badge-novedad-border);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sign-svg-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 140px;
  margin: 0.5rem 0 1rem;
}

.sign-svg-wrapper svg,
.sign-svg-wrapper img.sign-official-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.15));
}

.sign-card:hover .sign-svg-wrapper svg,
.sign-card:hover .sign-svg-wrapper img.sign-official-img {
  transform: scale(1.08);
}

.sign-info-header {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.sign-code {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-primary);
  background: var(--bg-elevated);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
}

.sign-category-tag {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.sign-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.35;
  margin-bottom: 0.6rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sign-desc-snippet {
  font-size: 0.825rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1 0 auto;
}

.sign-footer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-color);
  padding-top: 0.75rem;
  font-size: 0.8rem;
}

.sancion-pill {
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.sancion-pill.grave {
  color: var(--badge-novedad-text);
}

.sancion-pill.puntos {
  color: var(--badge-puntos-text);
}

.sancion-pill.info {
  color: var(--badge-success-text);
}

.btn-card-details {
  background: transparent;
  color: var(--accent-primary);
  border: none;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

/* Empty state */
.no-results-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 3rem 1.5rem;
  text-align: center;
  color: var(--text-muted);
  grid-column: 1 / -1;
}

.no-results-box h3 {
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

/* ==========================================================================
   Modo Entrenador de Test DGT
   ========================================================================== */

.trainer-container {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-card);
  margin-bottom: 2.5rem;
}

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

.trainer-score-badge {
  font-size: 0.9rem;
  font-weight: 700;
  background: var(--bg-elevated);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  color: var(--accent-primary);
}

.question-layout {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1.75rem;
  align-items: center;
  margin-bottom: 1.5rem;
}

.question-svg-box {
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  min-height: 140px;
  flex-shrink: 0;
}

.question-svg-box svg,
.question-svg-box img.trainer-official-img {
  max-width: 120px;
  max-height: 120px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.question-text {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.4;
}

.options-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.option-btn {
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  text-align: left;
  font-family: var(--font-main);
  font-size: 0.95rem;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 48px;
}

.option-btn:hover:not(:disabled) {
  background: var(--bg-card-hover);
  border-color: var(--accent-primary);
}

.option-btn.correct {
  background: var(--badge-success-bg);
  border-color: #22c55e;
  color: var(--badge-success-text);
  font-weight: 600;
}

.option-btn.wrong {
  background: var(--badge-novedad-bg);
  border-color: #ef4444;
  color: var(--badge-novedad-text);
}

.feedback-box {
  display: none;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  border-left: 4px solid var(--accent-primary);
  font-size: 0.95rem;
  line-height: 1.5;
}

.btn-next-question {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent-primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  padding: 0.75rem 1.5rem;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease;
  min-height: 44px;
}

.btn-next-question:hover {
  background: var(--accent-primary-hover);
}

/* ==========================================================================
   Modo Comparador de Señales Parecidas
   ========================================================================== */

.comparator-container {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-card);
  margin-bottom: 2.5rem;
}

.pair-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.pair-side {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pair-vs-badge {
  grid-column: 1 / -1;
  text-align: center;
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--text-dim);
  border-bottom: 1px dashed var(--border-color);
  padding-bottom: 0.75rem;
  margin-bottom: 0.5rem;
}

/* ==========================================================================
   Infografía Jerarquía de Señales
   ========================================================================== */

.hierarchy-container {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-card);
  margin-bottom: 2.5rem;
}

.pyramid-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}

.pyramid-step {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  transition: transform 0.2s ease;
}

.pyramid-step:hover {
  transform: translateX(6px);
  border-color: var(--accent-primary);
}

.step-rank {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.step-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.step-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* ==========================================================================
   Modal Técnico Accesible (Detalles de la señal)
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.modal-window {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  max-width: 680px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-modal);
  transform: translateY(20px) scale(0.98);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  padding: 2rem;
}

.modal-backdrop.active .modal-window {
  transform: translateY(0) scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.modal-hero {
  display: flex;
  gap: 1.75rem;
  align-items: center;
  margin-bottom: 1.5rem;
}

.modal-svg-container {
  width: 150px;
  height: 150px;
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  flex-shrink: 0;
}

.modal-svg-container svg,
.modal-svg-container img.modal-official-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.2));
}

.modal-title-area {
  flex: 1 1 0%;
  min-width: 0;
}

.modal-code-tag {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-primary);
  background: var(--bg-elevated);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  display: inline-block;
  margin-bottom: 0.5rem;
}

.modal-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.modal-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.meta-item-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.meta-item-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

.modal-section {
  margin-bottom: 1.25rem;
}

.modal-section-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.modal-section-text {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.modal-sancion-box {
  background: var(--badge-novedad-bg);
  border: 1px solid var(--badge-novedad-border);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-top: 1rem;
}

.modal-sancion-title {
  font-weight: 700;
  color: var(--badge-novedad-text);
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* ==========================================================================
   Acordeones de FAQ y Guía SEO
   ========================================================================== */

.seo-guide-section {
  margin-top: 3rem;
  border-top: 1px solid var(--border-color);
  padding-top: 2rem;
}

.faq-section-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 1.25rem;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.faq-summary {
  padding: 1.15rem 1.25rem;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 48px;
}

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

.faq-summary::after {
  content: '+';
  font-size: 1.4rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.faq-item[open] .faq-summary::after {
  content: '−';
}

.faq-content {
  padding: 0 1.25rem 1.25rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.faq-content p + p {
  margin-top: 0.75rem;
}

/* ==========================================================================
   Diseño responsivo móvil y tablet
   ========================================================================== */

@media (max-width: 991px) {
  .hero-box {
    padding: 1.5rem;
  }

  .hero-title {
    font-size: 1.4rem;
  }

  .question-layout {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .question-svg-box {
    margin: 0 auto;
    width: 120px;
    height: 120px;
  }

  .pair-card {
    grid-template-columns: 1fr;
  }
}

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

  .controls-card {
    padding: 1rem;
  }

  .signs-grid {
    grid-template-columns: 1fr;
  }

  .modal-hero {
    flex-direction: column;
    text-align: center;
  }

  .modal-svg-container {
    margin: 0 auto;
  }

  .modal-window {
    padding: 1.25rem;
  }

  .view-tabs {
    flex-direction: column;
  }

  .tab-btn {
    width: 100%;
    justify-content: center;
  }
}
