/* ======================
   GLOBAL
====================== */
* {
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

body {
  margin: 0;
  background: #f4f4f4;
}


/* ======================
   HERO (BERITA PAGE)
====================== */
.hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 80px 60px;
  background: linear-gradient(to bottom, #fff 0%, #fafafa 100%);
  min-height: 500px;
  gap: 40px;
  animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-text {
  flex: 1;
  max-width: 45%;
  animation: slideInLeft 0.8s ease-out;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.hero-text h1 {
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.2;
  margin-bottom: 20px;
  color: #2c3e50;
  font-weight: 700;
  background: linear-gradient(135deg, #2c3e50 0%, #c9a34a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-text p {
  font-size: clamp(15px, 2vw, 18px);
  line-height: 1.8;
  color: #666;
}

.hero-slider {
  flex: 1;
  max-width: 50%;
  animation: slideInRight 0.8s ease-out;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.hero-slider img {
  width: 100%;
  max-width: 600px;
  height: auto;
  max-height: 400px;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: 0 15px 50px rgba(0,0,0,0.15);
  transition: transform 0.3s ease;
  display: block;
  margin: 0 auto;
}

.hero-slider img:hover {
  transform: scale(1.02);
}


/* ======================
   BERITA SECTION
====================== */
.section {
  padding: 60px clamp(20px, 5vw, 60px);
  background: #fff;
  margin-top: 20px;
}

.section h2 {
  text-align: center;
  font-size: clamp(26px, 4vw, 36px);
  margin-bottom: 15px;
  color: #2c3e50;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.section h2::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, transparent, #c9a34a, #d4af37, #c9a34a, transparent);
  margin: 15px auto 0;
  border-radius: 2px;
}

.berita-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px;
  margin-top: 30px;
}

.card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 5px 18px rgba(0,0,0,0.08);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid #f0f0f0;
  height: 100%;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 35px rgba(0,0,0,0.15);
  border-color: #c9a34a;
}

.card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.card:hover img {
  transform: scale(1.08);
}

.card-content {
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
  min-height: 180px;
}

.card-content h4 {
  margin: 0 0 10px;
  color: #2c3e50;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 45px;
}

.card-content p {
  font-size: 13px;
  color: #666;
  margin: 0 0 12px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.card-content a {
  font-size: 13px;
  text-decoration: none;
  color: #c9a34a;
  font-weight: 600;
  align-self: flex-start;
  margin-top: auto;
  transition: all 0.3s ease;
}

.card-content a:hover {
  color: #b8923d;
  transform: translateX(5px);
}


/* ======================
   PAGINATION
====================== */
.pagination-berita {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 50px;
  padding: 20px 0;
}

.page-btn {
  padding: 10px 18px;
  border: 2px solid #e0e0e0;
  background: #fff;
  color: #555;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.page-btn:hover {
  background: linear-gradient(135deg, #c9a34a, #d4af37);
  color: #fff;
  border-color: #c9a34a;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(201, 163, 74, 0.3);
}

.page-btn.active {
  background: linear-gradient(135deg, #c9a34a, #d4af37);
  color: #fff;
  border-color: #c9a34a;
  box-shadow: 0 6px 16px rgba(201, 163, 74, 0.3);
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.page-btn:disabled:hover {
  background: #fff;
  color: #555;
  border-color: #e0e0e0;
  transform: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.page-dots {
  padding: 10px;
  color: #999;
  font-weight: 600;
}


/* ======================
   BERITA VIDEO (IG REELS)
====================== */
.video-scroll {
  display: flex;
  gap: 25px;
  overflow-x: auto;
  margin-top: 30px;
  padding: 10px 0 20px 0;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.video-scroll::-webkit-scrollbar {
  height: 10px;
}

.video-scroll::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.video-scroll::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, #c9a34a, #d4af37);
  border-radius: 10px;
  transition: background 0.3s ease;
}

.video-scroll::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(90deg, #b8923d, #c9a34a);
}

.video-card {
  min-width: clamp(240px, 30vw, 280px);
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(to bottom, #000, #1a1a1a);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.video-card:hover {
  transform: translateY(-10px) scale(1.03);
  box-shadow: 0 15px 45px rgba(0,0,0,0.25);
}

.video-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.video-card:hover img {
  transform: scale(1.1);
}

.video-caption {
  padding: 15px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0,0,0,0.9);
  backdrop-filter: blur(10px);
  line-height: 1.4;

   overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;

  min-width: 0; /* WAJIB untuk flex */
}
.video-caption i {
  flex-shrink: 0;
  font-size: 18px;
  flex-shrink: 0;
}

.video-caption {
  width: 100%;
}



/* ======================
   FOOTER
====================== */
.footer {
  background: #fdf7e8;
  border-top: 3px solid #c9a34a;
  margin-top: 60px;
  width: 100%;
}

.footer-container {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  padding: 50px 60px;
  align-items: center;
}

.footer-logo {
  height: 70px;
  margin-bottom: 10px;
}

.footer-info h3 {
  margin: 10px 0;
  color: #222;
}

.footer-info p {
  font-size: 14px;
  color: #444;
  line-height: 1.6;
}

.footer-social {
  margin-top: 15px;
  display: flex;
  gap: 15px;
}

.footer-social a {
  font-size: 26px;
  color: #333;
  transition: 0.3s;
}

.footer-social a.youtube:hover { color: #ff0000; }
.footer-social a.instagram:hover { color: #c13584; }
.footer-social a.facebook:hover { color: #1877f2; }

.footer-map iframe {
  width: 100%;
  height: 280px;
  border: none;
  border-radius: 15px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.footer-bottom {
  text-align: center;
  padding: 15px;
  background: #fff;
  font-size: 13px;
  color: #666;
}


/* ======================
   RESPONSIVE
====================== */
@media (max-width: 1200px) {
  .berita-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .berita-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .hero {
    flex-direction: column;
    padding: 50px 30px;
    min-height: auto;
  }
  
  .hero-text {
    max-width: 100%;
    text-align: center;
    margin-bottom: 30px;
  }
  
  .hero-text h1 {
    font-size: 32px;
  }
  
  .hero-slider {
    max-width: 100%;
  }
  
  .hero-slider img {
    width: 100%;
    height: auto;
    max-width: 100%;
    max-height: 300px;
    display: block;
    margin: 0 auto;
  }
}

/* Tablet/Medium screens */
@media (min-width: 769px) and (max-width: 1024px) {
  .hero-slider {
    max-width: 90%;
    margin: 0 auto;
  }
  
  .hero-slider img {
    max-width: 500px;
    display: block;
    margin: 0 auto;
  }
  
  .section {
    padding: 40px 20px;
  }
  
  .section h2 {
    font-size: 28px;
  }
  
  .card img {
    height: 200px;
  }
  
  .card-content {
    min-height: 180px;
  }
  
  .video-card {
    min-width: 240px;
  }
  
  .video-card img {
    height: 320px;
  }
  
  .pagination-berita {
    gap: 8px;
    flex-wrap: wrap;
  }
  
  .page-btn {
    padding: 8px 14px;
    font-size: 13px;
  }
}

@media (max-width: 576px) {
  .hero {
    padding: 30px 15px;
  }
  
  .section {
    padding: 30px 15px;
  }
  
  .berita-grid {
    gap: 20px;
  }
  
  .card img {
    height: 180px;
  }
  
  .video-card {
    min-width: 220px;
  }
  
  .video-card img {
    height: 280px;
  }
  
  .video-scroll {
    gap: 20px;
  }
}
/* error state dan skeleton loader untuk halaman berita */
#listBerita .error-state,
#listBerita .empty-state,
#beritaVideo .error-state,
#beritaVideo .empty-state {
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  grid-column: 1 / -1; /* span all columns */
  padding: 60px 20px;
}

#listBerita .skeleton-card,
#beritaVideo .skeleton-card {
  width: 100%;
  height: 420px;
  border-radius: 16px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s ease-in-out infinite;
}

/* pastikan grid tetap rapi saat skeleton loader */
.berita-grid:has(.skeleton-card) {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
}

.video-scroll:has(.skeleton-card) {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}