.masthead {
    background: url('/img/bg.jpg') no-repeat center center/cover;
    height: 741.6px;
    position: relative;
}

.gradient-divider {
  height: 4px;
  background: linear-gradient(to right, transparent, #072e48, transparent);
  margin: 60px 0;
}

html, body {
  height: 100%;
  margin: 0;
}

body {
  display: flex;
  flex-direction: column;
}

section {
  flex: 1 0 auto;
  width: 100%;
  overflow-x: hidden;
}


body::-webkit-scrollbar {
  display: none;
}

.overlay {
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
}

.img-kegiatan{
  width: 100%;
}

@media (max-width: 991.98px) {
  #mainNav {
    max-width: 100%;
    padding-left: 15px;
    padding-right: 15px;
  }
}


#sejarah-desa,#visimisi,#strukturdesa,#demografi {
    padding: 80px 0;
    background-color: #f8f9fa;
}

#sejarah-desa h2 {
    color: #333;
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.sejarah-content p {
    color: #555;
    line-height: 1.6;
    margin-bottom: 15px;
    text-align: justify;
}

.wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

html, body {
    margin: 0;
    padding: 0;
    height: 0%;
  }
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.content {
    flex: 1;
}

.service-container {
    max-width: 500px; /* Sesuaikan dengan kebutuhan Anda */
    margin: 0 auto;
}

.service-heading {
    font-size: 1.1rem;
    margin-top: 15px;
}

@media (min-width: 992px) {
    #layanan .row {
        max-width: 900px;
        margin-left: auto;
        margin-right: auto;
    }
}
@media (min-width: 768px) {
  #layanan .row > div:nth-child(n+4) {
      margin-top: 2rem;
  }
}
@media (min-width: 992px) {
  #layanan .row {
      display: flex;
      flex-wrap: wrap;
  }
  #layanan .row > div:nth-child(n+4) {
      margin-top: 2rem;
  }
}

#berita {
  background-color: #072e48;
  padding: 80px 0;
}

.news-card {
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  overflow: hidden;
  height: 100%;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.card-img-top {
  height: 200px;
  object-fit: cover;
}

.card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  height: calc(100% - 200px);
}

.card-date {
  color: #96c82b;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.card-title {
  color: #fff;
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.card-text {
  color: #a0a0a0;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.btn-read-more {
  color: #dbdbdb;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
  align-self: flex-start;
}

.btn-read-more:hover {
  color: #96c82b;
}

.more-news {
  background: url("assets/img/map-image.png") center/cover no-repeat;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  
}

.more-news .card-body {
  background-color: rgba(7, 46, 72, 0.8);
  height: 100%;
}

.more-news h4 {
  color: #fff;
  font-size: 1.5rem;
}

.btn-more-news {
  display: inline-block;
  padding: 0.8rem 2rem;
  background-color: #2f0a80;
  color: #fff;
  text-decoration: none;
  border-radius: 50px;
  transition: background-color 0.3s ease;
}

.btn-more-news:hover {
  background-color: #96c82b;
  color: #2f0a80;
}

@media (max-width: 991.98px) {
  .news-card {
    margin-bottom: 2rem;
  }
}

#kegiatan {
  background-color: #f8f9fa;
}

.kegiatan-card {
  background-color: #ffffff;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.kegiatan-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.kegiatan-image {
  height: 200px;
  background-size: cover;
  background-position: center;
}

.kegiatan-content {
  padding: 1.5rem;
}

.kegiatan-content h4 {
  color: #333;
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.kegiatan-content p {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.btn-kegiatan {
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: #072e48;
  color: #fff;
  text-decoration: none;
  border-radius: 50px;
  transition: background-color 0.3s ease;
}

.btn-kegiatan:hover {
  background-color: #096090;
}

@media (max-width: 767.98px) {
  .kegiatan-card {
    margin-bottom: 1.5rem;
  }
}

#layanan {
  background-color: #f0f4f8;
  padding: 80px 0;
}

.service-wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap:20px;
}

.service-item {
  flex-basis: calc(50% - 20px); /* 50% lebar dikurangi gap */
  max-width: calc(50% - 20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.service-icon {
  width: 115px;
  height: 115px;
  border-radius: 50%;
  background: linear-gradient(145deg, #3498db, #2980b9);
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 20px;
  transition: all 0.3s ease;
  box-shadow: 0 10px 20px rgba(52, 152, 219, 0.2);
}

.service-icon i {
  font-size: 40px;
  color: #ffffff;
}

.service-item:hover .service-icon {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(52, 152, 219, 0.3);
}

.service-item h4 {
  color: #2c3e50;
  font-size: 1.2rem;
  margin-bottom: 15px;
  font-weight: 600;
}

.btn-service {
  display: inline-block;
  padding: 8px 20px;
  background: linear-gradient(145deg, #3498db, #2980b9);
  color: #ffffff;
  text-decoration: none;
  border-radius: 25px;
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
}

.service-item:hover .btn-service {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 768px) {
  .service-item {
    flex-basis: 100%;
    max-width: 100%;
  }
}

.org-chart {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.org-level {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-bottom: 20px;
}
.org-unit {
  background-color: #ffffff;
  border: 1px solid #dee2e6;
  border-radius: 5px;
  padding: 15px;
  margin: 0 10px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}
.org-unit:hover {
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}
.org-unit h3, .org-unit h4, .org-unit h5 {
  margin-bottom: 5px;
  color: #343a40;
}
.org-unit p {
  margin-bottom: 0;
  font-size: 0.9rem;
  color: #6c757d;
}
.kepala-desa {
  background-color: #e9ecef;
  border-bottom: 3px solid #007bff;
}
.sekretaris-desa {
  background-color: #e9ecef;
  border-bottom: 3px solid #28a745;
}
.kaur {
  border-bottom: 3px solid #ffc107;
}
.kadus {
  border-bottom: 3px solid #17a2b8;
}

@media (max-width: 768px) {
  .org-level {
      flex-direction: column;
      align-items: center;
  }
  .org-unit {
      width: 80%;
      margin-bottom: 15px;
  }
}

#lokasi {
  background-color: #f8f9fa;
  position: relative;
}

#lokasi::before {
  content: '';
  position: absolute;
  top: -50px;
  left: -50px;
  right: -50px;
  bottom: -50px;
  background: url('assets/img/bg.png') no-repeat center center;
  background-size: cover;
  opacity: 0.1;
  z-index: 0;
}

.lokasi-wrapper {
  position: relative;
  z-index: 1;
  display: flex;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.map-container {
  flex: 1;
  height: 400px;
}

.batas-wilayah {
  flex: 0 0 300px;
  padding: 30px;
  background: linear-gradient(135deg, #072e48, #0a4c7a);
  color: white;
}

.batas-wilayah h3 {
  margin-bottom: 20px;
  font-weight: 700;
  color: #ffd700;
}

.batas-wilayah ul {
  list-style-type: none;
  padding: 0;
}

.batas-wilayah li {
  margin-bottom: 15px;
  font-size: 0.9rem;
}

.batas-wilayah li strong {
  display: inline-block;
  width: 70px;
  color: #ffd700;
}

@media (max-width: 991px) {
  .lokasi-wrapper {
    flex-direction: column;
  }
  
  .batas-wilayah {
    flex: 0 0 auto;
  }
}


.intro-text {
    z-index: 2;
    text-align: left;
    color: #fff;
}

.intro-heading {
    font-size: 4rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 25px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.intro-lead-in {
    font-size: 1.5rem;
    font-style: italic;
    line-height: 1.5;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.kegiatan-content {
  display: flex;
  flex-direction: column;
  align-items: center; /* Menempatkan elemen secara horizontal di tengah */
  justify-content: center; /* Menempatkan elemen secara vertikal di tengah */
  text-align: justify; /* Meratakan teks kanan kiri */
}

.kegiatan-content p {
  text-align: justify; /* Meratakan teks paragraf kanan kiri */
  width: 100%; /* Memastikan paragraf mengambil lebar penuh */
}

.center-button {
  margin-top: auto;
}


#layanan {
  background-color: #f8f9fa;
}

.card {
  border: none;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.form-control {
  border: 1px solid #ced4da;
  font-size: 16px;
}

.form-control::placeholder {
  font-size: 16px;
  color: #6c757d;
}

.form-control:focus {
  border-color: #072e48;
  box-shadow: 0 0 0 0.2rem rgba(7, 46, 72, 0.25);
}

.btn-primary {
  background-color: #072e48;
  border: none;
  padding: 10px 20px;
  font-size: 16px;
}

.btn-primary:hover {
  background-color: #0a4268;
}

h2 {
  color: #072e48;
  font-weight: bold;
}
.berita-terkini {
  margin-bottom: 40px;
}
.berita-terkini img {
  width: 100%;
  height: 400px;
  object-fit: cover;
}
.berita-sebelumnya .card {
  height: 100%;
}
.berita-sebelumnya img {
  height: 200px;
  object-fit: cover;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.4);
  -webkit-overflow-scrolling: touch;
}

.modal-content {
  background-color: #072e48;
  margin: 15% auto;
  padding: 20px;
  width: 80%;
  max-width: 300px;
  border-radius: 10px;
}

#adminLoginModal{
  height: fit-content;
}

#adminLoginForm .form-group {
  margin-bottom: 20px;
}

#adminLoginForm input {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 25px;
  background-color: rgba(255,255,255,0.1);
  color: white;
  transition: 0.3s;
}

#adminLoginForm input::placeholder {
  color: rgba(255,255,255,0.7);
}

#adminLoginForm input:focus {
  outline: none;
  background-color: rgba(255,255,255,0.2);
}

#adminLoginForm button {
  width: 100%;
  padding: 12px;
  background-color: rgba(26, 10, 34, 0.866);
  color: white;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  transition: 0.3s;
}

#adminLoginForm button:hover {
  background-color: #e10000;
}

.modal h2 {
  text-align: center;
  margin-bottom: 20px;
  font-weight: 300;
}

.floating-socials {
  position: fixed;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.social-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #072e48;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.social-icon:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.social-icon i {
  font-size: 20px;
}

/* Warna khusus untuk setiap platform (opsional) */
.facebook:hover { background-color: #3b5998; }
.instagram:hover { background-color: #e4405f; }
.twitter:hover { background-color: #1da1f2; }
.tiktok:hover { background-color: #000000; }

#demografi{
  .card {
    height: 400px; /* Atur tinggi tetap untuk semua kartu */
    overflow: auto; /* Tambahkan scrollbar jika konten melebihi tinggi */
}
.card-body {
    padding: 0.75rem; /* Kurangi padding */
}
.card-header {
    padding: 0.5rem 0.75rem; /* Kurangi padding header */
}
.h6 {
    font-size: 0.8rem; /* Kurangi ukuran font judul */
}
.h4 {
    font-size: 1.2rem; /* Kurangi ukuran font angka */
}
.fas {
    font-size: 1.5rem; /* Kurangi ukuran ikon */
}
.list-group-item {
    padding: 0.5rem 0.75rem; /* Kurangi padding item list */
}
.table {
    font-size: 1rem; /* Kurangi ukuran font tabel */
}
#educationChart {
    max-height: 300px; /* Batasi tinggi chart */
}
}

#kontak {
  background-color: #f8f9fa;
}

.kontak-card {
  background-color: #ffffff;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.kontak-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.kontak-info h2 {
  color: #072e48;
  font-weight: 700;
  font-size: 2rem;
}

.kontak-info p {
  font-size: 1.1rem;
  color: #555;
}

.kontak-info ul {
  font-size: 0.95rem;
  color: #333;
}

.kontak-info ul strong {
  font-weight: 600;
}

.kontak-image {
  background-image: url('../img/kontak/kontak.jpeg');
  background-position: center;
  background-size: cover;
  min-height: 690px;
}

@media (max-width: 991px) {
  .kontak-image {
    min-height: 300px;
  }
}

#pengumuman{
  .pengumuman-section {
    background-color: #f8f9fa;
}

.hover-effect {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-effect:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.pengumuman-item .card {
    border-radius: 10px;
}

.pengumuman-item .card-title {
    color: #072e48;
}

.btn-link {
    color: #072e48;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.btn-link:hover {
    color: #0056b3;
}

.badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.35em 0.65em;
    border-radius: 50rem;
}

.btn-primary {
    background-color: #072e48;
    border-color: #072e48;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.btn-primary:hover {
    background-color: #0a4265;
    border-color: #0a4265;
}
}

#galeri{
  .galeri-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    aspect-ratio: 1 / 1; /* Membuat rasio aspek 1:1 (persegi) */
}

.galeri-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Memastikan gambar menutupi seluruh area tanpa distorsi */
}

.galeri-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(7, 46, 72, 0.8);
    color: white;
    padding: 15px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.galeri-item:hover .galeri-caption {
    transform: translateY(0);
}

/* Styles untuk popup */
.popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    
    overflow-y: auto;
}

.popup-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 80%;
    max-height: 80%;
}

.popup-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.popup-info {
    background-color: rgba(0, 0, 0, 0);
    color: white;
    padding: 20px;
    margin-top: 20px;
}

.close-popup {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 30px;
    color: white;
    cursor: pointer;
}
}

.berita-detail-page{
  main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-container {
    margin-top: 100px;
    max-width: 1000px;
    flex: 1;
}

.news-layout {
    display: flex;
    flex-direction: row;
    gap: 30px;
    align-items: flex-start;
}

.news-image {
    flex: 0 0 25%;
}

.news-image img {
    width: 100%;
    height: auto;
    aspect-ratio: 4/5;
    object-fit: cover;
}

.news-content {
    flex: 0 0 65%;
}

.news-content article {
    text-align: justify;
    font-family: 'Merriweather', serif;
    font-size: 16px;
    line-height: 1.6;
}

.news-content p {
    margin-bottom: 15px;
}

h1 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    margin-bottom: 10px;
}

.date {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .news-layout {
      flex-direction: column;
    }
    
    .news-image, .news-content {
      flex: 1 0 100%;
    }
    
    .news-image {
      margin-bottom: 20px;
    }
    
    .news-content article {
      font-size: 14px;
    }
    
    h1 {
      font-size: 24px;
    }
  }

  @media (max-width: 768px) {
    .navbar-nav {
      text-align: center;
    }
    
    .nav-item {
      padding: 5px 0;
    }
    
    .dropdown-menu {
      text-align: center;
    }
  }
  @media (max-width: 768px) {
    body {
      font-size: 14px;
    }
    
    .news-content article {
      font-size: 16px;
    }
  }

  @media (max-width: 768px) {
    .back-button {
        display: none;
    }
}
}

.berita-page{
  .news-list-card {
    height: 100%;
    max-height: 500px; /* Set the maximum height */
    overflow-y: auto;
}

.news-list {
    max-height: calc(100vh - 300px); /* Adjust based on your header/footer heights */
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 10px; /* Adjust to ensure padding for scrollbar */
}
.news-list-card {
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    background-color: #fff;
}

.news-list {
    max-height: 300px;
    overflow-y: auto;
    padding-right: 10px;
}

.news-item {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    transition: background-color 0.3s ease;
}

.news-item:last-child {
    border-bottom: none;
}

.news-item:hover {
    background-color: #f8f9fa;
}

.news-title {
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-date {
    font-size: 0.75rem;
    color: #6c757d;
}

/* Custom scrollbar */
.news-list::-webkit-scrollbar {
    width: 4px;
}

.news-list::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.news-list::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 2px;
}

.news-list::-webkit-scrollbar-thumb:hover {
    background: #555;
}
}

.kontakinfo{
  body {
    font-family: 'Montserrat', sans-serif;
    background-color: #f8f9fa;
}
.kontak-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-top: -50px;
}
.kontak-info {
    padding: 3rem;
}
.kontak-image {
    background-image: url(/img/kontak/kontak.jpeg);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    height: 100%;
}
.contact-list i {
    color: #007bff;
    width: 20px;
    text-align: center;
    margin-right: 10px;
}
.animated-text {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s, transform 0.5s;
}
.animated-text.visible {
    opacity: 1;
    transform: translateY(0);
}
@media (min-width: 992px) {
  .kontak-image {
      min-height: 450px; /* Sesuaikan dengan kebutuhan */
  }
}
}

#berita-utama,#berita-terbaru,#berita-detail{
        .card-title{
            color: #39321fd8;
        }

        .card-text{
            color: #242115;
        }
        .news-card {
            border: none;
            border-radius: 15px;
            overflow: hidden;
            box-shadow: 0 5px 15px rgba(0,0,0,0.1);
            transition: all 0.3s ease;
            height: 100%;
            background-color: #e4e4e4;
        }

        .news-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 20px rgba(0,0,0,0.2);
        }

        .news-card img {
            height: 200px;
            object-fit: cover;
        }

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

        .btn-custom {
            background-color: var(--secondary-color);
            border: none;
            color: white;
            padding: 10px 20px;
            border-radius: 30px;
            transition: all 0.3s ease;
        }

        .btn-custom:hover {
            background-color: var(--accent-color);
            color: var(--primary-color);
        }

        .section-title {
            position: relative;
            display: inline-block;
            margin-bottom: 2rem;
            color: var(--primary-color);
        }

        .section-title::after {
            content: '';
            position: absolute;
            bottom: -10px;
            left: 0;
            width: 50px;
            height: 3px;
            background-color: var(--accent-color);
        }

        .flex-grow-1 {
            flex: 1 0 auto;
        }
}

#galeri{
.category-filter {
    position: sticky;
    margin-bottom: 20px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}
.category-filter .card-header {
    border-bottom: 2px solid #f8f9fa;
}
.category-filter .form-check {
    margin-bottom: 10px;
}
.galeri-item {
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
}
.galeri-item img {
    transition: transform 0.3s ease;
}
.galeri-item:hover img {
    transform: scale(1.05);
}
.galeri-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 10px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}
.galeri-item:hover .galeri-caption {
    transform: translateY(0);
}
}