/* Import Poppins Font */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600;700;800;900&display=swap');

/* General Typography and Base Styles */
* {
    font-family: 'Poppins', sans-serif;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

p {
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    line-height: 1.6;
    margin-bottom: 1rem;
}

#spinner {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease-out, visibility 0s linear 0.5s;
  z-index: 99999;
}

#spinner.show {
  transition: opacity 0.8s ease-out, visibility 0s linear 0s;
  visibility: visible;
  opacity: 1;
}

/*** Spinner End ***/

.back-to-top {
  position: fixed;
  right: 30px;
  bottom: 30px;
  display: flex;
  width: 45px;
  height: 45px;
  align-items: center;
  justify-content: center;
  transition: 0.5s;
  z-index: 99;
}

/*** Button Start ***/

.btn {
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  transition: 0.3s;
}

.btn-square {
  width: 32px;
  height: 32px;
}

.btn-sm-square {
  width: 34px;
  height: 34px;
}

.btn-md-square {
  width: 44px;
  height: 44px;
}

.btn-lg-square {
  width: 56px;
  height: 56px;
}

.btn-square,
.btn-sm-square,
.btn-md-square,
.btn-lg-square {
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: normal;
}

.btn-primary-outline-0 {
  border: 0;
  color: var(--bs-white) !important;
}

.btn-white {
  border: 0;
  background-color: white !important;
  color: var(--bs-dark) !important;
  outline-color: #003d22;
  border-color: #003d22 !important;
}

.btn-light-outline-0 {
  border: 0;
  color: var(--bs-primary) !important;
}

.btn-primary-outline-0:hover {
  background: #003d22 !important;
  color: var(--bs-white) !important;
}

.btn-light-outline-0:hover {
  background: var(--bs-secondary) !important;
  color: var(--bs-white) !important;
}

/*** Topbar Start ***/

.sticky-top {
  transition: 0.5s;
  background: var(--bs-white);
}

.topbar {
  padding: 10px 0;
  background: var(--bs-secondary) !important;
}

/*** Topbar End ***/

/*** Navbar Start ***/

.navbar .navbar-nav .nav-link {
  font-family: 'Poppins', sans-serif;
  padding: 8px 12px;
  font-size: 15px;
  font-weight: 500;
  transition: 0.3s;
}

.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link.active,
.sticky-top.bg-white .navbar .navbar-nav .nav-link:hover,
.sticky-top.bg-white .navbar .navbar-nav .nav-link.active {
  color: var(--bs-primary);
}

.navbar .dropdown-toggle::after {
  border: none;
  content: "\f107";
  font-family: "Font Awesome 5 Free";
  font-weight: 700;
  vertical-align: middle;
  margin-left: 8px;
}

@media (min-width: 1200px) {
  .navbar .nav-item .dropdown-menu {
    display: block;
    visibility: hidden;
    top: 100%;
    transform: rotateX(-75deg);
    transform-origin: 0% 0%;
    border: 0;
    transition: 0.5s;
    opacity: 0;
  }
}

.dropdown .dropdown-menu a:hover {
  background: var(--bs-secondary);
  color: var(--bs-primary);
}

.navbar .nav-item:hover .dropdown-menu {
  transform: rotateX(0deg);
  visibility: visible;
  background: var(--bs-light) !important;
  border-radius: 10px !important;
  transition: 0.5s;
  opacity: 1;
}

@media (min-width: 1200px) {
  .navbar .navbar-collapse .border-top {
    border-top: none !important;
  }
}

/* Right-justify hubungi kami section on bigger screens */
@media (min-width: 768px) {
  .footer-section:nth-child(2) {
    text-align: right !important;
  }
}

/* Left-align both footer sections on small screens */
@media (max-width: 767.98px) {
  .footer-section:nth-child(1),
  .footer-section:nth-child(2) {
    text-align: left !important;
  }
}

/* Make profil desa boxes more compact on bigger screens */
@media (min-width: 992px) {
  .profil-box {
    min-height: 180px !important;
    padding: 1.2rem !important;
  }
  
  .profil-box .number {
    font-size: 1.1rem !important;
    margin-bottom: 0.5rem !important;
  }
  
  .profil-box .label {
    font-size: 0.85rem !important;
    line-height: 1.3 !important;
  }
  
  #profildesa .row.g-4 {
    gap: 1rem !important;
  }
  
  #profildesa .col-6.col-md-4 {
    padding: 0.5rem !important;
  }
}

/*** Carousel Start ***/

.carousel-item {
  position: relative;
  min-height: 100vh;
}

.carousel-item img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-item .carousel-caption {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;

  background-size: cover;
}

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

.carousel-control-prev .carousel-control-prev-icon,
.carousel-control-next .carousel-control-next-icon {
  background: transparent;
}

#carouselId .carousel-indicators {
  padding-bottom: 30px;
}

#carouselId .carousel-indicators li {
  border-top: 10px solid var(--bs-white);
  border-bottom: 10px solid var(--bs-white);
  border-right: 5px solid var(--bs-white);
  border-left: 5px solid var(--bs-white);
  margin-right: 10px;
  border-radius: 10px;
  transition: 0.5s;
}

#carouselId .carousel-indicators li.active {
  background: var(--bs-primary);
  border-color: var(--bs-primary);
  border-right: 15px solid var(--bs-primary);
  border-left: 15px solid var(--bs-primary);
}

/*** Carousel End ***/

.bg-breadcrumb {
  background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
    url(../img/bg4.jpg);
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
}

.video {
  position: relative;
  padding-right: 70px;
  padding-bottom: 70px;
  border-radius: 10px;
}

.video .btn-play {
  position: absolute;
  z-index: 3;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -45%);
  margin-left: -35px;
  box-sizing: content-box;
  display: block;
  width: 32px;
  height: 44px;
  border-radius: 50%;
}

.video .btn-play:before {
  content: "";
  position: absolute;
  z-index: 0;
  left: 50%;
  top: 50%;
  transform: translateX(-50%) translateY(-50%);
  display: block;
  width: 100px;
  height: 100px;
  background: var(--bs-secondary);
  border-radius: 50%;
  animation: pulse-border 1500ms ease-out infinite;
}

.video .btn-play:after {
  content: "";
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: block;
  width: 100px;
  height: 100px;
  background: var(--bs-primary);
  border-radius: 50%;
  transition: all 200ms;
}

.video .btn-play span {
  display: block;
  position: relative;
  z-index: 3;
  width: 0;
  height: 0;
  border-left: 32px solid var(--bs-white);
  border-top: 22px solid transparent;
  border-bottom: 22px solid transparent;
}

@keyframes pulse-border {
  0% {
    transform: translateX(-50%) translateY(-50%) translateZ(0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateX(-50%) translateY(-50%) translateZ(0) scale(1.5);
    opacity: 0;
  }
}

.gallery .tab-class .nav-item {
  padding: 0 0 20px 0;
}

.gallery .tab-class .nav-item a.active {
  background: var(--bs-primary) !important;
}

.gallery .tab-class .nav-item a.active span {
  color: var(--bs-white) !important;
}

.gallery .gallery-img {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
}

.gallery .gallery-img img {
  transition: 0.5s;
}

.gallery .gallery-img:hover img {
  transform: scale(1.3);
}

.gallery .gallery-img .gallery-overlay {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 10px;
  transition: 0.5s;
  opacity: 0;
  z-index: 1;
}

.slidegeser {
  background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
    url(../img/bg1.jpg);
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
}

.slidegeser .slidegeser-item {
  color: var(--bs-white);
}

.slidegeser .slidegeser-item .slidegeser-content {
  background: rgba(255, 255, 255, 0.4);
}

.slidegeser .owl-carousel.slidegeser-carousel {
  position: relative;
}

.slidegeser .owl-carousel.slidegeser-carousel .owl-nav {
  position: absolute;
  top: -60px;
  right: 0;
  display: flex;
  font-size: 40px;
  color: var(--bs-white);
}

.slidegeser .owl-carousel.slidegeser-carousel .owl-nav .owl-prev {
  margin-right: 40px;
}

.slidegeser .owl-carousel.slidegeser-carousel .owl-nav .owl-prev,
.slidegeser .owl-carousel.slidegeser-carousel .owl-nav .owl-next {
  transition: 0.5s;
}

.slidegeser .owl-carousel.slidegeser-carousel .owl-nav .owl-prev:hover,
.slidegeser .owl-carousel.slidegeser-carousel .owl-nav .owl-next:hover {
  color: var(--bs-primary);
}

.destinasi .destinasi-item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
}

.destinasi .destinasi-item .destinasi-text {
  background: var(--bs-primary);
}

.destinasi .destinasi-item .destinasi-social {
  position: absolute;
  top: -180px;
  left: 20px;
  opacity: 0;
  transition: 0.5s;
}

.destinasi .destinasi-item:hover .destinasi-social {
  top: 20px;
  left: 20px;
  opacity: 1;
}

.destinasi .destinasi-item .destinasi-img {
  position: relative;
  width: 100%;
}

.destinasi .destinasi-item .destinasi-img::after {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.3);
  overflow: hidden;
  width: 100%;
  height: 0;
  transition: 0.5s ease;
}

.destinasi .destinasi-item:hover .destinasi-img::after {
  bottom: 0;
  height: 100%;
}

.destinasi .destinasi-item .destinasi-text {
  transition: 0.5s;
}

.destinasi .destinasi-item:hover .destinasi-text {
  background: var(--bs-secondary);
}

.testimoni {
  background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
    url(../img/bg1.jpg);
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
}

.testimoni .testimoni-item {
  background: rgba(0, 0, 0, 0.4);
}

.testimoni .owl-carousel.testimoni-carousel {
  position: relative;
}

.testimoni .owl-carousel.testimoni-carousel .owl-nav {
  position: absolute;
  top: -60px;
  right: 0;
  display: flex;
  font-size: 40px;
  color: var(--bs-white);
}

.testimoni .owl-carousel.testimoni-carousel .owl-nav .owl-prev {
  margin-right: 40px;
}

.testimoni .owl-carousel.testimoni-carousel .owl-nav .owl-prev,
.testimoni .owl-carousel.testimoni-carousel .owl-nav .owl-next {
  transition: 0.5s;
}

.testimoni .owl-carousel.testimoni-carousel .owl-nav .owl-prev:hover,
.testimoni .owl-carousel.testimoni-carousel .owl-nav .owl-next:hover {
  color: var(--bs-primary);
}

.contact {
  background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
    url(../img/appointment-background.jpg);
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
}

.contact .contact-form {
  background: rgba(255, 255, 255, 0.6);
}

.footer {
  background: var(--bs-dark);
}

.footer .footer-item a,
.footer .footer-item p {
  color: var(--bs-white);
  line-height: 40px;
  font-size: 17px;
  transition: 0.5s;
}

.footer .footer-item a:hover {
  letter-spacing: 2px;
  color: var(--bs-primary) !important;
}

.copyright {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background-color: #003d22 !important;
}

.testimoni-carousel {
  display: flex;
  overflow: hidden;
  width: 100%;
  position: relative;
}

.testimoni-wrapper {
  display: flex;
  transition: transform 0.5s ease-in-out;
  width: 300%;
}

.testimoni-item {
  flex: 1 0 100%;
  box-sizing: border-box;
  padding: 20px;
  border-radius: 10px;
  background: #222;
  color: white;
}

.alink {
  color: white;
  font-family: 'Poppins', sans-serif;
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: block;
}

.achild {
  color: white;
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  font-weight: 400;
  margin-bottom: 0.25rem;
  display: block;
  text-decoration: none;
}

.achild:hover {
  text-decoration: none;
  color: #cccccc;
}

.carousel-controls {
  position: absolute;
  top: 50%;
  width: 100%;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
}

.carousel-controls button {
  background: rgba(255, 255, 255, 0.5);
  border: none;
  padding: 10px;
  cursor: pointer;
  font-size: 20px;
}

.carousel-controls button:hover {
  background: white;
  color: black;
}

.statistic-box {
  background-color: #e6f7ed;
  border-radius: 1rem;
  padding: 1.25rem;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  margin-bottom: 1.25rem;
  align-items: center;
  min-height: 110px;
  max-width: 190px;
  font-family: 'Poppins', sans-serif;
}

.statistic-box .number {
  font-family: 'Poppins', sans-serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: #00563b;
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.statistic-box .label {
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  color: #008053;
  line-height: 1.3;
}

.pdesa {
  max-width: 700px;
  width: 100%;
  margin: 0 auto;
  text-align: center;
  justify-content: center;
  padding: 0 20px;
  font-family: 'Poppins', sans-serif;
  font-weight: 400;
  line-height: 1.6;
}

.profil-box {
  background-color: #e6f7ed;
  border-radius: 1rem;
  padding: 1rem;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 120px;
  max-width: 330px;
  width: 100%;
  margin: 0 auto 1rem auto;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  font-family: 'Poppins', sans-serif;
}

.profil-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.profil-box .number {
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: #00563b;
  margin-bottom: 0.3rem;
  line-height: 1.2;
}

.profil-box .label {
  font-family: 'Poppins', sans-serif;
  font-size: 0.75rem;
  font-weight: 400;
  color: #008053;
  line-height: 1.3;
  text-align: center;
}

.peta-box .img-fluid {
  border-radius: 20px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.peta-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.profil-box .image {
  border-radius: 60px;
  margin-bottom: 10px;
  width: 100px;
  height: 100px;
}

.custom-border-btn {
  border: 1px solid #003d22 !important;
  transition: all 0.3s ease;
}

.custom-border-btn:hover {
  background-color: #003d22 !important;
  color: white !important;
}

.boxes {
  margin: 0 auto;
  align-items: center;
  justify-content: center;
}

.profil-box .number {
  font-size: 1.1rem;
  font-weight: 600;
}

.custom-hr {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  margin: 0 auto 2rem auto;
  width: 80%;
  max-width: 1000px;
  margin-top: 20px;
  color: white;
}

.footer-text-box {
  text-align: center;
  color: white;
  font-size: 1rem;
  padding: 1rem 2rem;
  width: fit-content;
  margin: 0 auto;
  border-radius: 5px;
}

.text-sejarah {
  width: 90%;
  margin: 0 auto;
  text-align: center;
  text-justify: auto;
}

.text-hero {
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: 2.5rem;
  font-weight: bold;
  color: #004d33;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
  width: 80%;
  margin: 0 auto;
  line-height: 1.3;
}

.misi-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 1.1rem;
  color: #333;
}

.misi-list li {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  padding-left: 0.5rem;
}

.misi-list li::before {
  content: counter(list-item) ".";
  counter-increment: list-item;
  font-weight: bold;
  font-size: 1.8rem;
  color: #00563b;
  margin-right: 1rem;
  min-width: 2.5rem;
  text-align: right;
}

.table-custom {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-family: Arial, sans-serif;
}

.table-custom th,
.table-custom td {
  padding: 0.8rem 1.2rem;
  text-align: left;
  border-bottom: 1px solid #e0e0e0;
}

.table-custom th {
  font-weight: bold;
  color: #00563b;
  background-color: transparent;
  text-transform: uppercase;
}

.table-custom tr.dusun-row td:first-child {
  font-weight: bold;
  color: #00563b;
  padding-top: 1.5rem;
}

.table-custom td {
  color: #333;
}

.table-custom tbody tr:last-child td {
  border-bottom: none;
}

.table-custom tbody tr.dusun-row td:first-child {
  border-bottom: 1px solid #e0e0e0;
}

.pgeo {
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
  text-align: center;
  justify-content: center;
  font-size: 1.5rem;
  padding: 0 15px;
}

.text-graph {
    line-height: 24px !important;  
}

.form-container {
  max-width: 400px;
  margin: 50px auto;
  padding: 20px;
}

.custom-input {
  width: 100%;
  padding: 1rem 1.25rem;
  background-color: #e6f7ed;
  border: none;
  border-radius: 0.5rem;
  font-size: 1rem;
  color: #333;
  margin-bottom: 1.5rem;
  outline: none;
}

.custom-input::placeholder {
  color: #777;
}

.custom-input:focus {
  box-shadow: 0 0 0 0.25rem rgba(0, 86, 59, 0.25);
}

.custom-button {
  width: 100%;
  padding: 0.75rem 1.5rem;
  background-color: white;
  color: #00563b;
  border: 1px solid #00563b;
  border-radius: 2rem;
  font-size: 1.25rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
}

.custom-button:hover {
  background-color: #00563b;
  color: white;
  border-color: #00563b;
}

.custom-border-btn {
  border: 2px solid #28a745;
  color: #28a745;
  transition: all 0.3s ease;
}

.custom-border-btn:hover {
  background-color: #28a745;
  color: white;
}

.modal-content {
  border-radius: 15px;
  border: none;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.modal-header {
  background: linear-gradient(135deg, #e8f5e8 0%, #d4f1d4 100%);
  border-bottom: none;
  border-radius: 15px 15px 0 0;
  padding: 25px 30px 20px;
}

.modal-title {
  font-weight: 700;
  font-size: 1.5rem;
  color: #2d5a2d;
  text-align: center;
  width: 100%;
}

.btn-close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 1.5rem;
  color: #666;
  opacity: 0.8;
}

.btn-close:hover {
  opacity: 1;
  color: #333;
}

.modal-body {
  padding: 30px;
  background-color: #fafafa;
}

.requirements-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.requirements-list li {
  background: white;
  margin-bottom: 12px;
  padding: 15px 20px;
  border-radius: 8px;
  border-left: 4px solid #28a745;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  font-size: 0.95rem;
  line-height: 1.5;
}

.requirements-list li strong {
  color: #2d5a2d;
  font-weight: 600;
}

.requirements-list li .text-muted {
  font-size: 0.85rem;
  color: #666 !important;
  font-style: italic;
}

.material-note {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 8px;
  padding: 15px;
  margin-top: 20px;
  font-size: 0.9rem;
  color: #856404;
}

.modal-footer {
  border-top: none;
  padding: 20px 30px 30px;
  background-color: #fafafa;
  border-radius: 0 0 15px 15px;
}

.btn-action {
  padding: 12px 30px;
  border-radius: 25px;
  font-weight: 500;
  margin: 0 5px;
  min-width: 120px;
}

.btn-outline-success {
  border: 2px solid #28a745;
  color: #28a745;
}

.btn-outline-success:hover {
  background-color: #28a745;
  color: white;
}

.btn-success {
  background-color: #28a745;
  border: 2px solid #28a745;
}

.btn-success:hover {
  background-color: #218838;
  border-color: #218838;
}

/* General Layout Consistency Fixes */
.container {
    max-width: 1200px;
}

.profil-box {
    background-color: #e6f7ed;
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 180px;
    width: 100%;
    margin: 0 auto 1.5rem auto;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profil-box.h-100 {
    height: 100%;
    min-height: 200px;
}

.profil-box .number {
    font-size: 1.4rem;
    font-weight: bold;
    color: #00563b;
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.profil-box .label {
    font-size: 0.95rem;
    color: #008053;
    line-height: 1.4;
    flex-grow: 1;
    display: flex;
    align-items: center;
}

/* Consistent Typography Scaling */
.display-1 {
    font-size: 3.5rem;
    line-height: 1.2;
}

.display-4 {
    font-size: 2.5rem;
    line-height: 1.3;
    margin-bottom: 1.5rem;
}

.pdesa {
    max-width: 700px;
    width: 100%;
    margin: 0 auto;
    text-align: center;
    justify-content: center;
    padding: 0 15px;
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Consistent Button Styling */
.hero-btn, .custom-border-btn {
    transition: all 0.3s ease;
    border: 2px solid transparent;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
}

.hero-btn:hover, .custom-border-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
    text-decoration: none;
}

.custom-border-btn {
    border: 2px solid #003d22 !important;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    margin-top: 1rem;
}

/* Consistent Spacing */
.py-5 {
    padding-top: 4rem !important;
    padding-bottom: 4rem !important;
}

.container-fluid.about {
    padding: 4rem 0;
}

.mb-4 {
    margin-bottom: 2rem !important;
}

.g-4 > * {
    padding: 0.75rem;
}

/* Image Consistency */
.profil-box .image {
    border-radius: 50%;
    margin-bottom: 1rem;
    width: 80px;
    height: 80px;
    object-fit: cover;
}

.peta-box .img-fluid {
    border-radius: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-width: 100%;
    height: auto;
}

/* Section Spacing Improvements */
#profildesa .container {
    padding-top: 3rem;
    padding-bottom: 1rem;
}

#dusun .container {
    padding-top: 0.5rem !important;
    padding-bottom: 2.5rem;
}

#layanandesa .container {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
}

/* Reduce gap between title and components */
.display-4 {
    margin-bottom: 0.75rem !important;
}

.pdesa {
    margin-bottom: 1.5rem !important;
}

/* Enhanced Mobile Responsivity */
@media (max-width: 575.98px) {
  .container-fluid {
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .display-1 {
    font-size: 1.8rem !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    margin-bottom: 0.75rem !important;
  }
  
  .display-4 {
    font-size: 1.5rem !important;
    font-weight: 600 !important;
    margin-bottom: 0.5rem !important;
  }
  
  /* Header/Navbar Mobile Fixes */
  .navbar-brand {
    text-align: center !important;
    flex: 1 !important;
    margin: 0 auto !important;
  }
  
  .navbar-brand h1 {
    font-size: 1.1rem !important;
    margin: 0 !important;
    text-align: center !important;
  }
  
  .navbar-brand h6 {
    font-size: 0.75rem !important;
    margin: 0 !important;
    text-align: center !important;
  }
  
  .navbar .justify-content-start {
    margin-right: 10px !important;
  }
  
  .navbar-toggler {
    margin-left: auto !important;
  }
  
  /* Hero Section Mobile Improvements */
  .carousel-caption {
    padding: 15px 10px !important;
  }
  
  .carousel-caption h1 {
    font-size: 2.2rem !important;
    margin-bottom: 1rem !important;
    line-height: 1.1;
  }
  
  .carousel-caption p {
    font-size: 0.9rem !important;
    padding: 0 5px !important;
    margin-bottom: 1.5rem !important;
    line-height: 1.4;
  }
  
  /* Hero Buttons Mobile Stacking */
  .hero-buttons-container {
    flex-direction: column !important;
    align-items: center !important;
  }
  
  .hero-buttons-container .col-md-6 {
    width: 100% !important;
    margin-bottom: 0.5rem !important;
  }
  
  .hero-buttons-container .d-flex {
    justify-content: center !important;
  }
  
  .hero-btn {
    width: 200px !important;
    margin: 0.2rem auto !important;
    display: block !important;
    font-size: 0.85rem !important;
    padding: 10px 20px !important;
  }
  
  .pdesa {
    font-size: 0.9rem;
    padding: 0 15px;
    max-width: 95%;
  }
  
  .profil-box {
    padding: 0.8rem;
    min-height: 110px;
    margin-bottom: 0.75rem;
  }
  
  .profil-box .number {
    font-size: 0.9rem !important;
    margin-bottom: 0.25rem;
  }
  
  .profil-box .label {
    font-size: 0.7rem;
    line-height: 1.2;
  }
  
  /* Button adjustments with reduced spacing */
  .custom-border-btn {
    padding: 0.6rem 1.2rem !important;
    font-size: 0.8rem;
    width: 100%;
    margin-top: 0.3rem !important;
  }
  
  /* Image sizing */
  .profil-box .image {
    width: 70px;
    height: 70px;
    margin-bottom: 0.75rem;
  }
  
  /* Section spacing improvements */
  .about {
    padding: 3rem 0 !important;
  }
  
  .py-5 {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
  }
  
  #profildesa .container {
    padding-top: 2rem !important;
    padding-bottom: 0.5rem !important;
  }
  
  #dusun .container {
    padding-top: 0.5rem !important;
    padding-bottom: 1.5rem !important;
  }
  
  #layanandesa .container {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
  }

  /* Improved spacing for "Pembagian Wilayah Dusun" section */
  .container-fluid.about {
    padding: 2.5rem 0 !important;
  }

  /* Increase spacing between sections for better readability */
  .container-fluid.about + .container-fluid.about {
    padding-top: 2rem !important;
    margin-top: 0 !important;
  }

  /* Increase spacing for dusun section */
  #dusun {
    margin-top: 1rem !important;
    padding-top: 2rem !important;
  }

  /* Increase spacing for layanan administrasi section */
  #layanandesa {
    margin-top: 2rem !important;
    padding-top: 2.5rem !important;
  }

  /* Box spacing improvements */
  .row.g-4 {
    margin-bottom: 0 !important;
  }

  .col-6 {
    margin-bottom: 0.5rem !important;
  }
  
  /* Footer improvements - Remove Navigation Section */
  .footer-content {
    text-align: left !important;
  }
  
  .footer-section {
    margin-bottom: 2rem !important;
    text-align: left !important;
  }
  
  .footer-address {
    font-size: 0.7rem !important;
    line-height: 1.4 !important;
    display: block !important;
    margin-top: 0.5rem !important;
  }
  
  .copyright .row {
    text-align: center !important;
  }
  
  .copyright .col-md-4 {
    margin-bottom: 1.5rem;
  }
  
  .copyright h1 {
    font-size: 1.5rem !important;
    margin-bottom: 0.5rem;
  }
  
  .alink {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    display: block;
  }
  
  .achild {
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
    display: block;
  }
  
  .footer-text-box {
    font-size: 0.8rem;
    padding: 0.75rem 1rem;
    margin-top: 1rem;
    text-align: center !important;
  }

  
  /* Left-justify header text on smaller screens */
  .navbar-brand {
    text-align: left !important;
  }
  
  .navbar-brand h1,
  .navbar-brand h6 {
    text-align: left !important;
  }
}

@media (max-width: 767.98px) {
  .display-1 {
    font-size: 2.8rem !important;
    line-height: 1.2 !important;
  }
  
  .display-4 {
    font-size: 2rem !important;
    margin-bottom: 1.25rem !important;
  }
  
  /* Tablet and mobile adjustments */
  .carousel-caption {
    padding: 20px 15px !important;
  }
  
  .carousel-caption h1 {
    font-size: 2.8rem !important;
    margin-bottom: 1.25rem !important;
  }
  
  .carousel-caption p {
    font-size: 0.95rem !important;
    padding: 0 10px !important;
    margin-bottom: 2rem !important;
  }
  
  /* Hero Buttons Tablet Stacking */
  .hero-buttons-container {
    flex-direction: column !important;
    align-items: center !important;
    gap: 0.5rem !important;
  }
  
  .hero-buttons-container .col-md-6 {
    width: 100% !important;
    margin-bottom: 0 !important;
    flex: none !important;
  }
  
  .hero-btn {
    width: 70% !important;
    max-width: 200px !important;
    font-size: 0.9rem !important;
    padding: 12px 24px !important;
    margin: 0 auto !important;
    display: block !important;
    text-align: center !important;
  }
  
  .profil-box {
    max-width: 100%;
    padding: 1.25rem;
    margin-bottom: 1rem;
  }
  
  .profil-box .number {
    font-size: 1.3rem !important;
  }
  
  .profil-box .label {
    font-size: 0.85rem;
  }
  
  /* Section improvements */
  .pdesa {
    max-width: 90%;
    padding: 0 15px;
    font-size: 0.95rem;
  }

  /* Improved spacing for "Pembagian Wilayah Dusun" section on tablet */
  .container-fluid.about {
    padding: 3rem 0 !important;
  }

  .container-fluid.about + .container-fluid.about {
    padding-top: 2.5rem !important;
    margin-top: 0 !important;
  }

  #dusun {
    margin-top: 1.5rem !important;
    padding-top: 2.5rem !important;
  }

  /* Increase spacing for layanan administrasi section on tablet */
  #layanandesa {
    margin-top: 2.5rem !important;
    padding-top: 3rem !important;
  }
  
  /* Footer adjustments */
  .footer-text-box {
    font-size: 0.85rem;
    padding: 0.75rem 1.25rem;
  }
  
  .alink {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
  }
  
  .achild {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
  }
  
  /* Button spacing in cards */
  .custom-border-btn {
    width: 85%;
    margin: 0.5rem auto 0 auto !important;
  }
  
  /* Grid spacing improvements */
  .row {
    margin-left: -10px;
    margin-right: -10px;
  }
  
  .row > * {
    padding-left: 10px;
    padding-right: 10px;
  }
}

@media (max-width: 991.98px) {
  /* Medium devices adjustments */
  .pdesa {
    max-width: 90%;
  }
  
  .profil-box {
    max-width: 300px;
  }
  
  /* Grid adjustments for profile sections */
  .col-md-4 {
    margin-bottom: 20px;
  }
  
  /* Image container adjustments */
  .peta-box {
    margin-bottom: 30px;
  }
}

@media (max-width: 767.98px) {
  .text-hero {
    font-size: 1.8rem;
    width: 95%;
    line-height: 1.4;
  }
}

@media (max-width: 767.98px) {
  .misi-list li {
    margin-bottom: 1rem;
  }
  .misi-list li::before {
    font-size: 1.5rem;
    margin-right: 0.8rem;
    min-width: 2rem;
  }
  .misi-list {
    font-size: 1rem;
  }
}

@media (max-width: 767.98px) {
  .table-responsive {
    overflow-x: auto;
    border: none;
  }

  .table-custom thead {
    display: none; 
  }

  .table-custom, .table-custom tbody, .table-custom tr, .table-custom td {
    display: block;
    width: 100%;
    border: none;
  }

  .table-custom tr {
    margin-bottom: 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    display: block;
    padding: 1rem;
    background: #f8f9fa;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  }

  .table-custom tr.dusun-row {
    background: #e6f7ed;
    border-color: #00563b;
  }

  .table-custom td {
    text-align: right;
    padding: 0.5rem 0;
    padding-left: 50%;
    position: relative;
    border-bottom: none;
  }

  .table-custom td::before {
    content: attr(data-label) ": ";
    position: absolute;
    left: 0;
    width: 45%;
    padding-left: 10px;
    font-weight: bold;
    text-align: left;
    color: #00563b;
  }

  .table-custom td[rowspan] {
    display: none;
  }

  .table-custom tr.dusun-row::before {
    content: "Dusun: " attr(data-dusun);
    display: block;
    font-weight: bold;
    font-size: 1.1rem;
    color: #00563b;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid #00563b;
    padding-bottom: 0.25rem;
  }
}

@media (max-width: 575.98px) {
  .table-custom th,
  .table-custom td {
    padding: 0.6rem 0.8rem;
    font-size: 0.9rem;
  }
  .table-custom tr.dusun-row td:first-child {
    font-size: 1rem;
  }
  .table-custom th {
    font-size: 0.95rem;
  }
}
