/* ═══════════════════════════════════════════
   Portugal Binário — Estilo Principal
   ═══════════════════════════════════════════ */

/* ─── Reset & Base ─────────────────────── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #1a365d;
  --primary-dark: #0f2340;
  --primary-light: #2a4a7f;
  --accent: #c94b1f;
  --accent-light: #e85d2a;
  --bg: #FFFFFF;
  --bg-alt: #f4f5f7;
  --bg-card: #FFFFFF;
  --text: #1a1a2e;
  --text-light: #555;
  --text-muted: #888;
  --border: #dde1e6;
  --shadow: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-hover: 0 8px 24px rgba(0,0,0,0.1);
  --radius: 8px;
  --radius-sm: 4px;
  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-heading: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --max-width: 1200px;
  --header-height: 60px;
}

/* ═══════════════════════════════════════════
   Dark Mode
   ═══════════════════════════════════════════ */
[data-theme="dark"] {
  --primary: #60a5fa;
  --primary-dark: #3b82f6;
  --primary-light: #93c5fd;
  --accent: #f97316;
  --accent-light: #fb923c;
  --bg: #0f1724;
  --bg-alt: #0a0f1a;
  --bg-card: #1a2332;
  --text: #e2e8f0;
  --text-light: #9ca3af;
  --text-muted: #6b7280;
  --border: #2d3748;
  --shadow: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-hover: 0 8px 24px rgba(0,0,0,0.5);
}

[data-theme="dark"] .topbar {
  background: #0d1117;
}

[data-theme="dark"] .topbar a {
  color: #555;
}

[data-theme="dark"] .topbar a:hover {
  color: #ccc;
}

[data-theme="dark"] .footer {
  background: #0d1117;
}

[data-theme="dark"] .nav-link:hover {
  background: #1e293b;
}

[data-theme="dark"] .sidebar-list a:hover {
  background: #1e293b;
}

[data-theme="dark"] .article-body blockquote {
  background: #1e293b;
  border-left-color: #60a5fa;
}

[data-theme="dark"] .comment-form input,
[data-theme="dark"] .comment-form textarea,
[data-theme="dark"] .search-form input {
  background: #1a2332;
  color: var(--text);
  border-color: var(--border);
}

[data-theme="dark"] .comment-moderated {
  background: #3d2e00;
  color: #ffb74d;
}

[data-theme="dark"] .msg-success {
  background: #1b3d1b;
  color: #81c784;
}

[data-theme="dark"] .msg-error {
  background: #3d1b1b;
  color: #ef9a9a;
}

[data-theme="dark"] .btn-approve {
  background: #1b3d1b;
  color: #81c784;
}

[data-theme="dark"] .btn-reject {
  background: #3d2e00;
  color: #ffb74d;
}

[data-theme="dark"] .btn-delete {
  background: #3d1b1b;
  color: #ef9a9a;
}

[data-theme="dark"] .btn-approve:hover {
  background: #2e7d32;
  color: #fff;
}

[data-theme="dark"] .btn-reject:hover {
  background: #e65100;
  color: #fff;
}

[data-theme="dark"] .btn-delete:hover {
  background: #c62828;
  color: #fff;
}

[data-theme="dark"] .cat-android {
  color: #fff !important;
}

/* ─── HTML & Body ──────────────────────── */
html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg-alt);
  line-height: 1.6;
  min-height: 100vh;
  transition: background 0.3s ease, color 0.3s ease;
}

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

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ─── Top Bar (SAPO-style) ─────────────── */
.topbar {
  background: #1a1a2e;
  color: #ccc;
  font-size: 0.75rem;
  padding: 6px 0;
  transition: background 0.3s ease;
}

.topbar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.topbar a {
  color: #aaa;
  margin-right: 12px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.topbar a:hover {
  color: #fff;
}

.topbar-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.topbar-social a {
  margin-left: 8px;
  font-size: 0.85rem;
}

/* ─── Header ────────────────────────────── */
.header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

.logo {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
  white-space: nowrap;
  transition: color 0.3s ease;
}

.logo span {
  color: var(--accent);
}

.logo .flag {
  margin-right: 4px;
}

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

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ─── Theme Toggle ─────────────────────── */
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all 0.2s ease;
  color: var(--text);
  flex-shrink: 0;
  line-height: 1;
}

.theme-toggle:hover {
  background: var(--bg-alt);
  border-color: var(--text-muted);
  transform: scale(1.05);
}

.theme-toggle:active {
  transform: scale(0.95);
}

/* ─── Search ────────────────────────────── */
.search-form {
  display: flex;
  align-items: center;
}

.search-form input {
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 0.85rem;
  width: 180px;
  outline: none;
  background: var(--bg);
  color: var(--text);
  transition: border-color 0.2s, width 0.3s, background 0.3s ease;
}

.search-form input:focus {
  border-color: var(--primary);
  width: 240px;
}

.search-form input::placeholder {
  color: var(--text-muted);
}

.search-form button {
  background: none;
  border: none;
  margin-left: -32px;
  cursor: pointer;
  color: var(--text-light);
  font-size: 1rem;
}

/* ─── Navigation ────────────────────────── */
.nav {
  background: var(--bg);
  border-bottom: 2px solid var(--primary);
  transition: background 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.nav::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 40px;
  background: linear-gradient(to right, transparent, var(--bg));
  pointer-events: none;
  z-index: 1;
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-behavior: smooth;
  gap: 2px;
}

.nav-inner::-webkit-scrollbar {
  display: none;
}

.nav-home {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--primary);
  color: #fff !important;
  border-radius: 4px;
  font-size: 0.9rem;
  flex-shrink: 0;
  margin-right: 4px;
  transition: background 0.3s ease;
}

.nav-home:hover {
  background: var(--primary-dark);
}

.nav-link {
  display: block;
  padding: 12px 16px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
  flex-shrink: 0;
}

.nav-link:hover {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: #f0f4ff;
}

/* ─── Main Layout ───────────────────────── */
.main-wrap {
  max-width: var(--max-width);
  margin: 20px auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
}

.main-full {
  grid-template-columns: 1fr;
}

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

/* ─── Sidebar ───────────────────────────── */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.sidebar-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text);
  padding: 14px 16px;
  border-bottom: 2px solid var(--primary);
  background: var(--bg);
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.sidebar-list {
  list-style: none;
  padding: 0;
}

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

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

.sidebar-list a {
  display: flex;
  gap: 10px;
  padding: 10px 16px;
  font-size: 0.82rem;
  color: var(--text);
  transition: background 0.2s;
}

.sidebar-list a:hover {
  background: #f0f4ff;
  color: var(--primary);
}

.sidebar-list .thumb {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  background: var(--bg-alt);
}

.sidebar-list .sidebar-item-text {
  flex: 1;
}

.sidebar-list .sidebar-item-title {
  font-weight: 600;
  display: block;
  line-height: 1.3;
  font-size: 0.82rem;
}

.sidebar-list .sidebar-item-date {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Category cloud in sidebar */
.cat-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 14px 16px;
}

.cat-tag {
  display: inline-block;
  padding: 6px 16px;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: 20px;
  color: #fff;
  transition: transform 0.2s, box-shadow 0.2s;
}

.cat-tag:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  color: #fff;
}

/* ─── Hero / Featured Article ──────────── */
.hero-article {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 24px;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.hero-article:hover {
  box-shadow: var(--shadow-hover);
}

.hero-image {
  width: 100%;
  height: 360px;
  object-fit: cover;
  background: var(--bg-alt);
}

.hero-body {
  padding: 24px 28px;
}

.hero-category {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 3px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #fff;
  margin-bottom: 10px;
}

.hero-title {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 10px;
}

.hero-title a {
  color: var(--text);
  transition: color 0.3s ease;
}

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

.hero-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-excerpt {
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.6;
}

/* ─── Article Grid ──────────────────────── */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.article-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow 0.3s, transform 0.2s, background 0.3s ease;
}

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

.card-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: var(--bg-alt);
}

.card-body {
  padding: 16px 18px;
}

.card-category {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 3px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #fff;
  margin-bottom: 8px;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 6px;
}

.card-title a {
  color: var(--text);
  transition: color 0.3s ease;
}

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

.card-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.card-excerpt {
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.5;
}

/* ─── Article Page ──────────────────────── */
.article-full {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.article-full .hero-image {
  height: 400px;
  border-radius: var(--radius);
  margin-bottom: 24px;
}

.article-header {
  margin-bottom: 24px;
}

.article-header .hero-category {
  margin-bottom: 12px;
}

.article-header h1 {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 12px;
  color: var(--text);
  transition: color 0.3s ease;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.article-meta .author {
  color: var(--primary);
  font-weight: 600;
}

.article-meta .fonte {
  color: var(--text-light);
}

.article-meta .fonte a {
  color: var(--primary);
}

.article-body {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text);
  transition: color 0.3s ease;
}

.article-body p {
  margin-bottom: 1.2em;
}

.article-body h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 1.5em 0 0.5em;
  color: var(--text);
  transition: color 0.3s ease;
}

.article-body h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 1.3em 0 0.4em;
}

.article-body blockquote {
  border-left: 4px solid var(--primary);
  padding: 12px 20px;
  margin: 1.2em 0;
  background: #f0f4ff;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--text-light);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.article-body blockquote p {
  margin-bottom: 0;
}

.article-body img {
  border-radius: var(--radius);
  margin: 1.2em 0;
  width: 100%;
}

.article-body a {
  color: var(--primary);
  text-decoration: underline;
}

.article-body ul, .article-body ol {
  margin: 1em 0;
  padding-left: 24px;
}

.article-body li {
  margin-bottom: 0.4em;
}

/* Article body charts/statistics */
.article-body .chart-container {
  background: var(--bg-alt);
  border-radius: var(--radius);
  padding: 20px;
  margin: 1.2em 0;
  text-align: center;
}

.article-body .chart-container img {
  margin: 0 auto;
  max-width: 100%;
}

.article-body .img-legenda {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: -0.8em;
  margin-bottom: 1.2em;
  font-style: italic;
}

/* ─── Break Images (small, article body) ─── */
.article-body .break-image {
  text-align: center;
  margin: 16px 0;
}
.article-body .break-image img {
  width: 180px;
  height: auto;
  border-radius: 3px;
  opacity: 0.85;
}

/* ─── Share Buttons ─────────────────────── */
.article-footer {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.share-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.share-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  margin-right: 2px;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.2s;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  text-decoration: none;
  line-height: 1.3;
}

.share-btn:hover {
  transform: translateY(-1px);
  color: #fff !important;
  border-color: transparent;
  text-decoration: none;
}

.share-btn .icon {
  font-size: 0.95rem;
  line-height: 1;
}

.share-fb:hover { background: #1877F2; }
.share-wa:hover { background: #25D366; }
.share-x:hover { background: #000000; }
.share-ig:hover { background: #E1306C; }
.share-copy:hover { background: var(--primary); }

/* ─── Toast Notification ────────────────── */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--text);
  color: var(--bg);
  padding: 10px 24px;
  border-radius: 24px;
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0;
  transition: all 0.35s ease;
  z-index: 9999;
  pointer-events: none;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  white-space: nowrap;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ─── Comments Section ──────────────────── */
.comments-section {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  margin-top: 24px;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.comments-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary);
}

.comment-form {
  margin-bottom: 24px;
}

.comment-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text);
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.9rem;
  margin-bottom: 12px;
  outline: none;
  background: var(--bg);
  color: var(--text);
  transition: border-color 0.2s, background 0.3s ease, color 0.3s ease;
}

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

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

.comment-form .btn-submit {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.comment-form .btn-submit:hover {
  background: var(--primary-dark);
}

.comment-form .btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.comment {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.comment:last-child {
  border-bottom: none;
}

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

.comment-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: 8px;
}

.comment-text {
  font-size: 0.9rem;
  line-height: 1.5;
  margin-top: 6px;
  color: var(--text-light);
}

.comment-awaiting {
  color: var(--accent);
  font-size: 0.75rem;
  font-style: italic;
}

.comment-moderated {
  background: #fff8e1;
  padding: 4px 8px;
  border-radius: 3px;
  font-size: 0.75rem;
  color: #e65100;
  display: inline-block;
  margin-top: 4px;
}

.comment-rejected {
  color: #c62828;
  text-decoration: line-through;
}

.no-comments {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
  padding: 24px;
}

/* ─── Topic Page ────────────────────────── */
.topic-header {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 28px;
  margin-bottom: 20px;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.topic-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.topic-header p {
  color: var(--text-light);
  margin-top: 6px;
  font-size: 0.9rem;
}

/* ─── Pagination ────────────────────────── */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 24px 0;
}

.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  transition: all 0.2s;
}

.page-link:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.page-link.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ─── Section Headers ───────────────────── */
.section-title {
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ─── Footer ────────────────────────────── */
.footer {
  background: #1a1a2e;
  color: #ccc;
  margin-top: 40px;
  padding: 32px 0 0;
  transition: background 0.3s ease;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 28px;
}

.footer h4 {
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer p {
  font-size: 0.82rem;
  line-height: 1.6;
  color: #999;
}

.footer ul {
  list-style: none;
}

.footer ul li {
  margin-bottom: 6px;
}

.footer ul a {
  color: #999;
  font-size: 0.82rem;
}

.footer ul a:hover {
  color: #fff;
}

.footer-bottom {
  margin-top: 28px;
  padding: 16px 20px;
  border-top: 1px solid #333;
  text-align: center;
  font-size: 0.78rem;
  color: #666;
}

/* ─── Admin Panel ───────────────────────── */
.admin-wrap {
  max-width: var(--max-width);
  margin: 20px auto;
  padding: 0 20px;
}

.admin-header {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 24px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.admin-header h1 {
  font-size: 1.3rem;
  font-weight: 700;
}

.admin-stats {
  display: flex;
  gap: 16px;
  font-size: 0.85rem;
}

.admin-stats span {
  background: var(--bg-alt);
  padding: 4px 12px;
  border-radius: 20px;
}

.comment-moderation {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.mod-comment {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.mod-comment:last-child {
  border-bottom: none;
}

.mod-comment-content {
  flex: 1;
}

.mod-comment-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.mod-comment-text {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 8px;
}

.mod-comment-actions {
  display: flex;
  gap: 8px;
}

.btn-approve, .btn-reject, .btn-delete {
  padding: 4px 14px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-approve {
  background: #e8f5e9;
  color: #2e7d32;
}

.btn-approve:hover {
  background: #2e7d32;
  color: #fff;
}

.btn-reject {
  background: #fff3e0;
  color: #e65100;
}

.btn-reject:hover {
  background: #e65100;
  color: #fff;
}

.btn-delete {
  background: #ffebee;
  color: #c62828;
}

.btn-delete:hover {
  background: #c62828;
  color: #fff;
}

/* ─── Messages ──────────────────────────── */
.msg-success {
  background: #e8f5e9;
  color: #2e7d32;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  font-size: 0.85rem;
  font-weight: 600;
}

.msg-error {
  background: #ffebee;
  color: #c62828;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  font-size: 0.85rem;
  font-weight: 600;
}

/* ─── State Messages ────────────────────── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

.empty-state .icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.empty-state h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
  color: var(--text-light);
}

.empty-state p {
  font-size: 0.9rem;
}

/* ─── Responsive ────────────────────────── */
@media (max-width: 1024px) {
  .main-wrap {
    grid-template-columns: 1fr;
  }
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
  .hero-image {
    height: 280px;
  }
  .article-full .hero-image {
    height: 300px;
  }
}

@media (max-width: 768px) {
  .header-inner {
    flex-wrap: wrap;
    height: auto;
    padding: 10px 16px;
    gap: 6px;
  }
  .logo {
    font-size: 1.2rem;
  }
  .header-right {
    gap: 6px;
  }
  .search-form input {
    width: 120px;
    font-size: 0.8rem;
    padding: 5px 12px;
  }
  .search-form input:focus {
    width: 160px;
  }
  .search-form button {
    margin-left: -28px;
    font-size: 0.85rem;
  }
  .theme-toggle {
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }
  .hero-image {
    height: 200px;
  }
  .hero-body {
    padding: 16px;
  }
  .hero-title {
    font-size: 1.2rem;
  }
  .article-full {
    padding: 16px;
  }
  .article-full .hero-image {
    height: 200px;
  }
  .article-header h1 {
    font-size: 1.4rem;
  }
  .article-body {
    font-size: 1rem;
    line-height: 1.7;
  }
  .article-grid {
    grid-template-columns: 1fr;
  }
  .footer-inner {
    grid-template-columns: 1fr;
  }
  .admin-header {
    flex-direction: column;
    gap: 12px;
  }
  .article-footer {
    flex-direction: column;
    align-items: flex-start;
  }
  .share-bar {
    width: 100%;
  }
  .main-wrap {
    margin: 12px auto;
    padding: 0 12px;
    gap: 16px;
  }
  .sidebar {
    gap: 16px;
  }
  .comments-section {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .topbar-inner {
    flex-direction: column;
    gap: 4px;
  }
  .topbar-links {
    gap: 2px;
  }
  .topbar a {
    font-size: 0.65rem;
    margin-right: 8px;
  }
  .header-inner {
    padding: 8px 12px;
  }
  .nav-link {
    padding: 8px 10px;
    font-size: 0.7rem;
  }
  .search-form input {
    width: 100px;
  }
  .search-form input:focus {
    width: 130px;
  }
  .hero-image {
    height: 180px;
  }
  .hero-body {
    padding: 14px;
  }
  .hero-title {
    font-size: 1.1rem;
  }
  .article-header h1 {
    font-size: 1.2rem;
  }
  .article-meta {
    font-size: 0.75rem;
    gap: 8px;
  }
  .article-body {
    font-size: 0.95rem;
  }
  .share-btn {
    font-size: 0.72rem;
    padding: 4px 10px;
  }
  .footer-inner {
    gap: 20px;
  }
  .footer {
    padding: 24px 0 0;
  }
  .section-title {
    font-size: 0.95rem;
  }
  .card-image {
    height: 160px;
  }
}

/* ─── Category Colors ───────────────────── */
.cat-apple { background: #555555; }
.cat-android { background: #3DDC84; color: #1a1a1a !important; }
.cat-windows { background: #0078D4; }
.cat-linux { background: #FCC624; color: #1a1a1a !important; }
.cat-ia, .cat-inteligencia-artificial { background: #7C3AED; }
.cat-ciencia { background: #0288D1; }
.cat-smartphones { background: #E91E63; }
.cat-gaming { background: #FF5722; }
.cat-seguranca, .cat-ciberseguranca { background: #D32F2F; }
.cat-espaco { background: #1A237E; }
.cat-internet { background: #00BCD4; }
.cat-motores { background: #FF6F00; }
.cat-streaming { background: #E1306C; }
.cat-open-source { background: #2E7D32; }
.cat-geral { background: #607D8B; }
.cat-analises { background: #6A1B9A; }
.cat-actualidade { background: #E91E63; }
.cat-pessoas { background: #4CAF50; }
.cat-caca { background: #795548; }
.cat-radio { background: #1565C0; }

/* ─── Archive Page ──────────────────────── */
.archive-month {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  overflow: hidden;
}

.archive-month-title {
  font-size: 1.05rem;
  font-weight: 700;
  padding: 14px 20px;
  border-bottom: 2px solid var(--primary);
  background: var(--bg);
  color: var(--text);
}

.archive-list {
  list-style: none;
  padding: 0;
}

.archive-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
  transition: background 0.2s;
}

.archive-item:last-child {
  border-bottom: none;
}

.archive-item:hover {
  background: #f0f4ff;
}

[data-theme="dark"] .archive-item:hover {
  background: #1e293b;
}

.archive-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  min-width: 80px;
}

.archive-cat {
  font-size: 0.8rem;
  padding: 2px 8px;
  border-radius: 10px;
  color: #fff;
}

.archive-title {
  color: var(--text);
  font-weight: 600;
  flex: 1;
}

.archive-title:hover {
  color: var(--primary);
}

/* Video embed */
.video-embed {
    display: block;
    position: relative;
    max-width: 100%;
    border-radius: 8px;
    overflow: hidden;
    transition: opacity 0.2s;
    margin: 1.5rem 0;
}
.video-embed:hover {
    opacity: 0.95;
}
.video-embed .video-thumb {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
}
.video-embed .play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3.5rem;
    color: white;
    background: rgba(0,0,0,0.7);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background 0.2s, transform 0.2s;
    padding-left: 6px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.4);
}
.video-embed:hover .play-button {
    background: #cc0000;
    transform: translate(-50%, -50%) scale(1.1);
}

/* Clickable image */
article a > img {
    transition: opacity 0.2s;
}
article a:hover > img {
    opacity: 0.9;
}
