/* Custom styles for Puskesmas Gedangan */
: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 */
}

.get-in-touch {
    background-color: #fff;
    padding: 80px 0;
}

.get-in-touch h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: #1E201E;
}

.contact-card {
    padding: 2rem;
    transition: all 0.3s ease;
    height: 100%;
    background: var(--test-color);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.contact-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.icon-wrapper {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.contact-card:hover .icon-wrapper {
    background: var(--primary-color);
}

.contact-card:hover .icon-wrapper i {
    color: var(--test-color);
}

.icon-wrapper i {
    font-size: 2rem;
    color: #1E201E;
    transition: all 0.3s ease;
}

.contact-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 1.5rem 0;
    color: var(--primary-color);
}

.btn-outline-dark {
    border: 2px solid var(--primary-color);
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    color: #fff;
}

.btn-outline-dark:hover {
    background-color: var(--primary-color);
    color: var(--test-color);
    transform: translateY(-2px);
}


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

.icon{
    padding-right: 10px;
}

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


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

.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;
}

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


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

.hero-placeholder {
  height: 300px;
  background-color: #1E201E;
}

.card-img-placeholder {
  height: 150px;
  background-color: var(--test-color);
  border-top-left-radius: 0.25rem;
  border-top-right-radius: 0.25rem;
}

/* 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: 3px solid #fff;
}

.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;
}

/* Footer image placeholder */
.footer-img-placeholder {
  width: 200px;
  height: 150px;
  border-radius: 0.5rem;
}

/* 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;
}

/* Dropdown menu default style (untuk desktop) - tidak berubah */
.dropdown-menu {
  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;
  display: block;
  visibility: hidden;
  pointer-events: none;
  font-family: 'Poppins', sans-serif;
}

/* Ini adalah gaya untuk dropdown saat dibuka oleh Bootstrap */
.dropdown-menu.show {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
  pointer-events: auto;
}

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

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;
}

/* ========================= RESPONSIVE STYLE ========================= */

/* 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) {

  .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;
  }
}
