/* Featured News Card dengan Glassmorphism */
.featured-news-wrapper {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  margin-bottom: 3rem;
  height: 700px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  margin-top: 0;
}

.featured-news-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.85);
}

.featured-news-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.3) 50%,
    rgba(0, 0, 0, 0.7) 100%
  );
}

.featured-news-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2.5rem;
  color: white;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  max-height: 45%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.featured-badge {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
  color: white;
  width: fit-content;
}

.featured-title {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.75rem;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
  color: white;
}

.featured-description {
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 1rem;
  opacity: 0.95;
  max-width: 800px;
  color: white;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.3);
}

.featured-meta {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.9);
}

.featured-meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Arrow Icon di kanan atas glass */
.featured-arrow {
  position: absolute;
  top: 2.5rem;
  right: 2.5rem;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

.featured-news-wrapper:hover .featured-arrow {
  background: rgba(255, 255, 255, 0.25);
  transform: translate(4px, -4px);
}

/* Section Title */
.section-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.section-badge {
  padding: 0.35rem 0.85rem;
  background: #f0f0f5;
  color: #666;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #2c2c3e;
  margin: 0;
}

/* Filter dan Search Section */
.filter-section {
  margin-bottom: 2.5rem;
  display: flex;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.category-tabs {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  flex: 1;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.category-tabs::-webkit-scrollbar {
  display: none;
}

.category-tab {
  padding: 0.5rem 1.25rem;
  border-radius: 20px;
  border: 1px solid #e0e0e0;
  background: white;
  color: #666;
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.category-tab:hover {
  border-color: #0084ff;
  color: #0084ff;
  background: #f5f5ff;
}

.category-tab.active {
  background: #0084ff;
  color: white;
  border-color: #0084ff;
}

.search-wrapper {
  position: relative;
  min-width: 280px;
}

.search-input {
  width: 100%;
  padding: 0.6rem 1rem 0.6rem 2.75rem;
  border-radius: 20px;
  border: 1px solid #e0e0e0;
  font-size: 0.875rem;
  outline: none;
  transition: all 0.2s ease;
  background: white;
  color: #2c2c3e;
}

.search-input:focus {
  border-color: #696cff;
  box-shadow: 0 0 0 3px rgba(105, 108, 255, 0.1);
}

.search-input::placeholder {
  color: #999;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
  font-size: 1rem;
}

/* Clean News Cards */
.news-card {
  border-radius: 24px;
  overflow: hidden;
  border: none;
  background: transparent;
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.news-card:hover {
  transform: translateY(-8px);
  box-shadow: none;
}

.news-card-image {
  position: relative;
  padding-top: 65%;
  overflow: hidden;
  background: #f5f5f9;
}

.news-card-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.news-card:hover .news-card-image img {
  transform: scale(1.08);
}

/* Glass Badge di atas gambar */
.news-card-image-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: 0.4rem 0.9rem;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px) saturate(180%);
  -webkit-backdrop-filter: blur(10px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 16px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: white;
  z-index: 2;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.news-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.news-category-badge {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  width: fit-content;
}

.news-card-title {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 0.75rem;
  color: #2c2c3e;
}

.news-card-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.news-card-description {
  font-size: 0.875rem;
  color: #666;
  line-height: 1.6;
  margin-bottom: 1rem;
  flex: 1;
}

.news-card-footer {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #f0f0f0;
  font-size: 0.8rem;
  color: #999;
}

.news-card-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Empty State */
.empty-state-card {
  border-radius: 24px;
  border: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  background: white;
}

/* ========================================
   DARK MODE STYLES 
   ======================================== */

/* Body background untuk halaman berita saja */
[data-bs-theme="dark"] body {
  background-color: #24293c !important;
}

/* Container Background - Gunakan :has() untuk target spesifik */
[data-bs-theme="dark"] .container-xxl:has(.section-py),
[data-bs-theme="dark"] .container:has(.featured-news-wrapper) {
  background-color: #24293c !important;
}

[data-bs-theme="dark"] .section-py {
  background-color: transparent !important;
}

[data-bs-theme="dark"] .featured-news-wrapper {
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.7);
}

/* Category Tabs - Dark Mode */
[data-bs-theme="dark"] .category-tab {
  background: #2b2c40 !important;
  border-color: #3a3c52 !important;
  color: #b4b7c5 !important;
}

[data-bs-theme="dark"] .category-tab:hover {
  border-color: #696cff !important;
  color: #696cff !important;
  background: #33354a !important;
}

[data-bs-theme="dark"] .category-tab.active {
  background: #696cff !important;
  color: white !important;
  border-color: #696cff !important;
}

/* Search Input - Dark Mode */
[data-bs-theme="dark"] .search-input {
  background: #2b2c40 !important;
  border-color: #3a3c52 !important;
  color: #d9dbe6 !important;
}

[data-bs-theme="dark"] .search-input:focus {
  border-color: #696cff !important;
  box-shadow: 0 0 0 3px rgba(105, 108, 255, 0.15) !important;
  background: #2b2c40 !important;
}

[data-bs-theme="dark"] .search-input::placeholder {
  color: #7a7e96 !important;
}

[data-bs-theme="dark"] .search-icon {
  color: #7a7e96 !important;
}

/* News Cards - Dark Mode */
[data-bs-theme="dark"] .news-card {
  background: #24293c !important;
  /* border: 1px solid #3a3c52 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important; */
}

[data-bs-theme="dark"] .news-card:hover {
  /* box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6) !important;
  border-color: #4a4d66 !important; */
  transform: translateY(-8px);
}

[data-bs-theme="dark"] .news-card-image {
  background: #1e1e2d !important;
}

[data-bs-theme="dark"] .news-card-image-badge {
  background: rgba(255, 255, 255, 0.15) !important;
  backdrop-filter: blur(10px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(10px) saturate(180%) !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  color: white !important;
}

[data-bs-theme="dark"] .news-card-title {
  color: #d9dbe6 !important;
}

[data-bs-theme="dark"] .news-card-title a {
  color: #d9dbe6 !important;
}

[data-bs-theme="dark"] .news-card-title a:hover {
  color: #696cff !important;
}

[data-bs-theme="dark"] .news-card-description {
  color: #b4b7c5 !important;
}

[data-bs-theme="dark"] .news-card-footer {
  border-top-color: #3a3c52 !important;
  color: #7a7e96 !important;
}

[data-bs-theme="dark"] .news-card-meta {
  color: #7a7e96 !important;
}

[data-bs-theme="dark"] .news-card-meta i {
  color: #7a7e96 !important;
}

/* Empty State - Dark Mode */
[data-bs-theme="dark"] .empty-state-card {
  background: #2b2c40 !important;
  border: 1px solid #3a3c52 !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
}

[data-bs-theme="dark"] .empty-state-card .card-body {
  background: transparent !important;
}

[data-bs-theme="dark"] .empty-state-card h4 {
  color: #d9dbe6 !important;
}

[data-bs-theme="dark"] .empty-state-card .text-muted {
  color: #7a7e96 !important;
}

[data-bs-theme="dark"] .empty-state-card i {
  color: #3a3c52 !important;
}

/* Section Headers & Badges - Dark Mode */
[data-bs-theme="dark"] .section-badge,
[data-bs-theme="dark"] .badge.bg-label-primary {
  background-color: rgba(105, 108, 255, 0.16) !important;
  color: #696cff !important;
}

[data-bs-theme="dark"] .section-title {
  color: #d9dbe6 !important;
}

/* Target hanya heading di dalam section-py */
[data-bs-theme="dark"] .section-py h1,
[data-bs-theme="dark"] .section-py h2,
[data-bs-theme="dark"] .section-py h3,
[data-bs-theme="dark"] .section-py h4,
[data-bs-theme="dark"] .section-py h5,
[data-bs-theme="dark"] .section-py h6 {
  color: #d9dbe6 !important;
}

[data-bs-theme="dark"] .section-py p,
[data-bs-theme="dark"] .section-py .text-muted {
  color: #b4b7c5 !important;
}

/* Alert - Dark Mode */
[data-bs-theme="dark"] .alert-info {
  background-color: rgba(3, 195, 236, 0.12) !important;
  border-color: rgba(3, 195, 236, 0.3) !important;
  color: #26c6f9 !important;
}

[data-bs-theme="dark"] .alert-info i {
  color: #26c6f9 !important;
}

[data-bs-theme="dark"] .alert-info strong {
  color: #26c6f9 !important;
}

[data-bs-theme="dark"] .btn-outline-info {
  color: #26c6f9 !important;
  border-color: rgba(3, 195, 236, 0.5) !important;
  background: transparent !important;
}

[data-bs-theme="dark"] .btn-outline-info:hover {
  background-color: #03c3ec !important;
  color: #fff !important;
  border-color: #03c3ec !important;
}

/* Pagination - Dark Mode */
[data-bs-theme="dark"] .pagination .page-link {
  background: #2b2c40 !important;
  border-color: #3a3c52 !important;
  color: #b4b7c5 !important;
}

[data-bs-theme="dark"] .pagination .page-link:hover {
  background: #33354a !important;
  border-color: #696cff !important;
  color: #696cff !important;
}

[data-bs-theme="dark"] .pagination .page-item.active .page-link {
  background: #696cff !important;
  border-color: #696cff !important;
  color: white !important;
}

[data-bs-theme="dark"] .pagination .page-item.disabled .page-link {
  background: #2b2c40 !important;
  border-color: #3a3c52 !important;
  color: #7a7e96 !important;
}

/* Breadcrumb - Dark Mode */
[data-bs-theme="dark"] .breadcrumb {
  background: transparent !important;
}

[data-bs-theme="dark"] .breadcrumb-item,
[data-bs-theme="dark"] .breadcrumb-item a {
  color: #b4b7c5 !important;
}

[data-bs-theme="dark"] .breadcrumb-item.active {
  color: #d9dbe6 !important;
}

/* Scrollbar - Dark Mode untuk news section */
[data-bs-theme="dark"] .filter-section::-webkit-scrollbar,
[data-bs-theme="dark"] .category-tabs::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

[data-bs-theme="dark"] .filter-section::-webkit-scrollbar-track,
[data-bs-theme="dark"] .category-tabs::-webkit-scrollbar-track {
  background: #1e1e2d;
}

[data-bs-theme="dark"] .filter-section::-webkit-scrollbar-thumb,
[data-bs-theme="dark"] .category-tabs::-webkit-scrollbar-thumb {
  background: #3a3c52;
  border-radius: 4px;
}

[data-bs-theme="dark"] .filter-section::-webkit-scrollbar-thumb:hover,
[data-bs-theme="dark"] .category-tabs::-webkit-scrollbar-thumb:hover {
  background: #4a4d66;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .featured-news-wrapper {
    height: 550px;
    border-radius: 20px;
  }

  .featured-title {
    font-size: 1.4rem;
  }

  .featured-description {
    font-size: 0.875rem;
  }

  .featured-news-content {
    padding: 1.5rem;
    max-height: 50%;
  }

  .featured-meta {
    gap: 1rem;
    font-size: 0.8rem;
    flex-wrap: wrap;
  }

  .featured-badge {
    font-size: 0.65rem;
    padding: 0.35rem 0.75rem;
  }

  .featured-arrow {
    width: 35px;
    height: 35px;
    font-size: 1rem;
    top: 1.5rem;
    right: 1.5rem;
  }

  .filter-section {
    flex-direction: column;
    align-items: stretch;
  }

  .category-tabs {
    width: 100%;
  }

  .search-wrapper {
    width: 100%;
    min-width: auto;
  }

  .news-card {
    border-radius: 20px;
  }

  .news-card-image-badge {
    font-size: 0.65rem;
    padding: 0.35rem 0.75rem;
    top: 0.75rem;
    left: 0.75rem;
  }
}
