/* =============================
   VARIABEL WARNA
============================= */
:root {
  --primary: #004080;
  --primary-light: #003060;
  --bg: #f8f9fa;
  --text: #333;
  --card-bg: #fff;
  --secondary: #f0f8ff;
}

/* ====== Tema Hijau ====== */
body.theme-green {
  --primary: #28a745;
  --primary-light: #218838;
  --bg: #f9fff9;
  --text: #222;
  --card-bg: #ffffff;
  --secondary: #f0f8f4;
}

/* ====== Tema Ungu ====== */
body.theme-purple {
  --primary: #7d3fbf;
  --primary-light: #6d2fae;
  --bg: #faf8ff;
  --text: #222;
  --card-bg: #ffffff;
  --secondary: #f9f6fc;
}

/* ====== Tema Oranye ====== */
body.theme-orange {
  --primary: #ff6600;
  --primary-light: #cc5200;
  --bg: #fffaf6;
  --text: #222;
  --card-bg: #ffffff;
  --secondary: #fff8f0;
}

/* =============================
   RESET & DASAR
============================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
}
a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.3s ease;
}
a:hover {
  color: var(--primary-light);
  text-decoration: underline;
}

/* =============================
   CONTAINER
============================= */
.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
  padding: 20px 0;
}

/* =============================
   HEADER
============================= */
.site-header {
  background: var(--primary);
  color: #fff;
  padding: 20px;
  margin-bottom: 20px;
}
.site-header a {
  color: #fff;
}
.site-title {
  font-size: 28px;
  margin-bottom: 5px;
}
.site-description {
  font-size: 14px;
  opacity: 0.8;
}
.main-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 10px;
}
nav a {
  color: #fff;
  padding: 8px 12px;
  display: inline-block;
}
nav a:hover {
  background: rgba(255,255,255,0.2);
  border-radius: 4px;
}

/* =============================
   LAYOUT
============================= */
.site-main {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
}
.content-area {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.sidebar {
  background: var(--secondary);
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
}

/* =============================
   ARTIKEL LISTING
============================= */
.news-item {
  display: flex;
  gap: 15px;
  background: var(--card-bg);
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  overflow: hidden;
  padding: 15px;
  transition: box-shadow 0.3s;
}
.news-item:hover {
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.news-item .thumb img {
  width: 150px;
  height: 100px;
  object-fit: cover;
  border-radius: 6px;
}
.news-content h2 {
  font-size: 20px;
  margin-bottom: 8px;
}
.news-content .meta {
  font-size: 12px;
  color: #777;
  margin-bottom: 10px;
}

/* =============================
   SINGLE POST
============================= */
.post-content {
  margin-top: 15px;
  line-height: 1.7;
}
.post-thumb img {
  max-width: 100%;
  border-radius: 8px;
  margin-bottom: 15px;
}

/* Kategori Badge */
.category-badge {
  display: inline-block;
  background: #004080;
  color: #fff;
  font-size: 13px;
  padding: 4px 10px;
  border-radius: 20px;
  margin: 3px 5px 3px 0;
  font-weight: 500;
  transition: background 0.3s ease;
}
.category-badge:hover {
  background: #0066cc;
}

/* ====== Style Tag Artikel ====== */
.post-tags {
  margin: 15px 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
}
.post-tags li {
  margin: 4px;
}
.tag-badge {
  display: inline-block;
  background: #eee;
  color: #333;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background 0.3s ease, color 0.3s ease;
}
.tag-badge:hover {
  background: #004080;
  color: #fff;
}

/* ====== Style Related Posts ====== */
.related-posts {
  margin: 30px 0;
  padding: 20px;
  border-top: 2px solid #f0f0f0;
  background: #fafafa;
  border-radius: 8px;
}
.related-posts h3 {
  margin-bottom: 15px;
  font-size: 18px;
  font-weight: bold;
  color: #004080;
}
.related-posts ul {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  list-style: none;
  padding: 0;
}
.related-item {
  flex: 1 1 calc(33.33% - 10px);
  background: #fff;
  border: 1px solid #eee;
  border-radius: 6px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.related-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}
.related-thumb img {
  width: 100%;
  height: auto;
  display: block;
}
.related-title {
  padding: 10px;
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

/* Tag Badge */
.tag-badge {
  display: inline-block;
  background: var(--secondary);
  color: var(--primary);
  font-size: 12px;
  padding: 3px 7px;
  border-radius: 10px;
  margin: 3px;
  border: 1px solid var(--primary);
  transition: all 0.3s ease;
}
.tag-badge:hover {
  background: var(--primary);
  color: #fff;
}

/* =============================
   BREADCRUMB
============================= */
.breadcrumb {
  margin: 20px 0;
  font-size: 14px;
}
.breadcrumb a {
  color: #004080;
  text-decoration: none;
}
.breadcrumb a:hover {
  text-decoration: underline;
}
.breadcrumb span {
  margin: 0 5px;
  color: #888;
}

/* =============================
   WIDGET
============================= */
.widget {
  margin-bottom: 20px;
}
.widget-title {
  font-size: 18px;
  border-bottom: 2px solid var(--primary);
  margin-bottom: 10px;
  padding-bottom: 5px;
}

/* Artikel Populer */
.popular-posts {
  margin-top: 30px;
  background: #f9f9f9;
  padding: 20px;
  border-radius: 6px;
  border: 1px solid #eee;
}
.popular-posts h3 {
  font-size: 18px;
  margin-bottom: 15px;
  color: var(--primary);
  border-bottom: 1px solid #ddd;
  padding-bottom: 5px;
}
.popular-item {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}
.popular-thumb img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  margin-right: 10px;
  border-radius: 4px;
}
.popular-title {
  font-size: 14px;
  font-weight: bold;
  color: #333;
}
.popular-item:hover .popular-title {
  color: var(--primary);
}

/* Related Posts */
.related-posts {
  margin-top: 40px;
  padding: 20px;
  background: #f9f9f9;
  border-top: 2px solid var(--primary);
  border-radius: 6px;
}
.related-posts h3 {
  margin-bottom: 15px;
  font-size: 18px;
  color: var(--primary);
  border-bottom: 1px solid #ddd;
  padding-bottom: 5px;
}
.related-item {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 6px;
  overflow: hidden;
  transition: 0.3s;
}
.related-item:hover {
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}
.related-title {
  padding: 10px;
  font-size: 14px;
  font-weight: bold;
  color: #333;
}

/* =============================
   FOOTER
============================= */
.site-footer {
  background: var(--primary);
  color: #fff;
  padding: 40px 20px 20px;
  font-size: 14px;
  line-height: 1.6;
}
.footer-widgets {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-bottom: 20px;
}
.footer-column {
  flex: 1 1 30%;
  margin: 10px;
}
.footer-column h4 {
  margin-bottom: 10px;
  font-size: 16px;
  border-bottom: 2px solid #fff;
  display: inline-block;
  padding-bottom: 5px;
}
.footer-column ul {
  list-style: none;
}
.footer-column ul li {
  margin: 5px 0;
}
.footer-column ul li a {
  color: #fff;
}
.footer-column ul li a:hover {
  color: var(--secondary);
}
.footer-bottom {
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.3);
  padding-top: 15px;
  font-size: 13px;
}

/* =============================
   HERO SECTION
============================= */
.hero {
  background: var(--primary);
  color: #fff;
  text-align: center;
  padding: 40px 20px;
  border-radius: 10px;
  margin-bottom: 30px;
}
.hero h2 {
  font-size: 28px;
  margin-bottom: 10px;
}
.hero p {
  font-size: 16px;
  opacity: 0.9;
}

/* =============================
   RESPONSIVE
============================= */
@media (max-width: 768px) {
  .site-main {
    grid-template-columns: 1fr;
  }
  .news-item {
    flex-direction: column;
  }
  .news-item .thumb img {
    width: 100%;
    height: auto;
  }
}

/* =============================
   THEME SWITCHER
============================= */
.theme-switcher {
  position: fixed;
  top: 50%;
  right: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 1000;
}
.theme-switcher button {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  transition: transform 0.2s, box-shadow 0.3s;
}
.theme-switcher button:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
.theme-switcher button[data-theme="default"] { background: #004080; }
.theme-switcher button[data-theme="theme-green"] { background: #28a745; }
.theme-switcher button[data-theme="theme-purple"] { background: #7d3fbf; }
.theme-switcher button[data-theme="theme-orange"] { background: #ff6600; }
