/* ==========================================================================
   Todo Vatios - Hoja de estilos móvil-first, ligera y sin dependencias
   ========================================================================== */

:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #0f172a;
  --text-muted: #475569;
  --border: #e2e8f0;
  --primary: #0f4c81;       /* Azul técnico sobrio */
  --primary-hover: #0a365c;
  --accent: #d97706;        /* Ámbar eléctrico para detalles */
  --accent-soft: #fffbeb;
  --ok-bg: #dcfce7;
  --ok-text: #166534;
  --no-bg: #fee2e2;
  --no-text: #991b1b;
  --radius: 10px;
  --max-width: 780px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.65;
  color: var(--text);
  background-color: var(--bg);
}

/* Contenedor principal */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
}

/* Cabecera */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.brand {
  font-size: 1.35rem;
  font-weight: 800;
  text-decoration: none;
  color: var(--text);
  letter-spacing: -0.02em;
}

.brand span {
  color: var(--primary);
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  font-size: 0.92rem;
}

.main-nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--primary);
  font-weight: 600;
}

/* Artículo */
.guide-article {
  background: var(--surface);
  margin: 1.25rem 0 2.5rem;
  padding: 1.35rem 1.15rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.category-tag {
  margin: 0 0 0.4rem;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--primary);
}

h1 {
  margin: 0 0 0.75rem;
  font-size: 1.65rem;
  line-height: 1.22;
  letter-spacing: -0.02em;
}

h2 {
  margin: 2rem 0 0.75rem;
  font-size: 1.3rem;
  line-height: 1.3;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0.35rem;
}

h3 {
  margin: 0.35rem 0 0.5rem;
  font-size: 1.12rem;
  line-height: 1.35;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.disclosure {
  margin: 0;
  padding: 0.75rem 0.9rem;
  font-size: 0.84rem;
  color: var(--text-muted);
  background: var(--bg);
  border-left: 3px solid var(--border);
  border-radius: 4px;
}

/* Caja de respuesta rápida */
.callout-box {
  margin: 1.5rem 0;
  padding: 1.15rem;
  background: var(--accent-soft);
  border: 1px solid #fde68a;
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
}

.callout-box h2 {
  margin-top: 0;
  border-bottom: none;
  padding-bottom: 0;
  font-size: 1.12rem;
}

.callout-box ul {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
}

.callout-box li {
  margin-bottom: 0.35rem;
}

/* Fórmula */
.formula-box {
  text-align: center;
  padding: 0.85rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1.05rem;
  font-weight: 700;
}

/* Tablas responsivas (scroll horizontal limpio en móvil) */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
  margin: 1rem 0 1.25rem;
  border: 1px solid var(--border);
  border-radius: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
  font-size: 0.92rem;
}

th,
td {
  padding: 0.75rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  background: var(--bg);
  font-weight: 700;
  color: var(--text);
}

tbody tr:last-child td {
  border-bottom: none;
}

.badge {
  display: inline-block;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

.badge-ok {
  background: var(--ok-bg);
  color: var(--ok-text);
}

.badge-no {
  background: var(--no-bg);
  color: var(--no-text);
}

.table-link {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.table-link:hover {
  text-decoration: underline;
}

/* Tarjetas de producto */
.product-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem;
  margin: 1.25rem 0;
  background: var(--bg);
}

.product-badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary);
  background: #e0f2fe;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}

.specs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
  margin: 1rem 0;
  padding: 0.85rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.specs-grid dt {
  font-size: 0.76rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}

.specs-grid dd {
  margin: 0.1rem 0 0;
  font-weight: 700;
  font-size: 0.94rem;
}

.pros-cons p {
  margin: 0.45rem 0;
  font-size: 0.94rem;
}

.btn-cta {
  display: inline-block;
  width: 100%;
  text-align: center;
  margin-top: 0.85rem;
  padding: 0.8rem 1.2rem;
  background: var(--primary);
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
  border-radius: 8px;
  transition: background-color 0.15s ease;
}

.btn-cta:hover {
  background: var(--primary-hover);
}

/* Lista numerada */
.numbered-tips {
  padding-left: 1.25rem;
}

.numbered-tips li {
  margin-bottom: 0.7rem;
}

/* FAQ sin JavaScript */
.faq-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  margin-bottom: 0.75rem;
  background: var(--bg);
}

.faq-item summary {
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  float: right;
  font-weight: 700;
  color: var(--primary);
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item p {
  margin: 0.65rem 0 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Pie de página */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 1.5rem 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-nav {
  display: flex;
  gap: 1rem;
}

.footer-nav a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--primary);
}

/* ==========================================================================
   Adaptación para pantallas medianas y escritorio (>= 640px)
   ========================================================================== */
@media (min-width: 640px) {
  .header-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .guide-article {
    padding: 2.25rem 2.5rem;
  }

  h1 {
    font-size: 2.05rem;
  }

  .specs-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .btn-cta {
    width: auto;
    padding: 0.8rem 1.6rem;
  }

  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}