:root {
  --red: #b5121b;
  --navy: #111b3d;
  --ink: #202532;
  --muted: #6b7280;
  --line: #e5e7eb;
  --paper: #ffffff;
  --soft: #f5f6f8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--soft);
  font-family: "Open Sans", Arial, sans-serif;
  line-height: 1.65;
}

a {
  color: var(--red);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 10px;
}

.skip-link:focus {
  left: 10px;
  z-index: 20;
  background: #fff;
  padding: 8px 12px;
}

.topbar {
  height: 6px;
  background: linear-gradient(90deg, var(--red), #fff 50%, var(--navy));
}

.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.brand-wrap {
  min-height: clamp(42px, 8vw, 94px);
  padding: 28px clamp(18px, 5vw, 64px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background:
    linear-gradient(90deg, rgba(8, 12, 30, 0.76), rgba(8, 12, 30, 0.22) 55%, rgba(8, 12, 30, 0.55)),
    url("/assets/images/afp-logo-original.jpg") center/cover no-repeat;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  color: #fff;
  font-family: Oswald, Arial, sans-serif;
  font-size: clamp(2rem, 5vw, 4.7rem);
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  max-width: 760px;
  text-shadow: 0 3px 16px rgba(0, 0, 0, 0.78);
}

.search-form {
  display: flex;
  align-items: stretch;
  min-width: 280px;
}

.search-form label {
  position: absolute;
  left: -9999px;
}

.search-form input {
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-right: 0;
  padding: 11px 12px;
  width: 100%;
  background: rgba(255, 255, 255, 0.94);
}

.search-form button,
.compact-form button,
.poll-form button,
.button {
  border: 0;
  background: var(--red);
  color: #fff;
  padding: 11px 16px;
  font-weight: 700;
  cursor: pointer;
}

.main-nav {
  background: var(--navy);
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

.main-nav a {
  color: #fff;
  padding: 15px 18px;
  font-family: Oswald, Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0;
}

.main-nav a:hover {
  background: var(--red);
  text-decoration: none;
}

main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 18px 46px;
}

.hero {
  background: #fff;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  min-height: 360px;
  border: 1px solid var(--line);
}

.hero-copy {
  padding: clamp(28px, 5vw, 60px);
}

.kicker {
  color: var(--red);
  font-family: Oswald, Arial, sans-serif;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  font-family: Oswald, Arial, sans-serif;
  line-height: 1.12;
  color: #151923;
}

h1 {
  font-size: clamp(2.3rem, 6vw, 4.6rem);
  margin: 8px 0 16px;
}

h2 {
  font-size: 2rem;
  margin: 0 0 18px;
}

h3 {
  font-size: 1.35rem;
  margin: 0 0 8px;
}

.hero-media {
  min-height: 340px;
  background: linear-gradient(rgba(17, 27, 61, 0.18), rgba(17, 27, 61, 0.18)), url("/assets/images/image-6.jpg") center/cover;
}

.section {
  margin-top: 30px;
  background: #fff;
  border: 1px solid var(--line);
  padding: clamp(22px, 4vw, 34px);
}

.feature-grid,
.post-grid,
.issue-grid,
.results-list {
  display: grid;
  gap: 18px;
}

.feature-grid {
  grid-template-columns: repeat(3, 1fr);
}

.post-grid {
  grid-template-columns: repeat(3, 1fr);
}

.issue-grid {
  grid-template-columns: repeat(2, 1fr);
}

.feature-card,
.post-card,
.issue-card,
.result-item {
  border: 1px solid var(--line);
  background: #fff;
}

.feature-card {
  min-height: 220px;
  display: flex;
  align-items: end;
  padding: 22px;
  color: #fff;
  background-size: cover;
  background-position: center;
  position: relative;
}

.feature-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.12));
}

.feature-card span {
  position: relative;
  font-family: Oswald, Arial, sans-serif;
  font-size: 1.55rem;
  color: #fff;
}

.post-card img {
  width: 100%;
  height: 165px;
  object-fit: cover;
  display: block;
}

.post-card-body,
.issue-card,
.result-item {
  padding: 18px;
}

.meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.article {
  background: #fff;
  border: 1px solid var(--line);
  padding: clamp(26px, 5vw, 54px);
}

.article h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
}

.article-body {
  font-size: 1.05rem;
}

.article-thumb {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  display: block;
  margin: 20px 0;
}

.article-summary {
  border-left: 4px solid var(--red);
  color: #374151;
  font-size: 1.15rem;
  padding-left: 16px;
}

.article-body ul,
.article-body ol {
  padding-left: 1.4rem;
}

.form-panel {
  max-width: 760px;
}

.form-panel label,
.compact-form input,
.compact-form textarea,
.poll-form label {
  display: block;
}

.form-panel input,
.form-panel textarea,
.compact-form input,
.compact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  padding: 12px;
  margin: 6px 0 14px;
  font: inherit;
}

.notice {
  background: #eef7ee;
  border: 1px solid #b7d8b7;
  padding: 14px 16px;
  margin-bottom: 18px;
}

.admin-layout {
  display: grid;
  gap: 22px;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.stat-card {
  border: 1px solid var(--line);
  background: #fff;
  padding: 18px;
}

.stat-card strong {
  display: block;
  font-family: Oswald, Arial, sans-serif;
  font-size: 2.2rem;
  line-height: 1;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

.admin-table th,
.admin-table td {
  border-bottom: 1px solid var(--line);
  padding: 12px;
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  background: #f3f4f6;
  font-family: Oswald, Arial, sans-serif;
}

.admin-message {
  max-width: 520px;
  white-space: pre-wrap;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-form label {
  display: block;
  font-weight: 700;
  margin-bottom: 14px;
}

.admin-form input[type="text"],
.admin-form input[type="url"],
.admin-form input[type="datetime-local"],
.admin-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  font: inherit;
  font-weight: 400;
  margin-top: 6px;
  padding: 12px;
}

.check-row {
  display: flex !important;
  align-items: center;
  gap: 10px;
}

.button-secondary {
  background: #374151;
}

.site-footer {
  background: #111827;
  color: #e5e7eb;
}

.footer-grid {
  max-width: 1180px;
  margin: 0 auto;
  padding: 34px 18px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
}

.site-footer h2 {
  color: #fff;
  font-size: 1.35rem;
}

.compact-form input,
.compact-form textarea {
  background: #0b1020;
  border-color: #293042;
  color: #fff;
}

.poll-form label {
  margin: 8px 0;
}

.footer-bottom {
  border-top: 1px solid #293042;
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 18px;
  color: #aeb7c7;
}

@media (max-width: 820px) {
  .brand-wrap,
  .hero,
  .footer-grid {
    grid-template-columns: 1fr;
    display: grid;
  }

  .brand {
    font-size: 2.4rem;
  }

  .search-form {
    min-width: 0;
    width: 100%;
  }

  .feature-grid,
  .post-grid,
  .issue-grid,
  .admin-stats {
    grid-template-columns: 1fr;
  }
}
