/* ClaCar.Com · Ayudas y Recursos HTML — estilos propios de estas páginas (se suman a style.css) */

/* ---------- Barra de navegación (mismo tono que la cabecera) ---------- */
.res-bar { position: sticky; top: 0; z-index: 10; background: var(--head); border-bottom: 1px solid var(--head-line); }
.res-nav { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .25rem .75rem; padding: .5rem 0; }
.res-nav a, .pager .dis {
  display: inline-block; padding: .5rem 1rem; border-radius: 999px; font-weight: 600; font-size: .95rem;
  line-height: 1.2; color: var(--muted); text-decoration: none; white-space: nowrap; transition: background-color .2s, color .2s;
}
.res-nav a:hover { color: var(--text); background: var(--tab-hover); }
.res-nav a[data-back], .res-nav a.jump { color: var(--accent); }
.pager { display: flex; align-items: center; gap: .15rem; }
.pager .count { color: var(--muted); font-size: .9rem; padding: 0 .4rem; white-space: nowrap; }
.pager .dis { opacity: .4; cursor: default; }

/* ---------- Contenido ---------- */
.res-toc { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.5rem; }
.res-toc a {
  padding: .4rem .85rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  color: var(--text); font-size: .88rem; font-weight: 500; text-decoration: none;
}
.res-toc a:hover { border-color: var(--accent); color: var(--accent); }

.res-card { padding: 0; margin-bottom: 1.5rem; overflow: hidden; scroll-margin-top: 5rem; }
.res-card .table-wrap { overflow-x: auto; }
.res-table { width: 100%; min-width: 34rem; border-collapse: collapse; font-size: .93rem; }
.res-table th, .res-table td { text-align: left; padding: .65rem .9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.res-table tr:last-child > th, .res-table tr:last-child > td { border-bottom: 0; }
.res-table th + th, .res-table th + td, .res-table td + td, .res-table td + th { border-left: 1px solid var(--line); }
.res-table th { background: var(--accent-soft); font-weight: 600; }
.res-table th[colspan] {
  background: var(--head); border-bottom: 1px solid var(--head-line); border-left: 0;
  font-family: "Fraunces", Georgia, serif; font-size: 1.05rem; font-weight: 700;
}
.res-table td.sub { text-align: center; background: var(--surface-2); color: var(--warm); font-weight: 600; border-left: 0; }
.res-table tbody tr:hover > td:not([style]) { background: var(--surface-2); }
.res-table td.code, .res-table pre, .res-table code, .res-table .demo {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; font-size: .85rem;
}
.res-table pre { margin: .25rem 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.res-table ul, .res-table ol { margin: .25rem 0; padding-left: 1.6rem; }
.res-table a { overflow-wrap: anywhere; }
.to-top { float: right; font-family: "Public Sans", system-ui, sans-serif; font-size: .85rem; font-weight: 600; }

/* ---------- Imágenes ---------- */
.res-img { display: block; max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.res-img.thumb { max-width: min(100%, 12rem); }
.res-img.mid { max-width: min(100%, 20rem); }
.res-img-link { display: inline-block; margin: .25rem 0; border-radius: 8px; }
.res-img-link:hover .res-img { border-color: var(--accent); }

/* ---------- Página «en construcción» ---------- */
.res-wip { padding: 2rem 1.5rem; text-align: center; }
.res-wip .wip-img { margin: 0 auto 1.25rem; max-width: min(100%, 18rem); }
.res-wip h3 { font-size: 1.35rem; }

@media (max-width: 40rem) {
  .res-nav { justify-content: center; }
  .res-nav a, .pager .dis { padding: .45rem .8rem; font-size: .88rem; }
}
@media print { .res-bar { display: none !important; } }
