/* ==========================================================
   assets/css/style.css
   — Mobile-first styles + smooth scroll + fade-in animation
   ========================================================== */

:root {
  --blue_soft: #438dff;
  --blue: #2663c7;
  --black: #000000;
  --grey: #666;
  --bg: #0b0b0b;
}

/* RESET & BASE --------------------------------------------- */
* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  font-family: 'Montserrat', sans-serif;
  background: #000; /* ✅ Ganti hitam → putih agar tidak flicker */
  color: #000;      /* ✅ Teks utama jadi hitam */
  -webkit-font-smoothing: antialiased;
  overflow-y: auto;
  scroll-behavior: smooth; /* boleh tetap */
}

a {
  color: inherit;
  text-decoration: none;
}

/* HEADER --------------------------------------------------- */
.site-header {
  position: fixed;
  z-index: 30;
  top: 0;
  left: 0;
  right: 0;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: transparent;
  pointer-events: auto;
}

.site-header-detail {
  position: fixed;
  z-index: 30;
  top: 0;
  left: 0;
  right: 0;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: transparent;
  backdrop-filter: blur(3px);
  pointer-events: auto;
}

.icon-btn {
  background: transparent;
  border: 0;
  padding: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.search-btn img {
  width: 30px;
  height: 30px;
  display: block;
}

.site-logo img {
  height: 36px;
  opacity: 0.95;
}

/* MAIN CONTENT --------------------------------------------- */
.main-content {
  padding-top: 0 !important;
  margin: 0;
}

/* Hilangkan jarak antar posting fullscreen */
.feed {
  margin: 0;
  padding: 0;
}


/* MEDIA ----------------------------------------------------- */
.card-media {
  position: relative;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
}

/* Overlay gelap bawah gambar */
.overlay-gradient {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 95%;
  background: linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.90) 0%,
    rgba(0, 0, 0, 0.70) 50%,
    rgba(0, 0, 0, 0) 100%
  );
  z-index: 1;
}

/* CONTENT DI ATAS GAMBAR ----------------------------------- */
.card-content {
  position: relative;
  z-index: 5;
  padding: 60px 42px 130px 22px;
  width: 100%;
  max-width: 900px;
  color: #fff;
}

/* LABEL KATEGORI */
.category-label {
  display: inline-block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 10px;
  color: var(--blue_soft);
  border-bottom: 3px solid var(--blue_soft);
  padding-bottom: 6px;
}

/* JUDUL */
.card-title {
  font-family: 'League Spartan', sans-serif;
  font-weight: 800;
  font-size: 24px;
  line-height: 0.92;
  letter-spacing: -1px;
  margin: 6px 0 12px 0;
  color: #fff;
  text-wrap: balance;
}

/* RINGKASAN DAN META */
.card-excerpt {
  font-size: 16px;
  opacity: 0.95;
  line-height: 1.6;
  max-width: 720px;
  margin-bottom: 14px;
}

.meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.meta .date {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
}

.read-more {
  font-weight: 700;
  color: var(--blue_soft);
  font-size: 14px;
}

/* TOGGLE NAV ------------------------------------------------ */
.toggle-nav {
  position: fixed;
  z-index: 60;
  right: 18px;
  bottom: 22px;
  width: 54px;
  height: 54px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  backdrop-filter: blur(3px);
}

/* NAV OVERLAY ---------------------------------------------- */
.nav-overlay {
  position: fixed;
  right: 16px;
  bottom: 92px;
  z-index: 55;
  display: none;
}

.nav-overlay.active {
  display: block;
}

.nav-card {
  min-width: 220px;
  max-width: 320px;
  background: rgba(255, 255, 255, 0.96);
  color: #111;
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  font-weight: 700;
}

.category-list {
  list-style: none;
  margin: 0;
  padding: 6px 8px;
}

.category-list li {
  padding: 12px 14px;
  border-bottom: 2px solid rgba(196, 63, 124, 0.1);
  font-size: 20px;
}

.category-list li:last-child {
  border-bottom: 0;
}

.category-list li a {
  color: #111;
  display: block;
}

/* DETAIL PAGE ---------------------------------------------- */
.detail-article .detail-media {
  height: 320px;
  background-size: cover;
  background-position: center;
}

.detail-body {
  padding: 18px;
  background: #fff;
  color: #111;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  margin-top: -60px;
}

.detail-title {
  font-family: 'League Spartan', sans-serif;
  font-size: 28px;
  margin: 8px 0;
}

/* RESPONSIVE ----------------------------------------------- */
@media (min-width: 720px) {
  .card.single {
    min-height: 820px;
  }

  .card-title {
    font-size: 96px;
  }

  .card-content {
    padding-left: 52px;
    padding-right: 52px;
  }

  .nav-overlay {
    right: 38px;
    bottom: 120px;
  }
}

@media (max-width: 720px) {
  .card-media {
    background-position: center top;
    min-height: 100vh;
  }
}

/* === DETAIL PAGE === */
.detail-wrapper {
  display: flex;
  flex-direction: column;
  /* Gunakan 100vh atau sesuaikan tinggi agar sesuai dengan header/footer yang sudah ada */
  min-height: calc(100vh - 50px); /* Asumsi tinggi header/footer total 50px */
  overflow: hidden;
  background: #fff;
}

/* Header atas (Asumsi ini dari header.php dan sudah sticky) */
/* .detail-header ... (Tidak perlu diubah jika sudah ada di file lain) */


/* Area scrollable */
.detail-scroll {
  /* Mengisi ruang di antara header dan footer. 
     Jika header/footer dari file terpisah, pastikan ini yang di-scroll */
  flex: 1; 
  overflow-y: auto;
  padding: 1rem 1.2rem; /* Sesuaikan padding */
  background: #fff;
}

/* Container untuk Judul, Foto, Meta (untuk memberi padding konsisten) */
.detail-header-content {
  margin-bottom: 1.5rem;
}

/* JUDUL BERITA BESAR (Gaya Gambar 2) */
.detail-title {
  font-family: 'League Spartan', sans-serif; /* Font Tebal */
  font-size: 2rem; /* Lebih besar dari sebelumnya */
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: #111;
}

/* Bagian foto (dipindah ke dalam detail-scroll) */
.detail-figure {
  margin: 0;
  margin-bottom: 1rem;
}

.detail-figure img {
  width: 100%;
  border-radius: 0; /* Tidak ada border-radius pada Gambar 2 */
  max-height: 380px;
  object-fit: cover;
}

.detail-figure figcaption {
  font-size: 0.85rem;
  color: #555;
  padding: 0.5rem 0; /* Sesuaikan padding */
  text-align: left;
}

/* METADATA + SHARE BUTTON (Pemisahan) */
.detail-meta-group {
  display: flex;
  flex-direction: column; /* Ditumpuk dulu */
  position: relative;
  padding-bottom: 1.5rem; /* Ruang bawah sebelum konten */
  border-bottom: 1px solid #eee;
  margin-bottom: 1.5rem;
}

/* Penempatan Tombol SHARE di kanan atas area meta */
.share-btn {
  position: absolute;
  right: 0;
  top: 5px; /* Sesuaikan posisi vertikal */
  padding: 0.5rem 1rem;
  background: #eee; /* Warna abu-abu dari Gambar 2 */
  color: #333;
  border: none;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.share-btn img {
  width: 16px;
  height: 16px;
}

/* Metadata Waktu & Penulis */
.detail-meta-time {
  font-size: 0.60rem;
  color: #777;
  margin-top: 0.5rem;
}

.detail-meta-time .penulis {
  color: #c2185b;
  margin-left: 0.5rem;
  font-weight: 700;
}

/* Metadata Lokasi (Bakawal, MESIR) dan Kategori */
.detail-meta {
  font-size: 0.9rem;
  color: #555;
}

.detail-meta .detail-location {
  font-weight: 700;
  color: #333;
}

.detail-meta .detail-category-inmeta {
  font-weight: 500;
  color: #c2185b;
}


/* KONTEN ARTIKEL */
.detail-content {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #222;
  text-align: justify;
}

/* Editor (Dipertahankan) */
.detail-editor {
  /* ... (Gaya lama) ... */
  display: flex;
  align-items: center;
  margin-top: 2rem;
  gap: 0.8rem;
}

.detail-editor img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
}

.detail-editor strong {
  font-size: 1rem;
}

.detail-editor span {
  color: #666;
  font-size: 0.9rem;
}

.detail-category {
font-family: 'Montserrat', san-serif;
color: #c2185b;
font-size: 1.1rem;
margin-bottom: 0.25rem;
}

.detail-category-line {
height: 3px;
background: #c2185b;
width: 90%;
max-width: 400px;
margin: 0 auto 1rem auto;
border-radius: 2px;
}

.detail-meta-time {
  display: flex;
  flex-direction: column; /* Tumpuk ke bawah */
  align-items: flex-start; /* Rata kiri */
  gap: 4px; /* Jarak kecil antara tanggal dan penulis */
  margin-top: 10px;
  margin-bottom: 20px;
}

.detail-meta-time .meta-tanggal {
  color: #333;
  letter-spacing: 0.5px;
  font-size: 0.8rem;
}

.detail-meta-time .meta-penulis {
  font-weight: 600; /* Bold penulis */
  color: #111;
  letter-spacing: 0.5px;
}

.nav-overlay {
  transition: opacity 0.3s ease;
  opacity: 0;
  pointer-events: none;
}
.nav-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* === DESKTOP / LAYAR LEBAR === */
@media (min-width: 1024px) {

  /* Konten di atas gambar */
  .card-content {
    padding: 80px 80px 140px 80px; /* lebih longgar kiri kanan */
    max-width: 1100px; /* sedikit lebih lebar di desktop */
  }

  /* Judul */
  .card-title {
    font-size: 42px;        /* lebih besar tapi masih proporsional */
    line-height: 1.05;      /* lebih lega agar mudah dibaca */
    letter-spacing: -0.5px;
    max-width: 80%;         /* batasi agar tidak menutupi seluruh gambar */
  }

  /* Ringkasan */
  .card-excerpt {
    font-size: 18px;
    max-width: 700px;
  }

  /* Label kategori */
  .category-label {
    font-size: 16px;
    padding-bottom: 8px;
    margin-bottom: 12px;
  }

  /* Meta dan tanggal */
  .meta .date {
    font-size: 13px;
  }

  /* Tombol baca selengkapnya */
  .read-more {
    font-size: 15px;
  }
}

/* === DESKTOP FULLSCREEN FIX === */
@media (min-width: 1024px) {
  /* Setiap kartu berita memenuhi layar penuh */
  .card.single {
    position: relative;
    height: 100vh;          /* penuh setinggi layar */
    width: 100vw;           /* penuh selebar layar */
    margin: 0;
    overflow: hidden;
  }

  /* Gambar latar memenuhi seluruh layar */
  .card-media {
    position: absolute;
    inset: 0;               /* top, right, bottom, left = 0 */
    width: 100%;
    height: 100%;
    background-size: cover; /* isi penuh tanpa distorsi */
    background-position: center;
    background-repeat: no-repeat;
  }

  /* Overlay tetap menutupi seluruh gambar */
  .overlay-gradient {
    height: 100%;
    background: linear-gradient(
      0deg,
      rgba(0, 0, 0, 0.85) 0%,
      rgba(0, 0, 0, 0.6) 40%,
      rgba(0, 0, 0, 0.2) 80%,
      rgba(0, 0, 0, 0) 100%
    );
  }

  /* Teks (card-content) agar posisinya proporsional */
  .card-content {
    position: absolute;
    bottom: 10%;            /* naikkan sedikit ke tengah bawah */
    left: 8%;
    right: 8%;
    z-index: 5;
    color: #fff;
    max-width: 900px;
  }

  /* Judul tidak terlalu besar di layar lebar */
  .card-title {
    font-size: clamp(28px, 3vw, 48px); /* fleksibel, proporsional */
    line-height: 1.1;
    max-width: 80%;
  }

  /* Ringkasan dan meta menyesuaikan */
  .card-excerpt {
    font-size: 18px;
    line-height: 1.6;
    max-width: 700px;
  }
}