/* ==========================================================================
   Reduz.ia.br - Gabarito & Resoluções ENEM 2026
   Design System Moderno, Acessível, Responsivo e Otimizado
   ========================================================================== */

:root {
  --primary: #0d9488;
  --primary-dark: #0f766e;
  --primary-light: #ccfbf1;
  --primary-50: #f0fdfa;
  --accent: #f59e0b;
  --accent-light: #fef3c7;
  --accent-dark: #b45309;
  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --bg: #f8fafc;
  --card: #ffffff;
  --border: #e2e8f0;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-pill: 9999px;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 25px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 30px -10px rgba(0, 0, 0, 0.12);

  /* Cores dos Cadernos */
  --caderno-azul: #2563eb;
  --caderno-amarelo: #eab308;
  --caderno-branco: #64748b;
  --caderno-cinza: #475569;
  --caderno-verde: #16a34a;

  /* Respostas */
  --resp-correta: #10b981;
  --resp-correta-bg: #d1fae5;
  --resp-errada: #ef4444;
  --resp-errada-bg: #fee2e2;
}

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

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

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

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

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s;
}

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

/* ================= HEADER ================= */
.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
}

.brand-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(13, 148, 136, 0.3);
}

.brand-accent {
  color: var(--primary);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.main-nav a {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--primary);
  background: var(--primary-50);
}

.main-nav a.active {
  font-weight: 700;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

/* ================= LIVE STATUS BAR ================= */
.live-status-bar {
  background: #0f172a;
  color: #f8fafc;
  padding: 10px 0;
  font-size: 0.88rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.status-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.status-badge-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.4);
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.live-pulse {
  width: 8px;
  height: 8px;
  background: #ef4444;
  border-radius: 50%;
  animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.partner-credits {
  color: #94a3b8;
  font-size: 0.82rem;
}

.partner-credits strong {
  color: #f1f5f9;
}

/* ================= HERO SECTION ================= */
.enem-hero {
  background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
  padding: 40px 0 30px;
  border-bottom: 1px solid var(--border);
}

.hero-header {
  text-align: center;
  max-width: 840px;
  margin: 0 auto 30px;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.hero-title {
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1.18;
  margin-bottom: 14px;
}

.hero-title .gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, #0284c7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.12rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Day Selector Tabs */
.day-selector-container {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 25px;
}

.day-tab-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  border-radius: var(--radius);
  background: var(--card);
  border: 2px solid var(--border);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow);
  position: relative;
}

.day-tab-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.day-tab-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(13, 148, 136, 0.3);
}

.day-tab-badge {
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.08);
  font-weight: 600;
}

.day-tab-btn.active .day-tab-badge {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.badge-new {
  background: #ef4444 !important;
  color: #ffffff !important;
  animation: pulse-dot 1.5s infinite;
}

/* Stats quick glance */
.quick-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 15px;
  margin-top: 25px;
}

.stat-pill {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow);
}

.stat-pill-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--primary-50);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-pill-info .stat-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}

.stat-pill-info .stat-lbl {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ================= CONTROLS & FILTER BAR ================= */
.filter-toolbar {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  padding: 24px;
  margin: -20px auto 30px;
  position: relative;
  z-index: 10;
}

.filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-label {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

/* Color pills */
.color-picker {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.color-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  border: 2px solid var(--border);
  background: #ffffff;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text);
}

.color-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.15);
}

.dot-azul { background: var(--caderno-azul); }
.dot-amarelo { background: var(--caderno-amarelo); }
.dot-branco { background: #ffffff; }
.dot-cinza { background: var(--caderno-cinza); }
.dot-verde { background: var(--caderno-verde); }

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

.color-btn.active {
  border-color: var(--text);
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.15);
}

.color-btn.active.btn-azul { background: #eff6ff; border-color: var(--caderno-azul); color: var(--caderno-azul); }
.color-btn.active.btn-amarelo { background: #fefce8; border-color: #ca8a04; color: #854d0e; }
.color-btn.active.btn-branco { background: #f8fafc; border-color: #64748b; color: #1e293b; }
.color-btn.active.btn-cinza { background: #f1f5f9; border-color: var(--caderno-cinza); color: var(--caderno-cinza); }
.color-btn.active.btn-verde { background: #f0fdf4; border-color: var(--caderno-verde); color: var(--caderno-verde); }

/* Language selector */
.lang-selector {
  display: flex;
  background: #f1f5f9;
  border-radius: var(--radius-pill);
  padding: 4px;
  border: 1px solid var(--border);
}

.lang-btn {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.lang-btn.active {
  background: #ffffff;
  color: var(--text);
  font-weight: 700;
  box-shadow: var(--shadow);
}

/* View Mode Selector */
.view-modes {
  display: flex;
  background: #f1f5f9;
  border-radius: var(--radius-sm);
  padding: 4px;
  border: 1px solid var(--border);
}

.view-btn {
  padding: 8px 16px;
  border-radius: 8px;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.view-btn.active {
  background: #ffffff;
  color: var(--primary);
  font-weight: 700;
  box-shadow: var(--shadow);
}

/* Search Box */
.search-box-wrap {
  position: relative;
  min-width: 220px;
}

.search-box-input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--card);
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
}

.search-box-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.search-box-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

/* ================= SCORE BOARD (SIMULATOR) ================= */
.score-board-banner {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border-radius: var(--radius);
  color: #ffffff;
  padding: 24px 30px;
  margin-bottom: 30px;
  box-shadow: var(--shadow-xl);
  display: none; /* Shown in simulator mode */
}

.score-board-banner.active {
  display: block;
}

.score-board-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 15px;
}

.score-board-title {
  font-size: 1.3rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
}

.score-reset-btn {
  background: rgba(255, 255, 255, 0.1);
  color: #f1f5f9;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 6px 14px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.score-reset-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #fca5a5;
}

.score-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.score-card-main {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.score-total-val {
  font-size: 2.4rem;
  font-weight: 900;
  color: #34d399;
  line-height: 1;
}

.score-total-sub {
  font-size: 0.85rem;
  color: #94a3b8;
}

.score-progress-bar-wrap {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  margin-top: 10px;
  overflow: hidden;
}

.score-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #06b6d4);
  width: 0%;
  transition: width 0.4s ease;
}

.score-share-btn {
  background: #10b981;
  color: #ffffff;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.score-share-btn:hover {
  background: #059669;
  transform: translateY(-2px);
}

/* ================= QUESTIONS GRID ================= */
.discipline-section {
  margin-bottom: 40px;
}

.discipline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
}

.discipline-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.discipline-range {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 600;
}

.questions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

/* Question Card */
.question-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  box-shadow: var(--shadow);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

.question-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: #cbd5e1;
}

.q-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.q-number-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.q-badge {
  background: #f1f5f9;
  color: var(--text);
  font-weight: 800;
  font-size: 1.1rem;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.q-ref-azul {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.q-correct-letter {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--resp-correta-bg);
  color: #065f46;
  font-weight: 900;
  font-size: 1.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.3);
}

/* Simulator interactive options */
.sim-options-row {
  display: none; /* Enabled in simulator mode */
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin: 10px 0;
}

.view-simulator .sim-options-row {
  display: flex;
}

.sim-opt-btn {
  flex: 1;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.sim-opt-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-50);
}

.sim-opt-btn.user-correct {
  background: var(--resp-correta);
  color: #ffffff;
  border-color: var(--resp-correta);
  box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
}

.sim-opt-btn.user-wrong {
  background: var(--resp-errada);
  color: #ffffff;
  border-color: var(--resp-errada);
}

.sim-opt-btn.highlight-correct {
  border: 2px dashed var(--resp-correta);
  background: var(--resp-correta-bg);
  color: #065f46;
}

/* Card bottom actions */
.q-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.q-subject-tag {
  font-size: 0.75rem;
  color: var(--text-muted);
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-open-res {
  background: var(--primary-50);
  color: var(--primary-dark);
  border: 1px solid var(--primary-light);
  padding: 6px 12px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s;
}

.btn-open-res:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

/* ================= TABLE MODE ================= */
.table-mode-container {
  display: none;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  margin-bottom: 40px;
}

.table-mode-container.active {
  display: block;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.corresp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  text-align: center;
}

.corresp-table th {
  padding: 14px 12px;
  font-weight: 800;
  background: #f1f5f9;
  border-bottom: 2px solid var(--border);
  color: var(--text);
}

.corresp-table th.col-azul { background: #dbeafe; color: #1e40af; }
.corresp-table th.col-amarelo { background: #fef9c3; color: #854d0e; }
.corresp-table th.col-branco { background: #f8fafc; color: #334155; }
.corresp-table th.col-cinza { background: #e2e8f0; color: #334155; }
.corresp-table th.col-verde { background: #dcfce7; color: #166534; }

.corresp-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
}

.corresp-table tr:hover td {
  background: #f8fafc;
}

.td-resp-badge {
  display: inline-block;
  width: 32px;
  height: 32px;
  line-height: 32px;
  border-radius: 8px;
  background: var(--resp-correta-bg);
  color: #065f46;
  font-weight: 800;
}

/* ================= MODAL DE RESOLUÇÃO ================= */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.modal-backdrop.open {
  display: flex;
  opacity: 1;
}

.modal-dialog {
  background: var(--card);
  border-radius: var(--radius);
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(20px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.open .modal-dialog {
  transform: translateY(0);
}

.modal-header {
  padding: 18px 24px;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.modal-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-q-badge {
  background: var(--primary);
  color: #ffffff;
  padding: 4px 12px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 1.15rem;
}

.modal-q-meta h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
}

.modal-q-meta p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.modal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-btn-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.modal-btn-icon:hover {
  background: #f1f5f9;
  color: var(--text);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  text-align: center;
  background: #f8fafc;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.modal-res-img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: var(--shadow);
  background: #ffffff;
  padding: 10px;
}

.modal-loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.modal-footer {
  padding: 14px 24px;
  background: #ffffff;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #ffffff;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.modal-nav-btn:hover:not(:disabled) {
  background: #f1f5f9;
  color: var(--text);
}

.modal-nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ================= EDITORIAL SECTIONS ================= */
.enem-content-section {
  margin: 60px 0;
}

.section-title {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

.tri-explanation-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.tri-text p {
  margin-bottom: 15px;
  color: var(--text-secondary);
  font-size: 0.98rem;
}

.tri-bullet-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.tri-bullet-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 800;
  flex-shrink: 0;
}

.timeline-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.timeline-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.timeline-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary);
}

.timeline-date {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.timeline-event {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.timeline-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

/* FAQ Accordion */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.faq-item summary {
  padding: 18px 22px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  font-size: 1.3rem;
  color: var(--primary);
  font-weight: 700;
  transition: transform 0.2s;
}

.faq-item[open] summary::after {
  content: '−';
}

.faq-answer {
  padding: 0 22px 20px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ================= FOOTER ================= */
.site-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 60px 0 30px;
  margin-top: 60px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

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

.footer-brand .brand {
  color: #ffffff;
  margin-bottom: 14px;
}

.footer-col h4 {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
}

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

.footer-col li {
  margin-bottom: 10px;
}

.footer-col a {
  color: #94a3b8;
  font-size: 0.9rem;
}

.footer-col a:hover {
  color: #ffffff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 25px;
  font-size: 0.85rem;
  text-align: center;
  color: #64748b;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 900px) {
  .hero-title { font-size: 2.1rem; }
  .tri-explanation-card { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
}

@media (max-width: 680px) {
  .main-nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    width: 100%;
    background: var(--card);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 20px;
    box-shadow: var(--shadow-lg);
  }
  .main-nav.open { display: flex; }
  .nav-toggle { display: flex; }
  .day-selector-container { flex-direction: column; }
  .filter-row { flex-direction: column; align-items: stretch; }
  .questions-grid { grid-template-columns: 1fr; }
}

/* ================= PRINT STYLES ================= */
@media print {
  .site-header, .live-status-bar, .filter-toolbar, .day-selector-container, .btn-open-res, .site-footer, .score-share-btn, .modal-backdrop {
    display: none !important;
  }
  body { background: #fff !important; color: #000 !important; }
  .question-card { border: 1px solid #ccc !important; break-inside: avoid; }
  .questions-grid { grid-template-columns: repeat(4, 1fr) !important; }
}
