/* ===== Portal KPU Kabupaten Kaur ===== */
:root {
  --red: #b71c1c;
  --red-dark: #8b0000;
  --red-deep: #5c0000;
  --gold: #c9a227;
  --text: #222;
  --text-muted: #666;
  --bg: #f4f4f4;
  --white: #fff;
  --border: #e0e0e0;
  --font: 'Segoe UI', system-ui, -apple-system, Roboto, 'Helvetica Neue', Arial, sans-serif;
  --container: 1140px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 16px;
}

/* ===== Top bar ===== */
.topbar {
  background: var(--red-deep);
  color: #fff;
  font-size: 12px;
  padding: 6px 0;
}
.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.topbar a { color: #ffcdd2; }
.topbar a:hover { color: #fff; }

/* ===== Header ===== */
.site-header {
  background: var(--white);
  border-bottom: 3px solid var(--red);
  padding: 12px 0;
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.logo-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}
.logo-wrap:hover { text-decoration: none; }
.logo-img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  flex-shrink: 0;
}
.logo-text h1 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--red-dark);
  line-height: 1.2;
}
.logo-text p {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}
.header-badges {
  margin-left: auto;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.badge-pill {
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 4px;
  letter-spacing: 0.02em;
}

/* ===== Nav ===== */
.main-nav {
  background: var(--red);
}
.nav-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}
.nav-inner a {
  color: #fff;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s;
}
.nav-inner a:hover,
.nav-inner a.active {
  background: rgba(0,0,0,0.2);
  text-decoration: none;
}
.menu-toggle {
  display: none;
  width: 100%;
  background: var(--red);
  color: #fff;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
}
.menu-toggle span { float: right; }

@media (max-width: 800px) {
  .menu-toggle { display: block; }
  .nav-inner {
    display: none;
    flex-direction: column;
    width: 100%;
  }
  .nav-inner.is-open { display: flex; }
  .nav-inner a {
    width: 100%;
    border-bottom: 1px solid rgba(255,255,255,0.15);
  }
}

/* ===== Hero / Slider ===== */
.hero-slider {
  position: relative;
  background: linear-gradient(135deg, #8b0000 0%, #c62828 50%, #4a0000 100%);
  color: #fff;
  overflow: hidden;
  min-height: 320px;
}
.slide {
  display: none;
  padding: 48px 0 56px;
  position: relative;
}
.slide.active { display: block; }
.slide-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: center;
}
@media (min-width: 768px) {
  .slide-content {
    grid-template-columns: 1.2fr 1fr;
  }
}
.slide-text h2 {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  margin-bottom: 10px;
  text-transform: uppercase;
  line-height: 1.2;
}
.slide-text p {
  font-size: 14px;
  opacity: 0.95;
  max-width: 520px;
  line-height: 1.6;
  margin-bottom: 20px;
}
.btn-hero {
  display: inline-block;
  background: transparent;
  border: 2px solid #fff;
  color: #fff;
  padding: 10px 22px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 24px;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.btn-hero:hover {
  background: #fff;
  color: var(--red-dark);
  text-decoration: none;
}
.slide-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}
.slide-visual img {
  max-width: 280px;
  filter: drop-shadow(0 12px 24px rgba(0,0,0,0.35));
}
.slider-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 5;
}
.slider-dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  transition: background 0.2s;
}
.slider-dots button.active { background: #fff; }
.slider-arrows {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  pointer-events: none;
  display: flex;
  justify-content: space-between;
  padding: 0 12px;
}
.slider-arrows button {
  pointer-events: auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0,0,0,0.35);
  color: #fff;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.slider-arrows button:hover { background: rgba(0,0,0,0.55); }

/* ===== Section cards (Berita / Pengumuman / Sosialisasi) ===== */
.sections {
  padding: 36px 0 20px;
}
.sections-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 768px) {
  .sections-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.section-card {
  background: var(--white);
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.section-card h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--red);
}
.item-list { display: flex; flex-direction: column; gap: 14px; }
.item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.item-thumb {
  width: 72px;
  height: 54px;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
  background: #eee;
}
.item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.item-body h3 {
  font-size: 13px;
  font-weight: 600;
  color: var(--red-dark);
  line-height: 1.35;
  margin-bottom: 4px;
}
.item-body h3 a { color: inherit; }
.item-body h3 a:hover { color: var(--red); }
.item-date {
  font-size: 11px;
  color: var(--text-muted);
}
.btn-more {
  display: inline-block;
  margin-top: 16px;
  padding: 8px 18px;
  border: 1.5px solid var(--red);
  color: var(--red);
  font-size: 12px;
  font-weight: 600;
  border-radius: 20px;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.btn-more:hover {
  background: var(--red);
  color: #fff;
  text-decoration: none;
}

/* ===== Pengumuman highlight ===== */
.announce-banner {
  background: var(--white);
  margin: 0 0 28px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  display: grid;
  grid-template-columns: 1fr;
}
@media (min-width: 800px) {
  .announce-banner {
    grid-template-columns: 1fr 1.1fr;
  }
}
.announce-text {
  padding: 28px 24px;
  background: #1a1a1a;
  color: #eee;
}
.announce-text h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.35;
  color: #fff;
}
.announce-text .date {
  font-size: 12px;
  color: #999;
  margin-bottom: 12px;
}
.announce-text p {
  font-size: 13px;
  line-height: 1.6;
  color: #ccc;
  margin-bottom: 18px;
}
.announce-img {
  background: linear-gradient(160deg, #8b0000, #c62828);
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.announce-img img {
  max-height: 280px;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

/* ===== Blogroll / Backlink ===== */
.blogroll {
  padding: 28px 0 40px;
}
.blogroll-box {
  background: var(--white);
  border-radius: 8px;
  padding: 22px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.blogroll-box h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text);
}
.blogroll-box .subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.blogroll-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 16px;
}
@media (min-width: 600px) {
  .blogroll-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (min-width: 900px) {
  .blogroll-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
.blogroll-grid a {
  font-size: 13px;
  color: var(--red-dark);
  padding: 6px 0;
  border-bottom: 1px dashed var(--border);
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.blogroll-grid a:hover {
  color: var(--red);
}

/* ===== Footer ===== */
.site-footer {
  background: #1a1a1a;
  color: #aaa;
  padding: 32px 0 0;
  font-size: 13px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  padding-bottom: 24px;
}
@media (min-width: 700px) {
  .footer-grid {
    grid-template-columns: 1.5fr 1fr auto;
  }
}
.footer-address {
  line-height: 1.6;
}
.social-links {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}
.social-links a {
  width: 36px;
  height: 36px;
  border: 1px solid #444;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ccc;
  font-size: 14px;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}
.social-links a:hover {
  border-color: var(--red);
  color: #fff;
  text-decoration: none;
}
.stats-box {
  background: var(--red-dark);
  color: #fff;
  padding: 14px 18px;
  border-radius: 6px;
  font-size: 12px;
}
.stats-box h4 {
  font-size: 13px;
  margin-bottom: 10px;
  font-weight: 700;
}
.stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
}
.stats-row span { opacity: 0.85; }
.stats-row strong { display: block; font-size: 16px; margin-top: 2px; }

.footer-bottom {
  border-top: 1px solid #333;
  padding: 14px 0;
  text-align: center;
  font-size: 12px;
  color: #777;
}

/* Page inner */
.page-hero {
  background: var(--red);
  color: #fff;
  padding: 28px 0;
}
.page-hero h1 {
  font-size: 1.5rem;
  font-weight: 700;
}
.page-content {
  background: var(--white);
  margin: 24px auto;
  padding: 28px 24px;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  max-width: var(--container);
}
.page-content h2 {
  font-size: 1.2rem;
  margin: 1.4em 0 0.5em;
  color: var(--red-dark);
}
.page-content p { margin-bottom: 1em; font-size: 14.5px; line-height: 1.7; }

/* Table style for pengumuman */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin: 16px 0;
}
.data-table th,
.data-table td {
  border: 1px solid #ddd;
  padding: 8px 10px;
  text-align: left;
}
.data-table th {
  background: var(--red);
  color: #fff;
  font-weight: 600;
}
.data-table tr:nth-child(even) { background: #fafafa; }
.badge-yes {
  color: #2e7d32;
  font-weight: 600;
}
.badge-no {
  color: #c62828;
  font-weight: 600;
}
