/* ==========================================================================
   Herramienta: Test y reparador de píxeles muertos, fuga de luz y quemado
   Fijate Tools - Hoja de estilos principal
   ========================================================================== */

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

  /* Colores temáticos neutros y primarios */
  --bg-primary: #0b0f17;
  --bg-card: #131b26;
  --bg-card-subtle: #192433;
  --bg-hover: #1f2c3d;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: #3b82f6;

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

  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: rgba(37, 99, 235, 0.15);
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --accent: #8b5cf6;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;

  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.4);
}

/* Modo claro nativo */
[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-subtle: #f1f5f9;
  --bg-hover: #e2e8f0;
  --border-subtle: #e2e8f0;
  --border-focus: #2563eb;

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

  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: rgba(37, 99, 235, 0.08);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* --------------------------------------------------------------------------
   Reset y contención global
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-main);
  margin: 0;
  padding: 0;
  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,
.card-title,
.guide-title {
  font-family: var(--font-heading);
  letter-spacing: -0.015em;
  font-weight: 700;
  color: var(--text-main);
}

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

/* --------------------------------------------------------------------------
   Layout principal canónico
   -------------------------------------------------------------------------- */
.main-wrapper.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%;
}

/* --------------------------------------------------------------------------
   Tarjetas y contenedores
   -------------------------------------------------------------------------- */
.card-main {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 2rem;
}

@media (max-width: 768px) {
  .card-main {
    padding: 1.25rem 1rem;
    border-radius: var(--radius-md);
  }
}

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

.card-title {
  font-size: 1.5rem;
  margin: 0 0 0.5rem 0;
  line-height: 1.25;
}

.card-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0;
}

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

.tab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  transition: all 0.2s ease;
}

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

.tab-btn.active {
  color: #ffffff;
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* --------------------------------------------------------------------------
   Visor de previsualización interactiva
   -------------------------------------------------------------------------- */
.preview-stage-container {
  background: #000000;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
  margin-bottom: 1.5rem;
}

.preview-stage {
  height: 380px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  transition: background 0.15s ease;
  user-select: none;
}

@media (max-width: 768px) {
  .preview-stage {
    height: 260px;
  }
}

.preview-badge-overlay {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 5;
}

.preview-fullscreen-hint {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 5;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.preview-stage:hover .preview-fullscreen-hint {
  transform: scale(1.04);
}

/* --------------------------------------------------------------------------
   Paleta de colores y selectores rápidos
   -------------------------------------------------------------------------- */
.pattern-selection-block {
  margin-bottom: 1.75rem;
}

.pattern-selection-block h3 {
  font-size: 1rem;
  margin: 0 0 0.75rem 0;
  color: var(--text-muted);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.patterns-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
  gap: 0.65rem;
}

.pattern-btn {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.6rem 0.75rem;
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  transition: all 0.15s ease;
  color: var(--text-main);
  font-size: 0.85rem;
  font-weight: 500;
}

.pattern-btn:hover {
  background: var(--bg-hover);
  border-color: var(--border-focus);
  transform: translateY(-1px);
}

.pattern-btn.active {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 0 0 1px var(--primary);
}

.swatch-color {
  width: 22px;
  height: 22px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.pattern-btn span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Acciones principales y lanzador a pantalla completa
   -------------------------------------------------------------------------- */
.actions-bar-main {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  padding: 1rem;
  background: var(--bg-card-subtle);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  margin-bottom: 1.5rem;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
  border: none;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.7rem 1.2rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.15s ease;
}

.btn-secondary:hover {
  background: var(--bg-hover);
  border-color: var(--text-muted);
}

.btn-accent {
  background: #7c3aed;
  color: #ffffff;
  border: none;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.75rem 1.3rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.btn-accent:hover {
  background: #6d28d9;
  transform: translateY(-1px);
}

.btn-danger {
  background: #dc2626;
  color: #ffffff;
  border: none;
  font-weight: 600;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.btn-danger:hover {
  background: #b91c1c;
}

/* --------------------------------------------------------------------------
   Visor nativo a pantalla completa (Overlay)
   -------------------------------------------------------------------------- */
.fullscreen-tester-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 999999;
  background: #000000;
  display: none;
  cursor: default;
  overflow: hidden;
}

.fullscreen-tester-overlay.active {
  display: block;
}

.fullscreen-tester-overlay.cursor-hidden {
  cursor: none !important;
}

.fullscreen-content-canvas {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

/* Barra HUD flotante en pantalla completa */
.fullscreen-hud {
  position: absolute;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  padding: 0.6rem 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  color: #ffffff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  z-index: 10000;
  transition: opacity 0.3s ease, transform 0.3s ease;
  max-width: 92vw;
  overflow-x: auto;
}

.fullscreen-hud.hud-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(-20px);
}

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

.hud-title {
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
}

.hud-desc {
  font-size: 0.75rem;
  color: #94a3b8;
  white-space: nowrap;
}

.hud-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hud-btn {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.hud-btn:hover {
  background: rgba(255, 255, 255, 0.22);
}

.hud-btn-active {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
}

.hud-close-btn {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.5);
  color: #fca5a5;
}

.hud-close-btn:hover {
  background: rgba(239, 68, 68, 0.5);
  color: #ffffff;
}

/* --------------------------------------------------------------------------
   Ventana flotante desatascadora ("Pixel Unstucker / JScreenFix")
   -------------------------------------------------------------------------- */
.floating-pixel-fixer {
  position: absolute;
  top: 100px;
  left: 100px;
  width: 240px;
  background: rgba(19, 27, 38, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-focus);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.7);
  z-index: 10001;
  user-select: none;
  display: none;
  flex-direction: column;
}

.floating-pixel-fixer.active {
  display: flex;
}

.pixel-fixer-header {
  padding: 0.5rem 0.75rem;
  background: rgba(0, 0, 0, 0.4);
  border-bottom: 1px solid var(--border-subtle);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: move;
}

.pixel-fixer-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.pixel-fixer-actions {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.fixer-btn-icon {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 0.2rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.fixer-btn-icon:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.pixel-fixer-canvas-box {
  position: relative;
  width: 100%;
  height: 200px;
  background: #000000;
  overflow: hidden;
}

.pixel-fixer-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.pixel-fixer-footer {
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.2);
}

.fixer-timer-badge {
  font-family: var(--font-mono);
  font-weight: 700;
  color: #38bdf8;
}

/* --------------------------------------------------------------------------
   Módulo del desatascador en tarjeta principal (Configuración)
   -------------------------------------------------------------------------- */
.fixer-config-card {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.fixer-config-card h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

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

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.select-custom,
.input-custom {
  width: 100%;
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.75rem;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.15s ease;
}

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

.photosensitive-warning {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  color: #f59e0b;
  font-size: 0.85rem;
  line-height: 1.45;
  margin-top: 1rem;
}

.photosensitive-warning svg {
  flex-shrink: 0;
  margin-top: 2px;
}

/* --------------------------------------------------------------------------
   Diagnóstico guiado y resumen de panel
   -------------------------------------------------------------------------- */
.wizard-box {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

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

.wizard-progress-bar {
  width: 100%;
  height: 6px;
  background: var(--bg-card);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.wizard-progress-fill {
  height: 100%;
  background: var(--primary);
  width: 16%;
  transition: width 0.3s ease;
}

.wizard-step-body {
  margin-bottom: 1.5rem;
}

.wizard-step-title {
  font-size: 1.15rem;
  margin: 0 0 0.5rem 0;
}

.wizard-step-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0 0 1rem 0;
}

.wizard-checklist-options {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.radio-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.radio-card:hover {
  background: var(--bg-hover);
  border-color: var(--border-focus);
}

.radio-card input[type="radio"] {
  accent-color: var(--primary);
  width: 18px;
  height: 18px;
}

.wizard-navigation-buttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.5rem;
}

/* Informe final del panel */
.report-card {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-top: 1.5rem;
}

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

.report-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.85rem;
}

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

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

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

.report-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

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

.metric-label {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 0.25rem;
}

.metric-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  font-family: var(--font-mono);
}

/* --------------------------------------------------------------------------
   Calculadora de PPI y distancia de visión
   -------------------------------------------------------------------------- */
.calc-ppi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

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

.calc-results-box {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.calc-kpi-item {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.calc-kpi-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.kpi-title {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.kpi-num {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary);
  margin: 0;
}

.kpi-desc {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin: 0.25rem 0 0 0;
  line-height: 1.4;
}

/* --------------------------------------------------------------------------
   Sección didáctica SEO y acordeón canónico FAQ
   -------------------------------------------------------------------------- */
.seo-guide-section {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-top: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}

@media (max-width: 768px) {
  .seo-guide-section {
    padding: 1.25rem 1rem;
  }
}

.guide-title {
  font-size: 1.6rem;
  margin: 0 0 1rem 0;
  line-height: 1.3;
}

.guide-intro {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 2rem;
}

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

.guide-card {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.guide-card h4 {
  font-size: 1.1rem;
  margin: 0 0 0.5rem 0;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.guide-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0;
}

/* Acordeón FAQ Canónico (Lección 612) */
.seo-faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

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

.seo-faq-item[open] {
  border-color: rgba(37, 99, 235, 0.35);
  background: var(--bg-card-subtle);
}

.seo-faq-question {
  padding: 1rem 1.25rem;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  list-style: none;
  user-select: none;
}

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

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

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

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

.seo-faq-answer p {
  margin: 0 0 0.75rem 0;
}

.seo-faq-answer p:last-child {
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Modales accesibles (Sin alert() de JS)
   -------------------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

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

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

.modal-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  z-index: 1;
}

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

.modal-header h3 {
  margin: 0;
  font-size: 1.2rem;
  color: var(--text-main);
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease;
}

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

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

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