/* Heraldo Toluca — regional newsroom (Herald de México inspired; original CSS) */
:root {
  --ink: #1a1a1a;
  --muted: #5c5c5c;
  --line: #e2e2e2;
  --paper: #fafafa;
  --white: #ffffff;
  --herald-red: #c8102e;
  --herald-red-dark: #9b0c24;
  --navy: #0c1d3a;
  --gold: #c9a227;
  --display: "Source Serif 4", "Georgia", serif;
  --sans: "Source Sans 3", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 17px;
}
a { color: var(--herald-red-dark); text-decoration-thickness: 1px; text-underline-offset: 0.12em; }
a:hover { color: var(--navy); }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--navy); color: #fff; padding: 0.5rem 1rem; z-index: 9999;
}
.skip-link:focus { left: 0; }

/* —— edition bar (unique header layer 1) —— */
.edition-bar {
  background: var(--navy);
  color: #dce6f5;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}
.edition-inner {
  width: min(1140px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 0.45rem 0;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* —— masthead (layer 2) —— */
.masthead {
  background: var(--white);
  border-bottom: 3px solid var(--herald-red);
}
.masthead-inner {
  width: min(1140px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.1rem 0 0.85rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: end;
}
.wordmark {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 0.95;
  color: var(--navy);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.wordmark span { display: block; color: var(--herald-red); font-size: 0.42em; letter-spacing: 0.22em; text-transform: uppercase; font-family: var(--sans); font-weight: 700; margin-bottom: 0.2rem; }
.masthead-tagline { color: var(--muted); font-size: 0.92rem; max-width: 22rem; text-align: right; }

/* —— section nav (layer 3 — horizontal red bar) —— */
.section-nav-wrap {
  background: var(--herald-red);
  position: sticky; top: 0; z-index: 40;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.section-nav-inner {
  width: min(1140px, calc(100% - 2rem));
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1rem;
  padding: 0.55rem 0;
}
.section-nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0;
}
.section-nav a:hover, .section-nav a[aria-current="page"] { color: #ffe0e6; }
.header-search {
  margin-left: auto;
  display: flex;
  gap: 0;
  min-width: min(220px, 100%);
}
.header-search input {
  flex: 1;
  border: 0;
  padding: 0.45rem 0.65rem;
  font: inherit;
  font-size: 0.88rem;
  border-radius: 2px 0 0 2px;
}
.header-search button {
  border: 0;
  background: var(--navy);
  color: #fff;
  padding: 0.45rem 0.85rem;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 0 2px 2px 0;
}

.shell { width: min(1140px, calc(100% - 2rem)); margin: 0 auto; }

/* —— homepage hero deck —— */
.lead-deck {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 1.5rem;
  padding: 1.75rem 0 1rem;
}
.lead-story {
  background: var(--white);
  border: 1px solid var(--line);
  overflow: hidden;
}
.lead-story img { width: 100%; height: 280px; object-fit: cover; display: block; }
.lead-story .pad { padding: 1.25rem 1.35rem 1.5rem; }
.trending-panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 4px solid var(--herald-red);
  padding: 1rem 1.1rem;
}
.trending-panel h2 {
  font-family: var(--display);
  font-size: 1.15rem;
  margin: 0 0 0.85rem;
  color: var(--navy);
}
.trending-list { list-style: none; padding: 0; margin: 0; counter-reset: trend; }
.trending-list li {
  counter-increment: trend;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1.6rem 1fr;
  gap: 0.5rem;
  align-items: start;
}
.trending-list li::before {
  content: counter(trend);
  font-weight: 800;
  color: var(--herald-red);
  font-size: 1.1rem;
  line-height: 1.2;
}
.trending-list a { text-decoration: none; color: var(--ink); font-weight: 600; font-size: 0.95rem; }
.trending-list a:hover { color: var(--herald-red); }

.kicker {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--herald-red);
  font-weight: 700;
  margin: 0 0 0.35rem;
}
h1, h2, h3 { font-family: var(--display); color: var(--navy); line-height: 1.2; }
.lead-story h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 0 0 0.5rem; }
.lead-story h2 a { color: inherit; text-decoration: none; }
.lead-story h2 a:hover { color: var(--herald-red); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  padding: 1rem 0 2rem;
}
.story-card {
  background: var(--white);
  border: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  display: block;
  transition: box-shadow 0.15s;
}
.story-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.story-card img { width: 100%; height: 160px; object-fit: cover; }
.story-card .pad { padding: 0.9rem 1rem 1.1rem; }
.story-card h3 { font-size: 1.05rem; margin: 0.25rem 0 0; color: var(--ink); }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-top: 2px solid var(--navy);
  padding-top: 0.65rem;
  margin: 1.5rem 0 0.75rem;
}
.section-head h2 { margin: 0; font-size: 1.35rem; }
.section-head a { font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }

/* —— article layout —— */
.breadcrumbs { font-size: 0.85rem; color: var(--muted); margin-bottom: 0.75rem; padding-top: 1.25rem; }
.breadcrumbs a { color: var(--muted); }

.page-hero {
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 4px solid var(--herald-red);
  padding: 1.35rem 1.5rem;
  margin-bottom: 0.5rem;
}
.page-hero h1 {
  font-size: clamp(1.5rem, 3vw, 2.35rem);
  margin: 0 0 0.5rem;
  max-width: 44rem;
  line-height: 1.22;
}
.page-hero .subtitle { color: var(--muted); margin: 0; max-width: 40rem; }

.layout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 1.25rem 2rem;
  align-items: start;
  padding-bottom: 2.5rem;
}
.layout-grid > .breadcrumbs,
.layout-grid > .page-hero { grid-column: 1 / -1; }
.layout-grid > .article-body,
.layout-grid > article.prose { grid-column: 1; min-width: 0; }
.layout-grid > .sidebar { grid-column: 2; }

.prose { max-width: 44rem; }
.article-body {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 1.35rem 1.5rem;
}
.article-body p { margin: 0 0 1rem; }
.article-body img, figure img { max-width: 100%; height: auto; }

.sidebar .widget {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 1rem;
  margin-bottom: 1rem;
}
.sidebar h2 {
  font-family: var(--display);
  font-size: 1.1rem;
  margin: 0 0 0.75rem;
  color: var(--navy);
  border-bottom: 2px solid var(--herald-red);
  padding-bottom: 0.35rem;
}
.post-list { list-style: none; padding: 0; margin: 0; }
.post-list li { padding: 0.5rem 0; border-bottom: 1px solid var(--line); }
.post-list a { text-decoration: none; font-weight: 600; color: var(--ink); font-size: 0.92rem; }
.post-list a:hover { color: var(--herald-red); }
.load-more-posts {
  margin-top: 0.75rem;
  background: transparent;
  border: 1px solid var(--herald-red);
  color: var(--herald-red-dark);
  padding: 0.55rem 1rem;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
}

.btn {
  display: inline-block;
  background: var(--herald-red);
  color: #fff !important;
  text-decoration: none;
  padding: 0.65rem 1.15rem;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 0;
  cursor: pointer;
}
.btn-ghost {
  background: transparent;
  color: var(--herald-red-dark) !important;
  border: 1px solid var(--herald-red);
}

.contact-form label { display: block; margin: 0.75rem 0; font-weight: 600; }
.contact-form input, .contact-form textarea {
  display: block; width: 100%; margin-top: 0.35rem;
  padding: 0.6rem 0.75rem; border: 1px solid var(--line);
  font: inherit; background: #fff;
}
.toast { padding: 0.75rem; background: #e8f5e9; border: 1px solid #a5d6a7; }

.site-foot {
  background: var(--navy);
  color: #c8d4e8;
  margin-top: 2.5rem;
  font-family: var(--sans);
}
.site-foot-rule {
  height: 4px;
  background: var(--herald-red);
}
.site-foot-inner {
  width: min(1140px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 1.5rem;
}
.foot-brand {
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  padding-bottom: 1.25rem;
  margin-bottom: 1.5rem;
}
.foot-wordmark {
  display: inline-block;
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 700;
  color: #fff !important;
  text-decoration: none !important;
  line-height: 1.1;
}
.foot-wordmark span {
  display: block;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--herald-red);
  font-weight: 700;
  margin-bottom: 0.15rem;
}
.foot-brand p {
  margin: 0.55rem 0 0;
  max-width: 36rem;
  color: #9eb0cc;
  font-size: 0.95rem;
}
.foot-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}
.foot-col h2 {
  margin: 0 0 0.75rem;
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  font-weight: 700;
}
.foot-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.foot-col li { margin: 0.35rem 0; }
.site-foot a {
  color: #d7e2f3;
  text-decoration: none;
}
.site-foot a:hover { color: #fff; text-decoration: underline; }
.foot-edition {
  margin: 0.35rem 0;
  color: #9eb0cc;
  font-size: 0.92rem;
  line-height: 1.45;
}
.foot-legal {
  background: #071226;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.82rem;
  color: #8fa0bb;
}
.foot-legal .site-foot-inner {
  padding: 0.85rem 0;
}
.foot-legal p { margin: 0; }

.search-result { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.search-empty { padding: 1.5rem; background: var(--white); border: 1px solid var(--line); }

@media (max-width: 900px) {
  .lead-deck { grid-template-columns: 1fr; }
  .masthead-inner { grid-template-columns: 1fr; }
  .masthead-tagline { text-align: left; }
  .layout-grid { grid-template-columns: 1fr; }
  .layout-grid > .sidebar,
  .layout-grid > .article-body,
  .layout-grid > article.prose { grid-column: 1; }
  .header-search { margin-left: 0; width: 100%; order: 9; }
  .foot-cols { grid-template-columns: 1fr; gap: 1.25rem; }
}
