/* Reset CSS */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

/* Body */
body {
  background-color: #f9f9f9;
  color: #333;
  line-height: 1.6;
  font-size: 16px;
  scroll-behavior: smooth; /* Smooth scrolling */
}

/* Container */
.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
  overflow: hidden;
}

/* Header */
header {
  background: linear-gradient(
    45deg,
    #2e8b57,
    #3c9e69
  ); /* Gradient background */
  color: #fff;
  padding: 20px 0;
  border-bottom: 5px solid #3c9e69;
}

header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

header .logo img {
  height: 60px; /* Atur sesuai ukuran logo */
  width: auto;
}

header nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  padding: 0;
}

header nav ul li {
  margin: 10px 15px;
  position: relative;
}

header nav ul li a {
  color: #fff;
  text-decoration: none;
  font-size: 18px;
  font-weight: bold;
  padding: 10px 20px;
  display: block;
  transition: color 0.3s ease; /* Smooth color transition */
}

header nav ul li a:hover {
  color: #f0e68c;
}

/* Dropdown Menu */
header nav ul .dropdown-content {
  display: none;
  position: absolute;
  background-color: #f9f9f9;
  min-width: 160px;
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
  z-index: 1;
}

header nav ul .dropdown-content li {
  display: block;
}

header nav ul .dropdown-content li a {
  color: #333; /* Text color in dropdown */
  padding: 12px 16px;
  text-decoration: none;
  display: block;
}

header nav ul .dropdown-content li a:hover {
  background-color: #ddd;
}

header nav ul .dropdown:hover .dropdown-content {
  display: block;
}

/* General Header Styles */
header {
  background: linear-gradient(45deg, #2e8b57, #3c9e69);
  color: #fff;
  padding: 20px 0;
  border-bottom: 5px solid #3c9e69;
}

header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

header .logo img {
  height: 60px;
  width: auto;
}

header nav {
  position: relative;
}

header .nav-links {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  padding: 0;
  margin: 0;
}

header .nav-links li {
  margin: 10px 15px;
}

header .nav-links li a {
  color: #fff;
  text-decoration: none;
  font-size: 18px;
  font-weight: bold;
  transition: color 0.3s ease;
}

header .nav-links li a:hover {
  color: #f0e68c;
}

/* Menu Toggle for Mobile */
header .menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

header .menu-toggle span {
  background: #fff;
  width: 25px;
  height: 3px;
  margin: 4px 0;
  transition: all 0.3s ease;
}

/* Mobile Styles */
@media (max-width: 768px) {
  header .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    background-color: #2e8b57;
    position: absolute;
    top: 100%;
    left: 0;
    padding: 10px 0;
  }

  header .nav-links li {
    text-align: center;
    margin: 10px 0;
  }

  header .menu-toggle {
    display: flex;
  }

  /* Menu Toggle Active State */
  header .menu-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  header .menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  header .menu-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  header nav.active .nav-links {
    display: contents;
  }
}

/* Banner */
.banner {
  background: url("banner.jpg") no-repeat center center/cover;
  height: 250px;
  color: #fff;
  text-align: center;
  padding-top: 100px;
  opacity: 0; /* Start with hidden banner */
  animation: fadeIn 2s forwards; /* Fade-in animation */
  border-radius: 10px;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

.banner h1 {
  margin: 0;
  font-size: 36px;
}

/* Sections */
section {
  padding: 20px 0;
  background: #fff;
  margin-bottom: 20px;
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.1); /* Slightly stronger shadow */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

section:hover {
  transform: translateY(-5px); /* Lift effect on hover */
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.15); /* Stronger shadow on hover */
}

.sejarah,
.visimisi,
.struktur,
.profil,
.data,
.galeri {
  padding: 20px;
}

h2,
h3,
h4,
h5 {
  color: #2e8b57;
  margin-bottom: 20px;
  text-align: center;
  font-weight: bold;
  text-transform: uppercase; /* Added uppercase for headings */
}

/* Images */
img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  margin-bottom: 10px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

img:hover {
  transform: scale(1.05); /* Slight zoom on hover */
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
}

/* Galeri */
.gallery-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

figure {
  margin: 0;
  text-align: center;
}

figcaption {
  margin-top: 10px;
  font-size: 14px;
  color: #555;
}

/* Footer */
footer {
  background: #2e8b57;
  color: #fff;
  text-align: center;
  padding: 20px 0;
  margin-top: 20px;
  position: relative;
}

footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(to right, #f0e68c, #f9f9f9); /* Decorative line */
}

footer small {
  display: block;
  margin-top: 10px;
  font-size: 14px;
}

/* Media Queries */
@media (max-width: 768px) {
  header ul {
    flex-direction: column;
    text-align: center;
  }

  header ul li {
    margin: 10px 0;
  }

  .container {
    width: 100%;
    padding: 0 10px;
  }

  .banner {
    height: 150px;
    padding-top: 40px;
    background-size: cover;
  }

  .banner h1 {
    font-size: 24px;
  }

  section {
    margin-bottom: 15px;
    padding: 15px 10px;
  }

  h3,
  h4,
  h5 {
    font-size: 18px;
  }

  img {
    margin-bottom: 8px;
  }
}

/* Berita Section */
.berita {
  padding: 50px 0;
  background-color: #f9f9f9;
}

.berita .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
  opacity: 0; /* Start with hidden container */
  animation: slideUp 1s 0.5s forwards; /* Slide-up animation */
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.berita h2 {
  text-align: center;
  font-size: 36px;
  margin-bottom: 30px;
  color: #2e8b57;
  font-weight: bold;
}

.news-item {
  margin-bottom: 40px;
  background-color: #fff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  opacity: 0; /* Start with hidden news items */
  animation: slideUp 1s forwards; /* Slide-up animation */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.news-item h3 {
  font-size: 28px;
  margin-bottom: 10px;
  color: #2e8b57;
}

.news-item p {
  font-size: 16px;
  color: #555;
  line-height: 1.6;
}

.news-item img {
  display: block;
  margin: 15px 0;
  width: 100%;
  height: auto;
  border-radius: 10px;
  object-fit: cover;
}

.news-item a {
  display: inline-block;
  margin-top: 10px;
  font-size: 16px;
  color: #007bff;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease, transform 0.3s ease;
}

.news-item a:hover {
  color: #0056b3;
  transform: scale(1.1); /* Slightly enlarge link on hover */
  text-decoration: underline;
}

hr {
  border: 0;
  height: 1px;
  background: #ccc;
  margin: 40px 0;
}

/* Responsive News Section */
@media (max-width: 768px) {
  .news-item h3 {
    font-size: 22px;
  }

  .news-item p {
    font-size: 14px;
  }

  .news-item img {
    margin-bottom: 10px;
  }

  .news-item a {
    font-size: 14px;
  }

  .berita h2 {
    font-size: 28px;
  }
}

@media (min-width: 769px) {
  .berita .container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
  }

  .news-item {
    flex: 1 1 calc(50% - 40px);
    max-width: calc(50% - 40px);
  }
}

/* Footer */
.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  padding: 20px 0;
}

.footer-logo img {
  margin-right: 10px;
}

.footer-links a {
  margin: 0 10px;
}

.footer-text {
  text-align: center;
}

.footer-text p {
  margin: 5px 0;
}

