/* Capa común de adaptación: conserva tipografía, color y lenguaje de cada plantilla. */
:root {
  --red-bg: #0e0e0e;
  --red-surface: #171717;
  --red-surface-2: #202020;
  --red-text: #f4f4f2;
  --red-muted: #b9b9b3;
  --red-heading: #ffffff;
  --red-accent: #f2520d;
  --red-accent-text: #ffffff;
  --red-line: #383838;
  --red-radius: 22px;
  --red-font-body: "Poppins", sans-serif;
  --red-font-heading: "Bricolage Grotesque", sans-serif;
  --red-max: 1240px;
  --red-reading: 72ch;
}
.template-digitos {
  --red-bg: #ffffff;
  --red-surface: #f6f6f6;
  --red-surface-2: #ffffff;
  --red-text: #292929;
  --red-muted: #666666;
  --red-heading: #131313;
  --red-accent: #c9430a;
  --red-line: #dedede;
  --red-font-body: "DM Sans", sans-serif;
  --red-font-heading: "Outfit", sans-serif;
}
.template-digitos.site-colombia {
  --red-accent: #155b8a;
  --red-surface: #f1f6f8;
  --red-line: #cddce4;
}
.template-aivora {
  --red-bg: #00020f;
  --red-surface: #080d1d;
  --red-surface-2: #0d1528;
  --red-text: #f4f6f8;
  --red-muted: #b2b3b7;
  --red-heading: #ffffff;
  --red-accent: #01ff97;
  --red-accent-text: #00020f;
  --red-line: #263248;
  --red-font-body: "DM Sans", sans-serif;
  --red-font-heading: "SportingGrotesque", "DM Sans", sans-serif;
}
.template-naar {
  --red-bg: #ffffff;
  --red-surface: #f6f6f6;
  --red-surface-2: #ffffff;
  --red-text: #2b2b2b;
  --red-muted: #666666;
  --red-heading: #222222;
  --red-accent: #f01313;
  --red-line: #dfdfdf;
  --red-font-body: "Nunito", sans-serif;
  --red-font-heading: "Montserrat", sans-serif;
  --red-radius: 8px;
}
.site-historia {
  --red-bg: #11100f;
  --red-surface: #1a1816;
  --red-surface-2: #211e1b;
  --red-accent: #d7a94a;
  --red-accent-text: #17130c;
  --red-line: #3d3730;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body.red-site {
  margin: 0;
  min-height: 100dvh;
  overflow-x: hidden;
  background: var(--red-bg);
  color: var(--red-text);
  font-family: var(--red-font-body);
  font-size: 16px;
  line-height: 1.7;
}
.red-site h1, .red-site h2, .red-site h3, .red-site h4 {
  color: var(--red-heading);
  font-family: var(--red-font-heading);
  line-height: 1.08;
  letter-spacing: -.035em;
}
.red-site h1 { font-size: clamp(2.65rem, 6vw, 5.7rem); }
.red-site h2 { font-size: clamp(2rem, 4vw, 3.55rem); }
.red-site h3 { font-size: clamp(1.25rem, 2vw, 1.65rem); }
.red-site h4 { font-size: 1.05rem; }
.red-site p { color: var(--red-text); font-family: var(--red-font-body); font-size: 1rem; line-height: 1.75; }
.red-site a { color: inherit; text-decoration: none; }
.red-site img { display: block; max-width: 100%; height: auto; }
.red-site ul { margin: 0; padding: 0; }
.red-site li { color: var(--red-text); font-family: var(--red-font-body); font-size: 1rem; line-height: 1.7; }
.red-site :focus-visible { outline: 3px solid var(--red-accent) !important; outline-offset: 4px; }
.red-site button, .red-site input, .red-site select { font: inherit; }
.red-site button, .red-site select { cursor: pointer; }
.red-container { width: min(calc(100% - 48px), var(--red-max)); margin-inline: auto; }
.red-skip { position: fixed; inset: 12px auto auto 12px; z-index: 100; padding: 12px 18px; background: var(--red-accent); color: var(--red-accent-text); transform: translateY(-180%); }
.red-skip:focus { transform: translateY(0); }
.red-header { position: sticky; top: 0; z-index: 30; border-bottom: 1px solid var(--red-line); background: color-mix(in srgb, var(--red-bg) 94%, transparent); backdrop-filter: blur(16px); }
.red-header-inner { min-height: 84px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.red-brand { max-width: 300px; font-family: var(--red-font-heading); font-size: 1.05rem; font-weight: 750; line-height: 1.15; letter-spacing: -.02em; }
.red-brand small { display: block; margin-top: 5px; color: var(--red-muted); font-family: var(--red-font-body); font-size: .7rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; }
.red-nav ul { display: flex; align-items: center; gap: 6px; list-style: none; }
.red-nav a { display: inline-flex; min-height: 44px; align-items: center; padding: 10px 12px; border-bottom: 2px solid transparent; font-size: .89rem; transition: color .2s ease, border-color .2s ease; }
.red-nav a:hover, .red-nav a[aria-current="page"] { color: var(--red-accent); border-bottom-color: var(--red-accent); }
.red-nav-toggle { display: none; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; border: 1px solid var(--red-line); border-radius: 8px; background: var(--red-surface); color: var(--red-text); }
.red-nav-toggle svg { width: 22px; height: 22px; }
.red-main { min-height: 70dvh; }
.red-hero { padding: 72px 0 56px; }
.red-hero-grid { display: grid; grid-template-columns: minmax(0, 1.06fr) minmax(360px, .94fr); align-items: center; gap: clamp(36px, 6vw, 80px); }
.red-kicker { display: inline-flex; margin-bottom: 22px; color: var(--red-accent); font-size: .76rem; font-weight: 750; letter-spacing: .12em; line-height: 1.5; text-transform: uppercase; }
.red-hero h1 { max-width: 13ch; margin: 0 0 24px; }
.red-hero-copy { max-width: 62ch; color: var(--red-muted); font-size: 1.08rem; }
.red-hero-copy p { color: var(--red-muted); }
.red-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.red-button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; gap: 9px; padding: 13px 20px; border: 1px solid var(--red-accent); border-radius: 999px; background: var(--red-accent); color: var(--red-accent-text); font-weight: 700; line-height: 1.25; transition: transform .2s ease, background .2s ease, color .2s ease; }
.red-button:hover { transform: translateY(-2px); }
.red-button.secondary { background: transparent; color: var(--red-text); border-color: var(--red-line); }
.red-button.secondary:hover { border-color: var(--red-accent); color: var(--red-accent); }
.red-button svg { width: 17px; height: 17px; flex: 0 0 auto; }
.red-hero-media { position: relative; }
.red-hero-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--red-radius); }
.red-hero-media::after { content: ""; position: absolute; inset: 14px -14px -14px 14px; z-index: -1; border: 1px solid var(--red-accent); border-radius: var(--red-radius); opacity: .55; }
.template-digitos .red-hero-media img, .template-naar .red-hero-media img { aspect-ratio: 16 / 11; }
.template-aivora .red-hero-media img { aspect-ratio: 16 / 10; border: 1px solid var(--red-line); }
.red-hero-note { margin-top: 18px; color: var(--red-muted); font-size: .82rem; }
.red-hero-note p { color: var(--red-muted); font-size: .82rem; }
.red-section { padding: 80px 0; border-top: 1px solid var(--red-line); }
.red-section.compact { padding: 56px 0; }
.red-section.tint { background: var(--red-surface); }
.red-section-header { display: flex; align-items: end; justify-content: space-between; gap: 28px; margin-bottom: 34px; }
.red-section-header h2 { max-width: 18ch; margin: 0; }
.red-section-header p { max-width: 54ch; margin: 0; color: var(--red-muted); }
.red-grid { display: grid; gap: 20px; }
.red-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.red-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.red-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.red-card { display: flex; min-width: 0; flex-direction: column; padding: 26px; border: 1px solid var(--red-line); border-radius: var(--red-radius); background: var(--red-surface); transition: transform .2s ease, border-color .2s ease; }
.red-card:hover { transform: translateY(-3px); border-color: var(--red-accent); }
.red-card h3 { margin: 12px 0; }
.red-card h3 a:hover { color: var(--red-accent); }
.red-card p { margin: 0 0 18px; color: var(--red-muted); }
.red-card .red-link { margin-top: auto; }
.red-card[data-search] { scroll-margin-top: 110px; }
.red-label { color: var(--red-accent); font-size: .73rem; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.red-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; color: var(--red-muted); font-size: .8rem; }
.red-link { display: inline-flex; min-height: 44px; align-items: center; gap: 8px; color: var(--red-accent); font-weight: 700; }
.red-link:hover { text-decoration: underline; text-underline-offset: 5px; }
.red-link::after { content: "↗"; font-size: .95em; }
.red-link.internal::after { content: "→"; }
.red-feature { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 36px; padding: 34px; border: 1px solid var(--red-line); border-radius: var(--red-radius); background: var(--red-surface); }
.red-feature img { width: 100%; height: 100%; min-height: 280px; object-fit: cover; border-radius: calc(var(--red-radius) - 8px); }
.red-feature-content { align-self: center; }
.red-feature-content h2, .red-feature-content h3 { margin-top: 0; }
.red-page-hero { padding: 62px 0 48px; border-bottom: 1px solid var(--red-line); background: var(--red-surface); }
.red-page-hero h1 { max-width: 18ch; margin: 14px 0 20px; font-size: clamp(2.5rem, 5vw, 4.8rem); }
.red-page-hero p { max-width: 72ch; margin: 0; color: var(--red-muted); font-size: 1.06rem; }
.red-breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; color: var(--red-muted); font-size: .82rem; }
.red-breadcrumbs a { min-height: 44px; display: inline-flex; align-items: center; color: var(--red-accent); }
.template-obry { --red-accent-text: #0e0e0e; }
.template-naar { --red-accent: #d91010; }
.template-naar .red-header { display: block; }
.red-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; align-items: start; gap: 52px; }
.red-layout > * { min-width: 0; }
.red-article { max-width: var(--red-reading); min-width: 0; }
.red-article > section + section { margin-top: 46px; }
.red-article h2 { margin: 0 0 20px; font-size: clamp(1.75rem, 3vw, 2.45rem); }
.red-article h3 { margin: 30px 0 12px; }
.red-article p { margin: 0 0 20px; }
.red-article ul, .red-article ol { margin: 0 0 22px; padding-left: 22px; }
.red-article li { margin-bottom: 10px; padding-left: 5px; }
.red-article a:not(.red-button):not(.red-link) { color: var(--red-accent); text-decoration: underline; text-underline-offset: 4px; }
.red-article blockquote { margin: 28px 0; padding: 24px 28px; border-left: 3px solid var(--red-accent); background: var(--red-surface); }
.red-article blockquote p:last-child { margin-bottom: 0; }
.site-historia .red-article p { font-family: Georgia, serif; font-size: 1.12rem; line-height: 1.85; }
.red-aside { position: sticky; top: 110px; padding: 22px; border: 1px solid var(--red-line); border-radius: var(--red-radius); background: var(--red-surface); }
.red-aside h2 { margin: 0 0 14px; font-size: 1.1rem; }
.red-aside a { display: flex; min-height: 44px; align-items: center; border-bottom: 1px solid var(--red-line); color: var(--red-muted); font-size: .86rem; }
.red-aside a:hover { color: var(--red-accent); }
.red-aside a:last-child { border-bottom: 0; }
.red-note { margin: 26px 0; padding: 22px 24px; border: 1px solid var(--red-accent); border-radius: var(--red-radius); background: color-mix(in srgb, var(--red-accent) 8%, var(--red-bg)); }
.red-note p:last-child { margin-bottom: 0; }
.red-note strong { color: var(--red-heading); }
.red-steps { list-style: none; counter-reset: red-step; }
.red-steps li { position: relative; min-height: 54px; padding: 4px 0 18px 58px; counter-increment: red-step; }
.red-steps li::before { content: counter(red-step, decimal-leading-zero); position: absolute; left: 0; top: 0; display: grid; width: 40px; height: 40px; place-items: center; border: 1px solid var(--red-accent); border-radius: 50%; color: var(--red-accent); font-size: .78rem; font-weight: 800; }
.red-filters { display: grid; grid-template-columns: minmax(0, 1fr) 220px auto; gap: 14px; margin-bottom: 28px; }
.red-filters > .red-button { align-self: end; min-height: 50px; }
.red-filters label { display: grid; gap: 7px; color: var(--red-muted); font-size: .8rem; }
.red-filters input, .red-filters select { width: 100%; min-height: 50px; padding: 12px 16px; border: 1px solid var(--red-line); border-radius: 10px; background: var(--red-surface); color: var(--red-text); }
.red-filters input::placeholder { color: var(--red-muted); opacity: 1; }
.red-empty { display: none; padding: 26px; border: 1px solid var(--red-line); border-radius: var(--red-radius); }
.red-empty.visible { display: block; }
.red-audio { margin: 26px 0; padding: 24px; border: 1px solid var(--red-line); border-radius: var(--red-radius); background: var(--red-surface); }
.red-audio audio { display: block; width: 100%; margin-top: 16px; }
.red-table-wrap { max-width: 100%; overflow-x: auto; border: 1px solid var(--red-line); border-radius: var(--red-radius); }
.red-table { width: 100%; min-width: 620px; border-collapse: collapse; background: var(--red-surface); }
.red-table th, .red-table td { padding: 16px 18px; border-bottom: 1px solid var(--red-line); text-align: left; vertical-align: top; }
.red-table th { color: var(--red-heading); font-family: var(--red-font-heading); }
.red-table tr:last-child td { border-bottom: 0; }
.red-details { margin: 14px 0; border: 1px solid var(--red-line); border-radius: 12px; background: var(--red-surface); }
.red-details summary { min-height: 52px; padding: 15px 18px; color: var(--red-heading); cursor: pointer; font-weight: 700; }
.red-details > div { padding: 0 18px 18px; }
.red-code { display: block; max-width: 100%; overflow-x: auto; padding: 20px; border: 1px solid var(--red-line); border-radius: 12px; background: #060a12; color: #d7e4dc; font: .88rem/1.65 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre-wrap; word-break: break-word; }
.red-checklist { list-style: none; }
.red-checklist li { position: relative; padding-left: 28px; }
.red-checklist li::before { content: "✓"; position: absolute; left: 0; color: var(--red-accent); font-weight: 900; }
.red-footer { padding: 54px 0 26px; border-top: 1px solid var(--red-line); background: var(--red-surface); }
.red-footer-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 36px; }
.red-footer p { color: var(--red-muted); }
.red-footer-nav { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: flex-end; }
.red-footer-nav a { display: inline-flex; min-height: 44px; align-items: center; color: var(--red-muted); }
.red-footer-nav a:hover { color: var(--red-accent); }
.red-footer-bottom { display: flex; justify-content: space-between; gap: 20px; margin-top: 32px; padding-top: 22px; border-top: 1px solid var(--red-line); color: var(--red-muted); font-size: .8rem; }
.red-footer-bottom p { margin: 0; font-size: .8rem; }
.red-hub { min-height: 100dvh; padding: 64px 0; background: #0e0e0e; color: #f4f4f2; font-family: "DM Sans", sans-serif; }
.red-hub h1 { max-width: 14ch; margin: 0 0 20px; color: #fff; font-size: clamp(2.7rem, 6vw, 5.5rem); line-height: 1; }
.red-hub-intro { max-width: 68ch; color: #b9b9b3; }
.red-hub-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 48px; }
.red-hub-card { display: flex; min-height: 230px; flex-direction: column; padding: 28px; border: 1px solid #383838; border-radius: 20px; background: #171717; }
.red-hub-card:hover { border-color: #f2520d; }
.red-hub-card h2 { margin: 0 0 14px; color: #fff; font-size: 1.45rem; }
.red-hub-card p { color: #b9b9b3; }
.red-hub-card a { margin-top: auto; color: #f2520d; font-weight: 700; }
.red-hub-card small { color: #d7a94a; }
.red-related { max-width: 1120px; margin: 64px 0 24px; padding: 32px 0 0; border-top: 1px solid var(--red-line); }
.red-related > h2 { max-width: 20ch; margin: 0 0 16px; font-size: clamp(1.9rem, 3vw, 2.8rem); }
.red-related-intro { max-width: 72ch; margin: 0 0 28px; color: var(--red-muted); }
.red-related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 16px; }
.red-related-card { min-width: 0; padding: 24px; border: 1px solid var(--red-line); border-radius: var(--red-radius); background: var(--red-surface); }
.red-related-card h3 { margin: 12px 0; font-size: 1.25rem; line-height: 1.25; }
.red-related-card h3 a { color: var(--red-heading); text-decoration: underline; text-decoration-color: var(--red-accent); text-underline-offset: 5px; }
.red-related-card h3 a:hover { color: var(--red-accent); }
.red-related-card p { margin: 0; color: var(--red-muted); font-size: .94rem; }
.red-hidden { display: none !important; }
@media (max-width: 1080px) {
  .red-grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .red-nav a { padding-inline: 8px; font-size: .82rem; }
  .red-layout { grid-template-columns: minmax(0, 1fr) 240px; gap: 32px; }
}
@media (max-width: 900px) {
  .red-hero-grid, .red-feature, .red-layout { grid-template-columns: 1fr; }
  .red-hero h1 { max-width: 16ch; }
  .red-hero-media { max-width: 680px; }
  .red-grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .red-aside { position: static; order: -1; }
  .red-aside nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
  .red-aside a { border-bottom: 0; }
  .red-footer-grid { grid-template-columns: 1fr; }
  .red-footer-nav { justify-content: flex-start; }
  .red-hub-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .red-container { width: min(calc(100% - 32px), var(--red-max)); }
  .red-header-inner { min-height: 74px; }
  .red-nav-toggle { display: inline-flex; }
  .red-nav { display: none; position: absolute; inset: 74px 0 auto; padding: 16px; border-bottom: 1px solid var(--red-line); background: var(--red-bg); }
  .red-nav.open { display: block; }
  .red-nav ul { display: grid; gap: 4px; }
  .red-nav a { width: 100%; padding-inline: 14px; border: 0; border-left: 2px solid transparent; }
  .red-nav a[aria-current="page"] { border-left-color: var(--red-accent); }
  .red-hero { padding-top: 48px; }
  .red-section { padding: 60px 0; }
  .red-section-header { display: block; }
  .red-section-header p { margin-top: 16px; }
  .red-grid.cols-2, .red-grid.cols-3, .red-grid.cols-4 { grid-template-columns: 1fr; }
  .red-feature { padding: 22px; }
  .red-filters { grid-template-columns: 1fr; }
  .red-footer-bottom { flex-direction: column; }
  .red-hub-grid { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .red-brand { max-width: 230px; font-size: .94rem; }
  .red-brand small { font-size: .61rem; }
  .red-actions { display: grid; }
  .red-button { width: 100%; }
  .red-card { padding: 22px; }
  .red-hero-media::after { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
