/* General Styles */
:root {
    --primary-color: #fff;
    --hover-color: #333;
    --test-color: #48AA81;
    /* Tambahkan variabel untuk warna khusus mobile menu */
    --mobile-menu-bg-color: #343a40; /* Warna background untuk menu yang terbuka di mobile */
    --mobile-menu-link-color: #ffffff; /* Warna teks link di mobile menu */
    --mobile-menu-link-hover-color: #adb5bd; /* Warna teks link saat di-hover di mobile menu */
    --mobile-dropdown-bg-color: #495057; /* Warna background dropdown di mobile */
    --mobile-dropdown-item-color: #1E201E; /* Warna teks item dropdown di mobile */
    --mobile-dropdown-item-hover-bg: #6c757d; /* Warna background item dropdown saat di-hover di mobile */
}

main h2{
  color: var(--test-color) !important;
}

main h2.border-bottom{
    border-bottom: 3px solid var(--test-color)!important;
}

.bg-dark.text-white.py-2.small {
  height: 100px;
  margin-left: auto;
  margin-right: auto;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: 'Poppins', sans-serif;
  background-color: var(--test-color) !important;
}

.icon{
    padding-right: 10px;
}

.bg-dark.text-white.py-2.small .container div i.fas.fa-phone {
    margin-right: 8px;
}


/* Navbar Utama (Navbar Bawah) */
.navbar.navbar-expand-lg.navbar-dark.bg-secondary.sticky-top {
  height: 49px;
  margin-left: auto;
  margin-right: auto;
  font-size: 20px;
  font-family: 'Poppins', sans-serif;
  background-color: var(--test-color) !important;
}

.navbar .container {
    width: 100%;
    height: 100%;
}

/* --- Penyesuaian untuk Desktop Navbar (Jarak Antar Item) --- */
/* Pastikan nav-item memiliki margin yang konsisten */
.navbar-nav .nav-item {
    margin-right: 1rem; /* Sesuaikan jarak antar item menu, misalnya 1rem */
}

/* Hapus margin pada item terakhir jika tidak diperlukan */
.navbar-nav .nav-item:last-child {
    margin-right: 0;
}
/* --- Akhir Penyesuaian Desktop Navbar --- */


/* Penyesuaian khusus untuk mode mobile (hamburger menu) */
@media (max-width: 991.98px) { /* Untuk breakpoint 'lg' ke bawah */
    /* Gaya untuk toggler (hamburger icon) */
    .navbar-toggler {
        border-color: rgba(255, 255, 255, 0.5); /* Warna border toggler */
    }

    .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e"); /* Warna icon toggler */
    }

    /* Gaya untuk menu yang diperluas saat hamburger diklik */
    .navbar-collapse {
        background-color: var(--mobile-menu-bg-color); /* Background untuk collapsed menu */
        border-radius: 0.5rem;
        padding: 1rem;
        margin-top: 0.5rem; /* Memberi sedikit jarak dari navbar atas */
        box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    }

    /* Gaya untuk link di dalam menu mobile */
    .navbar-nav .nav-link {
        color: var(--mobile-menu-link-color); /* Warna link di mobile menu */
        transition: color 0.3s ease;
        padding: 0.75rem 1rem; /* Padding untuk link agar lebih mudah diklik */
    }

    .navbar-nav .nav-link:hover,
    .navbar-nav .nav-link.active {
        color: var(--mobile-menu-link-hover-color); /* Warna link saat di-hover atau aktif di mobile */
    }

    /* Ini adalah bagian yang perlu penyesuaian: Jarak antar item di mobile */
    .navbar-nav .nav-item {
        margin-right: 0; /* Pastikan margin horizontal 0 */
        margin-bottom: 0; /* Hapus margin-bottom default dari nav-item */
    }

    /* Berikan padding-bottom hanya pada nav-item yang bukan dropdown */
    .navbar-nav .nav-item:not(.dropdown) {
        padding-bottom: 0.5rem; /* Memberi jarak di bawah item non-dropdown */
    }

    /* Berikan padding-bottom yang sedikit lebih besar atau disesuaikan untuk dropdown agar konsisten */
    .navbar-nav .nav-item.dropdown {
        padding-bottom: 0.5rem; /* Sesuaikan ini agar jaraknya sama dengan yang lain */
    }


    /* Gaya untuk dropdown menu di dalam menu mobile */
    .dropdown-menu {
        position: static; /* Sangat penting agar dropdown tidak melayang keluar di mobile */
        float: none;
        width: auto;
        margin-top: 0.5rem; /* Mungkin butuh disesuaikan, atau bisa 0 */
        border: none; /* Hapus border default */
        background-color: var(--mobile-dropdown-bg-color); /* Background dropdown di mobile */
        box-shadow: none; /* Hapus shadow atau sesuaikan jika perlu */
        border-radius: 0.25rem;
        padding: 0; /* Sesuaikan padding dropdown di mobile */
        /* Pastikan elemen dropdown tidak memiliki tinggi inheren saat tidak aktif */
        height: 0;
        overflow: hidden;
        transition: height 0.3s ease-out, opacity 0.3s ease-out; /* Transisi untuk tinggi */
    }

    .dropdown-menu.show {
        height: auto; /* Saat aktif, biarkan tinggi auto */
        overflow: visible;
        margin-top: 0.25rem; /* Sedikit jarak dari toggle parent */
        padding-bottom: 0.5rem; /* Tambahkan padding agar ada ruang di bawah item terakhir */
    }

    .dropdown-menu .dropdown-item {
        color: var(--mobile-dropdown-item-color); /* Warna teks item dropdown di mobile */
        padding: 0.75rem 1.5rem; /* Padding item dropdown */
        transition: background-color 0.3s ease, color 0.3s ease;
    }

    .dropdown-menu .dropdown-item:hover,
    .dropdown-menu .dropdown-item:focus {
        background-color: var(--mobile-dropdown-item-hover-bg); /* Warna background saat di-hover di mobile */
        color: #fff; /* Warna teks saat di-hover di mobile */
    }
}

.jumbotron-custom {
  height: 960px;
  display: flex;
  align-items: center;
  background-image: url(../../uploads/jumbo/4.jpg);
  background-size: cover;
  background-position: center;
}

.jumbotron-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 115%;
  background-color: rgba(0,0,0,0.5);
  z-index: 1;
}

.jumbotron-content {
  position: relative;
  z-index: 2;
  color: white;
  text-align: center;
  font-family: 'Poppins', sans-serif;
}


.jumbotron-custom img {
    width: 440px;
    height: 380px;
    margin-bottom: 5rem;
}

.dropdown-menu {
  /* Hapus atau komentari display: none; */
  /* display: none; */
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease-out, transform 0.3s ease-out;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1000;
  min-width: 10rem;
  padding: 0.5rem 0;
  margin: 0.125rem 0 0;
  font-size: 1rem;
  color: #1E201E;
  text-align: left;
  list-style: none;
  background-color: #fff;
  background-clip: padding-box;
  border: 1px solid rgba(0,0,0,.15);
  border-radius: 0.25rem;
  /* Tambahkan aturan default Bootstrap jika diperlukan, meskipun Bootstrap JS biasanya menanganinya */
  display: block; /* Agar elemen ada di DOM untuk transisi */
  visibility: hidden; /* Sembunyikan secara visual */
  pointer-events: none; /* Nonaktifkan interaksi mouse saat disembunyikan */
  font-family: 'Poppins', sans-serif;
}

/* Ini adalah gaya untuk dropdown saat dibuka oleh Bootstrap */
.dropdown-menu.show { /* Ganti .show-custom menjadi .show */
  opacity: 1;
  transform: translateY(0);
  visibility: visible; /* Tampilkan secara visual */
  pointer-events: auto; /* Aktifkan interaksi mouse */
}

.section-title.border-bottom {
    border-bottom: 3px solid var(--test-color) !important;
}

/* Teks Card */
.card-text{
    text-align: justify;
    font-family: 'Poppins', sans-serif;
}


/* Leadership Section (diterapkan juga untuk Layanan) */
.leader-card {
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    padding: 20px;
    margin-bottom: 20px;
}

.leader-card:hover {
    transform: translateY(-5px);
}

.leader-image-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

/* Class baru untuk gambar di dalam carousel Layanan */
.custom-layanan-carousel-img {
    width: 100%;
    height: auto; /* Atur tinggi agar konsisten, sesuaikan kebutuhan Anda */
    display: block;
    object-fit: cover; /* Memastikan gambar mengisi area tanpa terdistorsi, tetapi tidak memotong */
    border-radius: 5px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Spesifik untuk carousel Layanan */
.custom-layanan-carousel .carousel-control-prev,
.custom-layanan-carousel .carousel-control-next {
    width: 5%;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.custom-layanan-carousel:hover .carousel-control-prev,
.custom-layanan-carousel:hover .carousel-control-next {
    opacity: 0.8;
}


/* Gaya untuk kartu dinamis (width 382px, height 427px) */
.dynamic-card {
  width: 382px;
  height: 427px;
  overflow: hidden;
}
.dynamic-card .card-img-top {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-img-placeholder.dynamic-card {
  height: 100%;
  width: 100%;
}

.card-body{
  background-color: var(--primary-color) !important;
  color: var(--test-color);
}

.card-body:hover{
  background-color: var(--test-color) !important;
  color: var(--primary-color);
}
.custom-card {
  border-radius: 0.5rem;
  border: 4px solid var(--test-color);
  overflow: hidden;
}

.custom-card:hover {
  border: 4px solid var(--test-color);
}

.custom-btn {
  border-radius: 0.3rem;
  background-color: var(--test-color);
  width: 100px;
  font-weight: 600;
  padding: 0.50rem 0;
  user-select: none;
  font-family: 'Poppins', sans-serif;
  color: #fff;
}
.period {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    font-family: 'Poppins', sans-serif;
}

/* Pagination button style  */
.pagination-sm .page-link {
  background-color: #1E201E;
  color: white;
  border-radius: 0.3rem;
  margin: 0 0.15rem;
  user-select: none;
  border: 5px solid #1E201E;
}

.pagination-sm .page-link:hover {
  background-color: #5a5a56;
  color: white;
  border: 1px solid #5a5a56;
}

/* Styling untuk page link yang aktif */
.pagination-sm .page-item.active .page-link {
  background-color: var(--test-color);
  border-color: var(--test-color);
  color: white;
}

/* Latest Activities Carousel */
.carousel-container {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.activity-link {
    text-decoration: none;
    color: inherit;
}

.activity-image {
    position: relative;
    overflow: hidden;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.activity-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.activity-link:hover .activity-image img {
    transform: scale(1.05);
}

.activity-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.activity-link:hover .activity-overlay {
    opacity: 1;
    transform: translateY(0);
}

.carousel-control-prev,
.carousel-control-next {
    width: 5%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.carousel:hover .carousel-control-prev,
.carousel:hover .carousel-control-next {
    opacity: 0.8;
}

/* Latest News */
.news-card {
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    margin-bottom: 1.5rem;
}

.news-card:hover {
    transform: translateY(-5px);
}

.news-card img {
    width: 400px;
    height: 500px;
    border-radius: 10px 10px 0 0;
}

.news-card .card-body {
    padding: 1.5rem;
}

.news-card .card-title {
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    margin-bottom: 0.5rem;
}

.news-card .card-text {
    color: #6c757d;
    font-size: 0.9rem;
}

/* Footer Styles */
footer {
    margin-top: 4rem;
    text-align: center;
    font-family: 'Poppins', sans-serif;
    background-color: var(--test-color) !important;
}

footer .text{
  text-align: justify;
  font-family: 'Poppins', sans-serif;
}

footer h3 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

footer h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 30px;
    height: 2px;
    background-color: #fff;
}

footer h3.link::after {
    content: '';
    position: absolute;
    transform: translateX(-50%);
    left: 50%;
    bottom: 0;
    width: 80px;
    height: 2px;
    background-color: #fff;
}

.social-icons a {
    font-size: 1.5rem;
    transition: opacity 0.3s ease;
}

.social-icons a:hover {
    opacity: 0.7;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}


/* Responsive Adjustments */
@media (max-width: 768px) {
    .navbar-nav {
        padding: 1rem 0;
    }

    .custom-layanan-carousel-img {
        height: 250px; /* Adjust height for smaller screens */
    }

    .activity-overlay {
        padding: 1rem;
    }

    .activity-overlay h3 {
        font-size: 1.2rem;
    }
}

/* Tablet (width <= 991px) */
@media (max-width: 991.98px) {

  .jumbotron-custom {
    height: 600px;
  }

  .jumbotron-custom img {
    width: 300px;
    height: auto;
    margin-bottom: 2rem;
  }

  .jumbotron-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 70%;
  background-color: rgba(0,0,0,0.5);
  z-index: 1;
  }

  .contact-card a {
  display: inline-block;
  margin: 0 auto;
  text-align: center;
  }

  .contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  }

  .get-in-touch h2 {
    font-size: 2rem;
  }

  .get-in-touch {
    width: 100%;
    height: auto;
  }

  .contact-card a{
    font-size: 1rem;
  }

  .contact-card h3 {
    font-size: 1rem;
  }

  .dynamic-card {
    width: 100%;
    height: auto;
    margin-bottom: 1rem;
  }

  .dynamic-card .card-img-top {
    height: 200px;
  }

  .pagination-sm .page-link {
    font-size: 0.8rem;
  }
  footer iframe,
  footer .map-placeholder {
  width: 100%;
  height: 250px;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  }

  footer .text {
  text-align: justify;
  font-size: 1rem;
  line-height: 1.6;
  }
}

/* Phone (width <= 767px) */
@media (max-width: 767.98px) {

  .bg-dark.text-white.py-2.small {
  height: 100px;
  margin-left: auto;
  margin-right: auto;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: 'Poppins', sans-serif;
  }
  .jumbotron-custom {
    height: 500px;
    padding: 1rem;
    text-align: center;
  }

  .jumbotron-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 73%;
  background-color: rgba(0,0,0,0.5);
  z-index: 1;
  }

  .jumbotron-custom img {
    width: 200px;
    height: auto;
    margin-bottom: 1rem;
  }

  .jumbotron-content h1,
  .jumbotron-content h2,
  .jumbotron-content p {
    font-size: 1rem;
  }

  .get-in-touch {
    padding: 40px 0;
  }

  .get-in-touch h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }

  .contact-card {
    padding: 1rem;
  }

  .contact-card h3 {
    font-size: 1rem;
    margin: 1rem 0;
  }

  .icon-wrapper {
    width: 60px;
    height: 60px;
  }

  .icon-wrapper i {
    font-size: 1.5rem;
  }

  .dynamic-card {
    width: 100%;
    height: auto;
  }

  .dynamic-card .card-img-top {
    height: 180px;
  }

  .footer-img-placeholder {
    width: 150px;
    height: auto;
  }

  footer h3 {
    font-size: 1rem;
  }

  footer .text{
  text-align: center;
  font-family: 'Poppins', sans-serif;
  }

  footer h3::after {
    content: '';
    position: absolute;
    left: 45%;
    bottom: 0;
    width: 30px;
    height: 2px;
    background-color: #fff;
  }

  footer h3.link::after {
    content: '';
    position: absolute;
    transform: translateX(-50%);
    left: 50%;
    bottom: 0;
    width: 80px;
    height: 2px;
    background-color: #fff;
  }

  .social-icons a:hover {
    opacity: 0.7;
  }

  .custom-btn {
    width: 80px;
    font-size: 0.8rem;
    padding: 0.3rem 0;
  }

  .pagination-sm .page-link {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
  }
}