

/* Warna latar belakang & teks dasar */
body {
    background-color: var(--warna2);
    color: #d0d4e3;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
}

@media (max-width: 576px) {
    main.px-4 {
        padding-left: 3px !important;
        padding-right: 3px !important;
    }
}

/* Heading dan judul artikel */
h1, h2, h3, h4 {
    color: var(--warna3) !important;
    font-weight: 700;
}

.artikel-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--warna3);
    margin-bottom: 0.5rem;
}

.meta-info {
    font-size: 0.875rem;
    color: #aaa;
    margin-bottom: 1rem;
}

/* carousel */
.carousel-caption {
    bottom: 1rem;
    background-color: rgba(0,0,0,0.6);
    padding: 1rem;
    border-radius: 0.5rem;
}

.carousel-caption {
    bottom: 0;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 0 0 8px 8px;
}


/* Breadcrumb */
.breadcrumb {
    margin-bottom: 1rem;
}

.breadcrumb-artikel {
    font-size: 0.85rem;
    color: #bdbdbd;
    margin-bottom: 0.75rem;
}

.breadcrumb-artikel a {
    color: #a8b5f9;
    text-decoration: none;
}

.breadcrumb-artikel a:hover {
    text-decoration: underline;
}

.breadcrumb-artikel::before {
    content: "";
    display: block;
    height: 1px;
    background-color: #2a2a2a;
    margin-bottom: 8px;
}

.text-primary {
    color: var(--warna3);
}

/* Header Utama */
.navbar-custom {
    background-color: var(--warna1) !important;
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo-wrapper {
    display: flex;
    align-items: center;
}

.navbar-logo {
    height: 42px;
    width: auto;
}

.search-form {
    flex: 1;
    max-width: 300px;
    margin-left: 20px;
}

.search-form input {
    background-color: #1c1c1c;
    border: 1px solid #3a3a3a;
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    width: 100%;
}

/* Navigasi Kategori */
.navbar-menu {
    background-color: var(--warna1) !important;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    z-index: 999;
}

.navbar-menu .nav-link {
    color: #e0e0e0;
    font-weight: 600;
    padding: 10px 14px;
    border-radius: 999px;
    white-space: nowrap;
    transition: background-color .2s ease, color .2s ease, transform .15s ease;
}

.navbar-menu .nav-link:hover {
    background-color: rgba(255,255,255,.08);
    color: #fff;
}

.navbar-menu .nav-link.active{
  background: var(--warna3);     /* highlight pakai warna3 */
  color: #0b0f1a;                /* teks gelap agar kontras di warna3 */
  font-weight: 700;
}

/* Track nav yang bisa di-slide kanan-kiri */
.navbar-menu .container{ position: relative; }
.nav-track{
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  -ms-overflow-style: none;   /* IE & Edge */
  scrollbar-width: none;      /* Firefox */
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  padding: 8px 16px;
  scroll-snap-type: x proximity;   /* opsional, biar enak saat berhenti */
  white-space: nowrap;
  /* Fade edges tanpa JS (tidak mengganggu klik) */
  mask-image: linear-gradient(to right, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
}
.nav-track::-webkit-scrollbar {
  display: none;              /* Chrome, Safari, Opera */
}

/* Sticky navbar kategori */
.sticky-nav {
    position: sticky;
    top: 0;
    z-index: 999;
    background-color: var(--warna1);
}

/* Default: full-bleed */
.navbar-menu.sticky-nav{ background-color: var(--warna1) !important; }

/* Saat sudah nempel (sticky) → warna hanya selebar container */
.navbar-menu.sticky-nav.stuck{
  background-color: transparent !important; /* hilangkan full-bleed */
}
.navbar-menu.sticky-nav.stuck > .container{
  background-color: var(--warna1);
  border-radius: 0; /* bisa dibikin 8px kalau mau ada sudut */
  /* shadow tipis biar “terangkat” dikit */
  box-shadow: 0 2px 6px rgba(0,0,0,.18);
}
/* Pastikan isi di dalam tetap rapi saat mode stuck */
.navbar-menu.sticky-nav.stuck .nav-track{
  padding-left: 16px;
  padding-right: 16px;
  mask-image: linear-gradient(to right, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
}

@media (max-width: 768px) {
    .navbar-custom {
        flex-direction: column;
        align-items: flex-start;
    }

    .search-form {
        width: 100%;
        margin-left: 0;
        margin-top: 10px;
        max-width: 300px;
    }

    .navbar-menu {
        padding-left: 15px;
        justify-content: flex-start;
    }
    .nav-track{ padding: 0 12px; }
    
    .sidebar-title-box img {
    max-height: 140px;
  }
}

/* === Search (navbar) — CSS-only, no markup change === */
.navbar-custom .search-form{
  display:flex;
  align-items:center;
  gap:.5rem;
}

/* Panjang secukupnya, bukan full width */
.navbar-custom .search-form input[type="text"]{
  width: 300px;              /* ubah ke 260–340px sesuai selera */
  max-width: 60vw;           /* jaga responsif */
  height: 40px;
  padding: 9px 12px 9px 40px;/* ruang untuk ikon kiri */
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.12);
  background: #fff;          /* kontras dgn navbar gelap */
  color:#222;
  outline: none;
  transition: box-shadow .15s ease, border-color .15s ease;
  /* ikon kaca pembesar (SVG inline via background) */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 12px center;
  background-size: 18px 18px;
}

.navbar-custom .search-form input::placeholder{
  color:#8a8a8a;
}

.navbar-custom .search-form input:focus{
  border-color: rgba(0,0,0,.12);
  box-shadow: 0 0 0 3px rgba(255,255,255,.08), 0 2px 8px rgba(0,0,0,.15);
}

/* Tombol: tampil di mobile, disembunyikan di layar lebar */
.navbar-custom .search-form button{
  height: 40px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.12);
  background: var(--warna1, #0d6efd);
  color:#fff;
  cursor:pointer;
}
@media (min-width: 576px){
  .navbar-custom .search-form button{
    display:none; /* enter saja di layar lebar */
  }
}


/* Deskripsi artikel */
.artikel-description {
    font-size: 17px;
    color: #d0d4e3;
    margin-bottom: 1.5rem;
}

.artikel-content {
    margin-bottom: 2rem;
}

.artikel-content p {
    margin-bottom: 0.85rem;
    line-height: 1.65;
}

.artikel-utama img.img-fluid {
    max-width: 100%;
    height: auto;
    max-height: 480px;
    object-fit: cover;
    display: block;
    margin: 0 auto;
}

.artikel-utama small.text-muted {
    text-align: center;
    display: block;
    font-size: 0.85rem;
    opacity: 0.7;
}

@media (max-width: 576px) {
  .artikel-utama {
    margin-left: -12px !important;
    margin-right: -12px !important;
  }

  .artikel-utama img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto;
    display: block;
    border-radius: 0 !important;
  }
  
  .sidebar-title-box img {
    max-height: 120px;
  }
}

.artikel-utama figcaption {
    font-size: 0.9rem;
    color: #6c757d; /* Bootstrap text-muted */
    margin-top: 4px;
}

figure.artikel-utama {
    margin-bottom: 1rem;
    background-color: #1f1f1f;
}

figure.artikel-utama img {
    display: block;
    max-width: 100%;
    height: auto;
}

figure.artikel-utama figcaption {
    margin-top: 6px;
    font-size: 0.95rem;
    color: #bdbdbd;
    text-align: center;
    font-style: italic;
}


.sidebar-title-box img {
    width: 100%;
    height: auto;          /* biarkan auto */
    max-height: 180px;     /* kasih batas maksimum */
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

.sidebar-title-box strong {
    font-size: 0.95rem;
    display: block;
    color: var(--warna3);
}


/* Link umum */
a {
    color: #a8b5f9;
    text-decoration: none;
}
a:hover {
    color: #7f96e0;
}

/* Kontainer konten & sidebar */
.container {
    max-width: 1024px;
    margin: 0 auto;
}
.col-md-4 {
    padding-left: 20px;
}

.card-body,
.sidebar,
.promosi-banner,
.sidebar-title-box {
    background-color: var(--warna1);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.sidebar-title-box,
.promosi-banner {
    padding: 15px;
}

/* Sidebar */
.sidebar-title {
    color: #ffffff;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.article-item {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}
.article-item img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 5px;
    margin-right: 10px;
}
.article-item a {
    font-size: 1rem;
    color: #ffffff;
    transition: color 0.3s ease;
}
.article-item a:hover {
    color: #b3c8ff;
}

/* Tombol share dengan ikon */
.share-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.share-buttons span {
    font-weight: 600;
    margin-right: 6px;
    color: var(--warna3);
}

.share-icon {
    width: 42px;
    height: 42px;
    background-color: #2a2f45;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.share-icon:hover {
    background-color: #3b4570;
    transform: scale(1.1);
}

.share-icon img {
    width: 22px;
    height: 22px;
}

/* Tombol kecil */
.btn-sm {
    background-color: #b9c7ff;
    color: #191d2d;
    padding: 6px 12px;
    font-size: 0.9rem;
    border-radius: 6px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
}
.btn-sm:hover {
    background-color: #9faeff;
    transform: scale(1.05);
}

/* List */
ul, ol {
    color: #c7cce4;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}
li {
    margin-bottom: 6px;
}

/* Caption Gambar */
img + small.text-muted {
    display: block;
    margin-top: 6px;
    font-style: italic;
    color: #aaa;
}

/* Responsif */
@media (max-width: 576px) {
    .card-body,
    .sidebar {
        padding: 15px;
    }

    .article-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .article-item img {
        margin-bottom: 10px;
    }

    .share-buttons {
        flex-direction: column;
        align-items: flex-start;
    }

    .artikel-title {
        font-size: 1.4rem;
    }
}

/* Navigasi Kategori */

.kategori-judul {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--warna3);
}

.artikel-kategori-item {
    padding-bottom: 1rem;
    border-bottom: 1px solid #2a2a2a;
    margin-bottom: 1rem;
}

.artikel-kategori-item h5 {
    font-size: 1rem;
    font-weight: 600;
    color: #f0f0f0;
    margin-bottom: 0;
}

.artikel-kategori-item h5:hover {
    color: #d4d6ff;
}

.artikel-kategori-item .text-success {
    display: inline-block;
    font-size: 0.8rem;
    color: #00c67f !important;
    margin-bottom: 4px;
}

.artikel-kategori-item img {
    border-radius: 6px;
    object-fit: cover;
    width: 120px;
    height: 80px;
}

.thumbnail-wrapper {
    width: 130px;
    flex-shrink: 0;
}

.thumbnail-img {
    width: 130px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
}

.artikel-meta {
    font-size: 0.85rem;
    color: #bbb;
}

.artikel-title a:hover {
    color: #c4d6ff;
    text-decoration: underline;
}

.text-muted {
    color: #aaa !important;
}

/* === List Artikel ala bola.net (kategori + waktu di atas judul) === */
.artikel-meta-bar{
  gap: .6rem;          /* jarak kecil antara kategori & waktu */
  line-height: 1;
}

/* Ganti "badge" jadi teks biasa */
.badge-kategori{
  padding: 0;
  background: transparent;
  border-radius: 0;
  display: inline;                 /* bukan inline-block pill */
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--warna3);            /* pakai warna aksen brandmu */
}

/* Waktu menempel di kanan kategori, bukan pojok kanan row */
.meta-time{
  font-size: .76rem;
  color: #b9bfd3;
  letter-spacing: .02em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* excerpt isi ruang kosong & samakan warna dg meta-time */
.artikel-excerpt{
  color:#b9bfd3;          /* sama dengan .meta-time */
  font-size:.95rem;
  line-height:1.45;
  margin-top:2px;
  display:-webkit-box;
  -webkit-line-clamp:2;   /* tampilkan 2 baris di desktop */
  -webkit-box-orient:vertical;
  overflow:hidden;
  text-overflow:ellipsis;
}

/* (opsional) di mobile biar tetap satu baris, kalau sempit boleh wrap */
@media (max-width: 576px){
  .artikel-meta-bar{ flex-wrap: wrap; gap: .35rem .5rem; }
  .artikel-excerpt{ -webkit-line-clamp:1; }
}

/* Hanya beri jarak ke waktu kalau ada badge kategori sebelumnya */
.artikel-meta-bar .meta-time{ margin-left:0; }
.artikel-meta-bar .badge-kategori + .meta-time{ margin-left:.25rem; }

/* Judul: clamp supaya tidak "melewati" tinggi thumbnail */
.artikel-list-title{
  font-size:18px;         /* sesuai rombakanmu */
  line-height:1.25;
  margin:0 0 4px 0;
  display:-webkit-box;
  -webkit-line-clamp:2;   /* tetap max 2 baris judul */
  -webkit-box-orient:vertical;
  overflow:hidden;
  text-overflow:ellipsis;
}