/* ==== RESET ==== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f7f7f7;
  color: #222;
}

/* ==== HERO SECTION ==== */
.hero {
  position: relative;
  height: 90vh;
  background: url("../assets/pemandangan-kelurahan.jpg") center center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-overlay {
  background: rgba(0, 0, 0, 0.45);
  width: 100%;
  text-align: center;
  padding: 80px 20px;
  color: white;
}

.hero-logo {
  width: 90px;
  margin-bottom: 15px;
}

.hero-overlay h2 {
  font-size: 20px;
  letter-spacing: 1px;
  margin-bottom: 5px;
}

.hero-overlay h1 {
  font-size: 28px;
  font-weight: bold;
  letter-spacing: 1px;
}

/* ==== MAIN ==== */
main {
  max-width: 1100px;
  margin: 50px auto;
  padding: 0 20px;
}

.about,
.news {
  margin-bottom: 50px;
}

.about h2,
.news h2 {
  color: #b30000;
  margin-bottom: 10px;
  font-size: 22px;
}

/* ==== BERITA SLIDER ==== */
.berita-slider {
  max-width: 1100px;
  margin: 60px auto;
  padding: 0 20px;
  position: relative;
}

.berita-slider h2 {
  text-align: center;
  color: #b30000;
  margin-bottom: 30px;
  font-size: 24px;
}

/* ==== SLIDER WRAPPER ==== */
.slider-container {
  overflow: hidden;
  position: relative;
  width: 100%;
  padding: 0 70px; /* ruang kiri-kanan untuk tombol panah */
}

.slider {
  display: flex;
  gap: 20px;
  transition: transform 0.6s ease;
}

/* ==== CARD BERITA ==== */
.card {
  flex: 0 0 32%;
  background: white;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: transform 0.4s ease, box-shadow 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s forwards;
}

.card:nth-child(1) {
  animation-delay: 0.1s;
}
.card:nth-child(2) {
  animation-delay: 0.3s;
}
.card:nth-child(3) {
  animation-delay: 0.5s;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.card img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  border-radius: 10px 10px 0 0;
}

.card-content {
  padding: 15px 18px 25px;
}

.card-content h3 {
  color: #003399;
  font-size: 17px;
  margin-bottom: 10px;
  line-height: 1.3em;
}

.card-content p {
  color: #555;
  font-size: 14px;
  line-height: 1.5;
}

/* ==== SLIDER BUTTON ==== */
.slider-btn {
  background: #b30000;
  color: white;
  border: none;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
}

.slider-btn:hover {
  background: #8e0000;
  transform: translateY(-50%) scale(1.1);
}

#prevBtn {
  left: 10px;
}

#nextBtn {
  right: 10px;
}

/* ==== RESPONSIVE SLIDER ==== */
@media (max-width: 900px) {
  .card {
    flex: 0 0 48%;
  }

  .slider-container {
    padding: 0 50px;
  }

  #prevBtn {
    left: 0;
  }

  #nextBtn {
    right: 0;
  }
}

@media (max-width: 600px) {
  .card {
    flex: 0 0 100%;
  }

  /* tombol turun ke bawah di HP */
  .slider-btn {
    top: auto;
    bottom: -50px;
    transform: none;
    width: 38px;
    height: 38px;
    font-size: 18px;
  }

  #prevBtn {
    left: 30%;
  }

  #nextBtn {
    right: 30%;
  }
}


/* ==== PROFIL LURAH & SEKLUR ==== */
.profil-pimpinan {
  background-color: #f5f6fa;
  padding: 60px 10%;
}

.profil-container {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  gap: 30px;
}

.profil-foto {
  flex: 0 0 260px; /* tetap seragam di desktop & mobile */
  text-align: center;
}
.foto-pimpinan {
  width: 100%;
  max-width: 200px;
  border-radius: 10px;
  object-fit: cover;
  margin-bottom: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.profil-foto h3 {
  margin: 10px 0 5px;
  font-size: 18px;
  color: #003399;
}

.profil-foto p {
  font-size: 14px;
  color: #555;
}

.visi-misi {
  flex: 1;
  background: white;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.visi-misi h2 {
  color: #b30000;
  margin-bottom: 15px;
}

.visi-misi h3 {
  color: #003399;
  margin-top: 20px;
}

.visi-misi p {
  margin-bottom: 15px;
  font-style: italic;
}

@media (max-width: 768px) {
  .profil-foto {
    flex: 0 0 220px;
  }
}

/* ==== STRUKTUR PEMERINTAHAN ==== */
.pemerintahan-section {
  padding: 60px 10%;
  background-color: #f8f9fa;
  text-align: center;
}

.pemerintahan-section h2 {
  color: #b30000;
  margin-bottom: 40px;
}

.perangkat-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  justify-items: center;
  padding: 20px;
}

.card-perangkat {
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  width: 180px;
  padding: 20px 10px;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-perangkat:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.card-perangkat img {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #b30000;
  margin-bottom: 10px;
}

.card-perangkat h3 {
  margin: 10px 0 5px;
  color: #b30000;
  font-size: 16px;
}

.card-perangkat p {
  color: #555;
  font-size: 13px;
}

.struktur-container {
  text-align: center;
  padding: 60px 10%;
  background-color: #fff;
}

.struktur-container img {
  max-width: 100%;
  height: auto;
  margin: 20px 0;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.tabel-perangkat {
  width: 100%;
  border-collapse: collapse;
  margin-top: 30px;
  background: white;
  border-radius: 10px;
  overflow: hidden;
}

.tabel-perangkat th,
.tabel-perangkat td {
  border: 1px solid #ddd;
  padding: 12px 15px;
  text-align: center;
}

.tabel-perangkat th {
  background-color: #b30000;
  color: white;
}

.tabel-perangkat tr:nth-child(even) {
  background-color: #f9f9f9;
}

/* ==== INFORMASI PUBLIK ==== */
.info-section {
  padding: 80px 10%;
  background-color: #f6f7fb;
  min-height: 100vh;
}

.info-section h2 {
  text-align: center;
  color: #b30000;
  font-weight: 700;
  font-size: 2rem;
  margin-bottom: 50px;
  position: relative;
}

.info-section h2::after {
  content: "";
  width: 60px;
  height: 4px;
  background-color: #b30000;
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 2px;
}

.berita-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
}

.card-berita {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

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

.card-berita img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card-berita .content {
  flex: 1;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.tanggal {
  font-size: 13px;
  color: #777;
  margin-bottom: 8px;
}

.card-berita h3 {
  font-size: 1.1rem;
  color: #003399;
  margin-bottom: 10px;
  line-height: 1.4em;
}

.card-berita p {
  color: #555;
  font-size: 14px;
  line-height: 1.5;
  flex-grow: 1;
}

.read-more {
  align-self: flex-start;
  text-decoration: none;
  color: #fff;
  background-color: #b30000;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.3s ease;
  margin-top: 15px;
}

.read-more:hover {
  background-color: #8e0000;
}

/* ==== DATA STATISTIK ==== */
.data-kelurahan {
  background: #f5f6fa;
  padding: 60px 10%;
  text-align: center;
}

.data-kelurahan h2 {
  color: #b30000;
  margin-bottom: 40px;
}

.chart-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px;
}

.chart-card {
  background: white;
  border-radius: 10px;
  padding: 20px;
  width: 400px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.chart-card h3 {
  color: #003399;
  margin-bottom: 20px;
  font-size: 16px;
}

canvas {
  max-width: 100%;
  height: auto !important;
}

/* ==== FOOTER ==== */
footer {
  background-color: #b30000 !important;
  color: white !important;
  text-align: center;
  padding: 15px 0;
  margin-top: 40px;
  width: 100%;
}

footer p {
  color: white !important;
  margin: 0;
}

footer a {
  color: white !important;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* ==== RESPONSIVE ==== */
@media (max-width: 768px) {
  .hero-overlay h1 {
    font-size: 20px;
  }

  .card {
    flex: 0 0 100%;
  }

  .info-section {
    padding: 50px 6%;
  }

  .info-section h2 {
    font-size: 1.6rem;
  }

  .chart-container {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 480px) {
  .hero-logo {
    width: 70px;
  }

  .hero-overlay h2 {
    font-size: 16px;
  }
}

.slider-btn {
  background: #b30000;
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 22px;
  cursor: pointer;
  transition: background 0.3s;
}

.slider-btn:hover {
  background: #8e0000;
}

@media (min-width: 769px) {
  .perangkat-container {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* 🔹 Desktop: 3–4 kolom */
    gap: 25px;
  }

  .card-perangkat {
    width: 220px;
    padding: 25px 15px;
  }

  .card-perangkat img {
    width: 100px;
    height: 100px;
  }
}

/* 🔹 Mobile: 2 kolom */
@media (max-width: 768px) {
  .perangkat-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 10px;
  }

  .card-perangkat {
    width: 95%;
    padding: 15px 10px;
  }

  .card-perangkat img {
    width: 80px;
    height: 80px;
  }

  .card-perangkat h3 {
    font-size: 14px;
  }

  .card-perangkat p {
    font-size: 12px;
  }
}


/* === Video Section === */
.video-section {
  background: #f9f9f9;
  padding: 50px 30px;
  border-radius: 16px;
  margin: 50px auto;
  max-width: 1200px; /* 🔹 Batasi lebar maksimum agar tidak melebar */
}

.video-section h2 {
  text-align: center;
  color: #003366;
  margin-bottom: 40px;
  font-size: 1.8rem;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* 🔹 Lebar tiap kartu lebih proporsional */
  gap: 25px;
  justify-content: center;
}

.video-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.25s ease;
}

.video-card:hover {
  transform: translateY(-6px);
}

.video-card video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  background: #000;
}

.video-card h4 {
  font-size: 1rem;
  color: #003366;
  padding: 14px;
  text-align: center;
  font-weight: 600;
}

/* ==== RESPONSIVE DESKTOP ==== */
@media (min-width: 992px) {
  .video-section {
    max-width: 1300px;
    padding: 60px 60px;
  }

  .video-grid {
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); /* 🔹 Maks. 3 kolom di desktop */
    gap: 30px;
  }

  .video-section h2 {
    font-size: 2rem;
  }
}

/* berita detail */
body {
  background-color: #f6f7fb;
  font-family: "Poppins", sans-serif;
  color: #333;
}

.detail-section {
  max-width: 900px;
  margin: 120px auto 80px;
  padding: 0 20px;
}

.judul {
  text-align: center;
  color: #b30000;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.3em;
}

.tanggal {
  text-align: center;
  color: #777;
  font-size: 14px;
  margin-bottom: 25px;
}

.gambar-container {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
}

.gambar-container img {
  width: 100%;
  max-width: 800px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  object-fit: cover;
}

.isi {
  font-size: 16px;
  line-height: 1.8;
  color: #444;
  background-color: white;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.isi p {
  margin-bottom: 15px;
}

.kembali {
  display: inline-block;
  margin-top: 30px;
  background-color: #b30000;
  color: white;
  text-decoration: none;
  padding: 10px 18px;
  border-radius: 6px;
  font-size: 14px;
  transition: background 0.3s ease;
}

.kembali:hover {
  background-color: #8e0000;
}

@media (max-width: 768px) {
  .detail-section {
      margin: 100px 0 50px;
      padding: 0 15px;
  }

  .judul {
      font-size: 1.6rem;
  }

  .isi {
      padding: 20px;
      font-size: 15px;
  }

  .gambar-container img {
      max-width: 100%;
  }
}


/* ==== PROFIL UMUM & SEJARAH ==== */
.content {
  background: #fff;           
  padding: 40px 30px;         
  margin: 40px auto;          
  border-radius: 12px;        
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08); 
  max-width: 1100px;          
}

.content h3 {
  color: #b30000;             
  font-size: 1.8rem;
  margin-bottom: 20px;
  text-align: center;
  position: relative;
}

.content h3::after {
  content: "";
  width: 60px;
  height: 4px;
  background-color: #b30000;
  display: block;
  margin: 8px auto 0;
  border-radius: 2px;
}

.content p {
  font-size: 16px;
  line-height: 1.8;
  color: #333;
  text-align: justify;
  text-justify: inter-word;
}


.content blockquote {
  border-left: 4px solid #003399;
  padding-left: 20px;
  font-style: italic;
  color: #003366;
  margin: 20px 0;
  background: #f5f7ff;
  border-radius: 6px;
}

   /* Tambahan styling untuk profil singkat seperti admin */
   .profil-card {
    background-color: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
  }
  .profil-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
  }
  .profil-foto {
    text-align: center;
    flex: 1 1 200px;
  }
  .profil-foto img {
    border-radius: 12px;
    max-width: 180px;
    width: 100%;
    margin-bottom: 10px;
  }
  .visi-misi {
    flex: 1 1 100%;
    background-color: #f8f9fa;
    padding: 15px 20px;
    border-radius: 12px;
    margin-top: 20px;
  }


.about {
  background-color: #fff;          
  padding: 20px 25px;              
  border-radius: 12px;             
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); 
  margin-bottom: 30px;             
}

.about h2 {
  font-size: 1.8rem;
  margin-bottom: 15px;
  color: #b30000; 
}

.about p {
  font-size: 1rem;
  line-height: 1.6;
  color: #333;
}



