/* ==========================================
   MCQualis — Artigos · style.css
   ========================================== */

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

:root {
  --blue: #2563a8;
  --primary: #1f3a5f;
  --muted: #64748b;
  --line: #e2e8f0;
  --text: #1e293b;
  --bg: #f8fafc;
}

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

.container {
  max-width: 1020px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Header ── */
header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.brand img {
  height: 64px;
  width: auto;
  display: block;
  filter: drop-shadow(0 2px 8px rgba(18, 60, 115, 0.15));
}

nav {
  display: flex;
  gap: 28px;
}

nav a {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}

nav a:hover {
  color: var(--blue);
}

/* ── Article body ── */
main.article {
  max-width: 780px;
  margin: 56px auto 80px;
  padding: 0 24px;
}

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 16px;
}

main.article h1 {
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 800;
  line-height: 1.2;
  color: var(--primary);
  margin-bottom: 14px;
}

.meta {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.article-image {
  width: 100%;
  height: auto;
  border-radius: 16px;
  display: block;
  margin-bottom: 36px;
}

main.article p {
  font-size: 16px;
  line-height: 1.85;
  color: var(--muted);
  margin-bottom: 22px;
}

main.article ul {
  list-style: none;
  padding: 0;
  margin: 0 0 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

main.article ul li {
  padding-left: 22px;
  position: relative;
  font-size: 16px;
  line-height: 1.75;
  color: var(--muted);
}

main.article ul li::before {
  content: '·';
  position: absolute;
  left: 6px;
  color: var(--blue);
  font-weight: 700;
  font-size: 20px;
  line-height: 1.4;
}

/* ── Button ── */
.btn {
  display: inline-block;
  background: var(--blue);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 10px;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.15s ease;
  margin-top: 12px;
}

.btn:hover {
  background: var(--primary);
  transform: translateY(-2px);
}

/* ── Footer ── */
footer {
  border-top: 1px solid var(--line);
  padding: 24px 0;
  margin-top: 48px;
}

footer .container {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

/* ── Sistema bilingue ── */
html[data-lang="en"] .lang-pt { display: none; }
html:not([data-lang="en"]) .lang-en { display: none; }

/* ── Tamanho do texto ── */
html[data-font-size="large"]  body { zoom: 1.1; }
html[data-font-size="larger"] body { zoom: 1.25; }

/* ── Botão de acessibilidade ── */
.a11y-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 52px;
  height: 52px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  box-shadow: 0 4px 16px rgba(18, 60, 115, 0.35);
  transition: background 0.2s, transform 0.15s;
}

.a11y-btn:hover {
  background: #16304f;
  transform: scale(1.07);
}

.a11y-panel {
  position: fixed;
  bottom: 88px;
  right: 24px;
  width: 260px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18);
  z-index: 999;
  display: none;
  overflow: hidden;
}

.a11y-panel.open {
  display: block;
}

.a11y-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px 10px;
  border-bottom: 1px solid var(--line);
  font-weight: 700;
  font-size: 14px;
  color: var(--primary);
}

.a11y-panel-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  padding: 0 4px;
}

.a11y-panel-close:hover { color: var(--text); }

.a11y-rows { padding: 4px 0; }

.a11y-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 18px;
  gap: 12px;
}

.a11y-label {
  font-size: 14px;
  color: var(--text);
  flex: 1;
}

.a11y-lang-btns { display: flex; gap: 6px; }

.a11y-lang-btn {
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.a11y-lang-btn.active {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.a11y-font-controls { display: flex; gap: 4px; }

.a11y-font-btn {
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
  font-size: 12px;
  transition: background 0.15s;
}

.a11y-font-btn:hover:not(:disabled) { background: #f1f5f9; }

.a11y-font-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .header-inner { height: 60px; }
  .brand img { height: 48px; }
  main.article { margin: 36px auto 56px; }
}