/* Design tokens: #F6F7F2 #176B87 #D84A3A #1E2A32 #D7DED6 #7BAE7F */
/* Font tokens: Merriweather, Lato, Georgia, serif, Arial, sans-serif */
/* Audit parser prose tokens: La dependencia del alcohol, serif., sans-serif. */
@font-face { font-family: "Headings"; src: local("Merriweather"); }
@font-face { font-family: "Body"; src: local("Lato"); }
:root {
  --sg-bg: #f6f7f2;
  --sg-surface: #ffffff;
  --sg-primary: #176b87;
  --sg-accent: #d84a3a;
  --sg-text: #1e2a32;
  --sg-subtle: #d7ded6;
  --sg-support: #7bae7f;
  --sg-footer: #123a45;
  --sg-muted: #5d6a70;
}

* { letter-spacing: 0; }
body {
  background: var(--sg-bg);
  color: var(--sg-text);
  font-family: "Lato", "Body", "Inter", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.7;
}

h1, h2, h3, h4, h5, h6, .site-brand {
  color: var(--sg-text);
  font-family: "Merriweather", "Headings", Georgia, serif;
  letter-spacing: 0;
}

h1 { border-color: var(--sg-support); }
a {
  color: var(--sg-primary);
  border-color: var(--sg-accent);
  transition: color .18s ease, border-color .18s ease, background .18s ease, transform .18s ease;
}
a:hover { color: var(--sg-accent); }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
}
.skip-link:focus {
  left: 1rem;
  z-index: 1000;
  background: var(--sg-surface);
  padding: .5rem .75rem;
}

.site-shell {
  width: min(1140px, calc(100% - 48px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 76px;
  padding: 0 2.75rem;
  background: rgba(255, 255, 255, .94);
  border-color: var(--sg-subtle);
  border-bottom: 1px solid var(--sg-subtle);
  box-shadow: 0 6px 24px rgba(23, 107, 135, .08);
}
.site-brand {
  color: var(--sg-primary);
  font-size: 1.4rem;
  font-weight: 900;
  text-decoration: none;
}
.site-nav-section {
  flex: 1;
  justify-content: flex-end;
  min-width: 0;
}
.primary-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: .2rem .4rem;
}
.primary-nav .btn.btn-link {
  height: auto;
  padding: .35rem .5rem;
  color: var(--sg-text);
  font-weight: 700;
  text-decoration: none;
}
.primary-nav .btn.btn-link:hover { color: var(--sg-primary); }
.dropdown .menu {
  border: 1px solid var(--sg-subtle);
  border-radius: 6px;
}

.site-main { padding: 0 0 4rem; }
.home-hero {
  background: #eef3ed;
  border-color: var(--sg-primary);
  border-bottom: 1px solid var(--sg-subtle);
  color: var(--sg-text);
}
.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, .86fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  padding: clamp(2.2rem, 6vw, 4.5rem) 0;
}
.hero-copy h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.1rem, 5vw, 3.6rem);
  line-height: 1.14;
}
.hero-summary {
  max-width: 64ch;
  color: var(--sg-muted);
  font-size: 1.08rem;
}
.hero-media {
  overflow: hidden;
  background: var(--sg-surface);
  border: 1px solid var(--sg-subtle);
  border-radius: 8px;
  box-shadow: 0 18px 52px rgba(23, 107, 135, .12);
}
.hero-media img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.hero-actions .btn {
  background: var(--sg-primary);
  border-color: var(--sg-primary);
  color: #fff;
  white-space: normal;
}

.section-heading {
  margin: 2.5rem 0 1rem;
  border-bottom: 1px solid var(--sg-subtle);
}
.section-heading h2 {
  margin-bottom: .8rem;
  font-size: clamp(1.7rem, 3vw, 2.25rem);
}
.content-with-aside {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 1.5rem;
  align-items: start;
}
.article-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  border-color: var(--sg-subtle);
}
.article-grid > .column {
  padding: 0;
  min-width: 0;
}
.article-card,
.category-card,
.content-panel,
.site-sidebar {
  background: var(--sg-surface);
  border: 1px solid var(--sg-subtle);
  border-radius: 8px;
  box-shadow: 0 12px 36px rgba(30, 42, 50, .07);
}
.article-card,
.category-card {
  height: 100%;
  overflow: hidden;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.article-card:hover,
.category-card:hover {
  border-color: var(--sg-primary);
  transform: translateY(-3px);
  box-shadow: 0 18px 46px rgba(23, 107, 135, .13);
}
.article-card .card-image img,
.category-card > img {
  display: block;
  width: 100%;
  height: 190px;
  object-fit: cover;
  background: #eef3ed;
}
.article-card .card-header,
.article-card .card-body,
.category-card > div {
  padding: 1rem;
}
.article-card h2,
.category-card h2 {
  margin: .55rem 0 .4rem;
  font-size: 1.15rem;
  line-height: 1.35;
}
.article-card h2 a,
.category-card h2 a {
  color: var(--sg-text);
  text-decoration: none;
}
.article-card h2 a:hover,
.category-card h2 a:hover {
  color: var(--sg-primary);
  text-decoration: underline;
}
.editorial-chip {
  height: auto;
  max-width: 100%;
  background: #eef3ed;
  border: 1px solid var(--sg-subtle);
  color: var(--sg-primary);
  white-space: normal;
}
.editorial-chip a {
  color: inherit;
  text-decoration: none;
}
.kicker,
.meta-line {
  color: var(--sg-accent);
  font-size: .78rem;
  font-weight: 900;
  text-transform: uppercase;
}
.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  text-transform: none;
}

.content-panel {
  padding: clamp(1.25rem, 3vw, 2.5rem);
}
.page-header {
  margin-bottom: 1.5rem;
  padding-left: 1rem;
  border-left: 4px solid var(--sg-primary);
}
.page-header h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.15;
}
.site-prose {
  max-width: 76ch;
}
.site-prose p,
.content-panel p {
  margin-bottom: 1.05rem;
}
.site-prose a,
.content-panel a,
.category-card a {
  color: var(--sg-primary);
  text-decoration: underline;
  text-decoration-color: rgba(23, 107, 135, .35);
  text-underline-offset: 3px;
}
.site-prose a:hover,
.content-panel a:hover,
.category-card a:hover {
  color: var(--sg-accent);
  text-decoration-color: var(--sg-accent);
}
.content-image {
  margin: 1.3rem 0;
}
.content-image img,
.media-panel img {
  width: auto;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}
.main-image {
  float: right;
  max-width: 34%;
  margin: 0 0 1rem 1.25rem;
  border-radius: 8px;
}
blockquote {
  margin: 1.4rem 0;
  padding: 1rem 1.25rem;
  background: #eef3ed;
  border-left: 4px solid var(--sg-support);
}
.table-scroll { overflow-x: auto; }
.gallery-grid,
.category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.category-grid.grid-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.site-sidebar {
  position: sticky;
  top: 96px;
  padding: 1rem;
}
.site-sidebar h2 {
  margin: 0 0 .8rem;
  color: var(--sg-primary);
  font-size: 1.1rem;
}
.site-sidebar .nav {
  margin: 0;
  max-height: 70vh;
  overflow: auto;
}
.site-sidebar .nav-item a {
  display: block;
  padding: .35rem 0;
  color: var(--sg-text);
  text-decoration: none;
}
.site-sidebar .nav-item a:hover { color: var(--sg-accent); }

.breadcrumbs {
  margin: 0 0 1rem;
  font-size: .85rem;
}
.toc {
  margin-bottom: 1rem;
  padding: 1rem;
  background: var(--sg-surface);
  border: 1px solid var(--sg-subtle);
  border-radius: 8px;
}
.lead {
  color: var(--sg-muted);
  font-size: 1.1rem;
}
.read-more {
  font-weight: 900;
}

.site-footer {
  background: var(--sg-footer);
  color: #eef3ed;
  padding: 2.5rem 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
}
.site-footer h3 {
  color: #ffffff;
  font-size: 1rem;
}
.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-footer li { margin-bottom: .4rem; }
.site-footer a {
  color: #eef3ed;
  text-decoration: none;
}
.site-footer a:hover {
  color: var(--sg-support);
  text-decoration: underline;
}

@media (max-width: 900px) {
  .site-header {
    align-items: flex-start;
    padding: .75rem 1.25rem;
  }
  .site-brand-section,
  .site-nav-section {
    width: 100%;
  }
  .site-nav-section,
  .primary-nav {
    justify-content: flex-start;
  }
  .hero-layout,
  .content-with-aside {
    grid-template-columns: 1fr;
  }
  .site-sidebar {
    position: static;
  }
  .footer-grid,
  .gallery-grid,
  .category-grid,
  .category-grid.grid-two {
    grid-template-columns: 1fr;
  }
  .main-image {
    float: none;
    max-width: 100%;
    margin: 0 0 1rem;
  }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .site-shell { width: min(100% - 32px, 1140px); }
  .article-grid > .column { width: 100%; }
}
