@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css');

/* Regular 400 */
@font-face {
  font-family: 'SF Pro Rounded';
  src: url('../fonts/SF-Pro-Rounded-light.otf') format('opentype');
  font-weight: 200;
  font-style: normal;
}

@font-face {
  font-family: 'SF Pro Rounded';
  src: url('../fonts/SF-Pro-Rounded-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
}

/* Medium 500 */
@font-face {
  font-family: 'SF Pro Rounded';
  src: url('../fonts/SF-Pro-Rounded-Medium.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
}

/* Semibold 600 */
@font-face {
  font-family: 'SF Pro Rounded';
  src: url('../fonts/SF-Pro-Rounded-Semibold.otf') format('opentype');
  font-weight: 600;
  font-style: normal;
}

/* Bold 700 */
@font-face {
  font-family: 'SF Pro Rounded';
  src: url('../fonts/SF-Pro-Rounded-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
}

body.dark-mode {
  background: #001919 !important;
  color: #fff !important;
}

body.dark-mode .lihat-lainnya {
  color:  rgba(255, 255, 255, 0.7) !important;
}

.infografik-section {
  margin-top: 40px;
}

.container-infografik {
  width: 90%;
  max-width: 1300px;
  margin: 0 auto 50px;
}

/* HEADER */
.infografik-header {
  margin-bottom: 10px;
}

.judul-garis h2 {
  font-size: 20px;
  font-family: 'SF Pro Rounded', sans-serif;
  font-weight: 400;
  margin-bottom: 6px;
}

/* GARIS */
.garis-kombo-infog {
  height: 2px;
  width: 100%;
  margin-top: 5px;
  background: linear-gradient(to right, #046049 4%, #ccc 4%);
  margin-bottom: 30px;
}

/* LIHAT LAINNYA - PINDAH KE BAWAH */
.lihat-lainnya {
  font-family: 'SF Pro Rounded', sans-serif;
  font-weight: 500;
  display: block;
  text-align: right;
  margin-top: 8px;
  text-decoration: none;
  font-size: 13.75px;
  color: rgba(0, 0, 0, 0.7);;
  transition: color 0.3s;
}

.lihat-lainnya:hover {
  color: #000;
}


/* SLIDER */
.infografik-slider {
  padding-top: 20px;
}

.slider-content {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 10px;
}

.slider-content::-webkit-scrollbar {
  height: 6px;
}
.slider-content::-webkit-scrollbar-thumb {
  background: #aaa;
  border-radius: 3px;
}

.slider-content img {
  width: 100%;
  height: auto;
  max-height: 1000px;
  object-fit: cover;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.slider-content img:hover {
  transform: scale(1.12);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.infografik-item {
  flex: 0 0 auto;
  width: 20%; /* 5 items per screen */
  scroll-snap-align: start;
  position: relative;
  overflow: hidden;
  display: block;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.infografik-item:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.infografik-item img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}

/* Overlay judul (opsional) */
.overlay-judul {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0,0,0,0.6);
  color: white;
  font-size: 14px;
  padding: 10px;
  text-align: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.infografik-item:hover .overlay-judul {
  opacity: 1;
}

/* ==================== RESPONSIVE ==================== */

/* Desktop (≥ 992px) → 4 items */
.infografik-item {
  width: 22%; /* sebelumnya 20%, sekarang sedikit lebih compact */
}

/* Tablet (≤ 992px) → 3 items */
@media (max-width: 992px) {
.infografik-section {
  padding: 0 10px;
}

  .infografik-item {
    width: 30%;
  }
  .judul-garis h2 {
    font-size: 18px;
    margin-top: 30px;
  }

  .slider-content {
    gap: 7px;
  }
}

/* Mobile (≤ 768px) → 2 items */
@media (max-width: 768px) {
  .infografik-item {
    width: 48%;
  }
  .overlay-judul {
    font-size: 13px;
    padding: 8px;
  }
  .judul-garis h2 {
    font-size: 16px;
  }
}

/* Small Mobile (≤ 480px) → 1 item full width */
@media (max-width: 480px) {
  .infografik-item {
    width: 50%;
  }
  .overlay-judul {
    font-size: 12px;
    padding: 6px;
  }
  .judul-garis h2 {
    font-size: 15px;
    
  }

  .lihat-lainnya {
    font-size: 12px;
}
}
