/* ====== RESET ====== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Montserrat", sans-serif;
  line-height: 1.6;
  background: #fff;
  color: #0c0c0c;
}

/* ====== GAMBAR MELAYANG DI ATAS WEBSITE ====== */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}
.popup {
  position: relative;
  background: #fff;
  padding: 10px;
  border-radius: 10px;
  max-width: 90%;
  max-height: 90%;
}
.popup img {
  max-width: 100%;
  height: auto;
  display: block;
}
.close-btn {
  position: absolute;
  top: -10px;
  right: -10px;
  background: red;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  font-size: 18px;
  cursor: pointer;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 40px; /* kasih jarak lebih ke kiri & kanan */
  background: #fff;
  width: 100%;
}

/* Logo */
.brand img {
  max-height: 80px; /* logo lebih besar dari sebelumnya (50px -> 70px) */
  margin-left: auto;
}

.header-content {
  flex: 1;
  text-align: center;
}

.tagline p {
  margin: 0;
  font-size: 14px;
  font-style: italic;
  color: #0073e6;
}

.social-icons a img {
  height: 20px;
  margin: 0 5px;
  transition: transform 0.2s ease;
}

.social-icons a img:hover {
  transform: scale(1.2);
}

.ads-banner img {
  height: 60px;
}

/* ====== MENU HORIZONTAL ====== */
.tabbar-wrapper {
  position: sticky;
  margin-top: 0px;
  top: 0px;

  z-index: 50;
  padding-bottom: 40px;
  background: #16a5c9;
  border-bottom: 1px solid #ddd;
}

.tabbar {
  padding: 0px 0px 0px 0px;
  padding-bottom: 8px;
}


/* ====== LAYOUT ====== */
.wrap {
  display: flex;
  flex-wrap: wrap; /* supaya otomatis turun di layar kecil */
  max-width: 1200px;
  margin: 20px auto;
  gap: 20px;
  padding: 0 15px;
}

.left-column {
  flex: 2;
  min-width: 0;
}

.right-column {
  flex: 1;
  min-width: 0;
}

/* ====== SLIDER ====== */
.slider {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  width: 100%;
}

/* ubah: jangan flex, biar fade bisa jalan */
.slides {
  position: relative;
  width: 100%;
  height: 400px; /* samakan dengan tinggi gambar */
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
}

.slide.active {
  opacity: 1;
  z-index: 2;
}

.slide img {
  width: 100%;
  height: 400px; /* seragam tingginya */
  object-fit: cover; /* isi penuh, proporsional */
  display: block;
}

.caption {
  position: absolute;
  bottom: 10px;
  left: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  padding: 10px;
  border-radius: 6px;
}

.caption .kategory {
  font-size: 12px;
  font-weight: bold;
  color: #ffeb3b;
  font-family: "Montserrat", sans-serif;
}

/* ====== Dots navigasi ====== */
.dots {
  position: absolute;
  top: 10px;
  right: 15px;
  z-index: 10;
}

.dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-left: 6px;
  background-color: #bbb;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.3s;
}

.dot.active {
  background-color: #ff6600;
}

/* ====== SIDEBAR TRENDING ====== */
.trending {
  margin-bottom: 20px;
  width: 100%;
}

.trending .side-head {
  font-weight: bold;
  margin-bottom: 10px;
  font-size: 18px;
}

.news-item {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;

  background: #fff; /* warna kotak */
  border: 1px solid #ddd; /* garis pinggir tipis */
  border-radius: 8px; /* sudut membulat */
  padding: 10px; /* ruang dalam */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* efek bayangan */
}

.news-item img {
  width: 100%;
  height: 80px; /* kecil, seragam */
  object-fit: cover;
  border-radius: 3px;
  display: block;
}

.news-item .cat {
  font-size: 12px;
  font-weight: bold;
  color: #ade4fc;
}

.news-item .title {
  font-size: 14px;
}

/* ====== IKLAN & INVITE ====== */
.ads .ad-box {
  background: #86d7f7;
  height: 175px;
  margin-bottom: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 8px;
}


/* ====== KOTAK GAMBAR ====== */
.kotak {
  width: 240px;
  height: 150px;
  border: 1px solid #ccc;
  overflow: hidden; /* supaya gambar tidak keluar kotak */
}

.kotak img {
  width: 100%;
  height: auto; /* jaga proporsional */
}

/* ====== MENGHILANGKAN/ MERUBAH WARNA DAN GARIS BAWAH PADA LINK  ====== */
a {
  text-decoration: none; /* hilangkan garis bawah */
  color: rgb(248, 246, 246); /* ubah warna link jadi merah */
}
a:hover {
  text-decoration: none; /* kalau mau muncul garis bawah lagi saat hover */
}



/*-- FOOTER --*/
.site-footer {
  background: #111827; /* warna gelap elegan */
  color: #f3f4f6; /* teks abu muda */
  padding: 40px 20px 20px;
  font-size: 15px;
  line-height: 1.6;
  font-family: "Montserrat", sans-serif;
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-about h3 {
  margin-bottom: 10px;
  font-size: 20px;
  color: #0b2b41; /* hijau positif */
}

.footer-links h4,
.footer-social h4 {
  margin-bottom: 10px;
  font-size: 16px;
  color: #f9fafb;
}

.footer-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links ul li {
  margin-bottom: 8px;
}

.footer-links ul li a,
.footer-social a {
  color: #d1d5db;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links ul li a:hover,
.footer-social a:hover {
  color: #10b981; /* hover jadi hijau */
}

.footer-bottom {
  border-top: 1px solid #374151;
  margin-top: 20px;
  padding-top: 15px;
  text-align: center;
  font-size: 14px;
  color: #9ca3af;
}
/* Responsif untuk HP */
@media (max-width: 600px) {
  .support-box {
    flex-direction: column;
    text-align: center;
  }
  .btn-support {
    width: 100%;
    text-align: center;
  }
}

/* ====== RESPONSIVE ====== */
@media (max-width: 768px) {
  .wrap {
    display: flex;
    gap: 20px;
  }

  /* Sidebar kanan + konten utama */
  .main-content {
    flex: 3;
  }
  .sidebar {
    flex: 1;
  }

  nav#menu {
    display: none;
    flex-direction: column;
    gap: 10px;
    padding-left: 20px; /* lebih kecil di mobile */
  }

  .menu-toggle {
    display: block;
  }

  .slides {
    height: 250px; /* slider lebih kecil */
  }

  .slide img {
    height: 250px;
  }

  .news-columns.slider-mode .news-card {
    flex: 0 0 100%; /* tampil 1 per 1 di mobile */
  }
}

/* ====== AGAR LOGO MP RESPONSIVE RAPAT KIRI ====== */
@media (max-width: 768px) {
  .topbar {
    padding-left: 15px;
    padding-right: 15px;
  }
  .topbar .brand img {
    max-height: 55px;
    text-align: left;
  }
  .navbar .navbar-brand {
    margin-left: 0 !important;
    margin-right: auto !important;
  }
  .ads-banner {
    background: url("img/ads-mobile.png") center/contain no-repeat;
    border: none;
    font-size: 0; /* sembunyikan tulisan */
    height: 50px; /* sesuaikan tinggi */
  }
}

/* ====== SLIDER BERITA ATAS RESPONSIVE ====== */
@media (max-width: 768px) {
  .slides {
    height: 250px;
  }
  .slide img {
    height: 250px;
  }
}
/* ====== RESPONSIVE BERITA 3 KOLOM, DI HP JADI 1 KOLOM ====== */
@media (max-width: 768px) {
  .news-card {
    flex: 0 0 100%;
  }
}
@media (min-width: 768px) {
  .search-box {
    display: flex !important;
    width: auto;
    margin: 0;
    box-shadow: none;
    border: none;
    background: transparent;
    padding: 0;
  }

  .search-box input {
    width: 200px;
  }

  .search-toggle {
    display: none;
  }
}

/* ====== RESPONSIVE ====== */
@media (max-width: 900px) {
  .wrap {
    flex-direction: column; /* jadi 1 kolom */
    gap: 30px;
  }

  .left-column,
  .right-column {
    max-width: 100%;
    flex: none;
  }
}

/* HP kecil */
@media (max-width: 600px) {
  .slides {
    height: 220px;
  }

  .slide img {
    height: 220px;
  }

  .caption {
    font-size: 14px;
    padding: 8px;
  }
}
