@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=Roboto:wght@400;500&display=swap");

/* Ensure the body takes up at least the full height of the viewport */
html,
body {
  display: flex;
  flex-direction: column;
  font-family: "Playfair Display", serif, "Roboto", sans-serif;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

header {
  background: linear-gradient(
      rgba(255, 255, 255, 0.8),
      rgba(255, 255, 255, 0.8)
    ),
    url("../img/batik-kaltim.png") left/15% repeat-y,
    url("../img/batik-kaltim.png") right/15% repeat-y, #f5f5f5;
  color: black;
  padding: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: "Playfair Display", serif;
  position: relative;
  height: 120px; /* Sesuaikan tinggi header */
}

.logo-section {
  display: flex;
  align-items: center;
}

.logo {
  width: 50px;
  height: 50px;
  margin-right: 10px;
}

.bmkg-text {
  font-size: 16px;
  font-weight: bold;
  font-family: "Playfair Display", serif;
}

.date-time {
  font-family: "Roboto", sans-serif;
  font-size: 16px;
  color: green;
}

nav {
  position: relative; /* atau fixed jika navbar ingin selalu di atas */
  z-index: 1100; /* lebih tinggi dari banner */
  background-color: #fff; /* agar tidak transparan */
}

.navbar {
  display: flex;
  justify-content: center;
  padding: 0;
  margin: 0;
  list-style: none;
  z-index: 1000;
}

/* List item navbar */
.navbar > li {
  position: relative; /* konteks positioning untuk dropdown */
  z-index: 1100;
}

.navbar > li > a {
  font-family: "Roboto", sans-serif;
  display: block;
  padding: 15px 20px;
  text-decoration: none;
  color: black;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.navbar > li:hover > a {
  background-color: #f0f0f0;
  color: #007bff; /* Change navbar link color on hover */
}

/* Menempatkan ikon login di paling kanan */
.login-container {
  margin-left: auto;
  padding: 10px 20px;
}

.login-icon {
  color: black;
  font-size: 18px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Dropdown menu */
.dropdown {
  position: absolute;
  top: 100%; /* tepat di bawah parent li */
  left: 0;
  z-index: 1200; /* lebih tinggi dari navbar dan banner */
  display: none;
  background-color: #fff;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  min-width: 200px;
  transition: opacity 0.3s ease, transform 0.3s ease;
  opacity: 0;
  transform: translateY(10px);
}

.dropdown a {
  padding: 12px 18px;
  text-decoration: none;
  display: block;
  color: #333;
  font-family: "Roboto", sans-serif; /* Elegant font */
  font-size: 14px;
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.3s ease, padding-left 0.2s ease;
  border-radius: 8px;
}

.dropdown a:hover {
  background-color: #f5f5f5;
  padding-left: 20px; /* Slight left indentation on hover */
  color: #007bff; /* Change text color on hover */
}

/* Dropdown muncul saat hover */
.navbar > li:hover .dropdown {
  display: block;
  opacity: 1;
  transform: translateY(0);
  z-index: 1200;
}

.dropdown a:last-child {
  border-bottom: none;
}

/* Main Content */
main {
  padding: 20px;
  font-family: "Roboto", sans-serif;
}

/* Hero Section */
.hero {
  background: url("../img/banner.jpg") center/cover no-repeat;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-align: center;
}

.hero-content {
  background: rgba(0, 0, 0, 0.5);
  padding: 20px;
  border-radius: 10px;
}

.hero h1 {
  font-size: 32px;
  margin-bottom: 10px;
}

/* Prakiraan Cuaca */
.weather-forecast {
  text-align: center;
  padding: 20px;
  background: linear-gradient(to bottom, #e3f2fd, #bbdefb);
  border-radius: 10px;
  margin-top: 20px;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
  font-family: "Roboto", sans-serif;
}

.weather-forecast h2 {
  font-size: 24px;
  margin-bottom: 20px;
  font-weight: bold;
  color: #003366;
}

/* Weather Container */
.weather-container {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

/* Weather Card */
.weather-card {
  background: white;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
  text-align: center;
  width: 180px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.weather-card:hover {
  transform: translateY(-5px);
  box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.2);
}

.weather-card h3 {
  font-size: 18px;
  margin-bottom: 10px;
  font-weight: bold;
  color: #333;
}

.weather-card img {
  width: 60px;
  margin-bottom: 10px;
}

.weather-card .temp {
  font-size: 22px;
  font-weight: bold;
  color: #007bff;
}

.weather-card .status {
  font-size: 14px;
  color: #555;
}

.weather-card i.weather-icon {
  font-size: 50px; /* Ukuran ikon */
  margin-bottom: 10px; /* Jarak bawah */
  color: #007bff; /* Warna ikon, bisa sesuaikan */
}

/* Earthquake Section */
.earthquake-info {
  text-align: center;
  padding: 20px;
  background: white;
  margin-top: 20px;
  border-radius: 10px;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
  font-family: "Roboto", sans-serif;
}

.earthquake-container {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.earthquake-box {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
  text-align: left;
  min-width: 320px;
  max-width: 400px;
  position: relative;
}

.earthquake-header {
  display: flex;
  align-items: center;
  font-size: 18px;
  font-weight: bold;
  color: #dc3545;
  background: #ffebeb;
  padding: 10px;
  border-radius: 8px;
  justify-content: center;
}

.warning-icon {
  font-size: 20px;
  margin-right: 10px;
}

.earthquake-details {
  margin-top: 15px;
  font-size: 16px;
  line-height: 1.6;
}

.earthquake-details i {
  color: #007bff;
  margin-right: 8px;
}

.earthquake-footer {
  text-align: center;
  margin-top: 15px;
  font-size: 14px;
  color: gray;
}

.earthquake-footer i {
  margin-right: 5px;
}

/* Berita & Pengumuman */
.news-announcement-section {
  text-align: center;
  padding: 20px;
  background: #f4f4f4;
  margin-top: 20px;
  border-radius: 10px;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
  font-family: "Roboto", sans-serif;
}

/* Tab Navigation */
.tab-container {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.tab-button {
  background: #007bff;
  color: white;
  border: none;
  padding: 10px 20px;
  margin: 0 5px;
  cursor: pointer;
  font-size: 16px;
  border-radius: 5px;
  transition: background 0.3s;
}

.tab-button:hover,
.tab-button.active {
  background: #0056b3;
}

/* Tab Content */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* News Container */
.news-container {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.news-item {
  background: white;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
  max-width: 300px;
  text-align: center;
}

.news-item img {
  width: 100%;
  border-radius: 10px;
  margin-bottom: 10px;
}

.news-item h3 {
  font-size: 18px;
  font-weight: bold;
}

.news-item p {
  font-size: 14px;
  color: #555;
}

.read-more {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 12px;
  background: #007bff;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  font-size: 14px;
  transition: background 0.3s;
}

.read-more:hover {
  background: #0056b3;
}

/* Footer styles */
footer {
  background: linear-gradient(rgba(0, 51, 102, 0.7), rgba(0, 51, 102, 0.7)),
    url("../img/batik-kaltim.png") left/15% repeat-y,
    url("../img/batik-kaltim.png") right/15% repeat-y, #003366 !important;
  color: white;
  padding: 40px 20px;
  font-family: "Roboto", sans-serif;
  position: relative;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.footer-section {
  flex: 1;
  padding: 10px;
  min-width: 250px;
}

.footer-section h3 {
  font-size: 18px;
  margin-bottom: 10px;
  font-weight: bold;
}

.address,
.contact-item {
  display: flex;
  align-items: center;
  gap: 10px; /* Beri jarak antara ikon dan teks */
  margin-bottom: 10px;
}

.footer-icon {
  font-size: 18px;
  color: white;
}

/* Social Media Layout */
.social-media {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.social-links {
  list-style: none;
  padding: 0;
}

.social-links li {
  margin-bottom: 10px;
}

.social-links a {
  display: flex;
  align-items: center;
  color: white;
  text-decoration: none;
  font-size: 16px;
}

.social-links a:hover {
  text-decoration: underline;
}

.social-links i {
  font-size: 20px;
  margin-right: 10px;
}

/* Footer Bottom */
.footer-bottom {
  text-align: center;
  padding: 10px 0;
  background-color: #002244;
  margin-top: 20px;
}

@media (max-width: 768px) {
  .footer-container {
    flex-direction: column;
    text-align: center;
  }

  .address,
  .contact-item {
    justify-content: center;
  }

  .social-media {
    align-items: center;
  }
}

/* Tombol hamburger menu */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  margin-right: 15px;
}

/* Responsif untuk layar kecil */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    align-items: flex-start;
    height: auto;
  }

  .date-time {
    margin-top: 10px;
    margin-left: 10px;
  }

  .menu-toggle {
    display: block;
    position: absolute;
    top: 30px;
    right: 20px;
    z-index: 1200;
  }

  .navbar {
    flex-direction: column;
    width: 100%;
    display: none;
    background-color: white;
    border-top: 1px solid #ccc;
  }

  .navbar.active {
    display: flex;
  }

  .navbar > li {
    width: 100%;
  }

  .navbar > li > a {
    padding: 12px 20px;
    border-bottom: 1px solid #f0f0f0;
  }

  .dropdown {
    position: static;
    display: none;
    opacity: 1;
    transform: none;
    box-shadow: none;
  }

  .navbar > li:hover .dropdown,
  .navbar > li:focus-within .dropdown {
    display: block;
  }

  .dropdown a {
    padding-left: 30px;
  }

  .login-icon {
    justify-content: flex-start;
    padding: 10px 20px;
  }
}
