/* ==========================================================================
   Guía de Animales y Plantas Venenosas de España - Estilos Corporativos
   Estándar Fijate Tools: Inter, Outfit, JetBrains Mono, Dark Mode y Responsive
   ========================================================================== */

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

  /* Colores del tema claro */
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-subtle: #f1f5f9;
  --border-color: #e2e8f0;
  --border-focus: #3b82f6;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;

  /* Estados de gravedad */
  --color-mortal: #dc2626;
  --bg-mortal: #fef2f2;
  --border-mortal: #fecaca;
  --color-grave: #ea580c;
  --bg-grave: #fff7ed;
  --border-grave: #ffedd5;
  --color-moderado: #d97706;
  --bg-moderado: #fffbeb;
  --border-moderado: #fef3c7;
  --color-safe: #16a34a;
  --bg-safe: #f0fdf4;
  --border-safe: #bbf7d0;

  /* Accentos */
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-bg: #eff6ff;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] {
  --bg-page: #0b0f17;
  --bg-card: #111827;
  --bg-card-subtle: #1e293b;
  --border-color: #1f2937;
  --border-focus: #60a5fa;
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-subtle: #6b7280;

  --bg-mortal: rgba(220, 38, 38, 0.15);
  --border-mortal: rgba(220, 38, 38, 0.35);
  --bg-grave: rgba(234, 88, 12, 0.15);
  --border-grave: rgba(234, 88, 12, 0.35);
  --bg-moderado: rgba(217, 119, 6, 0.15);
  --border-moderado: rgba(217, 119, 6, 0.35);
  --bg-safe: rgba(22, 163, 74, 0.15);
  --border-safe: rgba(22, 163, 74, 0.35);

  --primary: #3b82f6;
  --primary-hover: #60a5fa;
  --primary-bg: rgba(59, 130, 246, 0.15);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
}

/* Reset y layout de contención */
* {
  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;
  line-height: 1.5;
}

h1, h2, h3, h4, .brand-title, .section-title, .faq-section-title {
  font-family: var(--font-heading);
}

.mono, code {
  font-family: var(--font-mono);
}

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

/* Layout principal con barra lateral AdSense */
.tool-layout {
  max-width: 1200px;
  margin: 1.5rem auto 3rem;
  padding: 0 1rem;
  box-sizing: border-box;
  flex: 1 0 auto;
  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%;
}

/* --------------------------------------------------------------------------
   Banner de urgencia y llamadas rápidas
   -------------------------------------------------------------------------- */
.emergency-bar-card {
  background: var(--bg-card);
  border: 2px solid var(--color-mortal);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.emergency-bar-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 6px;
  background-color: var(--color-mortal);
}

.emergency-bar-content {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1 1 320px;
}

.emergency-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-mortal);
  color: var(--color-mortal);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.emergency-text strong {
  display: block;
  font-size: 1.05rem;
  color: var(--color-mortal);
  margin-bottom: 0.15rem;
}

.emergency-text p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.emergency-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-emergency {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.1rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  min-height: 42px;
}

.btn-emergency:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-112 {
  background-color: var(--color-mortal);
  color: #ffffff;
}

.btn-sit {
  background-color: var(--bg-card-subtle);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-tel-badge {
  background: rgba(0, 0, 0, 0.2);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.88rem;
}

/* --------------------------------------------------------------------------
   Pestañas de navegación
   -------------------------------------------------------------------------- */
.tool-nav-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 1.5rem;
  overflow-x: auto;
  scrollbar-width: thin;
}

.nav-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.25rem;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  min-height: 44px;
}

.nav-tab:hover {
  color: var(--primary);
  background: var(--bg-card-subtle);
}

.nav-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* --------------------------------------------------------------------------
   Panel de filtros y búsqueda
   -------------------------------------------------------------------------- */
.filter-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.filter-top-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.search-input-wrap {
  position: relative;
  flex: 1 1 280px;
}

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

.search-input {
  width: 100%;
  min-height: 42px;
  padding: 0.6rem 2.4rem 0.6rem 2.5rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-card-subtle);
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.2s ease;
}

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

.btn-clear-search {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 1.2rem;
  color: var(--text-muted);
  cursor: pointer;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.filter-control-select {
  flex: 0 1 240px;
  min-width: 200px;
}

.filter-select {
  width: 100%;
  min-height: 42px;
  padding: 0.6rem 2.2rem 0.6rem 0.85rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background-color: var(--bg-card-subtle);
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 0.88rem;
  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='%2364748b' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  cursor: pointer;
}

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

.filter-chips-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.chip-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.chip-group-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  min-width: 65px;
}

.filter-chip {
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 32px;
}

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

.filter-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.filter-bottom-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 0.75rem;
}

.pet-alert-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
  font-size: 0.86rem;
  color: var(--text-main);
  user-select: none;
}

.pet-alert-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-track {
  width: 36px;
  height: 20px;
  background-color: var(--border-color);
  border-radius: 9999px;
  position: relative;
  transition: background-color 0.2s ease;
  flex-shrink: 0;
}

.toggle-track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: #ffffff;
  border-radius: 50%;
  transition: transform 0.2s ease;
}

.pet-alert-toggle input:checked + .toggle-track {
  background-color: var(--color-grave);
}

.pet-alert-toggle input:checked + .toggle-track::after {
  transform: translateX(16px);
}

.toggle-text {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.results-stats {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.results-count-badge {
  font-size: 0.84rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.btn-reset-filters {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Rejilla de especies
   -------------------------------------------------------------------------- */
.species-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.species-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
}

.species-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-focus);
}

.species-card.danger-mortal {
  border-left: 4px solid var(--color-mortal);
}

.species-card.danger-grave {
  border-left: 4px solid var(--color-grave);
}

.species-card.danger-moderado {
  border-left: 4px solid var(--color-moderado);
}

.species-card-header {
  margin-bottom: 0.75rem;
}

.species-badges-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.badge-danger {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.badge-danger.mortal {
  background: var(--bg-mortal);
  color: var(--color-mortal);
  border: 1px solid var(--border-mortal);
}

.badge-danger.grave {
  background: var(--bg-grave);
  color: var(--color-grave);
  border: 1px solid var(--border-grave);
}

.badge-danger.moderado {
  background: var(--bg-moderado);
  color: var(--color-moderado);
  border: 1px solid var(--border-moderado);
}

.badge-group {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  background: var(--bg-card-subtle);
  color: var(--text-muted);
}

.species-card-title {
  font-size: 1.15rem;
  line-height: 1.3;
  margin-bottom: 0.15rem;
}

.species-card-scientific {
  display: block;
  font-size: 0.85rem;
  font-style: italic;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.species-card-meta {
  font-size: 0.84rem;
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.meta-item {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  color: var(--text-muted);
}

.meta-item svg {
  flex-shrink: 0;
  margin-top: 2px;
}

.meta-item strong {
  color: var(--text-main);
  font-weight: 600;
}

.species-pet-alert {
  background: var(--bg-grave);
  border: 1px solid var(--border-grave);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.6rem;
  font-size: 0.78rem;
  color: var(--color-grave);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.25rem;
}

.btn-card-details {
  width: 100%;
  min-height: 40px;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all 0.15s ease;
}

.btn-card-details:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

/* Estado vacío */
.empty-state-card {
  text-align: center;
  padding: 3rem 1.5rem;
  background: var(--bg-card);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-lg);
  margin-bottom: 2rem;
}

.empty-state-card svg {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.empty-state-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.empty-state-card p {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  background: var(--primary);
  color: #ffffff;
  border: none;
  font-weight: 600;
  cursor: pointer;
  min-height: 42px;
}

/* --------------------------------------------------------------------------
   Sección 2: Confusiones peligrosas (comparador lado a lado)
   -------------------------------------------------------------------------- */
.section-intro-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.75rem;
}

.section-title {
  font-size: 1.35rem;
  margin-bottom: 0.5rem;
}

.section-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
}

.confusions-list {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  margin-bottom: 2.5rem;
}

.confusion-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.confusion-card-title {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.comparison-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1rem;
}

.compare-box {
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
}

.compare-box.danger-side {
  background: var(--bg-mortal);
  border: 1px solid var(--border-mortal);
}

.compare-box.safe-side {
  background: var(--bg-safe);
  border: 1px solid var(--border-safe);
}

.compare-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.compare-box-header h4 {
  font-size: 1.05rem;
}

.compare-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
}

.compare-badge.bad {
  background: var(--color-mortal);
  color: #ffffff;
}

.compare-badge.good {
  background: var(--color-safe);
  color: #ffffff;
}

.compare-traits {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.88rem;
}

.compare-traits li strong {
  color: var(--text-main);
}

.field-trick-box {
  background: var(--bg-card-subtle);
  border-left: 3px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0.75rem 1rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.field-trick-box strong {
  color: var(--text-main);
}

/* --------------------------------------------------------------------------
   Sección 3: Primeros auxilios y mitos
   -------------------------------------------------------------------------- */
.firstaid-guide-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 2.5rem;
}

.protocol-header {
  margin-bottom: 1.5rem;
}

.protocol-badge {
  display: inline-block;
  background: var(--primary-bg);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
}

.triage-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.triage-card {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.triage-card-header {
  margin-bottom: 0.75rem;
}

.triage-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.4rem;
}

.tag-hot {
  background: #ffedd5;
  color: #c2410c;
}

.tag-cold {
  background: #e0f2fe;
  color: #0369a1;
}

.tag-snake {
  background: #fee2e2;
  color: #b91c1c;
}

.triage-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.triage-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.triage-steps {
  padding-left: 1.2rem;
  font-size: 0.86rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.triage-alert-danger {
  background: var(--bg-mortal);
  border: 1px solid var(--border-mortal);
  color: var(--color-mortal);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
}

.myths-wrapper {
  border-top: 1px solid var(--border-color);
  padding-top: 1.5rem;
}

.myths-title {
  font-size: 1.2rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-mortal);
}

.myths-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.myth-card {
  background: var(--bg-card-subtle);
  border-left: 4px solid var(--color-mortal);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 1rem 1.25rem;
}

.myth-falsity {
  font-weight: 700;
  color: var(--color-mortal);
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.myth-truth {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.myth-rule {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--color-safe);
  background: var(--bg-safe);
  border: 1px solid var(--border-safe);
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  display: inline-block;
}

/* --------------------------------------------------------------------------
   Modal accesible de ficha técnica
   -------------------------------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 640px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: modalIn 0.2s ease-out;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.modal-title-wrap {
  flex: 1;
}

.modal-badges-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.modal-title {
  font-size: 1.35rem;
  line-height: 1.25;
}

.modal-subtitle {
  font-size: 0.88rem;
  font-style: italic;
  color: var(--text-muted);
}

.btn-close-modal {
  background: none;
  border: none;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  transition: color 0.15s;
}

.btn-close-modal:hover {
  color: var(--text-main);
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  line-height: 1.55;
}

.modal-section-title {
  font-size: 1.05rem;
  margin-bottom: 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--text-main);
}

.toxin-highlight-box {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.toxin-name {
  font-weight: 700;
  color: var(--color-mortal);
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.toxin-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.modal-symptoms-list {
  padding-left: 1.2rem;
  font-size: 0.88rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  color: var(--text-muted);
}

.pets-warning-box {
  background: var(--bg-grave);
  border: 1px solid var(--border-grave);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.pets-box-icon {
  color: var(--color-grave);
  flex-shrink: 0;
  margin-top: 2px;
}

.pets-box-content h4 {
  font-size: 0.95rem;
  color: var(--color-grave);
  margin-bottom: 0.2rem;
}

.pets-box-content p {
  font-size: 0.86rem;
  color: var(--text-muted);
}

.confusion-box {
  background: var(--bg-card-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  border: 1px solid var(--border-color);
}

.confusion-target {
  font-size: 0.88rem;
  margin-bottom: 0.35rem;
}

.confusion-details {
  font-size: 0.86rem;
  color: var(--text-muted);
}

.modal-steps-list {
  padding-left: 1.2rem;
  font-size: 0.88rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  color: var(--text-muted);
}

.forbidden-section {
  background: var(--bg-mortal);
  border: 1px solid var(--border-mortal);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.forbidden-title {
  color: var(--color-mortal);
}

.modal-forbidden-list {
  padding-left: 1.2rem;
  font-size: 0.86rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  color: var(--color-mortal);
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  background: var(--bg-card-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.modal-footer-call {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.btn-modal-call {
  background: var(--color-mortal);
  color: #ffffff;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.82rem;
}

.btn-modal-sit {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.82rem;
}

.btn-modal-close {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.88rem;
  min-height: 40px;
}

.btn-modal-close:hover {
  background: var(--bg-card);
}

/* --------------------------------------------------------------------------
   Acordeón FAQ y SEO
   -------------------------------------------------------------------------- */
.faq-section {
  margin: 3rem 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.faq-section-title {
  font-size: 1.35rem;
  margin-bottom: 1.25rem;
}

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

.faq-item {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.2s ease;
}

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

.faq-question {
  padding: 1rem 1.25rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.98rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
}

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

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

.faq-item[open] .faq-chevron {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 1.25rem 1.25rem 1.25rem;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-muted);
  background: var(--bg-card);
}

.faq-answer p:not(:last-child) {
  margin-bottom: 0.75rem;
}

.faq-answer strong {
  color: var(--text-main);
}

/* --------------------------------------------------------------------------
   Responsive y móvil
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .emergency-bar-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .emergency-actions {
    width: 100%;
    justify-content: stretch;
  }

  .btn-emergency {
    flex: 1 1 0%;
    justify-content: center;
  }

  .filter-top-row {
    flex-direction: column;
  }

  .filter-control-select {
    flex: 1 1 100%;
  }

  .modal-container {
    max-height: 95vh;
  }

  .modal-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .modal-footer-call {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-modal-close {
    width: 100%;
  }
}
