/* Corredor Nacional — transportebr.info
   Design: regional-press | urban-slate | mixed-newsroom */

:root {
  /* urban-slate palette */
  --slate-950: #1a1f24;
  --slate-900: #252b32;
  --slate-800: #343b44;
  --slate-700: #4a5360;
  --slate-600: #5f6978;
  --slate-500: #7a8494;
  --slate-400: #9aa3b0;
  --slate-300: #b8bfc9;
  --slate-200: #d4d9df;
  --slate-100: #e8ebee;
  --slate-50: #f4f5f7;
  --accent: #c45c3e;
  --accent-hover: #a84d34;
  --white: #ffffff;
  --overlay: rgba(26, 31, 36, 0.72);

  /* spacing — tight scale */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;

  /* radius — sharp */
  --radius: 1px;
  --radius-sm: 0;

  /* typography — mixed-newsroom */
  --font-display: "Georgia", "Times New Roman", serif;
  --font-body: "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Courier New", monospace;

  --container: 960px;
  --sidebar-width: 220px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--slate-900);
  background: var(--white);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--slate-900);
  text-decoration: underline;
  text-decoration-color: var(--slate-300);
  text-underline-offset: 2px;
  transition: color 0.15s, text-decoration-color 0.15s;
}

a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--s-4);
}

/* ---- Cookie top-strip ---- */
.cookie-strip {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--slate-900);
  color: var(--slate-200);
  font-size: 0.8125rem;
  padding: var(--s-2) var(--s-4);
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
}

.cookie-strip.is-visible {
  display: flex;
}

.cookie-strip p {
  flex: 1;
  line-height: 1.4;
}

.cookie-strip a {
  color: var(--slate-100);
}

body.has-cookie .site-header {
  margin-top: 36px;
}

/* ---- Header: double-row-nav ---- */
.site-header {
  border-bottom: 1px solid var(--slate-200);
}

.header-top {
  background: var(--slate-950);
  color: var(--slate-300);
  font-size: 0.75rem;
  padding: var(--s-1) 0;
}

.header-top .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-top a {
  color: var(--slate-300);
  text-decoration: none;
}

.header-top a:hover {
  color: var(--white);
}

.header-main {
  padding: var(--s-3) 0;
}

.header-main .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  font-family: var(--font-display);
  font-size: 1.625rem;
  font-weight: 700;
  color: var(--slate-950);
  text-decoration: none;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.site-logo span {
  display: block;
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--slate-500);
  margin-top: var(--s-1);
}

/* nav: horizontal-underline */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--slate-300);
  padding: var(--s-1) var(--s-2);
  cursor: pointer;
  font-size: 0.8125rem;
  color: var(--slate-800);
  border-radius: var(--radius);
}

.nav-primary {
  display: flex;
  gap: var(--s-4);
  list-style: none;
}

.nav-primary a {
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--slate-700);
  padding-bottom: var(--s-1);
  border-bottom: 2px solid transparent;
}

.nav-primary a:hover,
.nav-primary a.is-active {
  color: var(--slate-950);
  border-bottom-color: var(--accent);
}

.header-nav-row {
  border-top: 1px solid var(--slate-100);
  padding: var(--s-2) 0;
}

.header-nav-row .container {
  display: flex;
  justify-content: center;
}

.nav-secondary {
  display: flex;
  gap: var(--s-5);
  list-style: none;
}

.nav-secondary a {
  text-decoration: none;
  font-size: 0.8125rem;
  color: var(--slate-600);
  padding-bottom: var(--s-1);
  border-bottom: 2px solid transparent;
}

.nav-secondary a:hover {
  color: var(--slate-900);
  border-bottom-color: var(--slate-400);
}

/* ---- Buttons: outlined ---- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: var(--s-2) var(--s-4);
  border: 1px solid var(--slate-800);
  background: transparent;
  color: var(--slate-800);
  cursor: pointer;
  text-decoration: none;
  border-radius: var(--radius);
  transition: background 0.15s, color 0.15s;
}

.btn:hover {
  background: var(--slate-900);
  color: var(--white);
  text-decoration: none;
}

.btn-accent {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-accent:hover {
  background: var(--accent);
  color: var(--white);
}

.btn-sm {
  padding: var(--s-1) var(--s-3);
  font-size: 0.75rem;
}

/* ---- Tags: uppercase-small ---- */
.tag {
  display: inline-block;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  text-decoration: none;
}

.tag:hover {
  color: var(--accent-hover);
}

/* ---- Hero: full-width-image + overlay ---- */
.hero {
  position: relative;
  width: 100%;
  aspect-ratio: 21 / 9;
  overflow: hidden;
  background: var(--slate-800);
}

.hero img,
.hero svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: var(--overlay);
  display: flex;
  align-items: flex-end;
  padding: var(--s-5);
}

.hero-content {
  max-width: var(--container);
  margin: 0 auto;
  width: 100%;
  padding: 0 var(--s-4);
  color: var(--white);
}

.hero-content .tag {
  color: var(--slate-200);
  margin-bottom: var(--s-2);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: var(--s-2);
}

.hero-title a {
  color: var(--white);
  text-decoration: none;
}

.hero-title a:hover {
  text-decoration: underline;
  text-decoration-color: var(--accent);
}

.hero-meta {
  font-size: 0.8125rem;
  color: var(--slate-300);
}

/* ---- 8-col-asymmetric grid ---- */
.grid-8 {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: var(--s-4);
}

.col-5 { grid-column: span 5; }
.col-3 { grid-column: span 3; }
.col-6 { grid-column: span 6; }
.col-2 { grid-column: span 2; }
.col-8 { grid-column: span 8; }
.col-4 { grid-column: span 4; }

/* ---- Homepage: editorial-columns + magazine-columns ---- */
.section {
  padding: var(--s-5) 0;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--slate-950);
  padding-bottom: var(--s-2);
  border-bottom: 2px solid var(--slate-950);
  margin-bottom: var(--s-4);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* cards: bordered */
.card {
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
}

.card-body {
  padding: var(--s-3);
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: var(--s-2);
}

.card-title a {
  text-decoration: none;
  color: var(--slate-950);
}

.card-title a:hover {
  color: var(--accent);
}

.card-excerpt {
  font-size: 0.875rem;
  color: var(--slate-600);
  line-height: 1.5;
  margin-bottom: var(--s-2);
}

/* image: 4:3-soft */
.img-4-3 {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--slate-100);
}

.img-4-3 img,
.img-4-3 svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* author: inline-byline */
.byline {
  font-size: 0.75rem;
  color: var(--slate-500);
}

.byline a {
  color: var(--slate-700);
  text-decoration: none;
  font-weight: 600;
}

.byline a:hover {
  color: var(--accent);
}

.byline time {
  color: var(--slate-400);
}

/* magazine-columns article_list */
.article-list {
  column-count: 2;
  column-gap: var(--s-5);
}

.article-list-item {
  break-inside: avoid;
  margin-bottom: var(--s-4);
  padding-bottom: var(--s-4);
  border-bottom: 1px solid var(--slate-100);
}

.article-list-item:last-child {
  border-bottom: none;
}

/* ---- Sidebar: left-rail ---- */
.layout-sidebar-left {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  gap: var(--s-5);
  align-items: start;
}

.sidebar {
  position: sticky;
  top: var(--s-4);
}

.sidebar-block {
  margin-bottom: var(--s-5);
  padding-bottom: var(--s-4);
  border-bottom: 1px solid var(--slate-200);
}

.sidebar-block:last-child {
  border-bottom: none;
}

.sidebar-heading {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--slate-500);
  margin-bottom: var(--s-3);
}

.sidebar-list {
  list-style: none;
}

.sidebar-list li {
  margin-bottom: var(--s-2);
  font-size: 0.8125rem;
  line-height: 1.4;
}

.sidebar-list a {
  text-decoration: none;
  color: var(--slate-700);
}

.sidebar-list a:hover {
  color: var(--accent);
}

.sidebar-list time {
  display: block;
  font-size: 0.6875rem;
  color: var(--slate-400);
  margin-top: 2px;
}

/* ---- Article: sidebar-article ---- */
.article-header {
  margin-bottom: var(--s-5);
  padding-bottom: var(--s-4);
  border-bottom: 1px solid var(--slate-200);
}

.article-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--slate-950);
  margin: var(--s-3) 0;
}

.article-lead {
  font-family: var(--font-display);
  font-size: 1.125rem;
  color: var(--slate-600);
  line-height: 1.5;
  margin-bottom: var(--s-3);
}

.article-updated {
  font-size: 0.75rem;
  color: var(--slate-400);
  font-style: italic;
}

.article-body {
  font-size: 1rem;
  line-height: 1.65;
}

.article-body h2 {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 700;
  margin: var(--s-5) 0 var(--s-3);
  color: var(--slate-950);
}

.article-body h3 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  margin: var(--s-4) 0 var(--s-2);
  color: var(--slate-800);
}

.article-body p {
  margin-bottom: var(--s-3);
}

.article-body ul,
.article-body ol {
  margin: 0 0 var(--s-3) var(--s-4);
}

.article-body li {
  margin-bottom: var(--s-1);
}

.article-body blockquote {
  border-left: 3px solid var(--accent);
  padding: var(--s-2) var(--s-4);
  margin: var(--s-4) 0;
  font-family: var(--font-display);
  font-style: italic;
  color: var(--slate-600);
  background: var(--slate-50);
}

.author-box {
  display: flex;
  gap: var(--s-3);
  padding: var(--s-4);
  border: 1px solid var(--slate-200);
  margin: var(--s-5) 0;
  border-radius: var(--radius);
}

.author-box-avatar {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--slate-100);
}

.author-box-name {
  font-weight: 700;
  font-size: 0.9375rem;
  margin-bottom: var(--s-1);
}

.author-box-bio {
  font-size: 0.8125rem;
  color: var(--slate-600);
  line-height: 1.45;
}

/* related articles — inline links */
.related-articles {
  margin: var(--s-5) 0;
  padding: var(--s-4);
  background: var(--slate-50);
  border-radius: var(--radius);
}

.related-articles h3 {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--slate-500);
  margin-bottom: var(--s-2);
}

.related-articles p {
  font-size: 0.875rem;
  line-height: 1.6;
}

.related-articles a {
  font-weight: 600;
}

/* ---- Page content (about, legal) ---- */
.page-header {
  padding: var(--s-5) 0 var(--s-4);
  border-bottom: 1px solid var(--slate-200);
  margin-bottom: var(--s-5);
}

.page-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--slate-950);
  margin-bottom: var(--s-2);
}

.page-subtitle {
  font-size: 1rem;
  color: var(--slate-500);
}

.prose {
  max-width: 680px;
}

.prose h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  margin: var(--s-5) 0 var(--s-3);
}

.prose p {
  margin-bottom: var(--s-3);
  line-height: 1.65;
}

.prose ul {
  margin: 0 0 var(--s-3) var(--s-4);
}

.prose li {
  margin-bottom: var(--s-1);
}

/* ---- Contact form ---- */
.contact-form {
  max-width: 480px;
}

.form-group {
  margin-bottom: var(--s-3);
}

.form-group label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: var(--s-1);
  color: var(--slate-700);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: var(--s-2);
  border: 1px solid var(--slate-300);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: var(--slate-900);
  background: var(--white);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: 2px solid var(--slate-400);
  outline-offset: 1px;
}

/* ---- Footer: three-column ---- */
.site-footer {
  background: var(--slate-950);
  color: var(--slate-400);
  padding: var(--s-5) 0 var(--s-4);
  margin-top: var(--s-5);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-5);
  margin-bottom: var(--s-5);
}

.footer-col h4 {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--slate-200);
  margin-bottom: var(--s-3);
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: var(--s-2);
}

.footer-col a {
  color: var(--slate-400);
  text-decoration: none;
  font-size: 0.8125rem;
}

.footer-col a:hover {
  color: var(--white);
}

.footer-col p {
  font-size: 0.8125rem;
  line-height: 1.5;
}

.footer-bottom {
  border-top: 1px solid var(--slate-800);
  padding-top: var(--s-4);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
}

.footer-bottom a {
  color: var(--slate-400);
  text-decoration: none;
}

.footer-bottom a:hover {
  color: var(--white);
}

/* ---- Articles listing ---- */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-4);
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav-primary {
    display: none;
    position: absolute;
    top: 100%;
    right: var(--s-4);
    background: var(--white);
    border: 1px solid var(--slate-200);
    flex-direction: column;
    padding: var(--s-3);
    gap: var(--s-2);
    z-index: 100;
    min-width: 180px;
  }

  .nav-primary.is-open {
    display: flex;
  }

  .header-main .container {
    position: relative;
  }

  .header-nav-row {
    display: none;
  }

  .grid-8 {
    grid-template-columns: 1fr;
  }

  .col-5, .col-3, .col-6, .col-2, .col-8, .col-4 {
    grid-column: span 1;
  }

  .layout-sidebar-left {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    order: 2;
  }

  .article-list {
    column-count: 1;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--s-4);
  }

  .articles-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    aspect-ratio: 16 / 9;
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--s-2);
    text-align: center;
  }
}
