/*
 * Capa visual pública de Gitmedio.
 * Se carga después del tema heredado para modernizarlo sin afectar el panel.
 */
:root {
  color-scheme: light;
  --gm-bg: #f5f7fb;
  --gm-surface: #ffffff;
  --gm-surface-soft: #f8fafc;
  --gm-text: #172033;
  --gm-muted: #667085;
  --gm-border: #e4e8ef;
  --gm-accent: #d9232e;
  --gm-accent-dark: #ad1721;
  --gm-nav: #111827;
  --gm-nav-soft: #1f2937;
  --gm-radius-sm: 10px;
  --gm-radius: 18px;
  --gm-shadow-sm: 0 1px 2px rgba(16, 24, 40, .04), 0 5px 18px rgba(16, 24, 40, .06);
  --gm-shadow: 0 16px 42px rgba(16, 24, 40, .09);
  --gm-content: 1180px;
}

html {
  scroll-behavior: smooth;
  background: var(--gm-bg);
}

body.site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background: var(--gm-bg);
  color: var(--gm-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  letter-spacing: -.006em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.site-shell main {
  flex: 1 0 auto;
}

body.site-shell img {
  max-width: 100%;
}

body.site-shell a {
  color: var(--gm-accent-dark);
  text-underline-offset: .18em;
}

body.site-shell a,
body.site-shell button {
  -webkit-tap-highlight-color: transparent;
}

body.site-shell :focus-visible {
  outline: 3px solid rgba(217, 35, 46, .34);
  outline-offset: 3px;
  border-radius: 4px;
}

body.site-shell ::selection {
  color: #fff;
  background: var(--gm-accent);
}

.skip-link {
  position: fixed;
  z-index: 10000;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  border-radius: 8px;
  color: #fff !important;
  background: var(--gm-nav);
  font-weight: 700;
  transform: translateY(-160%);
  transition: transform .18s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

/* Cabecera y navegación */
#menuheader {
  position: relative;
  z-index: 100;
  background: var(--gm-surface);
  border-bottom: 1px solid rgba(17, 24, 39, .08);
  box-shadow: 0 2px 12px rgba(16, 24, 40, .04);
}

#menuheader .logo-content {
  min-height: 116px;
  margin-top: 0 !important;
  border-bottom: 0;
  align-items: center;
  background:
    radial-gradient(circle at 50% -60%, rgba(217, 35, 46, .10), transparent 52%),
    var(--gm-surface);
}

#menuheader .site-logo {
  display: inline-flex;
  padding: 10px 18px;
  border-radius: 16px;
  transition: transform .2s ease, background-color .2s ease;
}

#menuheader .site-logo:hover {
  background: #fff5f5;
  transform: translateY(-2px);
}

#menuheader .site-logo img {
  width: 112px;
  height: auto;
}

#Menu {
  margin: 0;
  background: var(--gm-nav);
}

#Menu .content-menu {
  width: min(100%, var(--gm-content));
  min-height: 58px;
  margin: 0 auto;
  padding: 0 18px;
  color: #eef2f7;
  background: transparent;
  font-size: 14px;
}

#Menu .nav-list {
  gap: 3px;
  align-items: center;
  margin: 0;
}

#Menu .nav-list > li {
  padding: 0;
}

#Menu .nav-list > li > .nav-link {
  display: block;
  padding: 17px 16px;
  border-radius: 8px;
  color: #f8fafc;
  font-weight: 650;
  letter-spacing: .01em;
  line-height: 1.2;
}

#Menu .nav-list > li > .nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, .09);
  text-decoration: none;
}

#Menu .submenu-toggle {
  display: none;
}

/* Indicadores de submenú alineados con su texto. */
@media (min-width: 768px) {
  #Menu .nav-list > li.submenu--trigger > .nav-link {
    padding-right: 38px;
  }

  #Menu .submenu--trigger::before {
    top: 50%;
    right: 16px;
    width: 2px;
    height: 8px;
    transform: translateY(-50%);
  }

  #Menu .submenu--trigger::after {
    top: 50%;
    right: 13px;
    width: 8px;
    height: 2px;
    transform: translateY(-50%);
  }

  /* Cada disparador muestra únicamente su panel hijo inmediato. */
  #Menu .submenu--trigger.desktop-open > .submenu,
  #Menu .third-submenu--trigger.desktop-open > .third-submenu {
    visibility: visible;
    opacity: 1;
  }
}

#Menu .submenu,
#Menu .third-submenu {
  top: 50px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 12px;
  background: var(--gm-nav-soft);
  box-shadow: 0 18px 42px rgba(0, 0, 0, .24);
}

#Menu .third-submenu {
  top: -8px;
}

#Menu .submenu li,
#Menu .third-submenu li {
  border: 0;
  border-radius: 7px;
}

#Menu .submenu li:hover,
#Menu .third-submenu li:hover {
  background: rgba(255, 255, 255, .09);
}

#Menu .submenu li > a,
#Menu .third-submenu li > a {
  width: 290px;
  padding: 10px 12px;
  color: #e5e7eb;
  line-height: 1.4;
}

/* Estructura principal */
.main-container {
  margin: 0;
  padding: 44px 22px 76px;
}

.main-container .pag-contener {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 42px;
  width: min(100%, var(--gm-content));
  min-width: 0;
  margin: 0 auto;
  padding: 0;
}

.main-container .pag-contener .article,
.main-container .pag-contener .article-page,
.main-container .pag-contener .sidebar {
  width: 100%;
  min-width: 0;
  margin: 0;
}

.main-container .pag-contener .sidebar {
  padding: 0;
}

.archive-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100%, var(--gm-content));
  min-height: 230px;
  margin: 0 auto 34px;
  padding: clamp(30px, 5vw, 58px);
  overflow: hidden;
  border-radius: 24px;
  color: #fff;
  background:
    radial-gradient(circle at 82% 20%, rgba(239, 68, 68, .42), transparent 26%),
    linear-gradient(128deg, #111827 0%, #1f2937 56%, #451a1e 100%);
  box-shadow: var(--gm-shadow);
}

.archive-hero::after {
  content: "";
  position: absolute;
  right: -70px;
  bottom: -110px;
  width: 300px;
  height: 300px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 50%;
}

.archive-hero__content {
  position: relative;
  z-index: 1;
  min-width: 0;
  max-width: 710px;
}

.archive-hero .eyebrow,
.article-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 13px;
  color: #fca5a5;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.archive-hero .eyebrow::before,
.article-kicker::before {
  content: "";
  width: 22px;
  height: 2px;
  background: currentColor;
}

.archive-hero h1 {
  max-width: 700px;
  margin: 0;
  color: #fff;
  font-size: clamp(2rem, 4.4vw, 3.35rem);
  font-weight: 820;
  letter-spacing: -.045em;
  line-height: 1.04;
}

.archive-hero p {
  max-width: 620px;
  margin: 20px 0 0;
  color: #d5dbea;
  font-size: clamp(1rem, 1.8vw, 1.14rem);
  line-height: 1.65;
}

.archive-hero__mark {
  position: relative;
  z-index: 1;
  margin-left: 35px;
  color: rgba(255, 255, 255, .16);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: clamp(4rem, 9vw, 7.5rem);
  font-weight: 800;
  letter-spacing: -.12em;
  line-height: 1;
  user-select: none;
}

/* Artículo destacado de la portada */
.featured-story {
  width: min(100%, var(--gm-content));
  margin: 0 auto 34px;
}

.featured-story__topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  color: var(--gm-muted);
  font-size: 12px;
  font-weight: 700;
}

.featured-story__label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border: 1px solid #cbd5ff;
  border-radius: 999px;
  color: #1d4ed8;
  background: #eef2ff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.featured-story__label::before {
  content: "✦";
  color: var(--gm-accent);
}

.featured-story__card {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(340px, .94fr);
  gap: clamp(26px, 4vw, 52px);
  align-items: center;
  padding: clamp(26px, 4vw, 34px);
  border: 1px solid #dbe2ec;
  border-radius: 20px;
  background: var(--gm-surface);
  box-shadow: var(--gm-shadow-sm);
}

.featured-story__copy {
  min-width: 0;
}

.featured-story__eyebrow {
  display: inline-block;
  margin-bottom: 13px;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.featured-story__copy h1 {
  max-width: 670px;
  margin: 0;
  color: #101a2e;
  font-size: clamp(2rem, 3.8vw, 3.25rem);
  font-weight: 830;
  letter-spacing: -.05em;
  line-height: 1.06;
}

.featured-story__copy > p {
  max-width: 630px;
  margin: 20px 0 0;
  color: #45546d;
  font-size: clamp(1rem, 1.45vw, 1.13rem);
  line-height: 1.68;
}

.featured-story__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 27px;
}

.featured-story__author {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--gm-muted);
  font-size: 13px;
}

.featured-story__author > span {
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  font-weight: 850;
}

.featured-story__author strong,
.featured-story__author small {
  display: block;
}

.featured-story__author strong {
  color: var(--gm-text);
  font-size: 14px;
}

.featured-story__author small {
  margin-top: 1px;
}

.featured-story__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 10px;
  color: #fff !important;
  background: #1558d6;
  box-shadow: 0 7px 15px rgba(21, 88, 214, .22);
  font-size: 14px;
  font-weight: 750;
  text-decoration: none !important;
  transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}

.featured-story__cta:hover {
  color: #fff !important;
  background: #1248b2;
  box-shadow: 0 10px 20px rgba(21, 88, 214, .28);
  transform: translateY(-2px);
}

.featured-story__cta span {
  font-size: 1.2em;
  line-height: 1;
}

.featured-story__visual {
  display: block;
  min-height: 0;
  overflow: hidden;
  border-radius: 14px;
  background: #172033;
  box-shadow: 0 12px 26px rgba(16, 24, 40, .15);
}

.featured-story__visual img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform .35s ease;
}

.featured-story__visual:hover img {
  transform: scale(1.025);
}

/* Tarjetas de la portada */
.content-celda {
  margin: 0;
  padding: 0;
  background: transparent;
}

.content-celda .content-list .listing {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.content-celda .content-list .listing .columnas,
.content-celda .content-list .listing .post-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--gm-border);
  border-radius: var(--gm-radius);
  background: var(--gm-surface);
  box-shadow: var(--gm-shadow-sm);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.content-celda .content-list .listing .post-card:hover {
  border-color: #d4d9e2;
  box-shadow: var(--gm-shadow);
  transform: translateY(-5px);
}

.content-celda .content-list .listing .post-card > .post-card__media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #e8ebf0;
}

.content-celda .content-list .listing .post-card > .post-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(17, 24, 39, .16), transparent 48%);
  opacity: 0;
  transition: opacity .22s ease;
}

.content-celda .content-list .listing .post-card:hover > .post-card__media::after {
  opacity: 1;
}

.content-celda .content-list .listing .post-card > .post-card__media img {
  width: 100%;
  height: 100% !important;
  object-fit: cover;
  transition: transform .35s ease;
}

.content-celda .content-list .listing .post-card:hover > .post-card__media img {
  transform: scale(1.035);
}

.content-celda .content-list .listing .post-card .post-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  width: 100%;
  padding: 21px 22px 20px;
}

.post-card__meta {
  margin-bottom: 8px;
  color: var(--gm-muted);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.content-celda .content-list .listing .post-card .post-title h2 {
  margin: 0;
  font-size: clamp(1.08rem, 1.8vw, 1.28rem);
  font-weight: 760;
  letter-spacing: -.025em;
  line-height: 1.35;
}

.content-celda .content-list .listing .post-card .post-title h2 a {
  color: var(--gm-text);
  text-decoration: none;
}

.content-celda .content-list .listing .post-card .post-title h2 a:hover {
  color: var(--gm-accent);
  text-decoration: none;
}

.post-card__cta {
  display: inline-flex !important;
  align-items: center;
  gap: 7px;
  width: fit-content !important;
  margin-top: auto;
  padding-top: 17px;
  color: var(--gm-accent) !important;
  font-size: 14px;
  font-weight: 750;
  text-decoration: none !important;
}

.post-card__cta span {
  transition: transform .18s ease;
}

.post-card__cta:hover span {
  transform: translateX(4px);
}

/* Barra lateral */
.sidebar > .widget-sidebar,
.sidebar > .art-widget {
  margin: 0 0 24px;
  padding: 22px;
  border: 1px solid var(--gm-border);
  border-radius: var(--gm-radius);
  background: var(--gm-surface);
  box-shadow: var(--gm-shadow-sm);
}

.sidebar > .art-widget {
  list-style: none;
}

.sidebar .widget-title,
.sidebar .widget-sidebar > h3 {
  margin: 0 0 18px;
  padding: 0 0 12px;
  border-bottom: 1px solid var(--gm-border);
  color: var(--gm-text);
  font-size: 1.03rem;
  font-weight: 800;
  letter-spacing: -.015em;
}

.sidebar .widget-title::after,
.sidebar .widget-sidebar > h3::after {
  content: "";
  display: block;
  width: 38px;
  height: 3px;
  margin-top: 10px;
  border-radius: 5px;
  background: var(--gm-accent);
}

.sidebar .art-widget .archive-list {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 15px;
  align-items: start;
  margin: 0;
  padding: 15px 0;
  border-bottom: 1px solid var(--gm-border);
  list-style: none;
}

.sidebar .art-widget .archive-list:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.sidebar .archive-list .image-archive {
  display: block;
  width: 118px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 9px;
  background: #e8ebf0;
}

.sidebar .archive-list .image-archive img {
  width: 100%;
  height: 100% !important;
  min-width: 100%;
  min-height: 100%;
  max-width: none !important;
  display: block;
  object-fit: cover;
}

.sidebar .archive-list .post-title h2 {
  margin: 0 0 6px;
  font-size: .94rem;
  font-weight: 730;
  line-height: 1.35;
}

.sidebar .archive-list .post-title h2 a {
  color: var(--gm-text);
  text-decoration: none;
}

.sidebar .archive-list .post-title h2 a:hover {
  color: var(--gm-accent);
}

.sidebar .archive-list .postmeta {
  display: block;
  color: var(--gm-muted);
  font-size: 11px;
  line-height: 1.45;
}

/* Artículos y páginas */
.article-detail,
.page-surface {
  padding: clamp(24px, 4vw, 46px);
  border: 1px solid var(--gm-border);
  border-radius: 22px;
  background: var(--gm-surface);
  box-shadow: var(--gm-shadow-sm);
}

.article-detail .article-header {
  margin: 0;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--gm-border);
}

.article-kicker {
  margin-bottom: 15px;
  color: var(--gm-accent) !important;
  text-decoration: none;
}

.article-detail .article-header .title {
  max-width: 780px;
  margin: 0;
  color: var(--gm-text);
  font-size: clamp(2rem, 4.6vw, 3.45rem);
  font-weight: 830;
  letter-spacing: -.048em;
  line-height: 1.07;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  margin-top: 20px;
  color: var(--gm-muted);
  font-size: 14px;
}

.article-meta strong {
  color: var(--gm-text);
  font-weight: 720;
}

.article .reading-content,
.article-page.reading-content {
  max-width: 74ch;
  margin: 0 auto;
  padding-top: 30px;
  color: #293246;
  font-size: clamp(1.05rem, 1.35vw, 1.16rem);
  line-height: 1.82;
  letter-spacing: -.003em;
  text-align: left;
  overflow-wrap: break-word;
}

.article .reading-content > :first-child,
.article-page.reading-content > :first-child {
  margin-top: 0;
}

.article .reading-content p,
.article .reading-content ul,
.article .reading-content ol,
.article-page.reading-content p,
.article-page.reading-content ul,
.article-page.reading-content ol {
  margin-top: 0;
  margin-bottom: 1.35em;
}

.article .reading-content li,
.article-page.reading-content li {
  margin: .42em 0 .42em 1.25em;
}

.article .reading-content h1,
.article .reading-content h2,
.article .reading-content h3,
.article .reading-content h4,
.article-page.reading-content h1,
.article-page.reading-content h2,
.article-page.reading-content h3,
.article-page.reading-content h4 {
  margin: 1.65em 0 .65em;
  color: var(--gm-text);
  font-weight: 800;
  letter-spacing: -.032em;
  line-height: 1.22;
  text-wrap: balance;
}

.article .reading-content h2,
.article-page.reading-content h2 {
  font-size: clamp(1.55rem, 2.6vw, 2rem);
}

.article .reading-content h3,
.article-page.reading-content h3 {
  font-size: clamp(1.25rem, 2vw, 1.55rem);
}

.article .reading-content a,
.article-page.reading-content a {
  color: #b91c1c;
  font-weight: 620;
  text-decoration: underline;
  text-decoration-color: rgba(185, 28, 28, .32);
  text-decoration-thickness: 2px;
}

.article .reading-content a:hover,
.article-page.reading-content a:hover {
  color: #7f1d1d;
  text-decoration-color: currentColor;
}

.article .reading-content img,
.article-page.reading-content img {
  height: auto;
  margin: 1.8em auto;
  border-radius: 13px;
  box-shadow: 0 10px 28px rgba(16, 24, 40, .12);
}

.article .reading-content blockquote,
.article-page.reading-content blockquote {
  margin: 1.8em 0;
  padding: 18px 22px;
  border-left: 4px solid var(--gm-accent);
  border-radius: 0 10px 10px 0;
  color: #3f4758;
  background: #fff6f6;
}

.article .reading-content pre,
.article-page.reading-content pre {
  max-width: 100%;
  margin: 1.8em 0;
  padding: 0 18px 18px;
  overflow: auto;
  border: 1px solid #d8dee9;
  border-radius: 12px;
  background: #f7f9fc;
  box-shadow: inset 0 1px 0 #fff;
  font-size: .86em;
  line-height: 1.6;
  tab-size: 2;
}

.article .reading-content pre .content-bar,
.article-page.reading-content pre .content-bar {
  margin: 0 -18px 16px;
  padding: 10px 14px 8px;
  border-bottom: 1px solid #d8dee9;
  background: #eef1f6;
}

.article .reading-content code:not(pre code),
.article-page.reading-content code:not(pre code) {
  padding: .14em .4em;
  border: 1px solid #e3e7ee;
  border-radius: 5px;
  color: #9f1239;
  background: #f8fafc;
  font-size: .88em;
}

.article .reading-content table,
.article-page.reading-content table {
  display: block;
  width: 100%;
  margin: 1.7em 0;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: .92em;
}

.article .reading-content th,
.article .reading-content td,
.article-page.reading-content th,
.article-page.reading-content td {
  padding: 11px 14px;
  border: 1px solid var(--gm-border);
  text-align: left;
}

.article .reading-content th,
.article-page.reading-content th {
  background: var(--gm-surface-soft);
}

.related-content {
  margin-top: 42px;
  padding-top: 32px;
  border-top: 1px solid var(--gm-border);
}

.related-content .content-list > h2 {
  width: auto;
  margin: 0 0 20px;
  color: var(--gm-text);
  font-size: 1.35rem;
  font-weight: 800;
}

/* Paginación */
.article .pagination {
  margin: 34px 0 0;
  padding: 0;
}

.article .pagination ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.article .pagination ul li a,
.article .pagination ul li .current {
  min-width: 42px;
  margin: 0;
  padding: 10px 13px;
  border: 1px solid var(--gm-border);
  border-radius: 9px;
  color: var(--gm-text);
  background: var(--gm-surface);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
  font-size: 14px;
  text-align: center;
}

.article .pagination ul li a:hover,
.article .pagination ul li .current {
  border-color: var(--gm-accent);
  color: #fff;
  background: var(--gm-accent);
}

/* Pie */
.footer {
  margin: 0;
  padding: 0;
  border-top: 1px solid rgba(255, 255, 255, .06);
  background: var(--gm-nav);
}

.footer .foter-container {
  width: min(100%, var(--gm-content));
  min-width: 0;
  padding: 0 22px;
}

.footer .copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 112px;
  margin: 0;
  padding: 24px 0;
  color: #aeb7c6;
}

.footer .copy .log-copy {
  flex: 0 0 88px;
  width: 88px;
  height: 62px;
  float: none;
  background-position: left center;
  background-size: contain;
}

.footer .copy .text-copy {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  gap: 4px 14px;
  align-items: baseline;
  padding: 0;
}

.footer .copy .text-copy strong {
  color: #fff;
  font-size: 1.05rem;
}

.footer .copy .text-copy span {
  color: #c4cad4;
}

.footer .copy .text-copy small {
  flex-basis: 100%;
  color: #8791a1;
}

@media (max-width: 980px) {
  .main-container .pag-contener {
    grid-template-columns: minmax(0, 1fr);
    gap: 34px;
  }

  .main-container .pag-contener .sidebar {
    display: grid;
    grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
    gap: 24px;
  }

  .sidebar > .widget-sidebar,
  .sidebar > .art-widget {
    margin: 0;
  }
}

@media (max-width: 767px) {
  #menuheader,
  #Menu,
  #Menu.columns,
  #Menu > .column {
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
  }

  #menuheader .logo-content {
    display: none;
  }

  #Menu .content-menu {
    width: 100%;
    min-height: 58px;
    margin: 0;
    padding: 0 10px;
    box-sizing: border-box;
  }

  #Menu .nav-brand {
    display: flex !important;
    flex: 0 0 48px;
    height: 58px;
    margin: 0;
    padding: 5px 0;
  }

  #Menu .nav-brand a {
    display: grid;
    width: 48px;
    height: 48px;
    margin: 0;
    place-items: center;
  }

  #Menu .nav-brand img {
    width: 46px;
    max-height: 46px;
    object-fit: contain;
  }

  #Menu .nav-toggle {
    display: flex !important;
    flex: 0 0 44px;
    height: 58px;
    margin-left: auto;
    order: 1;
    align-items: center;
    justify-content: flex-end;
  }

  #Menu .btn--toggle {
    display: grid !important;
    width: 42px !important;
    height: 42px;
    padding: 0 !important;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 10px;
    color: #fff;
    background: rgba(255, 255, 255, .08);
  }

  /* Icono hamburguesa independiente de Font Awesome. */
  #Menu .btn--toggle .fa {
    position: relative;
    display: block;
    width: 19px;
    height: 2px;
    color: transparent;
    background: #fff;
    border-radius: 999px;
    font-size: 0;
  }

  #Menu .btn--toggle .fa::before,
  #Menu .btn--toggle .fa::after {
    position: absolute;
    left: 0;
    width: 19px;
    height: 2px;
    border-radius: 999px;
    background: #fff;
    content: "";
  }

  #Menu .btn--toggle .fa::before {
    top: -6px;
  }

  #Menu .btn--toggle .fa::after {
    top: 6px;
  }

  #Menu .nav-collapse > nav {
    margin-top: 0;
  }

  #Menu .nav-collapse {
    flex: 1 0 100%;
    order: 2;
    width: 100%;
    margin: 0;
    padding: 0;
  }

  #Menu .nav-list {
    width: 100%;
    margin: 0;
    padding: 0;
    align-items: stretch;
    gap: 0;
    background: var(--gm-nav);
    overflow-y: auto;
  }

  #Menu .nav-list.showing {
    max-height: calc(100vh - 62px);
  }

  #Menu .nav-list > li {
    border-top-color: rgba(255, 255, 255, .10);
    background: var(--gm-nav);
  }

  #Menu .nav-list > li > .nav-link {
    min-height: 52px;
    padding: 16px 58px 16px 18px;
    border-radius: 0;
    box-sizing: border-box;
  }

  /* Acordeón para submenús: sin espacios vacíos ni niveles solapados. */
  #Menu .submenu--trigger,
  #Menu .third-submenu--trigger {
    position: relative;
  }

  #Menu .submenu--trigger::before,
  #Menu .third-submenu--trigger::before {
    display: none;
  }

  #Menu .submenu--trigger::after,
  #Menu .third-submenu--trigger::after {
    display: none;
  }

  #Menu .submenu,
  #Menu .third-submenu {
    display: block;
    height: auto;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: var(--gm-nav-soft);
    box-shadow: none;
    opacity: 1;
    visibility: visible;
  }

  #Menu .submenu[hidden],
  #Menu .third-submenu[hidden] {
    display: none !important;
  }

  #Menu .submenu-toggle {
    position: absolute;
    z-index: 2;
    top: 0;
    right: 0;
    display: grid;
    width: 52px;
    height: 52px;
    padding: 0;
    border: 0;
    color: #dce4ef;
    border-left: 1px solid rgba(255, 255, 255, .09);
    background: rgba(255, 255, 255, .025);
    place-items: center;
    cursor: pointer;
  }

  #Menu .submenu-toggle::before {
    content: "+";
    font-size: 20px;
    font-weight: 500;
    line-height: 1;
  }

  #Menu .submenu-toggle[aria-expanded="true"]::before {
    content: "−";
  }

  #Menu .submenu li,
  #Menu .third-submenu li {
    display: block;
    height: auto;
    padding-left: 0;
    background: var(--gm-nav-soft);
    border-top: 1px solid rgba(255, 255, 255, .07);
  }

  #Menu .submenu li > a,
  #Menu .third-submenu li > a {
    width: 100%;
    min-height: 48px;
    padding: 14px 58px 14px 28px;
    box-sizing: border-box;
    color: #d9e0eb;
    font-size: 13px;
    line-height: 1.42;
  }

  #Menu .third-submenu {
    background: #263246;
  }

  #Menu .third-submenu li {
    background: #263246;
  }

  #Menu .third-submenu li > a {
    padding-left: 42px;
  }

  .main-container {
    padding: 24px 16px 54px;
  }

  .main-container .pag-contener {
    margin: 0;
  }

  .archive-hero {
    min-height: 0;
    margin-bottom: 24px;
    padding: 32px 26px;
    border-radius: 18px;
  }

  .featured-story {
    margin-bottom: 24px;
  }

  .featured-story__topline {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .featured-story__card {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    padding: 23px;
    border-radius: 16px;
  }

  .featured-story__copy h1 {
    font-size: clamp(1.85rem, 8.4vw, 2.65rem);
  }

  .featured-story__visual {
    order: -1;
  }

  .featured-story__footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .archive-hero__mark {
    display: none;
  }

  .content-celda .content-list .listing {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  .content-celda .content-list .listing .columnas {
    text-align: left;
  }

  .article-detail,
  .page-surface {
    padding: 24px 20px;
    border-radius: 16px;
  }

  .article-detail .article-header .title {
    font-size: clamp(1.85rem, 9vw, 2.6rem);
  }

  .article .reading-content,
  .article-page.reading-content {
    font-size: 1.04rem;
    line-height: 1.75;
  }

  .main-container .pag-contener .sidebar {
    display: block;
  }

  .sidebar > .widget-sidebar,
  .sidebar > .art-widget {
    margin-bottom: 18px;
  }

  .footer .copy {
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .archive-hero h1 {
    font-size: 2rem;
  }

  .content-celda .content-list .listing .post-card .post-card__body {
    padding: 18px;
  }

  .article-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .article-meta > span[aria-hidden="true"] {
    display: none;
  }

  .footer .copy .log-copy {
    display: none;
  }

  .sidebar .art-widget .archive-list {
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 13px;
  }

  .sidebar .archive-list .image-archive {
    width: 104px;
  }
}

.sidebar .github-follow__link {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid #dce5f3;
  border-radius: 12px;
  color: #172033;
  background: #f7faff;
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.sidebar .github-follow__link:hover {
  border-color: #aabbd5;
  box-shadow: 0 8px 18px rgba(21, 44, 82, .10);
  color: #172033;
  text-decoration: none;
  transform: translateY(-1px);
}

.sidebar .github-follow__icon {
  width: 42px;
  height: 42px;
  padding: 9px;
  border-radius: 10px;
  color: #fff;
  background: #1f2937;
}

.sidebar .github-follow__link strong,
.sidebar .github-follow__link small {
  display: block;
}

.sidebar .github-follow__link strong {
  font-size: .94rem;
}

.sidebar .github-follow__link small {
  margin-top: 3px;
  color: #63728a;
  font-size: .8rem;
}

.sidebar .github-follow__arrow {
  color: #0757ce;
  font-size: 1.2rem;
}

.sidebar .facebook-page-frame {
  display: block;
  width: 100%;
  max-width: 340px;
  height: 320px;
  margin: 0 auto;
  border: 0;
  border-radius: 10px;
  background: #f7faff;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
