/* ---------- Tokens (estilo inspirado en abc.net.au: fondo claro, azul de acento, tipografía sans bold) ---------- */
:root {
  --bg: #f2f3f5;
  --bg-elevated: #ffffff;
  --bg-elevated-2: #eaf0fa;
  --border: #dfe2e6;
  --text: #14171a;
  --text-muted: #565b61;
  --text-faint: #82878e;
  --accent: #0057b8;
  --accent-strong: #003f87;
  --accent-ink: #ffffff;
  --link: #0057b8;
  --masthead: #14171a;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --radius: 4px;
  --wrap: 1180px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--font-sans); font-weight: 800; line-height: 1.2; margin: 0 0 0.5em; color: var(--text); letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 0; top: -100px; background: var(--accent); color: var(--accent-ink);
  padding: 0.5em 1em; z-index: 100; transition: top 0.15s ease;
}
.skip-link:focus { top: 0; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

.section { padding: 32px 20px; }
.section__title {
  font-size: 1.6rem;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--text);
}

.button {
  display: inline-block; background: var(--accent); color: var(--accent-ink);
  padding: 10px 22px; border-radius: var(--radius); font-weight: 700; text-decoration: none;
}
.button:hover { background: var(--accent-strong); text-decoration: none; }

/* ---------- Header ---------- */
.site-header {
  background: var(--bg-elevated);
  border-bottom: 3px solid var(--text);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 14px 20px;
  flex-wrap: wrap;
}
.site-header__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}
.site-header__logo:hover { text-decoration: none; }
.site-header__logo-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: #ffffff;
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.site-header__logo-text {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--text);
  letter-spacing: -0.02em;
}
.site-header__logo:hover .site-header__logo-text { color: var(--accent); }

.site-nav {
  min-width: 0;
  flex: 1;
}
.site-nav ul {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.site-nav ul::-webkit-scrollbar { display: none; }
.site-nav a {
  display: block;
  white-space: nowrap;
  padding: 8px 14px;
  border-radius: var(--radius);
  color: var(--text);
  font-weight: 700;
  font-size: 0.92rem;
}
.site-nav a:hover { color: var(--accent); background: var(--bg-elevated-2); text-decoration: none; }
.site-nav a.is-active { color: var(--accent-ink); background: var(--accent); }

@media (min-width: 780px) {
  .site-nav ul { justify-content: flex-end; }
}

/* ---------- Tag / category pill ---------- */
.tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent-ink);
  background: var(--accent);
  padding: 4px 10px;
  border-radius: var(--radius);
  margin-bottom: 10px;
}
.tag:hover { text-decoration: none; background: var(--accent-strong); }

/* ---------- Hero (home) ---------- */
.hero {
  display: grid;
  align-items: start;
  gap: 20px;
  padding: 24px 20px 8px;
}
.hero__main {
  background: var(--bg-elevated-2);
  border-radius: var(--radius);
  overflow: hidden;
}
.hero__media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.hero__body { padding: 20px; }
.hero__title { font-size: 1.6rem; }
.hero__title a { color: var(--text); }
.hero__title a:hover { color: var(--accent); text-decoration: none; }
.hero__excerpt { color: var(--text-muted); font-size: 1.02rem; }

.hero__secondary {
  display: grid;
  gap: 16px;
}

@media (min-width: 900px) {
  .hero { grid-template-columns: 1.3fr 1fr; }
  .hero__secondary { grid-template-columns: 1fr; }
  .hero__title { font-size: 2.1rem; }
}

/* ---------- Rieles de noticias por categoría ---------- */
.news-rail__intro { padding: 24px 20px 0; }
.news-rail__intro .section__title { border: none; padding-bottom: 0; margin-bottom: 0; }

.news-rail { padding: 20px 20px 8px; }
.news-rail__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.news-rail__title { font-size: 1.15rem; margin: 0; }
.news-rail__link { font-size: 0.85rem; font-weight: 700; color: var(--accent); white-space: nowrap; }
.news-rail__link:hover { text-decoration: underline; }
.news-rail__track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding-bottom: 12px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.news-rail__track::-webkit-scrollbar { height: 8px; }
.news-rail__track::-webkit-scrollbar-track { background: transparent; }
.news-rail__track::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.news-rail__track .card {
  flex: 0 0 250px;
  scroll-snap-align: start;
}
@media (min-width: 620px) {
  .news-rail__track .card { flex-basis: 270px; }
}

/* ---------- Anuncio nativo ---------- */
.native-ad { padding: 4px 20px 28px; }
.native-ad__inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 16px 44px 16px 18px;
}
.native-ad__badge {
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-faint);
}
.native-ad__icon {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 8px;
}
.native-ad__body { min-width: 0; }
.native-ad__question { margin: 0 0 4px; font-weight: 800; font-size: 1.05rem; color: var(--text); }
.native-ad__cta { margin: 0; font-size: 0.92rem; color: var(--text-muted); }
.native-ad__cta a { font-weight: 700; }

/* ---------- Cards ---------- */
.card-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}
@media (min-width: 620px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 980px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); }
}

.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.card__media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.card__body { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.card__title { font-size: 1.1rem; margin-bottom: 8px; }
.card__title a { color: var(--text); }
.card__title a:hover { color: var(--accent); text-decoration: none; }
.card__excerpt { color: var(--text-muted); font-size: 0.92rem; flex: 1; }

.card__meta {
  color: var(--text-faint);
  font-size: 0.82rem;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

/* ---------- Breadcrumb ---------- */
.breadcrumb { margin-bottom: 16px; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 6px; font-size: 0.85rem; color: var(--text-faint); }
.breadcrumb li:not(:last-child)::after { content: '/'; margin-left: 6px; color: var(--text-faint); }
.breadcrumb a { color: var(--text-muted); }

/* ---------- Category header ---------- */
.category-header__desc { color: var(--text-muted); max-width: 640px; }

/* ---------- Post page ---------- */
.post__header { padding-top: 8px; }
.post__title { font-size: 1.9rem; }
.post__summary {
  margin: 18px 0;
  padding: 16px 18px;
  background: var(--bg-elevated-2);
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  max-width: 720px;
}
.post__summary-label {
  margin: 0 0 6px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
}
.post__summary-text {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text);
}
.post__media { margin: 20px 0; }
.post__media img { width: 100%; border-radius: var(--radius); aspect-ratio: 16 / 9; object-fit: cover; }
.post__content {
  font-family: var(--font-sans);
  font-size: 1.08rem;
  line-height: 1.7;
  max-width: 720px;
}
.post__content p { margin-bottom: 1.2em; }
.post__content strong { color: var(--text); }
.post__source {
  margin-top: 28px;
  padding: 14px 16px;
  background: var(--bg-elevated-2);
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  font-size: 0.92rem;
  color: var(--text-muted);
  max-width: 720px;
}

@media (min-width: 900px) {
  .post__title { font-size: 2.4rem; }
}

/* ---------- About / 404 ---------- */
.about__body { max-width: 680px; color: var(--text-muted); }
.about__disclosure { color: var(--text); font-weight: 700; }
.not-found { text-align: center; padding: 80px 20px; }
.not-found .section__title { border: none; font-size: 4rem; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--masthead);
  margin-top: 48px;
}
.site-footer__inner {
  display: grid;
  gap: 28px;
  padding: 40px 20px;
}
.site-footer__brand { font-family: var(--font-sans); font-size: 1.2rem; font-weight: 800; color: #ffffff; }
.site-footer__desc, .site-footer__disclosure { color: #b7bcc2; font-size: 0.9rem; }
.site-footer__disclosure a { color: #ffffff; font-weight: 700; }
.site-footer__heading { font-weight: 800; text-transform: uppercase; font-size: 0.78rem; letter-spacing: 0.05em; color: #8a8f96; margin-bottom: 10px; }
.site-footer__links li { margin-bottom: 8px; }
.site-footer__links a { color: #b7bcc2; }
.site-footer__links a:hover { color: #ffffff; }
.site-footer__bottom {
  border-top: 1px solid #2a2d31;
  padding: 16px 20px;
  color: #8a8f96;
  font-size: 0.82rem;
}

@media (min-width: 780px) {
  .site-footer__inner { grid-template-columns: 2fr 1fr; }
}
