html { scrollbar-gutter: stable; overflow-y: scroll; }

/* ============================================================
   ARTICLES — Asifit
   Covers: artikel.php (landing) & artikel-detail.php (detail)
   ============================================================ */

/* ── Shared Tokens ── */
:root {
  --green:      #28903b;
  --green-dark: #1f6e2d;
  --text:       #1a1a1a;
  --muted:      #616161;
  --border:     #e8e8e8;
  --bg-light:   #f7f9f7;
  --radius-lg:  20px;
  --radius-md:  12px;
  --radius-sm:  8px;
  --shadow-sm:  0 2px 8px rgba(0,0,0,.07);
  --shadow-md:  0 6px 20px rgba(0,0,0,.10);
  --shadow-lg:  0 12px 36px rgba(0,0,0,.12);
}

/* ── Shared Components ── */
.art-label {
  display: inline-block;
  background: var(--green);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  padding: 3px 10px;
  border-radius: 50px;
}
.art-label-sm { font-size: 10px; padding: 2px 8px; }
.artd-cat-mobile { display: none; }

.art-date, .art-popular-date, .artd-date {
  color: var(--muted);
  font-size: 13px;
}
.art-read-time, .artd-readtime { color: var(--muted); font-size: 13px; }

.art-btn-sm {
  display: inline-block;
  background: var(--green);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 20px;
  border-radius: 50px;
  text-decoration: none;
  transition: background .2s, transform .2s;
  white-space: nowrap;
}
.art-btn-sm:hover { background: var(--green-dark); transform: translateY(-1px); }

.art-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--green);
  color: #fff;
  padding: 12px 28px;
  border-radius: 50px;
  margin-bottom: 24px;
}
.art-section-header h3 { font-size: 18px; font-weight: 700; }
.art-view-all { color: #fff; font-size: 13px; text-decoration: none; opacity: .85; }
.art-view-all:hover { opacity: 1; text-decoration: underline; }

/* Sidebar shared */
.art-popular-header {
  background: var(--green);
  color: #fff;
  text-align: center;
  padding: 12px 24px;
  border-radius: 50px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.art-popular-header h3 { font-size: 16px; font-weight: 700; }

.art-popular-card {
  display: flex;
  gap: 12px;
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 12px;
  margin-bottom: 10px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow .2s, transform .2s;
}
.art-popular-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.art-popular-card--active { box-shadow: 0 0 0 2px var(--green), var(--shadow-sm); }

.art-popular-img {
  width: 90px;
  height: 68px;
  border-radius: var(--radius-sm);
  background: #d9d9d9 center/cover no-repeat;
  flex-shrink: 0;
}
.art-popular-body { flex: 1; min-width: 0; }
.art-popular-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin: 4px 0 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================================
   LANDING PAGE — artikel.php
   ============================================================ */
.art-wrap {
  max-width: 1418px;
  margin: 0 auto;
  padding: 170px 24px 80px;
}

/* Category Filter */
.art-cat-section { text-align: center; margin-bottom: 48px; }
.art-page-title {
  font-size: 30px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 24px;
}
.art-cat-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.art-cat-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--green);
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background .2s, transform .2s, box-shadow .2s;
  box-shadow: var(--shadow-sm);
}
.art-cat-btn:hover {
  background: var(--green-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.art-cat-btn.active {
  background: var(--green-dark);
  box-shadow: var(--shadow-md);
}
.art-cat-btn svg { flex-shrink: 0; }
.art-cat-icon { flex-shrink: 0; width: 22px; height: 22px; object-fit: contain; filter: brightness(0) invert(1); }

/* Featured + Sidebar grid */
.art-content-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 32px;
  margin-bottom: 48px;
  align-items: start;
}

/* Featured */
.art-featured { border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden; }
.art-featured-link {
  display: flex;
  align-items: flex-end;
  height: 420px;
  background: #d9d9d9 center/cover no-repeat;
  border-radius: var(--radius-lg);
  position: relative;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: transform .3s ease;
}
.art-featured-link:hover { transform: scale(1.01); }
.art-featured-link::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.68) 0%, rgba(0,0,0,.15) 55%, transparent 100%);
  border-radius: var(--radius-lg);
}
.art-featured-img { display: none; }
.art-featured-body {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 28px 32px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
}
.art-featured-left { flex: 1; min-width: 0; }
.art-featured-label-text {
  display: block;
  color: rgba(255,255,255,.8);
  font-size: 13px;
  margin-bottom: 6px;
}
.art-featured-title { font-size: 24px; font-weight: 700; color: #fff; margin: 0; line-height: 1.3; text-shadow: 0 2px 8px rgba(0,0,0,.3); }
.art-btn-read {
  display: inline-block;
  background: var(--green);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 32px;
  border-radius: 50px;
  text-decoration: none;
  transition: background .2s, transform .2s;
  box-shadow: var(--shadow-sm);
}
.art-btn-read:hover { background: var(--green-dark); transform: translateY(-2px); }
.art-empty { display: flex; align-items: center; justify-content: center; min-height: 300px; color: var(--muted); }

/* Sidebar */
.art-sidebar { position: sticky; top: 100px; }

/* Articles Grid */
.art-latest-section { margin-bottom: 0; }
.art-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.art-card { background: #fff; border-radius: var(--radius-md); box-shadow: var(--shadow-sm); overflow: hidden; transition: box-shadow .2s, transform .2s; }
.art-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.art-card-img-link { display: block; overflow: hidden; }
.art-card-img {
  height: 220px;
  background: #d9d9d9 center/cover no-repeat;
  transition: transform .4s ease;
}
.art-card:hover .art-card-img { transform: scale(1.04); }
.art-card-body { padding: 20px 24px; }
.art-card-title { font-size: 18px; font-weight: 700; color: var(--text); margin: 8px 0 10px; line-height: 1.4; }
.art-card-excerpt {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.art-card-footer { display: flex; justify-content: space-between; align-items: center; }

/* ============================================================
   DETAIL PAGE — artikel-detail.php
   ============================================================ */
.artd-wrap { background: #fff; padding: 170px 0 80px; }
.artd-container { max-width: 1418px; margin: 0 auto; padding: 0 24px; }

/* Breadcrumb */
.artd-breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); margin-bottom: 28px; }
.artd-breadcrumb a { color: var(--green); text-decoration: none; }
.artd-breadcrumb a:hover { text-decoration: underline; }
.artd-breadcrumb span { color: var(--muted); }

/* Main Grid */
.artd-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  margin-bottom: 60px;
  align-items: start;
}

/* Main Article */
.artd-main { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); overflow: hidden; }

/* Banner */
.artd-banner {
  height: 420px;
  background: #d9d9d9 center/cover no-repeat;
  position: relative;
  display: flex;
  align-items: flex-end;
}
/* artd-banner-overlay, -cat, -title removed (text now shown in meta section below) */

/* Meta */
.artd-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 28px 40px;
  border-bottom: 1px solid var(--border);
  gap: 24px;
  flex-wrap: wrap;
}
.artd-headline { font-size: 28px; font-weight: 700; color: var(--text); line-height: 1.3; margin-bottom: 10px; }
.artd-meta-row { display: flex; gap: 8px; align-items: center; }
.artd-dot { color: var(--border); }

.artd-share { display: flex; align-items: center; gap: 8px; flex-shrink: 0; padding-top: 4px; }
.artd-share-label { font-size: 13px; color: var(--muted); white-space: nowrap; }
.artd-share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1.5px solid var(--border);
  border-radius: 50%;
  text-decoration: none;
  transition: border-color .2s, background .2s, transform .2s;
}
.artd-share-btn:hover { border-color: var(--green); background: #f0faf2; transform: translateY(-2px); }

/* Content */
.artd-content {
  padding: 32px 40px;
  font-size: 16px;
  line-height: 1.85;
  color: var(--text);
}
.artd-content p { margin-bottom: 20px; }
.artd-content h2 { font-size: 22px; font-weight: 700; margin: 32px 0 16px; }
.artd-content h3 { font-size: 18px; font-weight: 700; margin: 28px 0 12px; }
.artd-content img { max-width: 100%; border-radius: var(--radius-md); margin: 20px 0; }
.artd-content ul, .artd-content ol { padding-left: 24px; margin-bottom: 20px; }
.artd-content li { margin-bottom: 8px; }
.artd-content blockquote {
  border-left: 4px solid var(--green);
  margin: 24px 0;
  padding: 12px 24px;
  background: var(--bg-light);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--muted);
}
.artd-content a { color: var(--green); text-decoration: underline; }

/* Tags */
.artd-tags {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 20px 40px 32px;
  border-top: 1px dashed var(--border);
}
.artd-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.artd-tags-label { font-size: 14px; font-weight: 600; color: var(--text); }
.artd-tag {
  display: inline-block;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 5px 16px;
  border-radius: 50px;
  text-decoration: none;
  transition: opacity .2s, transform .2s;
  border: none;
}
.artd-tag:hover { opacity: .85; transform: translateY(-1px); }
.artd-tag--blue  { background: #5b8ef0; }
.artd-tag--orange { background: #f39123; }

/* Sidebar */
.artd-sidebar { position: sticky; top: 100px; }

/* Related */
.artd-related { margin-bottom: 32px; }
.artd-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.artd-related-card { background: #fff; border-radius: var(--radius-md); box-shadow: var(--shadow-sm); overflow: hidden; transition: box-shadow .2s, transform .2s; }
.artd-related-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.artd-related-img {
  height: 190px;
  background: #d9d9d9 center/cover no-repeat;
  transition: transform .4s ease;
  display: block;
}
.artd-related-card:hover .artd-related-img { transform: scale(1.04); }
.artd-related-body { padding: 16px 20px 20px; }
.artd-related-title { font-size: 16px; font-weight: 700; color: var(--text); margin: 8px 0 10px; line-height: 1.4; }
.artd-related-title a { text-decoration: none; color: inherit; }
.artd-related-title a:hover { color: var(--green); }
.artd-related-excerpt {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Latest articles at bottom of detail page */
.artd-latest { margin-bottom: 48px; }
.artd-latest-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* ── Tablet (≤1100px) ── */
@media (max-width: 1100px) {
  .art-wrap  { padding: 150px 40px 60px; }
  .artd-wrap { padding-top: 150px; }
  .artd-container { padding: 0 40px; }

  .art-content-grid, .artd-grid { grid-template-columns: 1fr; }
  .art-sidebar, .artd-sidebar   { position: static; }

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

/* ── Mobile (≤768px) ── */
@media (max-width: 768px) {
  /* Landing wrap */
  .art-wrap { padding: 50px 16px 48px; }
  .art-cat-section { margin-bottom: 28px; }
  .art-page-title { font-size: 22px; margin-bottom: 16px; }

  /* Category buttons */
  .art-cat-list { gap: 8px; }
  .art-cat-btn  { padding: 9px 16px; font-size: 13px; gap: 7px; }
  .art-cat-btn svg { width: 18px; height: 18px; }

  /* Featured card */
  .art-featured-link  { height: 250px; }
  .art-featured-body  { padding: 16px 18px; flex-direction: column; align-items: flex-start; gap: 10px; }
  .art-featured-title { font-size: 17px; }
  .art-btn-read       { padding: 8px 22px; font-size: 13px; }

  /* Article grid */
  .art-grid      { grid-template-columns: 1fr; gap: 16px; }
  .art-card-img  { height: 180px; }
  .art-card-body { padding: 16px 18px; }
  .art-card-title { font-size: 16px; }

  /* Section header */
  .art-section-header    { padding: 10px 20px; border-radius: 40px; }
  .art-section-header h3 { font-size: 15px; }

  /* Popular sidebar cards */
  .art-popular-img   { width: 72px; height: 58px; }
  .art-popular-title { font-size: 12px; }

  /* Detail wrap */
  .artd-wrap      { padding-top: 50px; }
  .artd-container { padding: 0 16px; }
  /* Hide popular sidebar on mobile detail */
  .artd-sidebar   { display: none; }
  .artd-grid      { grid-template-columns: 1fr; }
  .artd-grid      { gap: 20px; }

  /* Breadcrumb */
  .artd-breadcrumb { font-size: 12px; gap: 4px; }

  /* Banner */
  .artd-banner         { height: auto; aspect-ratio: 1/1; }
  .artd-banner-overlay { padding: 24px 20px 20px; }
  .artd-banner-title   { font-size: 18px; }

  /* Meta + share */
  .artd-meta     { padding: 20px; flex-direction: column; align-items: flex-start; gap: 14px; }
  .artd-headline { font-size: 40px; }
  .artd-cat-mobile { display: inline-block; margin-bottom: 10px; }
  .artd-share    { padding-top: 0; }

  /* Content */
  .artd-content    { padding: 20px; font-size: 15px; }
  .artd-content h2 { font-size: 20px; margin: 24px 0 12px; }
  .artd-content h3 { font-size: 17px; margin: 20px 0 10px; }

  /* Tags */
  .artd-tags { padding: 16px 20px 24px; }

  /* Related & latest */
  .artd-related-grid { grid-template-columns: 1fr; gap: 14px; }
  .artd-related-img  { height: 160px; }
  .artd-latest-grid  { grid-template-columns: 1fr; }
}

/* ── Small mobile (≤480px) ── */
@media (max-width: 480px) {
  .art-wrap       { padding: 50px 12px 40px; }
  .artd-container { padding: 0 12px; }

  .art-page-title { font-size: 20px; }
  .art-cat-btn    { padding: 8px 13px; font-size: 12px; gap: 6px; }
  .art-cat-btn svg { width: 16px; height: 16px; }

  .art-featured-link  { height: 210px; }
  .art-featured-title { font-size: 15px; }
  .art-btn-read       { padding: 7px 18px; font-size: 12px; }

  .artd-wrap           { padding-top: 50px; }
  .artd-banner         { height: auto; aspect-ratio: 1/1; }
  .artd-banner-title   { font-size: 16px; }
  .artd-banner-overlay { padding: 16px 16px 16px; }
  .artd-meta           { padding: 16px; }
  .artd-headline       { font-size: 36px; }
  .artd-content        { padding: 16px; }
  .artd-tags           { padding: 12px 16px 20px; }
}

/* Sources block */
.artd-sources {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.artd-sources p {
  font-size: 12px;
  font-weight: 600;
  font-style: italic;
  color: var(--muted);
  margin-bottom: 6px;
}
.artd-sources ul {
  list-style: disc;
  padding-left: 18px;
  margin: 0;
}
.artd-sources li {
  font-size: 11px;
  font-style: italic;
  color: var(--muted);
  margin-bottom: 3px;
  word-break: break-all;
}
.artd-sources a {
  color: var(--muted);
  text-decoration: none;
}
.artd-sources a:hover {
  text-decoration: underline;
  color: var(--green);
}