/**
 * Fijate Tools - Atlas de lesiones y secuelas crónicas en el deporte de élite
 * Hoja de estilos corporativa adaptada a tema claro y oscuro
 */

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

  /* Colores base tema claro */
  --bg-body: #f8fafc;
  --bg-card: #ffffff;
  --bg-elevated: #f1f5f9;
  --bg-input: #ffffff;
  --border-color: #e2e8f0;
  --border-focus: #3b82f6;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;

  --accent-primary: #2563eb;
  --accent-primary-hover: #1d4ed8;
  --accent-secondary: #0ea5e9;
  --accent-danger: #ef4444;
  --accent-danger-bg: #fef2f2;
  --accent-warning: #f59e0b;
  --accent-warning-bg: #fffbeb;
  --accent-success: #10b981;
  --accent-success-bg: #ecfdf5;
  --accent-orange: #f97316;

  --silhouette-base: #cbd5e1;
  --silhouette-highlight: #93c5fd;
  --hotspot-pulse: rgba(239, 68, 68, 0.45);
  --hotspot-active: #ef4444;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --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.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] {
  --bg-body: #0b0f17;
  --bg-card: #131b2a;
  --bg-elevated: #1a2436;
  --bg-input: #0f172a;
  --border-color: #243047;
  --border-focus: #60a5fa;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent-primary: #3b82f6;
  --accent-primary-hover: #60a5fa;
  --accent-danger: #f87171;
  --accent-danger-bg: rgba(239, 68, 68, 0.12);
  --accent-warning: #fbbf24;
  --accent-warning-bg: rgba(245, 158, 11, 0.12);
  --accent-success: #34d399;
  --accent-success-bg: rgba(16, 185, 129, 0.12);

  --silhouette-base: #27354f;
  --silhouette-highlight: #3b82f6;
  --hotspot-pulse: rgba(248, 113, 113, 0.5);
  --hotspot-active: #f87171;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --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 general */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  line-height: 1.3;
}

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

/* Contenedores canónicos */
.main-wrapper.tool-layout {
  max-width: 1280px;
  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%;
}

/* Hero y tarjeta principal */
.hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  background: var(--accent-danger-bg);
  color: var(--accent-danger);
  border-radius: var(--radius-full);
  font-size: 0.825rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.hero-pill svg {
  width: 15px;
  height: 15px;
}

.hero-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.hero-desc {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 860px;
  line-height: 1.65;
  margin-bottom: 1.75rem;
}

/* KPIs destacados */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
}

.stat-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.stat-value {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--accent-primary);
  margin-bottom: 0.25rem;
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
}

.stat-value.danger {
  color: var(--accent-danger);
}

.stat-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.stat-sub {
  font-size: 0.775rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Sección interactiva: Mapa y Casos */
.explorer-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow-sm);
}

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

.section-heading {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.section-subheading {
  color: var(--text-secondary);
  font-size: 0.925rem;
}

/* Filtros y selectores de deporte */
.sports-chips-wrapper {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.75rem;
  margin-bottom: 1.5rem;
  scrollbar-width: thin;
}

.sport-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.95rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  min-height: 40px;
}

.sport-chip:hover {
  background: var(--bg-body);
  color: var(--text-primary);
  border-color: var(--accent-primary);
}

.sport-chip.active {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

.sport-chip svg {
  width: 16px;
  height: 16px;
}

/* Layout de dos columnas: Silueta y Detalles */
.atlas-interactive-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1.75rem;
  align-items: flex-start;
}

@media (max-width: 900px) {
  .atlas-interactive-grid {
    grid-template-columns: 1fr;
  }
}

/* Contenedor de la silueta SVG */
.silhouette-wrapper {
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-align: center;
  position: sticky;
  top: 1rem;
}

.silhouette-controls {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.view-btn {
  padding: 0.4rem 0.85rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 38px;
}

.view-btn.active {
  background: var(--text-primary);
  color: var(--bg-card);
  border-color: var(--text-primary);
}

.silhouette-svg-container {
  width: 100%;
  max-width: 280px;
  margin: 0 auto;
  position: relative;
  background: radial-gradient(ellipse at center, #1b263b 0%, #0d1522 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.body-silhouette-svg {
  width: 100%;
  height: auto;
  display: block;
}

.silhouette-img {
  user-select: none;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.silhouette-body-path {
  fill: var(--silhouette-base);
  transition: fill 0.3s ease;
}

.region-hotspot {
  cursor: pointer;
  transition: all 0.2s ease;
}

.region-hotspot .hotspot-circle {
  fill: var(--accent-danger);
  stroke: #ffffff;
  stroke-width: 2;
  transition: r 0.2s ease, fill 0.2s ease;
}

.region-hotspot .hotspot-pulse {
  fill: var(--hotspot-pulse);
  animation: hotspot-radar 2s infinite ease-out;
  transform-origin: center;
}

.region-hotspot:hover .hotspot-circle,
.region-hotspot.active .hotspot-circle {
  fill: #ffffff;
  stroke: var(--accent-danger);
  stroke-width: 3.5;
  r: 9;
}

@keyframes hotspot-radar {
  0% {
    r: 6;
    opacity: 0.9;
  }
  100% {
    r: 20;
    opacity: 0;
  }
}

.silhouette-caption {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.85rem;
  line-height: 1.4;
}

/* Panel derecho: Lista de patologías y casos */
.injuries-list-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.active-region-banner {
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--accent-primary);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.15rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.active-region-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.active-region-sub {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

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

/* Tarjeta individual de patología */
.injury-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  transition: all 0.2s ease;
  position: relative;
}

.injury-card:hover {
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-md);
}

.injury-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.injury-title-group h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.injury-popular-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-secondary);
}

.severity-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.725rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.severity-badge.grave {
  background: var(--accent-danger-bg);
  color: var(--accent-danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.severity-badge.moderada {
  background: var(--accent-warning-bg);
  color: var(--accent-warning);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.injury-biomechanics {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.55;
  margin-bottom: 1rem;
}

/* Chips de deportes involucrados */
.injury-sports-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.tag-sport-mini {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
}

/* Casos de atletas célebres dentro de la tarjeta */
.athlete-snippet-box {
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  margin-bottom: 1rem;
  border-left: 3px solid var(--accent-danger);
}

.athlete-snippet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35rem;
}

.athlete-name {
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--text-primary);
}

.athlete-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.athlete-text {
  font-size: 0.825rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.btn-open-dossier {
  width: 100%;
  padding: 0.65rem 1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--accent-primary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  min-height: 40px;
}

.btn-open-dossier:hover {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
}

/* Sección: Casos Célebres Destacados */
.celebrated-cases-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow-sm);
}

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

.athlete-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.athlete-card-top {
  margin-bottom: 1rem;
}

.athlete-badge-sport {
  font-size: 0.725rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-primary);
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.athlete-card-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.45rem;
}

.athlete-quote {
  font-style: italic;
  font-size: 0.85rem;
  color: var(--text-secondary);
  border-left: 2px solid var(--accent-primary);
  padding-left: 0.75rem;
  margin-bottom: 0.85rem;
}

.athlete-summary-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.athlete-card-footer {
  border-top: 1px solid var(--border-color);
  padding-top: 0.85rem;
  font-size: 0.8rem;
  color: var(--accent-danger);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Sección: Simulador Actuarial de Desgaste Biológico */
.calculator-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow-sm);
}

.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
  margin-top: 1.5rem;
}

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

.calc-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.form-select, .form-input {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 44px;
  padding: 0 2.5rem 0 1rem;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: var(--font-main);
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 16px;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.form-select:focus, .form-input:focus {
  outline: none;
  border-color: var(--border-focus);
}

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

.range-slider-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

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

.range-val-badge {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--accent-primary);
  background: var(--bg-elevated);
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-sm);
}

.form-range {
  width: 100%;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--border-color);
  outline: none;
  cursor: pointer;
}

.form-range::-webkit-slider-thumb {
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-primary);
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.btn-calculate {
  padding: 0.85rem 1.5rem;
  background: var(--accent-primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: background 0.2s ease, transform 0.1s ease;
  min-height: 44px;
}

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

.btn-calculate:active {
  transform: scale(0.99);
}

/* Panel de Resultados del Simulador */
.calc-results-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.gauge-header {
  text-align: center;
  margin-bottom: 1.25rem;
}

.gauge-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.75rem;
  border: 6px solid var(--accent-danger);
  background: var(--bg-card);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.gauge-num {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1;
}

.gauge-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}

.risk-level-badge {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.risk-desc-p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

/* Línea de tiempo de proyecciones 10, 20, 30 años */
.projections-timeline {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 1rem;
  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
}

.proj-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.proj-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-primary);
  margin-top: 0.35rem;
  flex-shrink: 0;
}

.proj-content h4 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
}

.proj-content p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Sección: Tabla comparativa pericial */
.table-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow-sm);
}

.table-search-box {
  margin-bottom: 1.25rem;
}

.table-search-input {
  width: 100%;
  height: 44px;
  padding: 0 1rem;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: var(--font-main);
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.comparative-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  text-align: left;
}

.comparative-table th {
  background: var(--bg-elevated);
  padding: 0.85rem 1rem;
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.comparative-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.comparative-table tr:last-child td {
  border-bottom: none;
}

.comparative-table tr:hover td {
  background: var(--bg-elevated);
}

.table-athlete-badge {
  font-weight: 700;
  color: var(--text-primary);
  display: block;
}

/* Acordeón y Guía Médica SEO */
.accordion-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow-sm);
}

.accordion-group {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 1.25rem;
}

.accordion-item {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-elevated);
}

.accordion-trigger {
  width: 100%;
  padding: 1.1rem 1.25rem;
  background: none;
  border: none;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  min-height: 44px;
}

.accordion-icon {
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.accordion-item.open .accordion-icon {
  transform: rotate(180deg);
}

.accordion-content {
  display: none;
  padding: 1.1rem 1.25rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  background: var(--bg-card);
}

.accordion-item.open .accordion-content {
  display: block;
}

/* Modal Accesible de Ficha Pericial (cero window.alert()) */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(11, 15, 23, 0.75);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-backdrop.active {
  display: flex;
}

.modal-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background: var(--bg-card);
  z-index: 10;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 800;
}

.btn-modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  min-height: 38px;
  min-width: 38px;
}

.btn-modal-close:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.modal-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

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

.modal-section-p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.modal-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.modal-list li {
  font-size: 0.85rem;
  color: var(--text-secondary);
  position: relative;
  padding-left: 1.25rem;
}

.modal-list li::before {
  content: '•';
  color: var(--accent-danger);
  position: absolute;
  left: 0.35rem;
  font-size: 1.1rem;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  background: var(--bg-elevated);
}

.btn-secondary {
  padding: 0.5rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 40px;
}

/* Responsividad general */
@media (max-width: 768px) {
  .hero-title {
    font-size: 1.55rem;
  }
  .hero-card {
    padding: 1.25rem;
  }
  .explorer-section, .celebrated-cases-section, .calculator-section, .table-section, .accordion-section {
    padding: 1.25rem;
  }
}
