/* ========== ROOT VARIABLES ========== */
:root {
  /* Color System */
  --ive-primary: #2c3e50;
  --ive-primary-light: #3a5169;
  --ive-secondary: #e74c3c;
  --ive-accent: #3498db;
  --ive-light: #f8f9fa;
  --ive-light-gray: #ecf0f1;
  --ive-dark: #2c3e50;
  --ive-text: #2c3e50;
  --ive-text-light: #7f8c8d;
  
  
  /* Container baca */
.article-wrap{ max-width: 760px; margin: 0 auto; padding: clamp(16px,3vw,24px); }
.article{
  font-size: 17px; line-height: 1.75; color: #1f2937; /* slate-800 */
  word-break: break-word;
}

/* Heading scale */
.article h1{ font-size: clamp(28px,4.2vw,36px); line-height:1.2; margin: 0 0 .6em; }
.article h2{ font-size: clamp(22px,3.2vw,28px); line-height:1.25; margin: 1.2em 0 .5em; }
.article h3{ font-size: clamp(18px,2.6vw,22px); line-height:1.3;  margin: 1em 0 .4em; }

/* Paragraf & list spacing */
.article p{ margin: 0 0 1em; }
.article ul,.article ol{ padding-left: 1.25em; margin: 0 0 1em; }
.article li{ margin: .25em 0; }

/* Link */
.article a{ color:#0d6efd; text-decoration: none; }
.article a:hover{ text-decoration: underline; }

/* Gambar, figure, caption */
.article img{ display:block; max-width:100%; height:auto; border-radius: 12px; }
.article figure{ margin: 1.25em 0; }
.article figcaption{ text-align:center; font-size: .9em; color:#6b7280; margin-top:.5em; }

/* Blockquote */
.article blockquote{
  margin: 1.25em 0; padding: .75em 1em;
  background:#f8fafc; border-left: 4px solid #0d6efd; border-radius: 12px;
  color:#334155;
}

/* Code inline & block */
.article code{ background:#f3f4f6; padding:.15em .4em; border-radius:6px; }
.article pre{ background:#0f172a; color:#e5e7eb; padding:1em; overflow:auto; border-radius:12px; }
.article pre code{ background:transparent; padding:0; }

/* Table */
.article table{ width:100%; border-collapse: collapse; margin:1em 0; }
.article th, .article td{ border-bottom:1px solid #e5e7eb; padding:.6em .8em; text-align:left; }
.article thead th{ background:#f8fafc; font-weight:600; }

/* HR & spacing */
.article hr{ border:0; border-top:1px solid #e5e7eb; margin: 2em 0; }

/* Responsif typografi */
@media (max-width: 640px){
  .article{ font-size: 16px; line-height: 1.7; }
}



  /* Typography */
  --ive-base-font: 1rem;
  --ive-line-height: 1.8;
  --ive-font-heading: 'Merriweather', serif;
  --ive-font-body: 'Open Sans', sans-serif;
  
  /* Spacing */
  --ive-container-width: 800px;
  --ive-sidebar-width: 350px;
  --ive-gap: 2rem;
  --ive-card-radius: 8px;
  
  /* Effects */
  --ive-shadow: 0 2px 10px rgba(0,0,0,0.1);
  --ive-shadow-hover: 0 5px 15px rgba(0,0,0,0.1);
  --ive-transition: all 0.3s ease;
}

/* ========== BASE STYLES ========== */
body {
  font-family: var(--ive-font-body);
  font-size: var(--ive-base-font);
  line-height: var(--ive-line-height);
  color: var(--ive-text);
  background-color: white;
  margin: 0;
  padding: 0;
}

/* ========== LAYOUT ========== */
.container {
  max-width: calc(var(--ive-container-width) + var(--ive-sidebar-width));
  margin: 0 auto;
  padding: 2rem 1rem;
  display: grid;
  grid-template-columns: var(--ive-container-width) var(--ive-sidebar-width);
  gap: var(--ive-gap);
}

.artikel-utama {
  grid-column: 1;
}

.artikel-lain,
.spot-iklan {
  grid-column: 2;
}

/* ========== ARTICLE CONTENT ========== */
.artikel-utama h2 {
  font-family: var(--ive-font-heading);
  font-size: 2.2rem;
  color: var(--ive-primary);
  margin-bottom: 1rem;
  line-height: 1.3;
}

.tanggal {
  color: var(--ive-text-light);
  font-size: 0.9rem;
  margin-bottom: 2rem;
  display: block;
}

.foto-artikel {
  width: 100%;
  max-height: 450px;
  object-fit: cover;
  border-radius: var(--ive-card-radius);
  margin-bottom: 2rem;
  box-shadow: var(--ive-shadow);
}

.isi-artikel {
  font-size: 1.1rem;
  color: var(--ive-text);
}

/* ========== TYPOGRAPHY & TEXT ELEMENTS ========== */
.isi-artikel p {
  margin-bottom: 1.5rem;
  text-align: justify;
  hyphens: auto;
}

.isi-artikel h2,
.isi-artikel h3,
.isi-artikel h4 {
  font-family: var(--ive-font-heading);
  color: var(--ive-primary);
  margin: 2rem 0 1rem;
  line-height: 1.3;
}

.isi-artikel h2 { font-size: 1.8rem; }
.isi-artikel h3 { font-size: 1.5rem; }
.isi-artikel h4 { font-size: 1.3rem; }

.isi-artikel a {
  color: var(--ive-accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(52, 152, 219, 0.3);
  transition: var(--ive-transition);
}

.isi-artikel a:hover {
  color: var(--ive-primary);
  border-bottom-color: var(--ive-primary);
}

.isi-artikel img {
  max-width: 100%;
  height: auto;
  border-radius: var(--ive-card-radius);
  margin: 1.5rem auto;
  display: block;
  box-shadow: var(--ive-shadow);
}

.isi-artikel blockquote {
  border-left: 4px solid var(--ive-accent);
  padding-left: 1.5rem;
  margin: 2rem 0;
  color: var(--ive-text-light);
  font-style: italic;
}

.isi-artikel ul,
.isi-artikel ol {
  margin-bottom: 1.5rem;
  padding-left: 2rem;
}

.isi-artikel li {
  margin-bottom: 0.5rem;
}

/* ========== RELATED ARTICLES ========== */
.artikel-lain h3,
.spot-iklan h3 {
  font-family: var(--ive-font-heading);
  font-size: 1.5rem;
  color: var(--ive-primary);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--ive-light-gray);
}

.grid-artikel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.card {
  background: white;
  border-radius: var(--ive-card-radius);
  overflow: hidden;
  box-shadow: var(--ive-shadow);
  transition: var(--ive-transition);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--ive-shadow-hover);
}

.card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.card h4 {
  font-family: var(--ive-font-heading);
  font-size: 1.1rem;
  margin: 1rem;
  color: var(--ive-primary);
}

.card p {
  font-size: 0.9rem;
  color: var(--ive-text-light);
  margin: 0 1rem 1rem;
  line-height: 1.5;
}

.btn-detail {
  display: inline-block;
  margin: 0 1rem 1rem;
  padding: 0.5rem 1rem;
  background: var(--ive-accent);
  color: white;
  text-decoration: none;
  border-radius: 4px;
  font-size: 0.9rem;
  transition: var(--ive-transition);
}

.btn-detail:hover {
  background: var(--ive-primary);
}

/* ========== ADVERTISEMENT ========== */
.grid-iklan {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.card-iklan {
  background: var(--ive-light);
  border-radius: var(--ive-card-radius);
  padding: 1.5rem;
  text-align: center;
  border: 1px dashed var(--ive-light-gray);
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ========== FONT CONTROLS ========== */
.font-controls {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: white;
  border-radius: 50px;
  box-shadow: var(--ive-shadow);
  padding: 0.5rem;
  z-index: 100;
  display: flex;
  gap: 0.5rem;
}

.font-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--ive-light-gray);
  border: none;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--ive-transition);
}

.font-btn:hover {
  background: var(--ive-accent);
  color: white;
}

/* ========== RESPONSIVE ADJUSTMENTS ========== */
@media (max-width: 1200px) {
  .container {
    grid-template-columns: 1fr;
    max-width: var(--ive-container-width);
  }
  
  .artikel-lain,
  .spot-iklan {
    grid-column: 1;
    margin-top: 3rem;
  }
  
  .grid-artikel {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  :root {
    --ive-base-font: 0.95rem;
    --ive-container-width: 100%;
    --ive-gap: 1.5rem;
  }
  
  .container {
    padding: 1.5rem;
  }
  
  .grid-artikel {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  :root {
    --ive-base-font: 0.9rem;
  }
  
  .artikel-utama h2 {
    font-size: 1.8rem;
  }
  
  .grid-artikel {
    grid-template-columns: 1fr;
  }
  
  .font-controls {
    bottom: 1rem;
    right: 1rem;
  }
}

/* ========== TYPOGRAPHY ========== */
@import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@400;700&family=Open+Sans:wght@400;600&display=swap');

/* ========== ACCESSIBILITY ========== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}