/* Reset and base styles */
* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  background-color: #ffffff;
}

/* Header atas */
.container-fluid.py-2.px-4.bg-white.shadow-sm {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Warna utama modern */
.text-primary-blue {
  color: #2b4680 !important;
}

.bg-primary-blue {
  background-color: #2b4680 !important;
}

/* Header - User Icon */
.icon-user i {
  font-size: 1.2rem;
  color: #2b4680;
  transition: color 0.3s ease;
}

.icon-user i:hover {
  color: #0d6efd;
}

/* Navbar Brand */
.navbar-brand {
  font-family: 'Poppins', sans-serif;
  color: white !important;
  font-weight: 700;
}

/* Navbar Toggler */
.navbar-toggler {
  border-color: #ffffff;
}

.navbar-toggler-icon {
  filter: invert(1);
}

/* Navbar Link */
.navbar-nav .nav-link {
  color: white !important;
  font-weight: 500;
  transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: #0d6efd !important;
}

/* Dropdown Arrow Custom */
.navbar .dropdown-toggle::after {
  border: none;
  content: "\f107";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  font-size: 0.7rem;
  margin-left: 6px;
  vertical-align: middle;
  transition: transform 0.3s ease;
  color: white;
}

.nav-item.dropdown.show > .nav-link.dropdown-toggle::after {
  transform: rotate(180deg);
}

/* Dropdown Menu */
.dropdown-menu {
  border-radius: 10px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
  border: none;
  padding: 1rem;
}

.dropdown-header-custom {
  color: #2b4680;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.dropdown-item {
  font-size: 0.95rem;
  padding: 8px 12px;
  color: #2b4680;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.dropdown-item:hover {
  background-color: #e6f0ff;
  color: #0d6efd;
}

/* Hero Section */
.hero-div {
  background: url('../img/kp.jpeg') no-repeat center 90%;
  background-size: cover;
  height: 70vh;
  min-height: 400px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  font-family: 'Poppins', sans-serif;
  padding: 0 1rem;
  animation: fadeIn 1.5s ease-in-out;
}

.hero-div::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5); /* Overlay hitam transparan */
  z-index: 1;
}

.hero-div > .container {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.hero-div h1 {
  font-weight: 700;
  font-size: 2.8rem;
  line-height: 1.3;
  margin-bottom: 1rem;
}

.hero-div h1 .main-title {
  display: block;
  font-size: 2rem;
  font-weight: 500;
  margin-top: 0.5rem;
}

.hero-subtext {
  font-size: 1.2rem;
  font-weight: 300;
  margin-bottom: 2rem;
  line-height: 1.6;
  color: #f0f0f0;
}

.hero-btn {
  display: inline-block;
  background: #ffffff;
  color: #333;
  padding: 0.7rem 1.5rem;
  font-size: 1rem;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

.hero-btn:hover {
  background-color: #f0f0f0;
  color: #000;
  transform: scale(1.05);
}

@media (max-width: 768px) {
  .hero-div h1 {
    font-size: 2rem;
  }

  .hero-div h1 .main-title {
    font-size: 1.3rem;
  }

  .hero-subtext {
    font-size: 1rem;
  }

  .hero-btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }
}

/* Animasi */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/*** Spinner ***/
#spinner {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease-out, visibility 0s linear 0.5s;
  z-index: 99999;
  background-color: rgba(255, 255, 255, 0.9);
}

#spinner.show {
  transition: opacity 0.8s ease-out, visibility 0s linear 0s;
  visibility: visible;
  opacity: 1;
}

.spinner-wrapper {
  text-align: center;
}

.spinner-circle {
  width: 60px;
  height: 60px;
  border: 6px solid #e0e0e0;
  border-top: 6px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

.loading-text {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.2rem;
  color: #007bff;
  animation: fadeIn 2s ease-in-out infinite alternate;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
  from { opacity: 0.3; }
  to { opacity: 1; }
}
/*** Spinner End ***/


/*** Tentang ***/
  .about {
      background-color: #f8f9fa;
    }

    .play-triangle {
      width: 0;
      height: 0;
      border-left: 20px solid #fff;
      border-top: 12px solid transparent;
      border-bottom: 12px solid transparent;
    }

    .btn-play {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      width: 60px;
      height: 60px;
      background: rgba(0, 0, 0, 0.6);
      border-radius: 50%;
      border: none;
      z-index: 2;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .video {
      position: relative;
      overflow: hidden;
    }

    .video::before {
      content: "";
      display: block;
      padding-top: 56.25%;
    }

    .video iframe, .video img {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
    }

    .title-border-radius {
      border-radius: 8px;
      background-color: #eaf0fb;
    }

    .btn-border-radius {
      border-radius: 30px;
    }

/* Katalog P3M */
.service {
  background-color: #f4f6f9;
}
.service .title-border-radius {
  border-radius: 6px;
  padding: 4px 12px;
}
.service h4 {
  font-size: 1rem;
  font-weight: 600;
}
.service h1 {
  font-size: 1.5rem;
  font-weight: 600;
}
.service .carousel-item h5 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #2b4680;
}
.service .carousel-item p {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.6;
}
.service .btn {
  font-size: 0.875rem;
}

/* Carousel Panah Khusus */
.service .carousel {
  position: relative;
}
.service .carousel-control-custom {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: #2b4680;
  padding: 10px 15px;
  border-radius: 50%;
  z-index: 10;
}
.service .carousel-control-prev-custom {
  left: -25px;
}
.service .carousel-control-next-custom {
  right: -25px;
}

/* Responsive */
@media (max-width: 768px) {
  .hero-div h1 {
    font-size: 1.5rem;
  }
  .hero-div p {
    font-size: 0.9rem;
  }

  .about h2 {
    font-size: 1.2rem;
  }

  .service h1 {
    font-size: 1.3rem;
  }

  .service .carousel-control-custom {
    top: 95%;
    transform: translateY(-50%);
  }
  .service .carousel-control-prev-custom {
    left: 35%;
  }
  .service .carousel-control-next-custom {
    right: 35%;
  }
}

/* Katalog P3M */
.service h1 {
  font-size: 1.5rem;
  font-weight: 600;
}
.service h4 {
  font-size: 1rem;
  font-weight: 500;
}
.service .title-border-radius {
  border-radius: 5px;
}
.service .border {
  border-radius: 12px;
}
.service .fa-file-pdf {
  font-size: 2.8rem;
}
.service h5 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.service p {
  font-size: 0.9rem;
  color: #6c757d;
  line-height: 1.6;
}
.service .btn {
  font-size: 0.85rem;
  border-radius: 20px;
  padding: 6px 14px;
}

/* Carousel Control */
.carousel-control-custom {
  position: absolute;
  top: 45%;
  transform: translateY(-50%);
  width: auto;
  height: auto;
  background: #2b4680;
  padding: 10px 15px;
  border-radius: 50%;
  z-index: 1;
}
.carousel-control-prev-custom {
  left: -30px;
}
.carousel-control-next-custom {
  right: -30px;
}
.carousel-control-prev-icon,
.carousel-control-next-icon {
  filter: invert(1);
}

/* Responsive text scaling */
@media (max-width: 768px) {
  .hero-div h1 {
    font-size: 1.5rem;
  }
  .hero-div p,
  .about .card p,
  .service p {
    font-size: 0.9rem;
  }
  .service h1 {
    font-size: 1.25rem;
  }
  .service .fa-file-pdf {
    font-size: 2.4rem;
  }
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
  background-color: #2b4680;
  border-radius: 50%;
  padding: 10px;
}

/* Team */
.team-section {
  background-color: #f8f9fa;
}

.section-header .team-title {
  border-bottom: 3px solid #0d6efd;
  display: inline-block;
  padding: 0.25rem 1rem;
  border-radius: 0.375rem;
  font-weight: 600;
}

.team-heading {
  font-size: 2.75rem;
  font-weight: 600;
}

.team-card {
  border: none;
  border-radius: 1rem;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 8px 20px rgba(13, 110, 253, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.team-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(13, 110, 253, 0.3);
}

.team-img {
  height: 280px;
  object-fit: cover;
  border-top-left-radius: 1rem;
  border-top-right-radius: 1rem;
  transition: transform 0.4s ease;
}

.team-card:hover .team-img {
  transform: scale(1.05);
}

.team-name {
  color: #0d6efd;
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 0.2rem;
}

.team-role {
  color: #6c757d;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.social-btn {
  width: 36px;
  height: 36px;
  font-size: 16px;
  line-height: 36px;
  padding: 0;
  border-radius: 50%;
  transition: background-color 0.3s ease;
}

.social-btn:hover {
  background-color: #0a58ca !important;
}

/* Footer */
.footer-title {
  font-weight: 700;
  font-size: 1.25rem;
  color: #0d6efd;
}

.footer-subtitle {
  font-weight: 600;
  margin-bottom: 1rem;
  color: #0d6efd;
}

.footer-text {
  font-size: 0.95rem;
  color: #6c757d;
}

.footer-list li {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.social-icons .social-link {
  font-size: 1rem;
  color: #fff;
  background-color: #0d6efd;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  border-radius: 50%;
  transition: background-color 0.3s ease;
}

.social-icons .social-link:hover {
  background-color: #0a58ca;
}

.footer-img {
  border: 2px solid #0d6efd;
  padding: 4px;
}


/* Bungkus Footer Jadi Card */
.footer-wrapper {
  background-color: #f8f9fa;
}

.footer-card {
  background-color: #ffffff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border-radius: 12px;
}

/* Back To Top */
.back-to-top {
  position: fixed;
  bottom: 20px; /* lebih bawah dari chatbot */
  right: 20px;
  z-index: 999;
  width: 45px;
  height: 45px;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  transition: opacity 0.3s ease, transform 0.3s ease;
  opacity: 0.8;
}

.back-to-top:hover {
  opacity: 1;
  transform: scale(1.05);
}

/* Chatbot */
.chatbot-icon {
  position: fixed;
  bottom: 90px; /* lebih tinggi dari back-to-top */
  right: 20px;
  z-index: 999;
  width: 50px;
  height: 50px;
  background-color: transparent;
  transition: transform 0.3s ease;
}

.chatbot-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.chatbot-icon:hover {
  transform: scale(1.1);
}

/* Sambutan */
@media (max-width: 767.98px) {
  .sambutan-p3m {
    padding: 2rem 1rem;
  }

  .sambutan-p3m .row {
    flex-direction: column;
    text-align: center;
  }

  .sambutan-p3m .col-md-4,
  .sambutan-p3m .col-md-8 {
    max-width: 100%;
    flex: 0 0 100%;
  }

  .sambutan-p3m .kepala-photo {
    max-width: 180px;
    margin: 0 auto 1.5rem auto;
    border-width: 4px;
  }

  .sambutan-p3m .sambutan-text {
    font-size: 1rem;
  }

  .sambutan-p3m p.fw-semibold {
    margin-top: 1.5rem;
  }
}

/* Visi Misi */

.visi-misi-section {
  font-family: 'Poppins', sans-serif;
}

.visi-misi-title {
  font-weight: 700;
  font-size: 1.8rem;
  color: #003366; /* Warna primary blue */
  border-bottom: 3px solid #007bff;
  display: inline-block;
  padding-bottom: 0.25rem;
}

.visi-misi-image-wrapper {
  background: #003366; /* Warna background kiri */
}

.visi-misi-logo {
  max-width:  100%;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 0 5px rgba(0,0,0,0.3));
}

.visi-content h5,
.misi-content h5 {
  color: #004080;
  font-weight: 600;
}

.visi-content p,
.misi-content ul {
  color: #333;
  font-size: 1rem;
  line-height: 1.6;
}

.misi-content ul {
  padding-left: 1.2rem;
}

.misi-content ul li {
  margin-bottom: 0.5rem;
  list-style-type: disc;
}

/* Card shadow and border-radius already from Bootstrap */
/* Add smooth hover shadow for subtle effect */
.card:hover {
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
  transition: box-shadow 0.3s ease-in-out;
}

/* Responsive adjustments */
@media (max-width: 767.98px) {
  .visi-misi-image-wrapper {
    padding: 2rem 0;
  }

  .visi-misi-logo {
    max-width: 140px;
  }

  .visi-misi-title {
    font-size: 1.5rem;
  }
}

/* Warna utama biru */
.bg-primary-blue {
  background-color: #003366; /* sesuaikan dengan warna latar biru kamu */
  color: white;
}

/* Bagian motto */
.motto-section .card {
  border: none;
}

.motto-image-wrapper {
  background-color: #003366;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
  min-height: 200px;
}

.motto-logo {
  max-width: 120px;
  max-height: 120px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 5px rgba(0,0,0,0.3));
}

.motto-title {
  font-weight: 700;
  font-size: 1.8rem;
  color: #003366;
}

.motto-content h5,
.janji-layanan-content h5 {
  color: #003366;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.motto-content p,
.janji-layanan-content p {
  font-size: 1.1rem;
  line-height: 1.5;
  color: #212529;
}

/* Responsive tweaks */
@media (max-width: 767.98px) {
  .motto-image-wrapper {
    min-height: 150px;
  }
}

/* Struktur Organisasi (Tree) */
.org-tree,
.org-tree ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
  position: relative;
  font-family: 'Poppins', sans-serif;
  color: #0d6efd;
}

/* Root ul tanpa border kiri */
.org-tree > li > ul {
  margin-left: 1rem;
  padding-left: 1rem;
  border-left: 2px solid #0d6efd88; /* sedikit transparan */
}

/* Sub ul punya margin dan border */
.org-tree ul ul {
  margin-left: 1.25rem;
  padding-left: 1.25rem;
  border-left: 2px solid #0d6efd44; /* lebih transparan */
}

.org-tree li {
  position: relative;
  margin: 0 0 1rem 0;
  padding-left: 1.25rem;
}

/* Garis horizontal kecil menghubungkan tiap li dengan garis vertikal */
.org-tree li::before {
  content: "";
  position: absolute;
  top: 1.3rem;
  left: 0;
  width: 1rem;
  height: 0;
  border-top: 2px solid #0d6efd88;
}

/* Hilangkan garis kiri untuk li terakhir agar rapi */
.org-tree li:last-child::before {
  border-color: transparent;
}

/* Garis vertikal utama */
.org-tree li > ul::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0.9rem;
  width: 2px;
  height: 100%;
  background: #0d6efd44;
  border-radius: 1px;
}

/* Style kotak posisi */
.position {
  display: inline-block;
  background-color: #e7f1ff;
  border: 2px solid #0d6efd;
  color: #0d6efd;
  padding: 8px 18px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  box-shadow: 0 3px 8px rgba(13, 110, 253, 0.2);
  cursor: default;
  user-select: none;
  transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
  min-width: 180px;
  text-align: center;
  white-space: nowrap;
}

.position:hover {
  background-color: #0d6efd;
  color: white;
  box-shadow: 0 6px 12px rgba(13, 110, 253, 0.6);
}

/* Section Title Styling */
.section-title {
  font-weight: 700;
  font-family: 'Poppins', sans-serif;
  color: #0d6efd;
  border-bottom: 3px solid #0d6efd;
  display: inline-block;
  padding-bottom: 6px;
  margin-bottom: 1.5rem;
  font-size: 1.75rem;
}

/* Responsive: kecilkan kotak posisi dan margin pada layar kecil */
@media (max-width: 576px) {
  .position {
    padding: 6px 12px;
    font-size: 0.9rem;
    min-width: 140px;
  }

  .org-tree li {
    padding-left: 1rem;
  }

  .org-tree li > ul::before {
    left: 0.7rem;
  }
}

/* Gaya umum tabel riset */
.riset-table {
  background-color: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  font-family: 'Poppins', sans-serif;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

/* Header tabel */
.riset-table thead th {
  background-color: #f8f9fa;
  color: #333;
  font-weight: 600;
  font-size: 1rem;
  padding: 16px;
  border-bottom: 1px solid #e0e0e0;
}

/* Isi tabel */
.riset-table tbody td {
  padding: 16px;
  vertical-align: middle;
  color: #444;
  border-bottom: 1px solid #f0f0f0;
  transition: all 0.2s ease-in-out;
}

/* Hover efek baris */
.riset-table tbody tr:hover {
  background-color: #e0f0ff;
  transform: scale(1.01);
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.15);
  cursor: pointer;
}

/* Tombol lihat */
.riset-table .btn-outline-primary {
  font-size: 0.85rem;
  border-radius: 8px;
  padding: 6px 12px;
}

/* Responsive table padding adjustment */
@media (max-width: 576px) {
  .riset-table tbody td, .riset-table thead th {
    padding: 10px;
    font-size: 0.875rem;
  }
}

/* === Hover pada Chart.js bar === */
canvas:hover {
  cursor: pointer;
}

/* === Hover ikon sosial media === */
.social-link {
  color: #ffffff;
  background-color: #007bff;
  padding: 8px 10px;
  margin-right: 8px;
  border-radius: 50%;
  transition: background-color 0.3s, transform 0.3s;
}

.social-link:hover {
  background-color: #0056b3;
  transform: scale(1.1);
}

/* === Hover untuk Footer link === */
.footer-list li:hover {
  color: #007bff;
  transition: color 0.3s;
}
