/* ============================================================
   PT GEMILANG BISNIS DIGITAL — blog.css
   Portal Berita Teknologi — gaya media berita, tema terang
   Konsisten dengan token style.css (cyan #3EC0DB → biru #1E86C6)
============================================================ */

.blog-page {
  padding-top: calc(var(--nav-h) + 34px);
  padding-bottom: 80px;
  background: #fff;
}

/* ---------- Header portal ---------- */
.blog-page__head { margin-bottom: 34px; }
.blog-page__breadcrumb {
  font-size: .78rem;
  color: var(--c-muted);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.blog-page__breadcrumb a { color: var(--c-blue); font-weight: 600; }
.blog-page__breadcrumb a:hover { text-decoration: underline; }
.blog-page__title { font-size: clamp(1.7rem, 3.4vw, 2.4rem); margin-bottom: 8px; }
.blog-page__subtitle { color: var(--c-body); max-width: 640px; }

/* ---------- Headline (berita utama) ---------- */
.headline-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 26px;
  margin-bottom: 44px;
}
@media (max-width: 880px) { .headline-grid { grid-template-columns: 1fr; } }

.headline-main {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 400px;
  display: flex;
  align-items: flex-end;
  background: var(--c-ink);
  box-shadow: var(--shadow-card);
}
.headline-main img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}
.headline-main:hover img { transform: scale(1.04); }
.headline-main::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(15,20,30,0) 30%, rgba(15,20,30,.9) 100%);
}
.headline-main__body {
  position: relative; z-index: 1;
  padding: 30px;
  color: #fff;
}
.headline-main__badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--grad); color: #fff;
  font-family: var(--font-mono);
  font-size: .66rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em;
  padding: 5px 12px; border-radius: 99px;
  margin-bottom: 14px;
}
.headline-main__title {
  font-size: clamp(1.25rem, 2.6vw, 1.8rem);
  font-weight: 800; line-height: 1.3; color: #fff;
  margin-bottom: 10px;
}
.headline-main__title a { color: inherit; }
.headline-main__title a:hover { text-decoration: underline; text-decoration-color: var(--c-cyan); }
.headline-main__excerpt {
  font-size: .9rem; line-height: 1.65; color: rgba(255,255,255,.82);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  margin-bottom: 12px;
}
.headline-main__meta { font-size: .74rem; color: rgba(255,255,255,.65); display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Daftar samping headline (terpopuler) ---------- */
.headline-side {
  display: flex;
  flex-direction: column;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: 22px;
}
.headline-side__title {
  font-family: var(--font-mono);
  font-size: .72rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--c-blue);
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 14px;
}
.headline-side__list { display: flex; flex-direction: column; }
.headline-side__item {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 13px 0;
  border-bottom: 1px solid var(--c-line);
}
.headline-side__item:last-child { border-bottom: none; padding-bottom: 0; }
.headline-side__rank {
  font-family: var(--font-mono);
  font-size: 1.3rem; font-weight: 700; line-height: 1;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  min-width: 28px;
}
.headline-side__item h3 { font-size: .88rem; font-weight: 700; line-height: 1.45; }
.headline-side__item h3 a { color: var(--c-ink); transition: color .2s; }
.headline-side__item h3 a:hover { color: var(--c-blue); }
.headline-side__meta { font-size: .7rem; color: var(--c-muted); margin-top: 4px; display: flex; gap: 10px; }

/* ---------- Toolbar: pencarian + kategori ---------- */
.blog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 0;
  border-top: 1px solid var(--c-line);
  border-bottom: 1px solid var(--c-line);
  margin-bottom: 36px;
}
.blog-cats {
  display: flex !important;
  gap: 8px !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  max-width: 100% !important;
  padding-bottom: 4px !important;
}
.blog-cats::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}
.blog-cat-chip {
  font-size: .8rem; font-weight: 600;
  color: var(--c-body);
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  padding: 7px 15px; border-radius: 99px;
  transition: all .2s ease;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}
.blog-cat-chip:hover { border-color: var(--c-blue); color: var(--c-blue); }
.blog-cat-chip.is-active {
  background: var(--grad); color: #fff; border-color: transparent;
  box-shadow: 0 6px 16px -6px rgba(30,134,198,.5);
}
.blog-search { display: flex; }
.blog-search input {
  border: 1px solid var(--c-line);
  border-right: none;
  border-radius: 10px 0 0 10px;
  padding: 9px 15px;
  font-family: var(--font-sans);
  font-size: .85rem;
  min-width: 210px;
  outline: none;
  transition: border-color .2s;
}
.blog-search input:focus { border-color: var(--c-blue); }
.blog-search button {
  border: none;
  background: var(--grad);
  color: #fff;
  padding: 0 16px;
  border-radius: 0 10px 10px 0;
  cursor: pointer;
  font-size: .85rem;
}

/* ---------- Grid artikel + pagination ---------- */
.blog-results-info { font-size: .85rem; color: var(--c-muted); margin-bottom: 22px; }
.blog-results-info strong { color: var(--c-ink); }

.pager { display: flex; justify-content: center; gap: 7px; margin-top: 48px; flex-wrap: wrap; }
.pager a, .pager span {
  min-width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--c-line);
  font-size: .85rem; font-weight: 600;
  color: var(--c-body);
  background: #fff;
  transition: all .2s ease;
}
.pager a:hover { border-color: var(--c-blue); color: var(--c-blue); }
.pager .is-current {
  background: var(--grad); color: #fff; border-color: transparent;
  box-shadow: 0 6px 16px -6px rgba(30,134,198,.5);
}
.pager .is-disabled { opacity: .4; pointer-events: none; }

/* ============================================================
   DETAIL ARTIKEL
============================================================ */
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 44px;
  align-items: start;
}
@media (max-width: 980px) { .article-layout { grid-template-columns: 1fr; } }

.article__category {
  display: inline-block;
  background: var(--grad); color: #fff;
  font-family: var(--font-mono);
  font-size: .68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em;
  padding: 5px 13px; border-radius: 99px;
  margin-bottom: 16px;
}
.article__title {
  font-size: clamp(1.6rem, 3.2vw, 2.35rem);
  line-height: 1.28;
  margin-bottom: 18px;
}
.article__meta {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding-bottom: 20px; margin-bottom: 24px;
  border-bottom: 1px solid var(--c-line);
  font-size: .82rem; color: var(--c-muted);
}
.article__author { display: flex; align-items: center; gap: 10px; }
.article__author-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--grad); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .95rem;
}
.article__author strong { display: block; color: var(--c-ink); font-size: .88rem; }
.article__author span { font-size: .74rem; }
.article__meta-dot { color: var(--c-line); }

.article__hero {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 10px;
  box-shadow: var(--shadow-soft);
  aspect-ratio: 16 / 9;
  max-height: 460px;
}
.article__hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.article__hero-caption { font-size: .74rem; color: var(--c-muted); margin-bottom: 26px; text-align: center; }

/* Tipografi isi artikel */
.article__content { font-size: 1.02rem; line-height: 1.85; color: #3a4352; }
.article__content > * + * { margin-top: 1.1em; }
.article__content h2 {
  font-size: 1.45rem; margin-top: 1.8em; margin-bottom: .4em;
  padding-left: 14px; border-left: 4px solid;
  border-image: linear-gradient(180deg, var(--c-cyan), var(--c-blue)) 1;
}
.article__content h3 { font-size: 1.18rem; margin-top: 1.5em; }
.article__content a { color: var(--c-blue); font-weight: 600; text-decoration: underline; text-decoration-color: rgba(30,134,198,.3); }
.article__content a:hover { text-decoration-color: var(--c-blue); }
.article__content ul, .article__content ol { padding-left: 1.4em; }
.article__content ul { list-style: disc; }
.article__content ol { list-style: decimal; }
.article__content li + li { margin-top: .45em; }
.article__content blockquote {
  border-left: 4px solid var(--c-cyan);
  background: var(--c-surface);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 18px 24px;
  font-style: italic;
  color: var(--c-ink);
}
.article__content img { border-radius: var(--radius-sm); margin-inline: auto; }
.article__content table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.article__content th, .article__content td { border: 1px solid var(--c-line); padding: 10px 14px; text-align: left; }
.article__content th { background: var(--c-surface); color: var(--c-ink); font-weight: 700; }
.article__content figure.table { overflow-x: auto; }

/* Galeri gambar tambahan */
.article__gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-top: 30px; }
.article__gallery img { width: 100%; height: 160px; object-fit: cover; border-radius: var(--radius-sm); }

/* Tag keywords */
.article__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 34px; }
.article__tags span {
  font-size: .76rem; font-weight: 600;
  color: var(--c-blue-deep);
  background: rgba(62,192,219,.1);
  border: 1px solid rgba(30,134,198,.16);
  padding: 5px 13px; border-radius: 99px;
}

/* Bagikan */
.article__share {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 26px; padding-top: 24px;
  border-top: 1px solid var(--c-line);
}
.article__share-label { font-size: .82rem; font-weight: 700; color: var(--c-ink); margin-right: 4px; }
.share-btn {
  width: 38px; height: 38px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .95rem; color: #fff;
  transition: transform .2s ease, box-shadow .2s ease;
  border: none; cursor: pointer;
}
.share-btn:hover { transform: translateY(-3px); box-shadow: 0 8px 18px -6px rgba(0,0,0,.3); }
.share-btn--fb { background: #1877f2; }
.share-btn--x { background: #111; }
.share-btn--wa { background: #25d366; }
.share-btn--li { background: #0a66c2; }
.share-btn--copy { background: var(--c-surface); color: var(--c-ink); border: 1px solid var(--c-line); }

/* Kotak penulis */
.article__authorbox {
  display: flex; gap: 18px; align-items: flex-start;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 34px;
}
.article__authorbox-avatar {
  width: 62px; height: 62px; border-radius: 50%;
  background: var(--grad); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.4rem; flex-shrink: 0;
}
.article__authorbox h4 { font-size: 1rem; margin-bottom: 4px; }
.article__authorbox p { font-size: .86rem; line-height: 1.65; color: var(--c-body); }

/* ---------- Sidebar ---------- */
.article-sidebar { position: sticky; top: calc(var(--nav-h) + 24px); display: flex; flex-direction: column; gap: 26px; }
.sidebar-widget {
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: 22px;
}
.sidebar-widget--surface { background: var(--c-surface); }
.sidebar-widget__title {
  font-family: var(--font-mono);
  font-size: .72rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--c-blue);
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 14px;
}
.sidebar-cats { display: flex; flex-direction: column; }
.sidebar-cats a {
  display: flex; align-items: center; justify-content: space-between;
  font-size: .86rem; font-weight: 600; color: var(--c-body);
  padding: 10px 2px;
  border-bottom: 1px solid var(--c-line);
  transition: color .2s, padding-left .2s;
}
.sidebar-cats a:last-child { border-bottom: none; }
.sidebar-cats a:hover { color: var(--c-blue); padding-left: 6px; }
.sidebar-cats a span {
  font-size: .7rem; color: var(--c-muted);
  background: var(--c-surface); border: 1px solid var(--c-line);
  padding: 2px 9px; border-radius: 99px;
}

/* CTA widget sidebar */
.sidebar-cta {
  background: linear-gradient(140deg, #10306b 0%, #1E86C6 60%, #3EC0DB 100%);
  border-radius: var(--radius);
  padding: 26px;
  color: #fff;
  text-align: center;
}
.sidebar-cta i { font-size: 1.6rem; margin-bottom: 12px; }
.sidebar-cta h4 { color: #fff; font-size: 1.02rem; margin-bottom: 8px; }
.sidebar-cta p { font-size: .82rem; color: rgba(255,255,255,.85); line-height: 1.6; margin-bottom: 16px; }

/* Artikel terkait */
.related-section { margin-top: 56px; }
.related-section h2 { font-size: 1.35rem; margin-bottom: 24px; display: flex; align-items: center; gap: 10px; }
.related-section h2 i { color: var(--c-blue); }
