/* ============================================================
   rm891 — Main Stylesheet
   89 Rádio FM — Missões RS
   ============================================================ */

/* ── Self-hosted fonts ───────────────────────────────────── */
@font-face {
  font-family: 'Syne';
  src: url('../fonts/syne-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Syne';
  src: url('../fonts/syne-600.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Syne';
  src: url('../fonts/syne-700.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Mulish';
  src: url('../fonts/mulish-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Mulish';
  src: url('../fonts/mulish-600.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Mulish';
  src: url('../fonts/mulish-400i.woff2') format('woff2');
  font-weight: 400; font-style: italic; font-display: swap;
}

/* ── Design tokens ───────────────────────────────────────── */
:root {
  --c-primary:      #006D77;
  --c-primary-dark: #004F58;
  --c-secondary:    #FF7F51;
  --c-secondary-dk: #E06030;
  --c-bg:           #F4F8F9;
  --c-surface:      #FFFFFF;
  --c-text:         #1A2B2E;
  --c-muted:        #4E6568;
  --c-border:       #C8E0E3;
  --c-accent-bg:    #E8F5F6;

  --f-display: 'Syne', system-ui, sans-serif;
  --f-body:    'Mulish', system-ui, sans-serif;

  --radius: 0;
  --shadow: 0 2px 12px rgba(0,109,119,.10);
  --shadow-hover: 0 6px 24px rgba(0,109,119,.18);

  --header-h: 60px;
  --container: 1140px;
  --gap: 1.5rem;
}

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--f-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--c-primary); text-decoration: none; }
a:hover { color: var(--c-secondary); }
ul { list-style: none; }

/* ── Layout ──────────────────────────────────────────────── */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gap);
}

/* ── Header — Magazine Masthead ──────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--c-primary);
  height: var(--header-h);
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
}
.header-inner {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gap);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  color: white;
  text-decoration: none;
  flex-shrink: 0;
}
.site-logo:hover { color: var(--c-secondary); }
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-call  { font-family: var(--f-display); font-weight: 700; font-size: 1.1rem; color: white; }
.logo-region { font-family: var(--f-body); font-size: .7rem; font-weight: 600; color: rgba(255,255,255,.7); letter-spacing: .06em; text-transform: uppercase; }

.nav-list { display: flex; gap: .25rem; }
.nav-list li a {
  font-family: var(--f-body);
  font-size: .88rem;
  font-weight: 600;
  color: rgba(255,255,255,.88);
  padding: .35rem .7rem;
  border-radius: var(--radius);
  transition: background .18s, color .18s;
}
.nav-list li a:hover,
.nav-list li.current a {
  background: rgba(255,255,255,.15);
  color: white;
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: .4rem;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: white;
  border-radius: 1px;
  transition: transform .2s;
}

/* ── Intro strip (homepage) ──────────────────────────────── */
.intro-strip {
  background: var(--c-primary);
  color: white;
  padding: 3.5rem var(--gap);
  text-align: center;
}
.intro-title {
  font-family: var(--f-display);
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  font-weight: 700;
  color: white;
  max-width: 720px;
  margin-inline: auto;
  line-height: 1.25;
}
.intro-desc {
  margin-top: .9rem;
  font-size: 1.05rem;
  color: rgba(255,255,255,.82);
  max-width: 620px;
  margin-inline: auto;
}

/* ── Topic card grid ─────────────────────────────────────── */
.topic-grid-section { padding: 3rem 0; }
.section-title {
  font-family: var(--f-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--c-primary);
  margin-bottom: 1.5rem;
  padding-bottom: .6rem;
  border-bottom: 3px solid var(--c-secondary);
  display: inline-block;
}
.topic-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap);
}
.topic-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow .2s, transform .2s;
}
.topic-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}
.card-link { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
.card-thumb { aspect-ratio: 16/9; overflow: hidden; background: var(--c-accent-bg); }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.topic-card:hover .card-thumb img { transform: scale(1.04); }
.card-thumb--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-primary);
  opacity: .45;
}
.card-body { padding: 1.2rem 1.4rem 1.4rem; flex: 1; display: flex; flex-direction: column; }
.card-title { font-family: var(--f-display); font-size: 1.15rem; font-weight: 700; color: var(--c-text); margin-bottom: .5rem; }
.card-desc  { font-size: .9rem; color: var(--c-muted); line-height: 1.55; flex: 1; }
.card-cta   { margin-top: 1rem; font-size: .85rem; font-weight: 700; color: var(--c-secondary); }

/* ── Recent news strip ───────────────────────────────────── */
.recent-news-section {
  background: var(--c-surface);
  border-top: 1px solid var(--c-border);
  padding: 3rem 0;
}
.news-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.news-card { display: flex; flex-direction: column; }
.news-thumb-link { display: block; aspect-ratio: 16/9; overflow: hidden; }
.news-thumb-link img { width: 100%; height: 100%; object-fit: cover; }
.news-body { padding: .9rem 0 0; flex: 1; }
.news-date { font-size: .78rem; color: var(--c-muted); display: block; margin-bottom: .3rem; }
.news-title { font-family: var(--f-display); font-size: 1rem; font-weight: 700; margin-bottom: .4rem; line-height: 1.35; }
.news-title a { color: var(--c-text); }
.news-title a:hover { color: var(--c-primary); }
.news-excerpt { font-size: .88rem; color: var(--c-muted); }
.btn-all-news {
  display: inline-block;
  margin-top: 2rem;
  font-weight: 700;
  font-size: .9rem;
  color: var(--c-primary);
  border-bottom: 2px solid var(--c-secondary);
  padding-bottom: .15rem;
}

/* ── Page hero & content ─────────────────────────────────── */
.page-hero {
  background: var(--c-primary);
  color: white;
  padding: 2.5rem var(--gap);
}
.breadcrumb { font-size: .8rem; color: rgba(255,255,255,.65); margin-bottom: .5rem; }
.breadcrumb a { color: rgba(255,255,255,.75); }
.breadcrumb a:hover { color: white; }
.page-title {
  font-family: var(--f-display);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700;
  color: white;
  max-width: var(--container);
}
.page-featured-img { margin: 2rem 0 0; }
.page-featured-img img { width: 100%; max-height: 480px; object-fit: cover; }
.page-content { padding: 2.5rem var(--gap); }

/* ── Entry content ───────────────────────────────────────── */
.entry-content {
  max-width: 760px;
  font-size: 1.02rem;
  line-height: 1.8;
}
.entry-content h2 {
  font-family: var(--f-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--c-primary);
  margin: 2rem 0 .8rem;
  padding-left: .8rem;
  border-left: 4px solid var(--c-secondary);
}
.entry-content h3 {
  font-family: var(--f-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--c-text);
  margin: 1.6rem 0 .5rem;
}
.entry-content p { margin-bottom: 1.1rem; }
.entry-content ul, .entry-content ol { padding-left: 1.4rem; margin-bottom: 1.1rem; list-style: disc; }
.entry-content ol { list-style: decimal; }
.entry-content li { margin-bottom: .35rem; }
.entry-content table { width: 100%; border-collapse: collapse; margin-bottom: 1.5rem; font-size: .93rem; }
.entry-content th { background: var(--c-primary); color: white; font-family: var(--f-display); font-weight: 600; padding: .6rem .8rem; text-align: left; }
.entry-content td { border: 1px solid var(--c-border); padding: .5rem .8rem; }
.entry-content tr:nth-child(even) td { background: var(--c-accent-bg); }
.entry-content strong { font-weight: 700; }
.entry-content a { color: var(--c-primary); text-decoration: underline; text-underline-offset: 3px; }

/* ── Infographic figure ──────────────────────────────────── */
.infographic-figure {
  margin: 2rem 0;
  border: 1px solid var(--c-border);
  background: var(--c-bg);
  overflow: hidden;
}
.infographic-figure figcaption {
  font-size: .8rem;
  color: var(--c-muted);
  padding: .5rem .8rem;
  border-top: 1px solid var(--c-border);
  text-align: center;
}
.infographic-svg { display: block; width: 100%; height: auto; }

/* ── FAQ ─────────────────────────────────────────────────── */
.rm891-faq { margin: 2.5rem 0; }
.faq-item {
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  margin-bottom: .75rem;
  overflow: hidden;
}
.faq-q {
  font-family: var(--f-display);
  font-size: 1rem;
  font-weight: 600;
  background: var(--c-accent-bg);
  color: var(--c-primary);
  padding: .85rem 1.1rem;
  border-bottom: 1px solid var(--c-border);
}
.faq-a { padding: .85rem 1.1rem; font-size: .95rem; line-height: 1.7; }

/* ── Archive ─────────────────────────────────────────────── */
.archive-page { padding: 2rem var(--gap) 3rem; }
.archive-header { margin-bottom: 2rem; }
.archive-tag { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--c-secondary); }
.archive-title {
  font-family: var(--f-display);
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 700;
  color: var(--c-primary);
  margin-top: .5rem;
}
.archive-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gap); }
.archive-card { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); overflow: hidden; }
.archive-thumb-link { display: block; aspect-ratio: 16/9; overflow: hidden; }
.archive-thumb-link img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.archive-card:hover .archive-thumb-link img { transform: scale(1.04); }
.archive-card-body { padding: 1rem 1.2rem 1.2rem; }
.archive-date { font-size: .78rem; color: var(--c-muted); display: block; margin-bottom: .3rem; }
.archive-card-title { font-family: var(--f-display); font-size: 1.05rem; font-weight: 700; margin-bottom: .5rem; line-height: 1.35; }
.archive-card-title a { color: var(--c-text); }
.archive-card-title a:hover { color: var(--c-primary); }
.archive-excerpt { font-size: .9rem; color: var(--c-muted); margin-bottom: .8rem; }
.archive-read-more { font-size: .85rem; font-weight: 700; color: var(--c-secondary); }

/* ── Single post ─────────────────────────────────────────── */
.single-header { padding: 2.5rem var(--gap) 2rem; background: var(--c-surface); border-bottom: 1px solid var(--c-border); }
.single-title { font-family: var(--f-display); font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 700; color: var(--c-text); margin-top: .5rem; }
.single-meta  { margin-top: .6rem; font-size: .88rem; color: var(--c-muted); display: flex; gap: .5rem; align-items: center; }
.single-featured { margin-bottom: 1.5rem; padding: 0 var(--gap); }
.single-featured img { width: 100%; max-height: 480px; object-fit: cover; }
.single-content { padding: 2rem var(--gap) 3rem; }
.single-footer { padding: 1.5rem var(--gap); border-top: 1px solid var(--c-border); background: var(--c-surface); }
.post-nav { display: flex; justify-content: space-between; gap: 1rem; }
.post-nav a { font-size: .88rem; font-weight: 600; color: var(--c-primary); }
.post-nav a:hover { color: var(--c-secondary); }

/* ── Footer ──────────────────────────────────────────────── */
.site-footer {
  background: var(--c-primary-dark);
  color: rgba(255,255,255,.82);
  padding-top: 2.5rem;
}
.footer-inner {
  max-width: var(--container);
  margin-inline: auto;
  padding: 0 var(--gap) 2rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
}
.footer-logo { display: flex; align-items: center; gap: .5rem; color: white; font-family: var(--f-display); font-size: 1.05rem; font-weight: 700; margin-bottom: .5rem; text-decoration: none; }
.footer-logo:hover { color: var(--c-secondary); }
.footer-tagline { font-size: .82rem; color: rgba(255,255,255,.55); max-width: 260px; line-height: 1.5; }
.footer-contact-line { font-size: .78rem; color: rgba(255,255,255,.45); margin-top: .4rem; max-width: 300px; line-height: 1.5; }
.footer-contact-line a { color: rgba(255,255,255,.75); text-decoration: underline; }
.footer-nav-list { display: flex; flex-direction: column; gap: .5rem; }
.footer-nav-list a { font-size: .88rem; color: rgba(255,255,255,.72); text-decoration: none; }
.footer-nav-list a:hover { color: white; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12);
  text-align: center;
  padding: 1rem var(--gap);
  font-size: .78rem;
  color: rgba(255,255,255,.4);
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn-primary {
  display: inline-block;
  background: var(--c-secondary);
  color: white;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: .9rem;
  padding: .7rem 1.4rem;
  border-radius: var(--radius);
  transition: background .18s;
  text-decoration: none;
}
.btn-primary:hover { background: var(--c-secondary-dk); color: white; }

/* ── Error page ──────────────────────────────────────────── */
.error-page { padding: 5rem var(--gap); text-align: center; }
.error-page h1 { font-family: var(--f-display); font-size: 2rem; color: var(--c-primary); margin-bottom: 1rem; }
.error-page p { color: var(--c-muted); margin-bottom: 1.5rem; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .topic-grid   { grid-template-columns: 1fr; }
  .news-row     { grid-template-columns: 1fr; }
  .archive-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; }

  .site-nav { display: none; position: absolute; top: var(--header-h); left: 0; right: 0; background: var(--c-primary-dark); padding: 1rem var(--gap); }
  .site-nav.is-open { display: block; }
  .nav-list { flex-direction: column; gap: 0; }
  .nav-list li a { display: block; padding: .65rem .5rem; border-bottom: 1px solid rgba(255,255,255,.08); }
  .nav-toggle { display: flex; }
}
