@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800;900&display=swap');

:root {
  --bg-body: #ffffff;
  --bg-card: #f9f9f9;
  --border-color: #e5e5e5;
  --text-primary: #0f172a;
  --text-muted: #64748b;
  --accent-color: #000000;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Base Layout & Sticky Footer Setup */
html, body {
  height: 100%;
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header & Giant Brand Logo */
header {
  padding: 40px 0 20px;
  border-bottom: 2px solid var(--text-primary);
  margin-bottom: 40px;
}

.brand-header {
  text-align: center;
}

.brand-header h1 {
  font-size: clamp(48px, 8vw, 96px);
  font-weight: 900;
  letter-spacing: -2px;
  text-transform: uppercase;
  color: var(--text-primary);
  line-height: 0.9;
  margin-bottom: 12px;
}

.brand-header p {
  font-size: 14px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

/* Main Layout Grid (Home Page) */
.main-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  margin-bottom: 60px;
  flex: 1;
}

@media (max-width: 900px) {
  .main-layout {
    grid-template-columns: 1fr;
  }
}

/* Articles Grid */
.articles-wrapper {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.featured-post {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border-color);
  text-decoration: none;
  color: inherit;
}

/* Fix Featured Image Utuh */
.featured-post img {
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: contain;
  background-color: #f8fafc;
  border-radius: 4px;
  border: 1px solid var(--border-color);
}

.featured-post h2 {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.3;
  color: var(--text-primary);
}

.featured-post:hover h2 {
  text-decoration: underline;
}

.sub-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

@media (max-width: 600px) {
  .sub-grid {
    grid-template-columns: 1fr;
  }
}

.post-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

/* Fix Post Card Image Utuh */
.post-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background-color: #f8fafc;
  border-radius: 4px;
  border: 1px solid var(--border-color);
}

.post-card h3 {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-primary);
}

.post-card:hover h3 {
  text-decoration: underline;
}

.meta-info {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Sidebar Widgets */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.widget-box {
  background: var(--bg-card);
  padding: 20px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
}

.widget-title {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 15px;
  color: var(--text-muted);
}

.widget-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.widget-list a {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

.widget-list a:hover {
  text-decoration: underline;
}

/* Detail Page Custom Layout */
.article-container {
  max-width: 760px;
  margin: 40px auto 60px;
  width: 100%;
  flex: 1;
}

.back-btn {
  display: inline-block;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 20px;
}

.article-title-detail {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 16px;
}

/* Fix Detail Article Image Utuh */
.article-thumbnail-detail {
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: contain;
  background-color: #f8fafc;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  margin: 24px 0 32px;
}

/* Formatting Isi Konten Artikel & Typography Fixes */
.article-content-detail {
  font-size: 17px;
  line-height: 1.8;
  color: #334155;
}

.article-content-detail p {
  margin-bottom: 20px;
}

.article-content-detail h2 {
  font-size: 24px;
  font-weight: 800;
  margin: 36px 0 16px;
  color: var(--text-primary);
  line-height: 1.3;
}

.article-content-detail h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 28px 0 12px;
  color: var(--text-primary);
  line-height: 1.3;
}

/* List Formatting */
.article-content-detail ul, 
.article-content-detail ol {
  margin: 16px 0 24px 24px;
  line-height: 1.6;
}

.article-content-detail li {
  margin-bottom: 8px;
  white-space: normal;
}

.article-content-detail li p {
  margin-bottom: 0;
  white-space: normal;
}

.article-content-detail img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  margin: 24px 0;
  display: block;
}

.article-content-detail code {
  background: #f1f5f9;
  color: #0f172a;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 14px;
}

/* Pre / Code Block (Struktur Direktori) */
.article-content-detail pre {
  background: #1e293b;
  color: #f8fafc;
  padding: 18px 20px;
  border-radius: 8px;
  overflow-x: auto;
  font-family: 'Fira Code', Consolas, Monaco, monospace;
  font-size: 14px;
  line-height: 1.5;
  margin: 24px 0;
  white-space: pre;
}

.article-content-detail pre code {
  background: transparent;
  color: inherit;
  padding: 0;
  border-radius: 0;
}

/* Footer Styling */
footer {
  border-top: 1px solid var(--border-color);
  padding: 40px 0 60px;
  margin-top: auto;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

.footer-credits {
  margin-bottom: 12px;
  font-weight: 500;
}

.footer-credits a {
  color: var(--text-primary);
  text-decoration: underline;
  font-weight: 700;
}

.footer-credits a:hover {
  color: var(--text-primary);
}

.footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  list-style: none;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--text-primary);
}

.footer-dot {
  color: var(--border-color);
}

/* Footer Modal Popup Styling */
.footer-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}

.footer-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.footer-modal-box {
  background: #ffffff;
  padding: 32px;
  border-radius: 12px;
  max-width: 520px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  position: relative;
  transform: scale(0.95);
  transition: transform 0.25s ease;
}

.footer-modal-overlay.active .footer-modal-box {
  transform: scale(1);
}

.footer-modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-muted);
  cursor: pointer;
}

.footer-modal-box h3 {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.footer-modal-body {
  font-size: 14px;
  line-height: 1.7;
  color: #334155;
}

.footer-modal-body p {
  margin-bottom: 12px;
}