/* style.css — theme claro, técnico, reutilizable para documentación normativa */

/* =========================
   VARIABLES BASE
   ========================= */
:root {
  --bg: #f4f6f8;
  --panel: #ffffff;
  --panel-alt: #f0f2f4;

  --text: #1e2328;
  --muted: #5f6b76;

  --border: #d6dbe1;
  --border-strong: #b8c0c8;

  --accent: #b42318;      /* rojo institucional */
  --accent-soft: #fce9e7; /* fondo informativo */
  --warn: #c97a00;

  --radius: 10px;
  --radius-sm: 6px;

  --max-width: 1100px;
}

/* =========================
   RESET / BASE
   ========================= */
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

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

a:hover {
  text-decoration: underline;
}

/* =========================
   LAYOUT
   ========================= */
.container {
  width: min(var(--max-width), calc(100% - 40px));
  margin: 0 auto;
}

section {
  padding: 20px 0;
}

/* =========================
   HEADER
   ========================= */
.site-header {
  background: var(--panel);
  border-bottom: 2px solid var(--border-strong);
}

.brand {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 18px 0;
}

.brand-mark {
  width: 56px;
  height: 56px;
  display: block;
  object-fit: contain;
  flex: 0 0 auto;
}

.kicker {
  font-size: 0.85rem;
  color: var(--muted);
}

.title {
  margin: 0;
  font-size: 1.6rem;
}

.subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  max-width: 80ch;
}

/* =========================
   NAV TABS
   ========================= */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 12px;
}

.tabs a {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--panel-alt);
  font-size: 0.9rem;
  color: var(--text);
}

.tabs a:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}

/* =========================
   BREADCRUMBS
   ========================= */
.breadcrumbs {
  padding: 12px 0 0;
}

.breadcrumbs .container {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.breadcrumbs a {
  color: var(--muted);
}

.breadcrumbs a:hover {
  color: var(--accent);
}

/* =========================
   GRID
   ========================= */
.grid-2 {
  display: grid;
  gap: 20px;
  grid-template-columns: 1.2fr 0.8fr;
}

.grid-3 {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, 1fr);
}

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

/* =========================
   CARDS
   ========================= */
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}

/* =========================
   TYPOGRAFÍA
   ========================= */
h2 {
  margin: 0 0 10px;
  font-size: 1.25rem;
  border-left: 4px solid var(--accent);
  padding-left: 10px;
}

h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

p {
  margin: 0 0 12px;
}

.muted {
  color: var(--muted);
}

/* =========================
   LISTAS
   ========================= */
.list {
  padding-left: 20px;
  margin: 0;
}

.list li {
  margin: 6px 0;
}

/* =========================
   DEFINICIONES / KV
   ========================= */
.kv {
  display: grid;
  gap: 10px;
}

.kv > div {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 10px;
  padding: 10px;
  background: var(--panel-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.kv dt {
  font-weight: 600;
}

.kv dd {
  margin: 0;
}

/* =========================
   CALLOUTS
   ========================= */
.callout {
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
  padding: 14px;
  border-radius: var(--radius-sm);
  margin: 14px 0;
}

.callout.subtle {
  border-left-color: var(--border-strong);
  background: var(--panel-alt);
}

/* =========================
   SEO BLOQUES
   ========================= */
.seo-meta {
  border-left: 4px solid var(--border-strong);
}

.seo-meta h2 {
  margin-bottom: 8px;
}

.related-links {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--panel-alt);
}

.related-links h3 {
  margin-bottom: 8px;
}

.related-links .list {
  margin-top: 4px;
}

/* =========================
   TABLAS
   ========================= */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.table {
  width: 100%;
  border-collapse: collapse;
  min-width: 700px;
}

.table th,
.table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.table thead th {
  background: var(--panel-alt);
  font-weight: 600;
}

.table tbody tr:hover {
  background: #fff4f3;
}

/* =========================
   BADGES
   ========================= */
.pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  font-weight: 600;
}

/* =========================
   FORMULARIO LEAD MAGNET
   ========================= */
.lead-form {
  margin-top: 12px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.field label {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.field input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: var(--text);
}

.field input:focus {
  outline: 2px solid var(--accent-soft);
  border-color: var(--accent);
}

.lead-actions {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-primary {
  appearance: none;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #ffffff;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary:hover {
  filter: brightness(0.95);
}

/* =========================
   FAQ ACORDEON
   ========================= */
.faq-accordion {
  display: grid;
  gap: 10px;
}

.faq-accordion details {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--panel-alt);
  padding: 10px 12px;
}

.faq-accordion summary {
  cursor: pointer;
  font-weight: 600;
}

.faq-accordion details p {
  margin: 10px 0 0;
}

@media (max-width: 700px) {
  .subtitle {
    line-height: 1.35;
    min-height: 5.4em;
  }

  .tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding-bottom: 10px;
  }

  .tabs a {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .table {
    min-width: 0;
  }

  .table thead {
    display: none;
  }

  .table,
  .table tbody,
  .table tr,
  .table td {
    display: block;
    width: 100%;
  }

  .table tr {
    border-bottom: 1px solid var(--border);
    background: var(--panel);
  }

  .table tr:last-child {
    border-bottom: 0;
  }

  .table td {
    border: 0;
    border-bottom: 1px solid var(--border);
    padding: 10px 12px;
  }

  .table td:last-child {
    border-bottom: 0;
  }

  .table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
  }
}

/* =========================
   FOOTER
   ========================= */
.footer {
  border-top: 2px solid var(--border-strong);
  margin-top: 20px;
  padding-top: 16px;
}

/* =========================
   ACCESIBILIDAD
   ========================= */
.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  left: 10px;
  top: 10px;
  background: var(--panel);
  border: 2px solid var(--accent);
  padding: 8px 10px;
  z-index: 1000;
}
