/* ============================================
   Site Educativo - Golpe do Falso Advogado
   Paleta inspirada em gov.br (institucional)
   ============================================ */

:root {
  --primary: #1351b4;
  --primary-dark: #0d3d87;
  --primary-light: #2378c3;
  --primary-bg: #dbe8fb;
  --accent: #168821;
  --accent-hover: #0f6b18;
  --bg: #f0f4f8;
  --bg-white: #ffffff;
  --text: #1b1b1b;
  --text-muted: #4a4a4a;
  --border: #c5d4eb;
  --bar-dark: #0d3d87;
  --font-sans: "Source Sans 3", "Source Sans Pro", "Segoe UI", system-ui, sans-serif;
  --font-serif: "Source Serif 4", Georgia, serif;
  --max-width: 720px;
  --container: min(92vw, 960px);
  --space: 1.5rem;
  --radius: 4px;
}

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

html {
  font-size: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.skip-link {
  position: absolute;
  top: -3rem;
  left: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--primary);
  color: white;
  text-decoration: none;
  z-index: 100;
  border-radius: var(--radius);
  transition: top 0.2s;
}
.skip-link:focus {
  top: 0.5rem;
  outline: 2px solid white;
  outline-offset: 2px;
}

/* ----- Header (estilo institucional gov.br) ----- */
.site-header {
  background: var(--bg-white);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-bar {
  background: var(--bar-dark);
  color: white;
  font-size: 0.875rem;
  padding: 0.35rem 0;
}

.header-bar .container {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.bar-text {
  opacity: 0.95;
}

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

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space);
}

.site-logo {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.site-logo:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.nav-main ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

.nav-main a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}
.nav-main a:hover,
.nav-main a[aria-current="page"] {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 1px solid var(--border);
  padding: 0.5rem;
  border-radius: var(--radius);
  cursor: pointer;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
}

@media (max-width: 640px) {
  .nav-main {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-white);
    padding: var(--space);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    display: none;
  }
  .nav-main.is-open {
    display: block;
  }
  .nav-main ul {
    flex-direction: column;
    gap: 0;
  }
  .nav-main a {
    display: block;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
  }
  .nav-toggle {
    display: flex;
  }
}

/* ----- Container ----- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space);
}

/* ----- Main content ----- */
.main-content {
  padding: 2rem 0 3rem;
  min-height: 50vh;
}

/* ----- Página inicial (blog) ----- */
.page-home .intro {
  background: linear-gradient(135deg, var(--primary-bg) 0%, var(--bg-white) 100%);
  border-left: 4px solid var(--primary);
  padding: 1.5rem 1.75rem;
  margin-bottom: 2rem;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.page-home .intro h1 {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  color: var(--primary-dark);
}

.page-home .intro p {
  margin: 0;
  color: var(--text-muted);
  font-size: 1rem;
}

.post-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.post-item {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  transition: box-shadow 0.2s;
}

.post-item:hover {
  box-shadow: 0 4px 12px rgba(19, 81, 180, 0.08);
}

.post-item h2 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.35;
}

.post-item h2 a {
  color: var(--text);
  text-decoration: none;
}
.post-item h2 a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.post-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.post-excerpt {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

/* ----- Layout de post (long-form) ----- */
.layout-post .article-header {
  margin-bottom: 2rem;
}

.layout-post .article-title {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--primary-dark);
  margin: 0 0 0.75rem;
}

.layout-post .article-meta {
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.layout-post .article-content {
  max-width: var(--max-width);
  margin: 0 auto;
}

.layout-post .article-content h2 {
  font-size: 1.35rem;
  margin: 2rem 0 1rem;
  color: var(--primary-dark);
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
}

.layout-post .article-content h3 {
  font-size: 1.15rem;
  margin: 1.5rem 0 0.75rem;
  color: var(--text);
}

.layout-post .article-content p {
  margin: 0 0 1rem;
}

.layout-post .article-content ul,
.layout-post .article-content ol {
  margin: 0 0 1rem;
  padding-left: 1.5rem;
}

.layout-post .article-content li {
  margin-bottom: 0.35rem;
}

.layout-post .article-content strong {
  color: var(--text);
}

.layout-post .article-content a {
  color: var(--primary);
  text-decoration: underline;
}
.layout-post .article-content a:hover {
  color: var(--primary-dark);
}

/* Caixas de destaque (alerta / dica) */
.callout {
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  border-radius: var(--radius);
  border-left: 4px solid;
}

.callout.warning {
  background: #fff8e6;
  border-color: #b38600;
  color: #5c4a00;
}

.callout.info {
  background: var(--primary-bg);
  border-color: var(--primary);
  color: var(--primary-dark);
}

.callout.success {
  background: #e6f4ea;
  border-color: var(--accent);
  color: #0f6b18;
}

.callout strong {
  display: block;
  margin-bottom: 0.35rem;
}

/* ----- Página Sobre ----- */
.page-sobre .content-wrap {
  max-width: var(--max-width);
}

.page-sobre h1 {
  color: var(--primary-dark);
  margin-bottom: 1rem;
}

.page-sobre p {
  margin-bottom: 1rem;
}

/* ----- Footer ----- */
.site-footer {
  background: var(--primary-dark);
  color: white;
  padding: 2rem 0 1.5rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.footer-brand strong {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.footer-brand p,
.footer-links p {
  margin: 0 0 0.5rem;
  opacity: 0.9;
  font-size: 0.9375rem;
}

.footer-links ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.35rem;
}

.footer-links a {
  color: white;
  text-decoration: underline;
  opacity: 0.95;
}
.footer-links a:hover {
  opacity: 1;
}

.footer-bottom {
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.2);
  font-size: 0.875rem;
  opacity: 0.85;
}

.footer-bottom p {
  margin: 0;
}

/* ----- Utilitários ----- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
