/* ============================================================
   FIJATE TOOLS - COMPONENTE CANÓNICO SEO & GUÍA PARA RASTREADORES
   Desktop & Mobile • Modo Claro / Oscuro • WCAG AA • Zero-JS
   ============================================================ */

/* 1. BARRA DE MIGAS DE PAN (BREADCRUMBS) */
.tool-breadcrumbs {
  margin: 0.5rem 0 1.25rem 0;
  padding: 0.5rem 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted, #94a3b8);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

.tool-breadcrumbs li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.tool-breadcrumbs a {
  color: var(--text-muted, #94a3b8);
  text-decoration: none;
  transition: color 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.tool-breadcrumbs a:hover {
  color: var(--primary, #0284c7);
  text-decoration: underline;
}

.tool-breadcrumbs .breadcrumb-separator {
  color: var(--border-color, #334155);
  display: inline-flex;
  align-items: center;
  user-select: none;
}

.tool-breadcrumbs [aria-current="page"] {
  color: var(--text-main, #f8fafc);
  font-weight: 600;
  pointer-events: none;
}

/* 2. SECCIÓN PRINCIPAL DE CONTENIDO EDITORIAL Y GUÍA SEO */
.seo-guide-section {
  background: var(--bg-card, #131b2e);
  border: 1px solid var(--border-color, #1e293b);
  border-radius: var(--card-radius, var(--radius-lg, 14px));
  box-shadow: var(--shadow-card, 0 10px 25px -5px rgba(0, 0, 0, 0.35));
  padding: clamp(1.5rem, 3vw, 2.75rem);
  margin-top: 2.5rem;
  margin-bottom: 2.5rem;
  box-sizing: border-box;
  width: 100%;
  position: relative;
  overflow: hidden;
  color: var(--text-main, #f8fafc);
}

[data-theme="light"] .seo-guide-section {
  background: var(--bg-card, #ffffff);
  border-color: var(--border-color, #e2e8f0);
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
}

.seo-guide-header,
.guide-header {
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-color, #1e293b);
  padding-bottom: 1.5rem;
}

[data-theme="light"] .seo-guide-header,
[data-theme="light"] .guide-header {
  border-bottom-color: var(--border-color, #e2e8f0);
}

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

.seo-guide-title,
.seo-guide-header h2,
.guide-header h2,
.seo-guide-section > h2 {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  font-weight: 800;
  color: var(--text-main, #f8fafc);
  margin: 0 0 0.65rem 0;
  line-height: 1.3;
}

[data-theme="light"] .seo-guide-title,
[data-theme="light"] .seo-guide-header h2,
[data-theme="light"] .guide-header h2,
[data-theme="light"] .seo-guide-section > h2 {
  color: var(--text-main, #0f172a);
}

.seo-guide-subtitle,
.seo-guide-lead,
.seo-guide-header p,
.guide-header p {
  font-size: clamp(0.95rem, 1.5vw, 1.05rem);
  color: var(--text-muted, #94a3b8);
  margin: 0;
  line-height: 1.6;
  max-width: 900px;
}

[data-theme="light"] .seo-guide-subtitle,
[data-theme="light"] .seo-guide-lead,
[data-theme="light"] .seo-guide-header p,
[data-theme="light"] .guide-header p {
  color: var(--text-muted, #475569);
}

/* 3. ARTÍCULO DIDÁCTICO Y TEXTO SEMÁNTICO */
.seo-guide-article,
.seo-guide-content,
.guide-content {
  font-size: 0.96rem;
  line-height: 1.7;
  color: var(--text-main, #f8fafc);
}

[data-theme="light"] .seo-guide-article,
[data-theme="light"] .seo-guide-content,
[data-theme="light"] .guide-content {
  color: var(--text-main, #0f172a);
}

.seo-guide-article h3,
.seo-guide-content h3,
.guide-content h3,
.seo-guide-section h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main, #f8fafc);
  margin: 2rem 0 0.85rem 0;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

[data-theme="light"] .seo-guide-article h3,
[data-theme="light"] .seo-guide-content h3,
[data-theme="light"] .guide-content h3,
[data-theme="light"] .seo-guide-section h3 {
  color: var(--text-main, #0f172a);
}

.seo-guide-article h3 svg,
.seo-guide-content h3 svg,
.guide-content h3 svg,
.seo-guide-section h3 svg {
  color: var(--primary, #0284c7);
  flex-shrink: 0;
}

.seo-guide-article p,
.seo-guide-content p,
.guide-content p,
.seo-guide-section p {
  margin: 0 0 1.25rem 0;
  color: var(--text-muted, #94a3b8);
}

[data-theme="light"] .seo-guide-article p,
[data-theme="light"] .seo-guide-content p,
[data-theme="light"] .guide-content p,
[data-theme="light"] .seo-guide-section p {
  color: var(--text-muted, #475569);
}

.seo-guide-article strong,
.seo-guide-content strong,
.guide-content strong,
.seo-guide-section strong {
  color: var(--text-main, #f8fafc);
  font-weight: 600;
}

[data-theme="light"] .seo-guide-article strong,
[data-theme="light"] .seo-guide-content strong,
[data-theme="light"] .guide-content strong,
[data-theme="light"] .seo-guide-section strong {
  color: var(--text-main, #0f172a);
}

/* Listas con viñetas temáticas */
.seo-guide-list,
.guide-card-list {
  list-style: none;
  margin: 0 0 1.5rem 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.85rem;
}

.seo-guide-list li,
.guide-card-list li {
  background: var(--bg-input, #0f172a);
  border: 1px solid var(--border-color, #1e293b);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-muted, #94a3b8);
}

[data-theme="light"] .seo-guide-list li,
[data-theme="light"] .guide-card-list li {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #475569;
}

.seo-guide-list li svg,
.guide-card-list li svg {
  color: var(--success, #10b981);
  flex-shrink: 0;
  margin-top: 0.2rem;
}

/* 4. TABLA ESTÁTICA PARA FEATURED SNIPPETS DE GOOGLE */
.seo-data-table-container,
.seo-table-wrapper,
.tabla-comparativa-wrapper {
  margin: 1.75rem 0 2.25rem 0;
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--border-color, #1e293b);
  background: var(--bg-input, #0f172a);
  -webkit-overflow-scrolling: touch;
}

[data-theme="light"] .seo-data-table-container,
[data-theme="light"] .seo-table-wrapper,
[data-theme="light"] .tabla-comparativa-wrapper {
  background: #ffffff;
  border-color: #e2e8f0;
}

.seo-data-table,
.seo-table,
.tabla-comparativa {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
  min-width: 600px;
}

.seo-data-table th,
.seo-data-table td,
.seo-table th,
.seo-table td,
.tabla-comparativa th,
.tabla-comparativa td {
  padding: 0.9rem 1.15rem;
  border-bottom: 1px solid var(--border-color, #1e293b);
}

[data-theme="light"] .seo-data-table th,
[data-theme="light"] .seo-data-table td,
[data-theme="light"] .seo-table th,
[data-theme="light"] .seo-table td,
[data-theme="light"] .tabla-comparativa th,
[data-theme="light"] .tabla-comparativa td {
  border-bottom-color: #e2e8f0;
}

.seo-data-table th,
.seo-table th,
.tabla-comparativa th {
  background: rgba(15, 23, 42, 0.75);
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  color: var(--text-main, #f8fafc);
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

[data-theme="light"] .seo-data-table th,
[data-theme="light"] .seo-table th,
[data-theme="light"] .tabla-comparativa th {
  background: #f1f5f9;
  color: #0f172a;
}

.seo-data-table tr:last-child td,
.seo-table tr:last-child td,
.tabla-comparativa tr:last-child td {
  border-bottom: none;
}

.seo-data-table tr:hover td,
.seo-table tr:hover td,
.tabla-comparativa tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

[data-theme="light"] .seo-data-table tr:hover td,
[data-theme="light"] .seo-table tr:hover td,
[data-theme="light"] .tabla-comparativa tr:hover td {
  background: rgba(0, 0, 0, 0.02);
}

.seo-data-table .mono-metric,
.seo-table .mono-metric {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  color: var(--primary, #0284c7);
}

.seo-data-table .badge-table,
.seo-table .badge-table {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  background: var(--primary-light, rgba(56, 189, 248, 0.12));
  color: var(--primary, #0284c7);
}

/* 5. CAJAS DESTACADAS Y EJEMPLOS RESUELTOS */
.seo-callout-box,
.seo-code-block {
  background: var(--bg-input, #0f172a);
  border: 1px solid var(--border-color, #1e293b);
  border-left: 4px solid var(--primary, #0284c7);
  border-radius: 10px;
  padding: 1.15rem 1.35rem;
  margin: 1.5rem 0;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-muted, #94a3b8);
}

[data-theme="light"] .seo-callout-box,
[data-theme="light"] .seo-code-block {
  background: #f8fafc;
  border-color: #e2e8f0;
  border-left-color: #0284c7;
  color: #475569;
}

.seo-callout-box svg {
  color: var(--primary, #0284c7);
  flex-shrink: 0;
  margin-top: 0.2rem;
}

.seo-callout-box p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-muted, #94a3b8);
}

.seo-callout-box strong {
  color: var(--text-main, #f8fafc);
}

/* 6. PASOS DE USO Y CUADRÍCULA DE TARJETAS (HOW-TO / STEPS / GUIDE-GRID) */
.seo-howto-grid,
.seo-steps-grid,
.seo-guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.15rem;
  margin: 1.5rem 0 2rem 0;
}

.seo-howto-card,
.seo-step-card,
.seo-guide-card {
  background: var(--bg-input, #0f172a);
  border: 1px solid var(--border-color, #1e293b);
  border-radius: 12px;
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.seo-howto-card:hover,
.seo-step-card:hover,
.seo-guide-card:hover {
  border-color: rgba(2, 132, 199, 0.45);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -4px rgba(0, 0, 0, 0.25);
}

[data-theme="light"] .seo-howto-card,
[data-theme="light"] .seo-step-card,
[data-theme="light"] .seo-guide-card {
  background: #f8fafc;
  border-color: #e2e8f0;
}

[data-theme="light"] .seo-howto-card:hover,
[data-theme="light"] .seo-step-card:hover,
[data-theme="light"] .seo-guide-card:hover {
  border-color: #0284c7;
  box-shadow: 0 8px 20px -4px rgba(0, 0, 0, 0.08);
}

.seo-howto-number,
.seo-step-num,
.seo-howto-step-number {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--primary-light, rgba(56, 189, 248, 0.15));
  color: var(--primary, #0284c7);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.guide-card-icon {
  font-size: 1.6rem;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.seo-howto-card h4,
.seo-step-card h4,
.guide-card-title,
.seo-howto-step-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--text-main, #f8fafc);
  margin: 0;
  line-height: 1.35;
}

[data-theme="light"] .seo-howto-card h4,
[data-theme="light"] .seo-step-card h4,
[data-theme="light"] .guide-card-title,
[data-theme="light"] .seo-howto-step-title {
  color: #0f172a;
}

.seo-howto-card p,
.seo-step-card p,
.guide-card-text,
.seo-howto-step-text {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-muted, #94a3b8);
  margin: 0;
}

[data-theme="light"] .seo-howto-card p,
[data-theme="light"] .seo-step-card p,
[data-theme="light"] .guide-card-text,
[data-theme="light"] .seo-howto-step-text {
  color: #475569;
}

/* 7. ACORDEÓN DE PREGUNTAS FRECUENTES (FAQ NATIVO EN HTML VISIBLE) */
.seo-faq-list,
.seo-faq-accordion,
.seo-faq-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin: 1.5rem 0 0 0;
}

.seo-faq-item {
  background: var(--bg-input, #0f172a);
  border: 1px solid var(--border-color, #1e293b);
  border-radius: 10px;
  transition: border-color 0.2s ease, background-color 0.2s ease;
  overflow: hidden;
}

[data-theme="light"] .seo-faq-item {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.seo-faq-item[open] {
  border-color: var(--primary, #0284c7);
  background: var(--bg-input, #0f172a);
}

[data-theme="light"] .seo-faq-item[open] {
  background: #ffffff;
  border-color: #0284c7;
}

.seo-faq-question {
  padding: 1.05rem 1.25rem;
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main, #f8fafc);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  user-select: none;
  min-height: 44px;
  box-sizing: border-box;
  list-style: none; /* Oculta marcador nativo */
}

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

[data-theme="light"] .seo-faq-question {
  color: #0f172a;
}

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

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

.seo-faq-answer {
  padding: 0 1.25rem 1.2rem 1.25rem;
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--text-muted, #94a3b8);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

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

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

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

.seo-faq-answer ul {
  margin: 0.5rem 0 0 1.25rem;
  padding: 0;
}

/* Badges específicos para IBP en GPX */
.ibp-badge {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  white-space: nowrap;
}
.ibp-facil { background: rgba(16, 185, 129, 0.15); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.3); }
.ibp-moderada { background: rgba(245, 158, 11, 0.15); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.3); }
.ibp-dificil { background: rgba(239, 68, 68, 0.15); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.3); }
.ibp-extrema { background: rgba(168, 85, 247, 0.15); color: #a855f7; border: 1px solid rgba(168, 85, 247, 0.3); }

/* 8. ADAPTACIONES MÓVILES */
@media (max-width: 768px) {
  .seo-guide-section {
    padding: 1.25rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
    border-radius: 12px;
  }

  .seo-guide-list,
  .guide-card-list {
    grid-template-columns: 1fr;
  }

  .seo-howto-grid,
  .seo-steps-grid,
  .seo-guide-grid {
    grid-template-columns: 1fr;
  }

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

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

