:root {
  /* Brand palette sampled from the Boost Reviews NFC logo */
  --brand-blue: #4989b4;
  --brand-green: #65b399;
  --brand-gradient: linear-gradient(90deg, #4989b4, #65b399);
  --primary: #3a7ca5;        /* logo blue, darkened for readable links */
  --primary-dark: #2f678a;
  --text: #20262b;
  --muted: #5c6a72;
  --bg: #ffffff;
  --surface: #f3f8f7;
  --border: #d6e0e2;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header */
.site-header {
  border-bottom: 3px solid transparent;
  border-image: var(--brand-gradient) 1;
  background: var(--bg);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  padding-bottom: 1rem;
}
.logo {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.logo img { display: block; height: 48px; width: auto; }
.lang-switch a {
  margin-left: 0.75rem;
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
}
.lang-switch a.active {
  color: var(--primary);
  border-bottom: 2px solid var(--brand-green);
}

main { padding: 2rem 1.25rem 3rem; }

h1 { font-size: 2rem; line-height: 1.25; margin: 0 0 0.5rem; }
.tagline { color: var(--muted); margin-top: 0; }

/* Post cards */
.post-list { margin-top: 2rem; }
.post-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 1.5rem;
  background: var(--bg);
}
.post-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}
.post-card-body { padding: 1.25rem; }
.post-card h2 { margin: 0 0 0.25rem; font-size: 1.35rem; }
.post-card h2 a { color: var(--text); text-decoration: none; }
.post-card h2 a:hover { color: var(--primary); }
.post-card time { color: var(--muted); font-size: 0.85rem; }
.read-more { color: var(--primary); text-decoration: none; font-weight: 600; }

/* Single post */
.post-meta { color: var(--muted); font-size: 0.9rem; }
.post .cover {
  width: 100%;
  border-radius: 10px;
  margin: 1rem 0;
}
.post-content { font-size: 1.05rem; }
.post-content img { max-width: 100%; height: auto; border-radius: 8px; }
.post-content h2 { margin-top: 2rem; }
.post-content a { color: var(--primary); }
.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}
.post-content th, .post-content td {
  border: 1px solid var(--border);
  padding: 0.5rem 0.75rem;
  text-align: left;
}
.post-content th { background: var(--surface); }

/* Pagination */
.pagination {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
}
.pagination a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
  background: var(--surface);
}
.site-footer .container { padding-top: 1rem; padding-bottom: 1rem; }

/* ---------- Admin ---------- */
.admin main { max-width: 900px; }
.admin-table { width: 100%; border-collapse: collapse; margin-top: 1rem; }
.admin-table th, .admin-table td {
  border-bottom: 1px solid var(--border);
  padding: 0.6rem 0.5rem;
  text-align: left;
  font-size: 0.95rem;
}
.badge {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 700;
}
.badge.published { background: #e4f3ed; color: #2a7a5e; }
.badge.draft { background: #fce8e6; color: #c5221f; }

form .field { margin-bottom: 1rem; }
form label { display: block; font-weight: 600; margin-bottom: 0.25rem; font-size: 0.9rem; }
form input[type="text"], form input[type="password"], form input[type="datetime-local"],
form textarea, form select {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font: inherit;
}
form textarea { min-height: 120px; }
form textarea.content { min-height: 320px; font-family: ui-monospace, Menlo, monospace; font-size: 0.9rem; }
.char-count { font-size: 0.75rem; color: var(--muted); }
.char-count.over { color: #c5221f; font-weight: 700; }

.btn {
  display: inline-block;
  background: var(--brand-gradient);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.6rem 1.2rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { filter: brightness(0.94); }
.btn.secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn.danger { background: #c5221f; }

.lang-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media (max-width: 700px) { .lang-cols { grid-template-columns: 1fr; } }
.lang-col { border: 1px solid var(--border); border-radius: 10px; padding: 1rem; }
.lang-col h3 { margin-top: 0; }

.alert { padding: 0.75rem 1rem; border-radius: 6px; margin-bottom: 1rem; }
.alert.error { background: #fce8e6; color: #c5221f; }
.alert.success { background: #e6f4ea; color: #137333; }

.btn-small { padding: 0.35rem 0.8rem; font-size: 0.85rem; }
.upload-row { display: flex; align-items: center; gap: 0.6rem; margin-top: 0.4rem; }
.upload-status { font-size: 0.85rem; color: var(--muted); }
.upload-status.error { color: #c5221f; font-weight: 600; }
.cover-preview {
  display: block;
  max-width: 320px;
  max-height: 180px;
  margin-top: 0.6rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  object-fit: cover;
}

.admin-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
