/* =========================
   RESET BÁSICO
========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* =========================
   VARIABLES
========================= */
:root {
  --color-bg: #ffffff;
  --color-text: #1f2933;
  --color-muted: #6b7280;
  --color-primary: #2563eb;
  --color-primary-hover: #1e40af;
  --color-border: #e5e7eb;
  --max-width: 1100px;
}

/* =========================
   BASE
========================= */
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* =========================
   CONTENEDOR
========================= */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
}

/* =========================
   HEADER
========================= */
header {
  background: linear-gradient(135deg, #2563eb, #1e40af);
  color: #ffffff;
  padding: 4rem 0;
  margin-bottom: 3rem;
}

header.hero {
  padding: 5rem 0;
}

header.hero h1 {
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1.2;
}

header.hero p {
  font-size: 1.15rem;
  line-height: 1.6;
  opacity: 0.95;
  margin-bottom: 2rem;
}

header h1 {
  font-size: 2.2rem;
  margin-bottom: 1rem;
}

header p {
  max-width: 700px;
  font-size: 1.1rem;
  color: #e5e7eb;
}

/* Header más compacto en páginas de listado */
header:not(.hero) {
  padding: 3rem 0;
}

.hero-subtitle {
  max-width: 700px;
  font-size: 1.15rem;
  line-height: 1.6;
  opacity: 0.95;
  margin-bottom: 2rem;
}

.h1-muted {
  display: block;
  font-weight: 400;
  font-size: 0.75em;
  opacity: 0.9;
}

.hero .container {
  max-width: 960px;
}

/* =========================
   BOTONES HERO
========================= */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.btn-primary {
  background-color: #ffffff;
  color: #2563eb;
  margin-right: 1rem;
}

.btn-primary:hover {
  background-color: #f1f5f9;
  color: #1e40af;
  text-decoration: none;
}

.btn-secondary {
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.6);
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.12);
  text-decoration: none;
}

.hero-actions {
  margin-top: 1.5rem;
}

/* =========================
   SECCIONES
========================= */
main section {
  margin-bottom: 3.5rem;
}

main section h2 {
  margin-top: 0;
  margin-bottom: 1.25rem;
}

main section ul {
  margin: 1rem 0 1.5rem;
  padding-left: 1.25rem;
}

main section li {
  margin-bottom: 0.4rem;
}

section h2 {
  font-size: 1.6rem;
  margin-bottom: 1.5rem;
}

/* Separación y ritmo para listas de enlaces editoriales */
section p + p {
  margin-top: 1.25rem;
}

/* Evitar cortes feos en enlaces editoriales */
section p a {
  white-space: nowrap;
}

/* Separación entre texto introductorio y bloques de contenido */
section p + .grid {
  margin-top: 2rem;
}

section h2 small {
  display: block;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-muted);
  margin-top: 0.25rem;
}

section + section h2 {
  margin-top: 0;
}

.featured-guide {
  padding: 1.5rem 2rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background-color: #f9fafb;
  max-width: 900px;
}

.featured-guide h2 {
  margin-bottom: 0.75rem;
}

.featured-guide a {
  font-weight: 600;
}

.popular-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  align-items: center;
}

.popular-links span {
  color: var(--color-muted);
}

.inline-links {
  list-style: none;
  padding: 0;
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  max-width: 900px;
  align-items: center;
}

.inline-links li {
  white-space: nowrap;
}	

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

.product ul {
  margin: 1rem 0 1.25rem;
  padding-left: 1.25rem;
}

.product li {
  margin-bottom: 0.4rem;
}

.product p a {
  display: inline-block;
  margin-top: 0.25rem;
  font-weight: 600;
}

a[href*="amazon.es"],
a[href*="amazon.com"] {
  color: #ffffff;
  background-color: var(--color-primary);
  padding: 0.6rem 1rem;
  border-radius: 4px;
  text-decoration: none;
}

a[href*="amazon.es"]:hover,
a[href*="amazon.com"]:hover {
  background-color: var(--color-primary-hover);
}

.review-content section h2 {
  margin-top: 2.5rem;
}

.review-summary {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 1.75rem 2rem;
  background-color: #f9fafb;
}

.review-summary h2 {
  margin-top: 0;
}

.review-summary a[href*="amazon"] {
  margin-top: 0.5rem;
  display: inline-block;
}

.steps {
  margin: 1.5rem 0;
  padding-left: 1.5rem;      /* controlas tú el sangrado */
}

.steps li {
  margin-bottom: 0.75rem;
  padding-left: 0.25rem;     /* separa texto del número */
  line-height: 1.6;
}

/* =========================
   BLOQUE DE CONFIANZA
========================= */

/* Texto introductorio tras títulos */
section h2 + p,
section h2 + p + p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--color-text);
  max-width: 750px;
}

section h2 + .categories {
  margin-top: 1.5rem;
}

/* =========================
   GRID DE CARDS
========================= */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.card {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 1.5rem;
  background-color: #ffffff;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.card p {
  font-size: 0.95rem;
  color: var(--color-muted);
  margin-bottom: 1rem;
}

.card a {
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: var(--color-primary);
  color: #ffffff;
  border-radius: 4px;
  font-size: 0.9rem;
  margin-top: auto;
}

.card a:hover {
  background-color: var(--color-primary-hover);
  text-decoration: none;
}

.card-primary {
  border-color: var(--color-primary);
}

.card-primary h3 {
  color: var(--color-primary);
}

/* =========================
   CATEGORÍAS
========================= */
.categories {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.categories li a {
  display: block;
  padding: 1rem 1.4rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  color: var(--color-text);
  background-color: #f9fafb;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
  transition: all 0.2s ease;
}

.categories li a:hover {
  background-color: #eef2ff;
  border-color: var(--color-primary);
  text-decoration: none;
  transform: translateY(-2px);
}

.categories li a span {
  display: block;
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--color-muted);
  margin-top: 0.25rem;
}

/* =========================
   FOOTER
========================= */
footer {
  border-top: 1px solid var(--color-border);
  padding: 2rem 0;
  margin-top: 4rem;
  font-size: 0.85rem;
  color: var(--color-muted);
}

footer h2 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  color: var(--color-text);
}

footer a {
  color: var(--color-primary);
}

footer section.container {
  margin-bottom: 1.5rem;
}

footer p {
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 640px) {
  header h1 {
    font-size: 1.8rem;
  }

  section h2 {
    font-size: 1.4rem;
  }

  .hero-actions a {
    display: block;
    margin-bottom: 0.75rem;
  }
}

/* =========================
   TABLA COMPARATIVA
========================= */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.comparison-table th,
.comparison-table td {
  border: 1px solid var(--color-border);
  padding: 0.75rem;
  text-align: left;
  font-size: 0.9rem;
}

.comparison-table th {
  background-color: #f9fafb;
}

