body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f4f4f4;
  width: 100%;
  min-height: 100vh; /* Pastikan memenuhi tinggi layar */
  overflow-x: hidden; /* Hindari scroll horizontal */
}


/* Header */
.header-wrapper {
  background-color: #004d99; /* Warna biru BMKG */
  color: white;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between; /* Logo & judul di kiri, waktu di kanan */
  flex-wrap: wrap;
  gap: 10px;
}

/* Logo */
.logo {
  height: 50px;
  max-width: 100%;
  flex-shrink: 0; /* Agar tidak mengecil berlebihan */
}

/* Judul Header */
.header-title {
  color: white;
  font-size: 27px;
  font-weight: bold;
  flex-grow: 1; /* Menggunakan ruang tersisa */
  text-align: center;
}

/* Waktu */
.header-time {
  font-size: 14px;
  white-space: nowrap;
}

/* Responsiveness */
@media (max-width: 768px) {
  .header-wrapper {
      flex-direction: column; /* Susun vertikal pada layar kecil */
      align-items: center;
      text-align: center;
  }

  .header-title {
      font-size: 22px; /* Sesuaikan ukuran */
  }

  .header-time {
      font-size: 13px;
      margin-top: 5px;
  }
}

@media (max-width: 480px) {
  .header-title {
      font-size: 18px; /* Ukuran lebih kecil untuk layar kecil */
  }

  .header-time {
      font-size: 12px;
  }
}


/* Judul */
h1 {
  text-align: center;
  font-size: 24px;
  margin: 10px 0;
}

/* Container */
.container-fluid {
  padding: 30px;
  width: 100%;
  margin: 0; /* Hapus auto agar tidak ada batas */
}


/* Peta */#peta {
    width: 100%;
    height: 700px;
    border: 2px solid #ccc;
    margin-top: 20px;
    border-radius: 8px;
}


/* Legenda */
.legend {
  background: white;
  padding: 8px; /* Kurangi padding */
  border-radius: 5px;
  box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.2);
  margin-top: 8px;
  max-width: 250px; /* Kurangi lebar maksimal */
  font-size: 12px; /* Perkecil ukuran font */
}

.legend-item {
  display: flex;
  align-items: center;
  margin-bottom: 5px;
}

.legend-color {
  width: 20px;
  height: 20px;
  display: inline-block;
  margin-right: 10px;
}
/* Menyamakan ukuran semua ikon marker di legenda */
.legend-marker img {
  width: 16px;
  height: 28px;
}


.gray { background-color: gray; }
.green { background-color: green; }
.yellow { background-color: yellow; }
.orange { background-color: orange; }
.red { background-color: red; }
.purple { background-color: purple; }

/* Carousel */
.owl-carousel .item {
  background: #fff;
  padding: 15px;
  text-align: center;
  border-radius: 5px;
  box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.2);
  margin: 5px;
}

.owl-carousel .item h3 {
  font-size: 18px;
  margin-bottom: 5px;
}

.owl-carousel .item span {
  font-size: 14px;
  color: #333;
}

footer {
  background-color: #003366; /* Warna yang sesuai dengan navbar */
  color: white;
  text-align: center;
  padding: 10px 0;
  font-size: 14px;
}

#last-refresh {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 5px;
}

.footer-wrapper {
  padding: 10px;
  text-align: center;
}

.footer-wrapper p {
  color: white; /* Ubah warna teks menjadi putih */
  margin: 0;
  font-weight: bold;
}


/* Responsivitas */
@media (max-width: 1024px) {
  #peta {
      height: 400px;
  }

  .container-fluid {
      padding: 15px;
  }
}

@media (max-width: 768px) {
  .header-wrapper {
      flex-direction: column;
      text-align: center;
  }

  .logo {
      height: 40px;
  }

  #last-refresh {
      flex-direction: column;
      gap: 5px;
  }

  .legend {
      max-width: 100%;
  }

  footer {
      padding: 10px;
      font-size: 12px;
  }
}

@media (max-width: 480px) {
  h1 {
      font-size: 20px;
  }

  .container-fluid {
      padding: 10px;
  }

  #peta {
      height: 300px;
  }

  .legend {
      padding: 8px;
  }

  footer {
      font-size: 11px;
      padding: 8px;
  }
}




/* Container Styling */
.button-container {
  padding: 10px;
  background-color: #fff;
  border-radius: 6px;
  box-shadow: 1px 1px 6px rgba(0, 0, 0, 0.1);
  margin-bottom: 8px;
  text-align: left;
  width: 250px; /* Lebar diperbesar */
}

/* Heading */
.button-container h4 {
  margin: 6px 0;
  color: #333;
  font-size: 13px;
  font-weight: bold;
}

/* Buttons */
button {
  background-color: #007bff;
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 11px;
  transition: background-color 0.3s ease;
  text-align: center;
  display: inline-block;
  white-space: nowrap;
}

button:hover {
  background-color: #0056b3;
}

/* Legend Styling */
#legend {
  padding: 6px;
  background-color: #fff;
  border-radius: 6px;
  box-shadow: 1px 1px 6px rgba(0, 0, 0, 0.1);
  margin-top: 8px;
}

.legend-item {
  display: flex;
  align-items: center;
  margin-bottom: 5px;
}

.legend-marker {
  margin-right: 6px;
}

.legend-label {
  font-size: 12px;
  color: #333;
}

/* Rain Category Styling */
.legend-color {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 5px;
  border-radius: 3px;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
  .button-container {
    padding: 6px;
  }

  button {
    font-size: 10px;
    padding: 4px 8px;
  }

  .legend-label {
    font-size: 11px;
  }
}

@media screen and (max-width: 480px) {
  .button-container {
    padding: 5px;
    justify-content: left;
  }

  button {
    font-size: 9px;
    padding: 4px 7px;
  }

  .legend-label {
    font-size: 10px;
  }
}
