/* ═══════════════════════════════════════
   BERITA PAGE — berita.css
═══════════════════════════════════════ */

/* ─── NAVBAR OVERRIDES ─── */
#navbar:not(.scrolled) .nav-link,
#navbar:not(.scrolled) .nav-mobile-link {
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

#navbar:not(.scrolled) .nav-hamburger {
  color: rgba(255, 255, 255, 0.95);
}

#navbar:not(.scrolled) .nav-p3m-text p {
  color: rgba(255, 255, 255, 0.95) !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* ─── HERO ─── */
.berita-hero {
  position: relative;
  overflow: hidden;
  background-color: #0f172a;
  /* Dark sunset base */
  padding-top: 7rem;
  padding-bottom: 6rem;
}

/* Abstract glowing orbs for sunset effect */
.berita-hero::before,
.berita-hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  z-index: 1;
  pointer-events: none;
}

.berita-hero::before {
  width: 60vw;
  height: 60vw;
  background: rgba(234, 88, 12, 0.15);
  /* Sunset orange */
  top: -20vw;
  left: -10vw;
}

.berita-hero::after {
  width: 50vw;
  height: 50vw;
  background: rgba(88, 28, 135, 0.25);
  /* Deep purple */
  bottom: -10vw;
  right: -10vw;
}

.berita-hero-shine {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, transparent 50%, rgba(0, 0, 0, 0.2) 100%);
}

.berita-hero-inner {
  max-width: 768px;
  margin: 0 auto;
  padding: 0 1.5rem;
  text-align: center;
  position: relative;
  z-index: 10;
}

.berita-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(6px);
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.5s ease forwards;
}

.berita-hero-title {
  font-size: clamp(1.8rem, 4vw, 2.9rem);
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.035em;
  margin-bottom: 1.2rem;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.08s forwards;
}

.berita-hero-title-orange {
  background: linear-gradient(135deg, #fed7aa, #fb923c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.berita-hero-bars {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
  margin-bottom: 1.25rem;
}

.berita-hero-desc {
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.85;
  font-size: 1rem;
  opacity: 0;
  animation: fadeUp 0.5s ease 0.18s forwards;
}

/* ─── FILTER & CONTENT ─── */
.berita-content-section {
  background: #ffffff;
  position: relative;
  overflow: hidden;
  padding: 2rem 0;
}

.berita-content-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
  position: relative;
  z-index: 10;
}

@media (min-width: 640px) {
  .berita-content-inner {
    padding: 0 1.5rem;
  }
}

@media (min-width: 1024px) {
  .berita-content-inner {
    padding: 0 2rem;
  }
}

.filter-bar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
  padding: 1rem;
  border-radius: 1rem;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.05);
  opacity: 0;
  animation: fadeUp 0.5s ease forwards;
}

@media (min-width: 640px) {
  .filter-bar {
    flex-direction: row;
    align-items: center;
    padding: 1.25rem;
  }
}

.filter-search-wrap {
  position: relative;
  flex: 1;
  max-width: 384px;
}

.filter-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  width: 16px;
  height: 16px;
  pointer-events: none;
}

.filter-search-input {
  width: 100%;
  padding: 12px 20px 12px 48px;
  border-radius: 14px;
  border: 1.5px solid #e2e8f0;
  background: #fff;
  font-size: 0.95rem;
  font-weight: 500;
  color: #0f172a;
  font-family: inherit;
  outline: none;
  transition: all 0.25s ease;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.filter-search-input:focus {
  border-color: #2563eb;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.12), 0 0 0 3px rgba(37, 99, 235, 0.15);
  transform: translateY(-1px);
}

.filter-search-spinner {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border: 2px solid #e2e8f0;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: none;
}

@keyframes spin {
  to {
    transform: translateY(-50%) rotate(360deg);
  }
}

.highlight-keyword {
  background: #fef08a;
  /* Soft bright yellow */
  color: #0f172a;
  border-radius: 3px;
  padding: 0 2px;
  font-weight: 700;
}

.berita-live-loading {
  opacity: 0.5;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.berita-animated-render {
  animation: fadeUpSoft 0.5s ease forwards;
}

@keyframes fadeUpSoft {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.filter-cats {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-cat-btn {
  padding: 6px 14px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  background: #fff;
  color: #64748b;
  border: 1.5px solid #e2e8f0;
  transition: all 0.2s;
}

.filter-cat-btn:hover {
  border-color: #2563eb;
  color: #2563eb;
}

.filter-cat-btn.active {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
  box-shadow: 0 3px 14px rgba(37, 99, 235, 0.30);
  transform: translateY(-1px);
}

/* ─── FEATURED ARTICLE ─── */
.featured-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 1rem;
}

.featured-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  background: linear-gradient(90deg, #fff7ed, #ffedd5);
  color: #c2410c;
  border: 1.5px solid #fdba74;
}

.featured-card {
  display: grid;
  grid-template-columns: 1fr;
  border-radius: 1.5rem;
  overflow: hidden;
  border: 1.5px solid #bfdbfe;
  box-shadow: 0 10px 48px rgba(37, 99, 235, 0.14);
  background: #fff;
  transition: box-shadow 0.3s, transform 0.3s;
  margin-bottom: 2.5rem;
  text-decoration: none;
  color: inherit;
}

.featured-card:hover {
  box-shadow: 0 20px 64px rgba(37, 99, 235, 0.22);
  transform: translateY(-4px);
}

@media (min-width: 768px) {
  .featured-card {
    grid-template-columns: minmax(360px, 1.1fr) 1fr;
  }
}

.featured-img-col {
  overflow: hidden;
  position: relative;
  min-height: 240px;
}

.featured-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.featured-card:hover .featured-img {
  transform: scale(1.05);
}

.featured-img-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to right, rgba(15, 23, 42, 0.35) 0%, transparent 50%), linear-gradient(to top, rgba(15, 23, 42, 0.3) 0%, transparent 40%);
}

.featured-cat-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  font-size: 0.75rem;
  padding: 6px 14px;
  border-radius: 12px;
  color: #fff;
  font-weight: 800;
}

.featured-views-badge {
  position: absolute;
  bottom: 16px;
  left: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
}

.featured-text-col {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(135deg, #ffffff, #f8fafc);
}

@media (min-width: 768px) {
  .featured-text-col {
    padding: 2rem;
  }
}

.featured-text-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 1.25rem;
}

.featured-text-cat-badge {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 800;
}

.featured-text-utama-badge {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 800;
  background: linear-gradient(135deg, #fff7ed, #ffedd5);
  color: #c2410c;
  border: 1px solid #fdba74;
}

.featured-title {
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  font-weight: 900;
  color: #0f172a;
  line-height: 1.45;
  margin-bottom: 0.75rem;
  transition: color 0.2s;
}

.featured-card:hover .featured-title {
  color: #1d4ed8;
}

.featured-desc {
  font-size: 0.875rem;
  color: #475569;
  line-height: 1.85;
  margin-bottom: 1.5rem;
}

.featured-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
}

.featured-date {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: #94a3b8;
}

.featured-read-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.875rem;
  padding: 6px 12px;
  border-radius: 12px;
  font-weight: 800;
  color: #c2410c;
  background: linear-gradient(135deg, #fff7ed, #ffedd5);
  border: 1px solid #fdba74;
}

/* ─── NEWS GRID ─── */
.berita-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
}

@media (min-width: 768px) {
  .berita-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1024px) {
  .berita-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.berita-grid-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 1rem;
  overflow: hidden;
  border: 1.5px solid #e2e8f0;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.07);
  transition: all 0.3s;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

.berita-grid-card:hover {
  box-shadow: 0 16px 44px rgba(37, 99, 235, 0.15);
}

.berita-grid-img-wrap {
  position: relative;
  height: 210px;
  flex-shrink: 0;
  overflow: hidden;
}

.berita-grid-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.berita-grid-card:hover .berita-grid-img {
  transform: scale(1.10);
}

.berita-grid-img-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.6) 0%, transparent 55%);
}

.berita-grid-cat {
  position: absolute;
  bottom: 12px;
  left: 12px;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 8px;
  color: #fff;
  font-weight: 800;
}

.berita-grid-views {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.50);
  backdrop-filter: blur(4px);
  color: #fff;
  font-weight: 600;
}

.berita-grid-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.berita-grid-title {
  font-weight: 800;
  color: #0f172a;
  font-size: 0.92rem;
  line-height: 1.55;
  margin-bottom: 10px;
  transition: color 0.2s;
}

.berita-grid-card:hover .berita-grid-title {
  color: #2563eb;
}

.berita-grid-ringkasan {
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.8;
  flex: 1;
  margin-bottom: 1rem;
}

.berita-grid-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  margin-top: auto;
}

.berita-grid-date {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: #94a3b8;
}

.berita-grid-read {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 8px;
  font-weight: 800;
}

/* ─── EMPTY STATE ─── */
.berita-empty {
  text-align: center;
  padding: 6rem 0;
}

.berita-empty-icon {
  width: 80px;
  height: 80px;
  border-radius: 1rem;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.berita-empty-text {
  font-weight: 700;
  color: #475569;
  font-size: 1rem;
}

.berita-empty-sub {
  font-size: 0.875rem;
  color: #94a3b8;
  margin-top: 8px;
}