
/* start section headline blog */
.news-section {
  padding: 30px;
  text-align: left;
  margin: auto;
}

.section-title {
  font-size: 30px;
  font-weight: bold;
  color: #162C60;
  text-align: center;
  margin: 30px 0 30px 0;
}

.news-carousel-wrapper {
  width: 100%;
  margin: 0 auto;
  padding: 20px;
  overflow: hidden;
  /* Mencegah bocoran konten berikutnya */
  box-sizing: border-box;
}

.news-carousel .news-item {
  position: relative;
  background-size: cover;
  background-position: center;
  overflow: hidden;
  height: 480px;
  display: flex;
  align-items: flex-end;
  transition: transform 0.3s ease;
  width: 100% !important;
  max-width: 100%;
  border-radius: 10px;
}

.news-carousel .news-item:hover {
  transform: scale(1.02);
}

.news-content {
  background: rgba(0, 0, 0, 0.5);
  color: white;
  padding: 12px 16px;
  width: 100%;
  backdrop-filter: blur(3px);
  box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.2);
}

.news-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 10px;
}

.news-description {
  font-size: 14px;
  line-height: 1.5;
}

.news-icon {
  position: absolute;
  top: 8px;
  right: 20px;
  font-size: 28px;
}

.read_time {
    display: inline-block;
    background-color: #D0E8FF; 
    color: #0873ff;
    font-size: 12px;
    padding: 2px 8px;
    margin-right: 10px;
    border-radius: 999px;
}

.filter-buttons .badge {
    background-color: #D0E8FF;
    color: #0873ff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 50%;
    font-weight: 500;
    margin-left: 5px;
}

.badge-count {
    display: none;
}

button.active .badge-count {
    display: inline-block;
}

#paginationBerita p.text-muted{
    display: none !important;
}

/* Tablet */
@media (max-width: 1024px) {
  .news-carousel-wrapper {
    padding: 0px;
    margin: 0px;
  }
  .news-section {
    padding: 30px;
    margin: auto;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .news-section {
    padding: 30px 15px;
  }

  .section-title {
    font-size: 24px;
    margin-bottom: 20px;
  }

  .news-carousel-wrapper {
    max-width: 100%;
    padding: 0 10px;
  }

  .news-carousel .news-item {
    height: 300px;
    border-radius: 15px;
    margin-bottom: 20px;
    overflow: hidden;
  }

  .news-content {
    padding: 10px 12px;
  }

  .news-title {
    font-size: 16px;
    margin-bottom: 8px;
  }

  .news-description {
    font-size: 13px;
    line-height: 1.4;
  }

  .news-icon {
    top: 6px;
    right: 10px;
    font-size: 24px;
  }
}

/* Extra Small */
@media (max-width: 576px) {
  .news-section {
    padding: 20px 10px;
  }

  .section-title {
    font-size: 22px;
    margin-bottom: 15px;
  }

  .news-carousel-wrapper {
    padding: 0 5px;
  }

  .news-content {
    padding: 8px 10px;
  }

  .news-title {
    font-size: 14px;
    margin-bottom: 6px;
  }

  .news-description {
    font-size: 12px;
    line-height: 1.4;
  }

  .news-icon {
    font-size: 20px;
  }
}
/* end section headline blog */


/* start section filter */ 
.filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #ddd;
  padding: 0 20px 20px 20px;
  font-family: 'Segoe UI', sans-serif;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto 50px auto;
  /* Pusatkan ke tengah */
}

.filter-buttons {
  display: flex;
  gap: 20px;
}

.filter-buttons button {
  background: none;
  border: none;
  outline: none;
  font-size: 14px;
  cursor: pointer;
  padding-bottom: 6px;
  color: #666;
  position: relative;
}

.filter-buttons button.active {
  color: #162C60;
  font-weight: bold;
}

.filter-buttons button:hover {
  color: #162C60;
  font-weight: bold;
}

.filter-buttons button::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #1e80ff;
  transition: width 0.3s ease;
}

.filter-buttons button.active::after {
  width: 100%;
}
.search-box {
  position: relative;
}

.search-box input {
  padding: 8px 30px 8px 12px;
  border-radius: 20px;
  border: 1px solid #ccc;
  font-size: 14px;
}

.search-box .icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 14px;
}

/* Tablet (max-width: 1024px) */
@media (max-width: 1024px) {
  .filter-bar {
    padding: 20px;
    flex-direction: row;
    justify-content: space-between;
  }

  .filter-buttons {
    gap: 20px;
  }

  .search-box {
    width: auto;
    margin-top: 0;
  }

  .search-box input {
    width: 220px;
    padding: 8px 30px 8px 12px;
  }
}

/* Mobile (max-width: 768px) */
@media (max-width: 768px) {
  .filter-bar {
    padding: 20px 30px;
    flex-direction: column;
    align-items: flex-start; 
    gap: 10px;
  }

  .filter-buttons {
    order: 1;
    gap: 10px;
    flex-wrap: nowrap;
    overflow-x: auto; 
    padding-bottom: 10px;
  }

  .filter-buttons button {
    font-size: 12px;
    padding-bottom: 4px;
  }

  .search-box {
    order: 2;
    width: 100%;
    margin-top: 10px;
  }

  .search-box input {
    width: 100%;
    padding: 8px 30px 8px 12px;
    font-size: 13px;
  }

  .search-box .icon {
    right: 12px;
    font-size: 12px;
  }
}

/* Extra Small (max-width: 576px) */
@media (max-width: 576px) {
  .filter-bar {
    padding: 20px;
    gap: 8px;
    flex-direction: column;
    align-items: flex-start; 
  }

  .filter-buttons {
    gap: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .filter-buttons button {
    font-size: 12px;
    padding-bottom: 3px;
  }

  .search-box input {
    font-size: 12px;
    padding: 6px 30px 6px 10px;
  }

  .search-box .icon {
    right: 10px;
    font-size: 12px;
  }
}
/* end section filter */




/* Start section blog */
.konten-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  width: 100%;
  max-width: 100%;
}

.konten-item {
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: 0.2s ease;
  margin-bottom: 20px;
  background-color: #fff;
}

.konten-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 10px;
}

.konten-details {
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.konten-title a {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #162C60;
  text-decoration: none;
  transition: color 0.3s ease, transform 0.3s ease;
}

.konten-title a:hover {
  color: #1e80ff;
  text-decoration: underline;
  transform: scale(1.05);
}

.konten-info {
  font-size: 14px;
  color: #6B7A99;
  margin-bottom: 12px;
}

.konten-deskripsi {
  font-size: 15px;
  color: #39445A;
  line-height: 1.5;
}

.badge-kategori {
  color: #0873ff;
  font-weight: 600;
  font-size: 12px;
  margin-bottom: 8px;
}

.konten-tanggal {
  font-size: 0.85rem;
  color: #777;
  margin-top: 10px;
}

.pagination .page-link {
  color: #0366ff;
  margin-bottom: 100px;
  margin-top: 30px;
}

.pagination .page-item.active .page-link {
  background-color: #0366ff;
  border-color: #0366ff;
  color: white;
}

.pagination .page-link:hover {
  background-color: rgba(3, 102, 255, 0.1);
}

/* Tablet styles (768px - 1024px) */
@media (max-width: 1024px) {
  #searchResults .container {
    padding: 0px 30px !important;
    z-index: 0;
  }

  .konten-grid {
    grid-template-columns: repeat(2, 1fr); 
    gap: 15px;
  }
  
  .konten-image {
    height: 200px;
  }
  
  .konten-title a {
    font-size: 17px;
  }
  
  .konten-deskripsi {
    font-size: 14px;
  }
}

/* Mobile styles (up to 767px) */
@media (max-width: 767px) {
  #searchResults .container {
    padding: 0px 20px !important;
  }

  .konten-grid {
    grid-template-columns: 1fr; 
    gap: 15px;
  }
  
  .konten-item {
    margin-bottom: 15px;
  }
  
  .konten-image {
    height: 180px;
  }
  
  .konten-title a {
    font-size: 16px;
  }
  
  .konten-info {
    font-size: 13px;
  }
  
  .konten-deskripsi {
    font-size: 14px;
  }
  
  .pagination .page-link {
    margin-bottom: 60px;
    margin-top: 20px;
  }
}

/* Small mobile devices (optional) */
@media (max-width: 480px) {
  .konten-image {
    height: 180px;
  }
  
  .konten-details {
    padding-top: 12px;
  }
  
  .konten-title a {
    font-size: 15px;
  }
  
  .konten-deskripsi {
    font-size: 13px;
  }
}
/* end section blog */