/* Custom style dari <style> di index.html */
.video-thumbnail {
  max-width: 75%;
  height: auto;
  cursor: pointer;
  display: block;
  margin: 0 auto;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.glightbox-container .gvideo {
  max-width: 100%;
  margin: 0 auto;
}
.glightbox-container .gvideo video {
  width: 100%;
  height: auto;
  max-height: 100vh;
}
.pulsating-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
}

/* Style aplikasi-section tanpa card, 4 logo berjejer, gap 3px antara logo 1 dan 2 */
.aplikasi-section {
  padding: 10px 0 40px 0;
  background: none;
}

.aplikasi-logo-row {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 5px;
}

.aplikasi-logo-img {
  width: 210px;
  height: 100px;
  object-fit: contain;
  margin: 5px;
  display: block;
  transition: transform 0.2s;
  background: none;
  /*border: 0.1px solid #d3d3d3; /* Warna abu-abu */
  border-radius: 5px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.aplikasi-logo-row a:hover .aplikasi-logo-img {
  transform: scale(1.05);
}

@media (max-width: 900px) {
  .aplikasi-logo-row {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }
  .aplikasi-logo-img {
    width: 70vw;
    max-width: 300px;
    min-width: 160px;
    height: auto;
    margin: 0 auto;
    display: block;
  }
  .aplikasi-logo-toast-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
}

.layanan-aplikasi-section {
  background:#3E5879;
  padding: 10px 0;
  margin-bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
}

.layanan-header {
  font-size: 1.3rem;
  font-weight: 500;
  color: #fff;
  text-align: center;
  margin: 0;
  letter-spacing: 1px;
  width: 100%;
}

.aplikasi-logo-toast-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.aplikasi-toast {
  display: none;
  position: relative;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-12px);
  background: rgba(220, 53, 69, 0.92);
  color: #fff;
  padding: 7px 18px;
  border-radius: 6px;
  font-size: 1rem;
  white-space: nowrap;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  font-weight: 500;
  letter-spacing: 0.5px;
  box-shadow: none;
}

.aplikasi-toast.show {
  display: block;
  opacity: 2;
}

@media (max-width: 992px) {
  .tabs .nav-link.active {
    background: none !important;
    color: var(--accent-color) !important;
  }
} 

/* Card Berita lebih kecil, landscape, dan menempel */
.berita-card {
  max-width: 350px;
  min-width: 300px;
  margin: 0 2px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 240px;
}
.berita-thumb-wrap {
  width: 100%;
  height: 120px;
  overflow: hidden;
  background: #f7f7f7;
  display: flex;
  align-items: center;
  justify-content: center;
}
.berita-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.card-body {
  flex: 1 1 auto;
  padding: 10px 14px 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.berita-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  color: #222;
  margin-bottom: 2px;
}
.berita-excerpt {
  font-size: 0.92rem;
  color: #444;
  font-weight: 400;
  line-height: 1.3;
  margin-bottom: 8px;
}
.btn.btn-primary.btn-sm {
  font-size: 0.92rem;
  padding: 4px 14px;
  border-radius: 4px;
  align-self: flex-start;
  background: #32b6f1 !important;
  border-color: #32b6f1 !important;
  color: #fff !important;
}
.btn.btn-primary.btn-sm:hover, .btn.btn-primary.btn-sm:focus {
  background: #229ed6 !important;
  border-color: #229ed6 !important;
  color: #fff !important;
}
.swiper-wrapper {
  align-items: stretch;
}
.swiper-slide {
  display: flex;
  height: auto;
}
@media (max-width: 991px) {
  .berita-card { max-width: 95vw; min-width: 220px; height: 180px; }
  .berita-thumb-wrap { height: 80px; }
}
#recent-berita .swiper-pagination {
  position: static;
  margin-top: 24px;
  text-align: center;
}
#recent-berita .swiper-pagination-bullet {
  background: #32b6f1;
  opacity: 0.4;
  width: 10px;
  height: 10px;
  margin: 0 3px !important;
  transition: opacity 0.2s;
}
#recent-berita .swiper-pagination-bullet-active {
  opacity: 1;
}

/* Custom CSS for Bapelkes Sulut */

/* Loading placeholder styles */
.berita-loading-placeholder {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  border-radius: 8px;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Optimize animations for better performance */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Improve page load performance */
.index-page {
  will-change: auto;
}

/* Optimize images */
img {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

/* Reduce layout shift */
.berita-card {
  min-height: 300px;
}

.berita-thumb-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

/* Modern Table Styles */
.modern-table {
  width: 100%;
  border-collapse: collapse;
  margin: 30px 0;
  font-size: 1rem;
  font-family: 'Poppins', Arial, sans-serif;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  /* border-radius: 10px; */
  overflow: hidden;
}
.modern-table thead {
  background: #3E5879;
  color: #fff;
}
.modern-table th, .modern-table td {
  padding: 14px 18px;
  text-align: left;
  border: 2px solid #d1d5db;
}
.modern-table tbody tr {
  border-bottom: 2px solid #d1d5db;
  transition: background 0.2s;
}
.modern-table tbody tr:hover {
  background: #f5faff;
}
.modern-table th:first-child, .modern-table td:first-child,
.modern-table th:last-child, .modern-table td:last-child {
  border-radius: 0;
}
@media (max-width: 600px) {
  .modern-table thead {
    display: none;
  }
  .modern-table, .modern-table tbody, .modern-table tr, .modern-table td {
    display: block;
    width: 100%;
  }
  .modern-table tr {
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    border-radius: 10px;
    background: #fff;
  }
  .modern-table td {
    padding: 12px 16px;
    text-align: right;
    position: relative;
    border: 2px solid #d1d5db;
  }
  .modern-table td:before {
    content: attr(data-label);
    position: absolute;
    left: 16px;
    top: 12px;
    font-weight: bold;
    text-align: left;
    color: #3E5879;
  }
}

.pagination {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.5rem;
  margin-top: 20px;
}
.pagination-btn {
  border: none;
  background: none;
  color: #3E5879;
  padding: 6px 16px;
  font-size: 1rem;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}
.pagination-btn:disabled {
  color: #b0b0b0;
  cursor: not-allowed;
}
.pagination-page {
  background: #3E5879;
  color: #fff;
  padding: 4px 12px;
  border-radius: 4px;
  font-weight: bold;
  border: none;
  font-size: 0.95rem;
}

.filter-bar {
  display: flex;
  align-items: flex-end;
  gap: 2rem;
  margin-bottom: 1rem;
}
.filter-group {
  display: flex;
  flex-direction: column;
  min-width: 160px;
}
.filter-group label {
  font-size: 1rem;
  color: #6c757d;
  margin-bottom: 4px;
  font-weight: 500;
}
.filter-group select {
  padding: 7px 12px;
  border: 1.5px solid #bfc9d9;
  border-radius: 6px;
  font-size: 1rem;
  color: #3E5879;
  background: #fcfdff;
  transition: border 0.2s;
  min-width: 160px;
  max-width: 220px;
}
.filter-group select:focus {
  outline: none;
  border-color: #3E5879;
}

.capitalize {
  text-transform: capitalize;
}


/* Floating WhatsApp Button & Popup */
#wa-float-popup {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 9999;
}

#wa-float-btn {
  background: #25d366;
  border: none;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: box-shadow 0.2s;
}

#wa-float-btn:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  background: #20ba5a;
}

#wa-popup {
  width: 320px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  position: absolute;
  bottom: 70px;
  left: 0;
  overflow: hidden;
  font-family: 'Poppins', Arial, sans-serif;
  animation: wa-popup-in 0.2s;
}

@keyframes wa-popup-in {
  from { opacity: 0; transform: translateY(30px);}
  to { opacity: 1; transform: translateY(0);}
}

.wa-popup-hidden {
  display: none;
}

.wa-popup-header {
  background: #25d366;
  color: #fff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  font-weight: 600;
  font-size: 1.1em;
  border-bottom: 1px solid #e0e0e0;
}

#wa-popup-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5em;
  margin-left: auto;
  cursor: pointer;
  line-height: 1;
}

.wa-popup-body {
  padding: 18px 16px 16px 16px;
  background: #f7f7f7;
}

.wa-popup-bubble {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  padding: 14px 18px;
  margin-bottom: 18px;
  font-size: 1em;
  color: #222;
  position: relative;
}

.wa-popup-bubble:before {
  content: "";
  position: absolute;
  left: 18px;
  top: 100%;
  width: 0;
  height: 0;
  border-top: 10px solid #fff;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
}

.wa-popup-chat-btn {
  display: flex;
  align-items: center;
  background: #25d366;
  color: #fff !important;
  border-radius: 24px;
  padding: 10px 22px;
  font-weight: 600;
  font-size: 1em;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  transition: background 0.2s;
  border: none;
  outline: none;
  cursor: pointer;
}

.wa-popup-chat-btn:hover {
  background: #20ba5a;
  color: #fff;
}

.wa-float-icon {
  width: 60px;
  height: 60px;
}

/*--------------------------------------------------------------
# Infografis Page
--------------------------------------------------------------*/
.infografis-gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px; /* Jarak antar kartu, bisa diubah jika perlu */
}

.infografis-item-wrapper {
  /* Wrapper ini bisa digunakan untuk styling tambahan jika perlu */
}

.infografis-item {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease;
  width: auto;
  display: inline-block;
  max-width: 100%;
}

.infografis-item:hover {
  box-shadow: 0 6px 25px rgba(0,0,0,0.15);
}

.infografis-gallery .infografis-item .card-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--default-color);
  margin-top: 10px;
}

.infografis-gallery .infografis-item img.card-img-top {
  transition: transform 0.3s ease;
  width: 100%;
  height: 400px; /* Tinggi kartu disesuaikan agar lebih kecil */
  object-fit: contain; /* Gambar akan pas, tidak terpotong */
  background-color: #f8f9fa; /* Latar belakang agar rapi */
  padding: 5px; /* Padding diperkecil */
}

.infografis-gallery .infografis-item:hover img.card-img-top {
  transform: scale(1.05);
}

/* Memaksa jarak antar kartu infografis menjadi lebih rapat */
.infografis-gallery.row {
  --bs-gutter-x: 0.5rem; /* Mengatur jarak horizontal menjadi sangat kecil (sekitar 8px) */
  --bs-gutter-y: 0.5rem; /* Mengatur jarak vertikal menjadi sangat kecil */
}

/* Pagination Styles */
.infografis-pagination {
  margin-top: 40px;
  display: flex;
  justify-content: center;
}

.numerical-pagination {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.numerical-pagination li a,
.numerical-pagination li span {
  display: block;
  padding: 6px 12px;
  text-decoration: none;
  color: var(--accent-color, #0d6efd);
  border-right: 1px solid #dee2e6;
  background: #fff;
  transition: background-color 0.2s;
  font-weight: 500;
  font-size: 0.9rem;
}

.numerical-pagination li:last-child a,
.numerical-pagination li:last-child span {
  border-right: none;
}

.numerical-pagination li a:hover {
  background-color: #f8f9fa;
}

.numerical-pagination li.active span {
  background-color: var(--accent-color, #0d6efd);
  color: white;
  cursor: default;
}

.numerical-pagination li.disabled span {
  color: #6c757d;
  background-color: #f8f9fa;
  cursor: default;
}

/*--------------------------------------------------------------
# Berita dan Infografis Section
--------------------------------------------------------------*/
.infografis-swiper .swiper-slide p {
  color: #333; /* Warna teks gelap agar terlihat di latar belakang putih */
}

/*--------------------------------------------------------------
# Berita Sidebar
--------------------------------------------------------------*/
/* CSS yang dihapus karena sidebar berita tidak digunakan lagi */

@media (min-width: 992px) {
  .col-lg-2 .glightbox img {
    max-height: 100%;
    width: 100%;
    display: block;
    margin: 0 auto 8px auto;
    object-fit: cover;
  }
  .col-lg-2 > div[style*='flex-direction: column'] {
    gap: 8px !important;
    align-items: center;
  }
  .row.g-4.align-items-stretch {
    align-items: stretch;
  }
}

@media (max-width: 600px) {
  .berita-card {
    height: 320px !important;
    min-height: 320px !important;
  }
  .berita-thumb-wrap {
    height: 180px !important;
    min-height: 180px !important;
  }
  .berita-thumb-img {
    height: 180px !important;
    min-height: 180px !important;
    object-fit: cover !important;
    object-position: center !important;
  }
  .features h3 {
    text-align: center !important;
    margin-top: 22px !important;
    padding-left: 18px !important;
    padding-right: 18px !important;
  }
  .features h3:after {
    left: 0;
    right: 0;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  .features p {
    text-align: justify !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}

/* .call-to-action.custom-bg {
  background: #3E5879 !important;
} */


