/* ============================================
   PASSA NO CONCURSO — CSS Unificado vFinal
   Baseado no design enviado pelo usuário
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --primary: #1e3a5f;
  --primary-dark: #0f172a;
  --accent: #2563eb;
  --accent-light: #3b82f6;
  --success: #16a34a;
  --warning: #f59e0b;
  --danger: #dc2626;
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-hover: #f8fafc;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --bg: #0f172a;
  --surface: #1e293b;
  --surface-hover: #334155;
  --border: #334155;
  --text: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ===== HEADER ===== */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.logo-icon { font-size: 1.5rem; }

.logo img { height: 52px; width: auto; }

.main-nav {
  display: none;
  align-items: center;
  gap: 0.25rem;
}

.main-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition);
  white-space: nowrap;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--primary);
  background: rgba(30, 58, 95, 0.08);
}

.dark-toggle,
.menu-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--surface-hover);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  transition: var(--transition);
}

.dark-toggle:hover,
.menu-toggle:hover { background: var(--border); }

/* ===== POPUP MENU ===== */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.popup-overlay.active { opacity: 1; visibility: visible; }

.popup-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: min(320px, 85vw);
  height: 100vh;
  background: var(--surface);
  z-index: 2001;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.popup-overlay.active .popup-menu { transform: translateX(0); }

.popup-header {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--primary);
  color: white;
}

.popup-header h3 {
  font-size: 1rem;
  font-weight: 600;
}

.popup-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.2);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  transition: var(--transition);
}

.popup-close:hover { background: rgba(255,255,255,0.3); }

.popup-nav {
  padding: 1rem 0;
  flex: 1;
}

.popup-nav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.25rem;
  color: var(--text);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: var(--transition);
  border-left: 3px solid transparent;
}

.popup-nav a:hover {
  background: var(--surface-hover);
  border-left-color: var(--accent);
  color: var(--accent);
}

.popup-footer {
  padding: 1rem;
  border-top: 1px solid var(--border);
}

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: white;
  padding: 52px 0;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  padding: 0.375rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.text-accent { color: #60a5fa; }

.hero-desc {
  font-size: 1.125rem;
  opacity: 0.9;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-search {
  max-width: 600px;
  margin: 0 auto 1.5rem;
  position: relative;
}

.hero-search input {
  width: 100%;
  padding: 1rem 3rem 1rem 1.25rem;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  background: white;
  color: var(--text);
  box-shadow: var(--shadow-lg);
}

.hero-search input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.3), var(--shadow-lg);
}

.hero-search button {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: none;
  background: var(--accent);
  color: white;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.hero-search button:hover { background: var(--primary); }

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
}

.hero-tags span { opacity: 0.8; }

.hero-tags a {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.375rem 0.875rem;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  color: white;
  border-radius: 9999px;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition);
  border: 1px solid rgba(255,255,255,0.2);
}

.hero-tags a:hover {
  background: rgba(255,255,255,0.25);
  transform: translateY(-1px);
}

/* ===== STATS BAR ===== */
.stats-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.stat-item { text-align: center; }

.stat-number {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--accent);
  display: block;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ===== MAIN GRID ===== */
.main-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding: 2rem 0;
}

.content-main { min-width: 0; }

.content-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ===== SECTION HEADER ===== */
.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
}

/* ===== FILTER TABS ===== */
.filter-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-tabs button {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.filter-tabs button:hover,
.filter-tabs button.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* ===== ARTICLES GRID ===== */
.articles-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.article-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-light);
}

.article-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: var(--surface-hover);
}

.article-card-body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; }

.article-card-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.75rem;
  background: rgba(37,99,235,0.1);
  color: var(--accent);
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
  width: fit-content;
}

.article-card h3 {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.article-card p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
  flex: 1;
}

.article-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: var(--text-muted);
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.load-more {
  text-align: center;
  margin-top: 2rem;
}

/* ===== WIDGETS ===== */
.widget {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}

.widget-highlight {
  background: linear-gradient(135deg, var(--accent) 0%, var(--primary) 100%);
  color: white;
  border: none;
}

.widget-title {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  font-size: 0.9375rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.widget-highlight .widget-title {
  border-bottom-color: rgba(255,255,255,0.2);
  color: white;
}

.widget-body { padding: 1rem 1.25rem; }

.widget-highlight .widget-body { color: rgba(255,255,255,0.9); }

.widget-text {
  font-size: 0.9375rem;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.widget-hint {
  display: block;
  font-size: 0.75rem;
  opacity: 0.7;
  margin-top: 0.75rem;
}

/* ===== EDITAL LIST ===== */
.edital-list { display: flex; flex-direction: column; }

.edital-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.edital-row:last-child { border-bottom: none; }

.edital-row:hover { background: var(--surface-hover); }

.edital-row-main { flex: 1; min-width: 0; }

.edital-row-org {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.edital-row-title {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.edital-row-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}

.edital-row.urgent { border-left: 3px solid var(--danger); }

/* ===== MATERIAS LIST ===== */
.materias-list { list-style: none; }

.materias-list li { border-bottom: 1px solid var(--border); }

.materias-list li:last-child { border-bottom: none; }

.materias-list a {
  display: block;
  padding: 0.875rem 1.25rem;
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

.materias-list a:hover { background: var(--surface-hover); }

.materia-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.375rem;
  font-size: 0.875rem;
}

.materia-name { font-weight: 600; color: var(--text); }

.materia-pct { color: var(--accent); font-weight: 700; }

.materia-track {
  height: 6px;
  background: var(--bg);
  border-radius: 9999px;
  overflow: hidden;
}

.materia-fill {
  height: 100%;
  border-radius: 9999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  transition: width 1s ease;
}

/* ===== POPULAR LIST ===== */
.popular-list { list-style: none; padding: 0; }

.popular-list li {
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border);
  counter-increment: popular;
}

.popular-list li:last-child { border-bottom: none; }

.popular-list li::before {
  content: counter(popular) ".";
  font-weight: 700;
  color: var(--accent);
  margin-right: 0.5rem;
}

.popular-list a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition);
}

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

/* ===== PUSH POPUP (NOVO POSICIONAMENTO) ===== */
.push-popup {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 320px;
  max-width: calc(100vw - 40px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  box-shadow: var(--shadow-lg);
  z-index: 150;
  transform: translateY(150%);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.push-popup.show { transform: translateY(0); }

.push-popup .close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--transition);
}

.push-popup .close:hover { background: var(--surface-hover); }

.push-popup h4 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
  padding-right: 24px;
}

.push-popup p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 14px;
  line-height: 1.5;
}

.push-popup .btn { width: 100%; font-size: 0.9rem; padding: 10px; }

.push-icon { font-size: 1.4rem; }

/* ===== COOKIE BANNER (NO POSICIONAMENTO DO ALERTA ANTIGO) ===== */
.cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  max-width: 420px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  box-shadow: var(--shadow-lg);
  z-index: 160;
  transform: translateY(150%);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cookie-banner.show { transform: translateY(0); }

.cookie-banner .close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: var(--text-muted);
}

.cookie-banner h4 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.cookie-banner p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 14px;
  line-height: 1.5;
}

.cookie-banner a { color: var(--accent); text-decoration: underline; }

.cookie-actions-popup {
  display: flex;
  gap: 8px;
}

.cookie-actions-popup .btn { flex: 1; font-size: 0.85rem; padding: 8px; }

/* ===== FOOTER ===== */
.site-footer {
  background: var(--primary);
  color: rgba(255,255,255,0.8);
  padding: 3rem 0 1.5rem;
  margin-top: 3rem;
}

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

.footer-brand .logo {
  color: white;
  margin-bottom: 0.75rem;
}

.footer-brand p {
  font-size: 0.9375rem;
  color: rgba(255,255,255,0.7);
  max-width: 300px;
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.footer-col h4 {
  color: white;
  font-size: 0.9375rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.footer-col a {
  display: block;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
  transition: var(--transition);
}

.footer-col a:hover {
  color: white;
  transform: translateX(2px);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.6);
}

/* ===== PAGE HEADER ===== */
.page-header {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: white;
  padding: 52px 0;
  text-align: center;
}

.page-header h1 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
}

/* ===== PAGE CONTENT ===== */
.page-content {
  max-width: 760px;
  margin: 0 auto;
  padding: 36px 20px;
  font-size: 1rem;
  line-height: 1.85;
  color: var(--text-secondary);
}

.page-content h1 {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 14px;
}

.page-content h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin: 28px 0 10px;
}

.page-content p { margin-bottom: 14px; }

.page-content ul,
.page-content ol {
  margin: 8px 0 14px 22px;
}

.page-content li { margin-bottom: 5px; }

/* ===== VALUES CARDS ===== */
.values {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.value-card {
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px;
  text-align: center;
}

.value-icon { font-size: 1.8rem; margin-bottom: 6px; }

.value-title { font-weight: 700; font-size: 0.95rem; color: var(--text); }

.value-desc { font-size: 0.82rem; color: var(--text-muted); margin-top: 4px; }

/* ===== CONTACT ===== */
.contact-grid {
  max-width: 800px;
  margin: 0 auto;
  padding: 36px 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.contact-form-inner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}

.contact-form-inner h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--text);
}

.contact-form-inner input,
.contact-form-inner textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9rem;
  margin-bottom: 10px;
  outline: none;
  background: var(--bg);
  color: var(--text);
  transition: var(--transition);
}

.contact-form-inner input:focus,
.contact-form-inner textarea:focus { border-color: var(--primary); }

.contact-form-inner textarea { resize: vertical; min-height: 90px; }

.contact-info h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--text);
}

.contact-info p {
  margin-bottom: 10px;
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.contact-info strong { color: var(--text); }

/* ===== ARTICLE PAGE ===== */
.article-header-page {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: white;
  padding: 52px 0 36px;
}

.article-header-page .container { max-width: 800px; }

.article-category {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  padding: 5px 12px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.article-title {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 12px;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.82rem;
  opacity: 0.85;
}

.article-cover {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 0 0 12px 12px;
  margin-top: -16px;
  position: relative;
  z-index: 2;
}

.article-body {
  max-width: 800px;
  margin: 0 auto;
  padding: 32px 20px;
  font-size: 1rem;
  line-height: 1.85;
  color: var(--text-secondary);
}

.article-body h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  margin: 32px 0 12px;
}

.article-body h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin: 22px 0 10px;
}

.article-body p { margin-bottom: 16px; }

.article-body strong { font-weight: 700; color: var(--text); }

.article-body blockquote {
  border-left: 4px solid var(--primary);
  padding-left: 18px;
  margin: 20px 0;
  color: var(--text-secondary);
  font-style: italic;
  background: var(--surface-hover);
  padding: 14px 14px 14px 22px;
  border-radius: 0 8px 8px 0;
}

.article-body ul,
.article-body ol {
  margin: 14px 0 18px 22px;
}

.article-body li { margin-bottom: 6px; }

.article-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  font-size: 0.88rem;
}

.article-body th,
.article-body td {
  padding: 8px 10px;
  border: 1px solid var(--border);
  text-align: left;
}

.article-body th {
  background: var(--surface-hover);
  font-weight: 700;
  color: var(--text);
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.article-tags a {
  background: var(--surface-hover);
  color: var(--text-secondary);
  padding: 5px 10px;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition);
}

.article-tags a:hover {
  background: var(--primary);
  color: white;
}

.article-author {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
  padding: 20px;
  background: var(--surface-hover);
  border-radius: 10px;
  border: 1px solid var(--border);
}

.author-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: white;
  font-weight: 700;
  flex-shrink: 0;
}

.author-info h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}

.author-info p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0;
}

.breadcrumb {
  max-width: 800px;
  margin: 0 auto;
  padding: 14px 20px 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--text-secondary);
  text-decoration: none;
}

.breadcrumb a:hover { color: var(--primary); }

/* ===== RELATED ARTICLES ===== */
.related-articles {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px 48px;
}

.related-articles h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}

.related-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  transition: var(--transition);
  color: inherit;
}

.related-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.related-card img {
  width: 100%;
  height: 110px;
  object-fit: cover;
}

.related-card-body { padding: 12px; }

.related-card-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== COMMENTS ===== */
.comments-section {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px 48px;
}

.comments-section h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text);
}

.comment-form {
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 20px;
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.88rem;
  margin-bottom: 8px;
  outline: none;
  background: var(--surface);
  color: var(--text);
  transition: var(--transition);
}

.comment-form input:focus,
.comment-form textarea:focus { border-color: var(--primary); }

.comment-form textarea { resize: vertical; min-height: 70px; }

.comment-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.comment-item {
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.comment-author {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text);
}

.comment-date {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.comment-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ===== QUIZ / SIMULADO ===== */
.quiz-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 20px;
}

.quiz-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  transition: var(--transition);
}

.quiz-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.quiz-option {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  transition: 0.15s;
  font-size: 0.9rem;
  background: var(--surface);
  color: var(--text);
  text-align: left;
}

.quiz-option:hover {
  border-color: var(--primary);
  background: var(--surface-hover);
}

.quiz-option.correct {
  border-color: var(--success);
  background: #dcfce7;
  color: #166534;
}

.quiz-option.wrong {
  border-color: var(--danger);
  background: #fee2e2;
  color: #991b1b;
}

.quiz-option.disabled {
  pointer-events: none;
  opacity: 0.7;
}

.quiz-result {
  text-align: center;
  padding: 32px 20px;
}

.quiz-result h2 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--text);
}

.quiz-result p {
  color: var(--text-muted);
  margin-bottom: 20px;
}

.score-bar {
  max-width: 360px;
  margin: 0 auto 20px;
  height: 10px;
  background: var(--border);
  border-radius: 5px;
  overflow: hidden;
}

.score-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 5px;
  transition: width 1s ease;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  text-decoration: none;
}

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

.btn-primary:hover {
  background: var(--accent);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn-secondary {
  background: var(--surface-hover);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover { background: var(--border); }

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}

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

/* ===== ADMIN ===== */
.admin-body { background: var(--bg); min-height: 100vh; }

.admin-header {
  background: var(--primary);
  color: white;
  padding: 0 1.5rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.admin-header .logo { color: white; font-size: 1.125rem; }

.admin-header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.admin-header-actions a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
}

.admin-header-actions a:hover { color: white; }

.admin-layout {
  display: flex;
  min-height: calc(100vh - 60px);
}

.admin-sidebar {
  width: 260px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 1.5rem 0;
  flex-shrink: 0;
  position: sticky;
  top: 60px;
  height: calc(100vh - 60px);
  overflow-y: auto;
}

.admin-sidebar a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.5rem;
  color: var(--text);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: var(--transition);
  border-left: 3px solid transparent;
}

.admin-sidebar a:hover,
.admin-sidebar a.active {
  background: var(--bg);
  color: var(--accent);
  border-left-color: var(--accent);
}

.admin-main {
  flex: 1;
  padding: 2rem;
  overflow-x: hidden;
}

.admin-page-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ===== LOGIN ===== */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.login-box {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
}

.login-box .logo {
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--primary);
}

.login-box h2 {
  text-align: center;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.login-box p {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  margin-bottom: 1.5rem;
}

.login-form .form-group { margin-bottom: 1rem; }

.login-form input {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  background: var(--bg);
  color: var(--text);
  transition: var(--transition);
}

.login-form input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.login-form button { width: 100%; padding: 0.875rem; margin-top: 0.5rem; }

.login-error {
  background: rgba(220,38,38,0.1);
  color: var(--danger);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  margin-bottom: 1rem;
  display: none;
}

.login-error.show { display: block; }

/* ===== UTILS ===== */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.hidden { display: none !important; }

/* ===== RESPONSIVE ===== */
@media (min-width: 768px) {
  .main-nav { display: flex; }
  .menu-toggle { display: none; }
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  .articles-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 2fr; }
  .footer-nav { grid-template-columns: repeat(3, 1fr); }
  .contact-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 1024px) {
  .main-grid { grid-template-columns: 1fr 340px; }
  .articles-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767px) {
  .contact-grid { grid-template-columns: 1fr; }
  .footer-nav { grid-template-columns: 1fr 1fr; }
  .article-title { font-size: 1.5rem; }
  .push-popup {
    width: calc(100vw - 40px);
    right: 20px;
    left: 20px;
  }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in { animation: fadeIn 0.5s ease forwards; }
