/* =========================================================
   V7 Ayuda — hoja de estilos única
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --text: #1a1d24;
  --text-muted: #6b7280;
  --border: #e6e8ec;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-hover: 0 8px 20px rgba(16, 24, 40, 0.08);
  --max-width: 1080px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.site-header .nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 17px;
}

.brand img {
  width: 28px;
  height: 28px;
}

.main-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.main-nav a,
.back-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 14.5px;
  color: var(--text-muted);
  transition: background 0.15s ease, color 0.15s ease;
}

.main-nav a:hover,
.back-link:hover {
  background: var(--bg);
  color: var(--text);
}

.back-link {
  padding: 8px 14px 8px 8px;
}

/* ---------- Sections ---------- */

.section {
  padding: 56px 0;
}

.section + .section {
  border-top: 1px solid var(--border);
}

.section-header {
  text-align: center;
  max-width: 560px;
  margin: 0 auto 36px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 24px;
  font-weight: 700;
  margin: 0;
}

.section-title i {
  color: var(--accent);
  font-size: 20px;
}

.section-subtitle {
  margin: 10px 0 0;
  color: var(--text-muted);
  font-size: 15px;
}

.subsection-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.subsection-title:not(:first-of-type) {
  margin-top: 32px;
}

/* ---------- Cards grid ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: #d7dbe3;
}

.card-icon {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  overflow: hidden;
}

.card-icon img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.card h3 {
  margin: 4px 0 0;
  font-size: 16.5px;
  font-weight: 600;
}

.card p {
  margin: 2px 0 0;
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ---------- Grid de 5 columnas (descargas y listados de ficheros) ---------- */

.cards--5 {
  grid-template-columns: repeat(5, 1fr);
}

/* ---------- Tarjeta compacta (listados de manuales/vídeos/PDF) ---------- */

.card--compact {
  padding: 16px 12px;
  gap: 4px;
}

.card--compact .card-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 4px;
}

.card--compact .card-icon img {
  width: 28px;
  height: 28px;
}

.card--compact h3 {
  font-size: 13.5px;
  line-height: 1.3;
}

.card--compact p {
  font-size: 11.5px;
  line-height: 1.35;
}

/* ---------- Descargas: versión ---------- */

.version-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px 8px 16px;
  max-width: fit-content;
  margin: 0 auto 32px;
  font-size: 14.5px;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.version-info img {
  width: 32px;
  height: 32px;
}

.version-info strong {
  color: var(--text);
}

/* Selector de versión */

.version-switch {
  display: flex;
  gap: 4px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 3px;
}

.version-option {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  padding: 6px 14px;
  font: inherit;
  font-size: 12.5px;
  line-height: 1.3;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.version-option strong {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  transition: color 0.15s ease;
}

.version-option:hover {
  background: var(--surface);
}

.version-option:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.version-option.is-active {
  background: var(--accent);
  color: rgba(255, 255, 255, 0.85);
  box-shadow: var(--shadow);
}

.version-option.is-active strong {
  color: #fff;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .cards--5 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 600px) {
  .version-info {
    padding: 10px;
    gap: 10px;
  }

  .version-switch {
    width: 100%;
  }

  .version-option {
    flex: 1;
    flex-direction: column;
    align-items: center;
    gap: 0;
    min-width: 0;
    padding: 6px 8px;
  }

  .section {
    padding: 40px 0;
  }

  .section-title {
    font-size: 21px;
  }

  .cards {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
  }

  .cards--5 {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .card {
    padding: 18px 12px;
  }

  .card--compact {
    padding: 14px 8px;
  }
}

@media (max-width: 380px) {
  .cards--5 {
    grid-template-columns: repeat(2, 1fr);
  }
}
