/* ============================================================
   ARTICLE PAGE SPECIFIC STYLES - REFINED
============================================================ */

/* --- Dynamic Background --- */
.article-layout-wrapper {
  position: relative;
  padding: 7rem 2rem;
  background: var(--paper-2);
  min-height: 100vh;
  /* overflow: hidden; */
  overflow: clip;
  isolation: isolate;
}

/* Dekorasi Blob Cahaya Bias */
.bg-glow-blob {
  position: absolute;
  width: 40vw;
  height: 40vw;
  background: var(--cyan-glow);
  border-radius: 50%;
  filter: blur(80px);
  z-index: -1;
  opacity: 0.3;
  pointer-events: none;
}
.top-left { top: -10%; left: -10%; background: var(--red-glow); opacity: 0.15; }
.bottom-right { bottom: -10%; right: -10%; }

.article-container {
  max-width: 75rem;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* --- Hero Image (Updated Order & Spacing) --- */
.article-hero-wrapper {
  margin-bottom: 2.5rem; /* Memberi jarak ke paragraf pertama */
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05); /* Bayangan lebih halus */
}

.article-hero-img {
  width: 100%;
  height: 25rem;
  object-fit: cover;
  display: block;
}

/* --- Layout Grid --- */
.article-grid {
  display: grid;
  grid-template-columns: 1fr 22rem;
  gap: 3rem;
  align-items: start;
}

.article-main {
  padding: 2rem 2rem;
  border-right: 2px solid rgba(0, 0, 0, 0.1);
}

/* --- Main Article Glass Card --- */
.article-card {
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-xl);
  padding: 3.5rem;
  box-shadow: 0 10px 30px rgba(10, 37, 64, 0.03), inset 0 1px 0 rgba(255, 255, 255, 1);
}

/* --- Typography --- */
.article-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.article-breadcrumb span {
  color: var(--ink);
}

.article-title {
  font-size: 1.75rem;
  line-height: 1.25;
  color: var(--ink); /* Warna gelap tegas untuk heading */
  margin-bottom: 2rem;
  letter-spacing: -0.03rem;
}

.text-gradient {
  background: linear-gradient(135deg, var(--primary-red) 0%, var(--red-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* --- Meta Row (Refined to match Execora layout) --- */
.article-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0;
  margin-bottom: 2rem;
  border-bottom: none; /* Dihapus agar lebih bersih */
}

.meta-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.meta-author {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.author-avatar {
  width: 2.25rem; /* Diperkecil */
  height: 2.25rem;
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Audiowide", sans-serif;
  font-size: 0.65rem;
}

.author-name {
  font-weight: 600;
  color: var(--ink);
  font-size: 0.9rem;
}

/* Badge kategori ala Execora */
.meta-tag {
  background: rgba(10, 37, 64, 0.05); /* Latar abu-abu sangat muda */
  border: 0px solid rgba(10, 37, 64, 0.1);
  padding: 0.35rem 0.875rem;
  border-radius: var(--radius-pill);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.meta-info {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  color: var(--muted);
  font-weight: 500;
}

.like-btn {
  color: var(--ink-soft);
  transition: var(--tr-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
}

.like-btn:hover {
  color: var(--primary-red);
  transform: scale(1.1); /* Efek membesar saat disentuh */
}

/* --- Article Body Colors --- */
.article-body {
  font-size: 1.125rem;
  line-height: 1.85;
  color: var(--ink-soft); /* Warna body text lebih lembut (abu-abu kebiruan) */
}

.lead-paragraph {
  font-size: 1.35rem;
  color: var(--ink); /* Paragraf pertama sedikit lebih gelap */
  font-weight: 500;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.article-body p {
  margin-bottom: 1.5rem;
  text-align: justify; /* Membuat teks rata kiri dan kanan */
  
  /* Opsional tapi sangat disarankan: 
     Menyalakan fitur pemotongan kata otomatis agar spasi antar kata tidak terlalu bolong-bolong */
  -webkit-hyphens: auto; 
  -moz-hyphens: auto;
  -ms-hyphens: auto;
  hyphens: auto;
}

.article-body h3 {
  font-size: 1.5rem;
  color: var(--ink);
  margin: 2.5rem 0 1rem;
  font-weight: 700;
  letter-spacing: -0.02rem;
}

/* Merapikan bullet points ala referensi */
.article-body ul {
  list-style-type: disc;
  padding-left: 1.25rem;
  margin-bottom: 2rem;
  color: var(--ink-soft);
}

.article-body li {
  margin-bottom: 0.75rem;
  padding-left: 0.25rem;
  line-height: 1.6;
}

/* Quote Box dengan efek Glass/Tint */
.glass-quote {
  position: relative;
  border-left: 4px solid var(--primary-red);
  padding: 1.5rem 2rem;
  margin: 3rem 0;
  background: linear-gradient(90deg, rgba(227, 30, 36, 0.05) 0%, rgba(255,255,255,0) 100%);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: 1.25rem;
  font-style: italic;
  font-weight: 500;
  color: var(--ink);
}

.article-cta-box {
  margin-top: 3.5rem;
  padding: 2.5rem;
  background: linear-gradient(135deg, rgba(255,255,255, 0.9) 0%, rgba(255,255,255, 0.4) 100%);
  border: 1px solid rgba(255,255,255, 0.8);
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: var(--shadow-card);
}
.article-cta-box h4 { color: var(--ink); margin-bottom: 0.5rem; }

/* --- Sidebar --- */
.article-sidebar {
  /* Membuat sidebar mengikuti scroll */
  position: -webkit-sticky; /* Dukungan untuk Safari */
  position: sticky;
  
  /* Jarak dari atas layar saat posisi sticky aktif. 
     Ubah angka ini jika Anda memiliki navbar/header yang juga sticky 
     agar sidebar tidak tertutup oleh header (misalnya menjadi 6rem atau 100px) */
  top: 8rem; 
  
  /* Menambahkan sedikit transisi agar mulus */
  transition: top var(--tr-base);
}

/* --- Sidebar Styles (Refined Landscape Layout) --- */
.sidebar-heading {
  font-size: 1.25rem; 
  font-weight: 800; 
  color: var(--ink);
  margin-bottom: 1.5rem; 
  padding-bottom: 0.75rem;
  border-bottom: 2px solid rgba(10, 37, 64, 0.1);
}

.sidebar-cards { 
  display: flex; 
  flex-direction: column; 
  gap: 1.5rem; /* Jarak antar artikel direnggangkan sedikit */
}

/* Mengubah hover effect agar lebih subtle seperti referensi */
.sidebar-item {
  display: flex; 
  gap: 1rem; 
  align-items: flex-start; /* Membuat teks sejajar dengan bagian atas gambar */
  padding: 0.5rem; 
  border-radius: var(--radius-md);
  margin-left: -0.5rem; /* Kompensasi padding agar rata kiri dengan judul sidebar */
  transition: var(--tr-fast);
  text-decoration: none;
}

.sidebar-item:hover {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Wadah gambar landscape */
.sidebar-img-box {
  position: relative;
  flex-shrink: 0;
  width: 8.5rem; /* Gambar diperkecil dari sebelumnya */
  height: 5.25rem; /* Dibuat landscape (rasio horizontal) */
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.sidebar-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--tr-slow);
}

/* Konten Teks */
.sidebar-item-content {
  display: flex;
  flex-direction: column;
  padding-top: 0.125rem; /* Penyesuaian mikro agar teks sejajar sempurna dengan tepi gambar */
}

.sidebar-item-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.4;
  margin: 0;
  transition: color var(--tr-fast);
  /* Truncate text: Memotong judul jika lebih dari 3 baris */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sidebar-item:hover .sidebar-item-title {
  color: var(--primary-red);
}

/* --- Responsive Layout --- */
@media (max-width: 1024px) {
  .article-grid { grid-template-columns: 1fr; }
  .article-card { padding: 2.5rem; }
}

@media (max-width: 768px) {
  .article-layout-wrapper { padding: 2rem 1rem; }
  .article-card { padding: 1.5rem; }
  .article-title { font-size: 1.5rem; }
  .article-hero-img { height: 16rem; }
  .lead-paragraph { font-size: 1.15rem; }
}

/* ============================================================
   RELATED ARTICLES SECTION (CAROUSEL)
============================================================ */

.related-articles-section {
  margin-top: 5rem;
  padding-top: 3.5rem;
  border-top: 2px solid rgba(0, 0, 0, 0.1); /* Garis batas pemisah dari konten atas */
}

/* Header & Navigasi */
.related-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.related-section-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--ink);
  margin: 0;
}

/* Specific styling for the track to ensure proper card widths */
.related-articles-section .carousel-track {
  padding-bottom: 1rem; /* Ruang untuk efek shadow saat hover */
}

/* --- Card Styling (Mengikuti referensi gambar) --- */
.related-card {
  display: flex;
  flex-direction: column;
  width: 22rem; /* Lebar statis agar carousel konsisten */
  border-radius: var(--radius-md);
  transition: var(--tr-base);
  background: transparent;
}

.related-card:hover {
  transform: translateY(-4px);
}

.related-card:hover .related-title {
  color: var(--primary-red);
}

/* Image Wrapper & Overlay Badge */
.related-img-wrapper {
  position: relative;
  width: 100%;
  height: 13rem; /* Rasio gambar persegi panjang */
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-card);
}

.related-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--tr-slow);
}

.related-card:hover .related-img-wrapper img {
  transform: scale(1.05); /* Efek zoom halus pada gambar */
}

.related-badge {
  position: absolute;
  bottom: 0;
  left: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.875rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--ink);
  /* Kita gunakan modifikasi dari glass-effect bawaan base.css agar pas di gambar */
  background: rgba(255, 255, 255, 0.85); 
  backdrop-filter: blur(8px);
  border-top-right-radius: var(--radius-md); /* Sudut melengkung sesuai gambar */
  border-bottom-left-radius: var(--radius-md);
  z-index: 2;
}

/* Content Area */
.related-content {
  display: flex;
  flex-direction: column;
  padding: 0 0.25rem;
}

.related-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.5;
  margin-bottom: 0.5rem;
  transition: color var(--tr-fast);
  
  /* Efek Truncate: Membatasi judul maksimal 2 baris agar rapi */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-meta {
  font-size: 0.875rem;
  color: var(--muted);
  font-weight: 500;
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
  .related-card {
    width: 18rem; /* Lebih kecil di mobile */
  }
  .related-img-wrapper {
    height: 11rem;
  }
}

/* =========================================
   BENTO GRID ARTICLE LAYOUT
   ========================================= */
.bento-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 40px 0;
}

/* Base style untuk semua kotak Bento */
.bento-box {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(227, 30, 36, 0.1); /* Subtle Red Border */
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.bento-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(227, 30, 36, 0.08);
}

/* Tipografi di dalam Bento */
.bento-label {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bento-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 16px;
    line-height: 1.3;
}

.bento-text {
    font-size: 1rem;
    color: #475569;
    line-height: 1.6;
    margin: 0;
}

/* 1. Kotak Problem (Besar & Mencolok) */
.bento-problem {
    flex: 2 1 50%;
    min-width: 320px;
    background: linear-gradient(135deg, #ffffff 0%, #fff5f5 100%);
    border-left: 6px solid #e31e24; /* Garis aksen kiri */
}
.bento-problem .bento-label { color: #e31e24; }
.bento-problem .bento-title { font-size: 1.6rem; }

/* 2. Kotak Causes (Kecil & Dinamis) */
.bento-cause {
    flex: 1 1 250px;
}
.bento-cause .bento-label { color: #f59e0b; } /* Warna peringatan/kuning oranye */

/* 3. Kotak Solution (Panjang di bawah) */
.bento-solution {
    flex: 1 1 100%;
    background: rgba(255, 255, 255, 0.85); /* Latar terang/putih */
    backdrop-filter: blur(16px);
    border: 1px solid rgba(0, 0, 0, 0.06); /* Border halus */
    color: #333; /* Warna teks kembali gelap */
    margin-top: 15px;
    padding: 40px; /* Padding sedikit lebih lega untuk artikel */
}
.bento-solution .bento-label { color: #0284c7; } /* Aksen biru profesional untuk label */
.bento-solution .bento-title { color: #1e293b; font-size: 1.6rem; }
.bento-solution .bento-text { color: #475569; font-size: 1.05rem; line-height: 1.8; margin-bottom: 0; }

/* Responsivitas untuk Tablet & Mobile */
@media (max-width: 992px) {
    .bento-wrapper { grid-template-columns: repeat(2, 1fr); }
    .bento-problem { grid-column: span 2; grid-row: auto; }
    .bento-solution { grid-column: span 2; }
}

@media (max-width: 768px) {
    .bento-wrapper { grid-template-columns: 1fr; }
    .bento-problem, .bento-cause, .bento-solution { grid-column: span 1; }
    .bento-problem .bento-title { font-size: 1.5rem; }
}

/* Gaya untuk Penutup Artikel (Signature Bengkel) */
.article-signature {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid rgba(0, 0, 0, 0.08); /* Garis pemisah di atas penutup */
    text-align: center;
}
.article-signature h4 {
    font-size: 1.1rem;
    color: #334155;
    margin: 0 0 8px 0;
    font-weight: 700;
}
.article-signature h4 span {
    font-weight: 400;
    color: #94a3b8;
}
.article-signature p {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}
.long-article-content {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #e5e7eb;
  color: #334155;
  font-size: 1.1rem; /* Ukuran teks ideal untuk bacaan panjang */
  line-height: 1.5; /* Jarak antar baris yang lega */
}
.long-article-content p {
  margin-bottom: 20px;
}
.long-article-content h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    margin-top: 0.6em;
    margin-bottom: 0.5em;
}
.long-article-content h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1e293b;
    margin-top: 0.6em;
    margin-bottom: 0.5em;
}
.long-article-content h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #334155;
    margin-top: 0.6em;
    margin-bottom: 0.5em;
}
.long-article-content p {
    margin-bottom: 1.2em;
    color: #475569;
}
.long-article-content strong, .long-article-content b {
    font-weight: 700;
    color: #0f172a;
}
.long-article-content ul, .long-article-content ol {
    margin-bottom: 1.2em;
    padding-left: 20px;
}
.long-article-content li {
    margin-bottom: 0.5em;
}
.long-article-content img {
    max-width: 100%;
    height: auto !important; /* Menjaga proporsi gambar agar tidak gepeng */
    border-radius: 12px; /* Memberikan efek lengkung senada dengan Bento Grid */
    box-shadow: 0 4px 20px rgba(0,0,0,0.08); /* Memberikan bayangan tipis yang elegan */
    display: block;
    margin: 0 auto; /* Memastikan gambar selalu di tengah */
}
/* Merapikan bungkus gambar bawaan dari CKEditor */
.long-article-content figure.image {
    margin: 2.5em 0; /* Memberikan jarak atas dan bawah dari teks */
    text-align: center;
}
/* Merapikan teks keterangan gambar (caption) jika Anda menambahkannya */
.long-article-content figcaption {
    font-size: 0.9rem;
    color: #64748b;
    margin-top: 12px;
    font-style: italic;
}
/* ============================================================
   MOBILE RESPONSIVE OVERRIDES & GRID FIX
   (Pastikan kode ini berada di paling bawah file CSS Anda)
============================================================ */

/* 1. PERBAIKAN BENTO GRID (Ubah paksa dari Flex ke Grid) */
.bento-wrapper {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
.bento-problem { flex: unset; min-width: unset; grid-column: span 2; }
.bento-cause { flex: unset; grid-column: span 1; }
.bento-solution { flex: unset; grid-column: span 2; }

/* 2. MODE TABLET (Layar di bawah 1024px) */
@media (max-width: 1024px) {
    .article-grid {
        grid-template-columns: 1fr; /* Memindahkan sidebar ke bawah artikel */
        gap: 2rem;
    }
    .article-main {
        border-right: none; /* Hilangkan garis batas vertikal kanan */
        padding: 0; /* Hapus padding agar teks rata kiri-kanan dengan pas */
    }
    .article-sidebar {
        position: static; /* Matikan efek melayang (sticky) */
        margin-top: 1rem;
        padding: 0;
    }
    .sidebar-cards {
        display: grid;
        /* Sidebar dijejerkan 2 kolom di tablet agar tidak kosong */
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    }
}

/* 3. MODE SMARTPHONE (Layar di bawah 768px) */
@media (max-width: 768px) {
    /* Wadah Utama */
    .article-layout-wrapper { padding: 6rem 1.2rem 2rem 1.2rem; }
    
    /* Judul & Breadcrumb */
    .article-title { font-size: 1.6rem; margin-bottom: 1.2rem; line-height: 1.3; }
    .article-breadcrumb { flex-wrap: wrap; font-size: 0.75rem; }
    
    /* Baris Informasi Meta */
    .article-meta-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.2rem;
    }
    .meta-left { gap: 0.75rem; }
    
    /* Gambar Utama (Hero) */
    .article-hero-img { height: 14rem; border-radius: 12px; }

    /* Bento Grid Berubah Menjadi 1 Kolom Penuh */
    .bento-wrapper {
        grid-template-columns: 1fr;
        margin: 20px 0;
    }
    .bento-problem, .bento-cause, .bento-solution {
        grid-column: span 1; 
    }
    .bento-box { padding: 24px; }
    .bento-problem .bento-title { font-size: 1.3rem; }
    .bento-solution { padding: 24px; margin-top: 5px; }
    .bento-solution .bento-title { font-size: 1.4rem; }

    /* Penyesuaian Teks Artikel Panjang (CKEditor) */
    .long-article-content { font-size: 1rem; padding-top: 10px; }
    .long-article-content h1 { font-size: 1.6rem; }
    .long-article-content h2 { font-size: 1.4rem; margin-top: 1.2em; }
    .long-article-content h3 { font-size: 1.2rem; }
    .long-article-content figure.image { margin: 1.5em 0; }

    /* Carousel / Slider Artikel Lainnya */
    .related-section-title { font-size: 1.4rem; }
    .related-card { width: 16rem; }
    .related-img-wrapper { height: 10rem; }
}

/* 4. MODE SMARTPHONE KECIL (Layar di bawah 480px) */
@media (max-width: 480px) {
    .sidebar-cards { grid-template-columns: 1fr; } /* Sidebar kembali 1 baris ke bawah */
    .article-hero-img { height: 12rem; }
}