@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");

:root {
  --primary: #9ccc29;
  --box-color: #f9f9fb;
}

* {
  font-family: "poppins", sans-serif;
  box-sizing: border-box;
  scroll-behavior: smooth;
  margin: 0;
  padding: 0;
}

body {
  overflow-x: hidden;
}

/* HEADER START */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 90px;
  box-sizing: border-box;
  position: sticky;
  top: 0;
  left: 0;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.8); /* semi-transparent white */
  backdrop-filter: blur(8px); /* blur effect */
  -webkit-backdrop-filter: blur(8px); /* for Safari */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); /* subtle shadow */
  padding: 0 20px; /* optional: add some padding */
  width: 100%;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  width: 50px;
  height: auto;
}

.text-logo {
  color: var(--primary);
}

.text-logo h3 {
  margin: 0 0 0 1rem;
  font-size: 1rem;
}

header nav {
  margin-right: 1rem;
  display: flex;
}

nav a {
  margin: 0 5px;
  text-decoration: none;
  color: black;
  padding: 5px 8px;
  border-radius: 8px;
  transition: 0.3s;
  font-size: 0.9rem;
}

nav a.active {
  color: white;
  background-color: var(--primary);
}

nav a:hover {
  color: white;
  background-color: var(--primary);
}

/* Mobile menu button (hamburger) */
/* Default hamburger menu */
.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  cursor: pointer;
  position: relative;
}

.menu-toggle span {
  height: 3px;
  width: 100%;
  background-color: var(--primary);
  border-radius: 3px;
  transition: 0.3s ease-in-out;
}

/* Change to "X" when menu is open */
.menu-toggle.open span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.menu-toggle.open span:nth-child(2) {
  opacity: 0; /* Hide middle bar */
}

.menu-toggle.open span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* Ensure menu is hidden by default */
#mobile-menu {
  display: flex; /* Keep flex to manage layout */
  flex-direction: column;
  position: absolute;
  top: 90px;
  left: 0;
  right: 0;
  background-color: rgba(255, 255, 255, 0.95);
  padding: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);

  /* Animation properties */
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-10px);
  transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out,
    transform 0.3s ease-in-out;
}

/* Show menu when active with animation */
#mobile-menu.active {
  max-height: 300px; /* Adjust based on your content */
  opacity: 1;
  transform: translateY(0);
}

/* HEADER END */

/* JUMBOTRON START*/
.jumbotron {
  height: 60vh;
  min-height: 400px;
  background-image: url("../assets/img/Group\ 24.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 0;
  box-shadow: 0 10px 10px rgba(0, 0, 0, 0.2);
  width: 100%;
}

.text-jumbotron {
  color: white;
  font-size: 1.5rem;
  padding: 120px 0 0 10%;
  width: 100%;
}

.text-jumbotron h1 {
  margin: 0;
  font-size: 2rem;
}

.text-jumbotron h1:nth-child(2) {
  margin-bottom: 20px;
}

.text-jumbotron a {
  color: white;
  text-decoration: none;
  font-size: 1rem;
  padding: 12px 20px;
  background-color: var(--primary);
  border-radius: 8px;
  display: inline-block;
  margin-top: 10px;
}
/* JUMBOTRON END */

/* VISI START */
.visi {
  margin: 40px 0 0 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0 20px;
  text-align: center;
}

.visi h1 {
  font-size: 1.8rem;
}

.text-visi {
  width: 100%;
  max-width: 992px;
  min-height: 126px;
  padding: 20px;
  background-color: var(--box-color);
  font-size: 1.2rem;
  box-shadow: 0 4px 5px rgba(0, 0, 0, 0.2);
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 8px;
}
/* VISI END */

/* MISI START */
.misi {
  margin: 20px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0 20px;
  text-align: center;
}

.misi h1 {
  font-size: 1.8rem;
}

.card-misi {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  width: 100%;
}

.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 10px 0;
  width: 100%;
  max-width: 305px;
  height: auto;
  min-height: 300px;
  padding: 30px 15px;
  text-align: center;
  background-color: var(--box-color);
  box-shadow: 0 4px 5px rgba(0, 0, 0, 0.2);
  border-radius: 8px;
}

.card p {
  width: 100%;
  max-width: 260px;
  font-size: 1rem;
}

.icon {
  box-sizing: content-box;
  height: 60px;
  width: 50px;
  background-color: var(--primary);
  padding: 10px 15px;
  border-radius: 8px;
}
/* MISI END */

/* PROGRAM START */
.program {
  display: flex;
  justify-content: center;
  padding: 0 20px;
  width: 100%;
}

.program .card {
  justify-content: flex-start;
  align-items: flex-start;
  padding: 25px 20px;
  font-size: 1rem;
  width: 100%;
  max-width: 992px;
  height: auto;
  min-height: 404px;
}

.program .card h1 {
  margin-bottom: 0;
  text-align: center;
  width: 100%;
  font-size: 1.8rem;
}

.cards {
  display: flex;
  width: 100%;
}

.card-left,
.card-right {
  width: 100%;
}

.card-item {
  margin-top: 20px;
  height: auto;
  min-height: 34px;
  display: flex;
  align-items: center;
  font-size: 1rem;
}

.card-item .icon {
  background-color: transparent;
  width: 24px;
  height: 24px;
  padding: 0;
  flex-shrink: 0;
}

.card-item p {
  text-align: left;
  margin-left: 15px;
  width: auto;
}
/* PROGRAM END */

/* KEGIATAN START */
.kegiatan {
  width: 100%;
}

.carousel-container {
  position: relative;
  width: 100%;
  max-width: 1200px;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  margin: 0 20px;
}

.carousel {
  display: flex;
  transition: transform 0.5s ease-in-out;
  width: 100%;
}

.carousel-slide {
  min-width: 100%;
  position: relative;
}

.carousel-slide img {
  width: 100%;
  height: auto;
  max-height: 615px;
  min-height: 300px;
  object-fit: cover;
  display: block;
}

.carousel-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgba(122, 193, 27, 0.9);
  color: white;
  padding: 12px;
  text-align: center;
  font-weight: bold;
  font-size: 0.9rem;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255, 255, 255, 0.7);
  color: #333;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.3s;
  z-index: 10;
}

.carousel-btn:hover {
  background-color: rgba(255, 255, 255, 0.9);
}

.prev-btn {
  left: 10px;
}

.next-btn {
  right: 10px;
}

.carousel-indicators {
  position: absolute;
  bottom: 50px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
}

.indicator.active {
  background-color: white;
}
/* KEGIATAN END */

/* RESPONSIVE MEDIA QUERIES */
@media only screen and (max-width: 1024px) {
  .text-jumbotron {
    padding: 100px 0 0 5%;
  }

  .card-misi {
    justify-content: center;
    flex-wrap: wrap;
  }

  .cards {
    flex-direction: row;
    justify-content: center;
    align-items: center;
  }

  .card-item {
    display: flex;
    align-items: center;
  }
}

footer {
  background-color: var(--primary);
}

footer > p {
  color: rgba(236, 235, 235, 0.562);
}

.footer {
  min-height: 150px;
  border-top: 1px solid #8b8b8b;
  background-color: var(--primary);
  display: flex;
  padding: 2rem;
  color: white;
}

.footer-left {
  width: 75%;
  font-size: 1.5rem;
}

.footer-right {
  display: flex;
  justify-content: center;
  width: 80%;
}

.footer-item:first-child {
  width: 50%;
  margin: 0 10px;
  font-size: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer-item > a {
  text-decoration: none;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 10px;
  color: white;
}

.footer-item > a > img {
  width: 20px;
  height: 20px;
  margin: 0 10px;
}

.footer-item:last-child > p {
  font-size: 0.8rem;
}

.footer-item:last-child > h3 {
  margin-bottom: 10px;
}

/* Hide menu toggle on larger screens */
@media (min-width: 769px) {
  .menu-toggle {
    display: none;
  }

  #mobile-menu {
    display: flex; /* Ensure menu is shown normally */
    flex-direction: row; /* Display menu items in a row */
    position: static; /* Reset positioning */
    background: none; /* Remove background */
    box-shadow: none; /* Remove shadow */
    padding: 0;
    opacity: 1;
    transform: none;
    max-height: none;
  }
}

@media only screen and (max-width: 768px) {
  header {
    padding: 0 15px;
  }

  .logo img {
    width: 40px;
  }

  .text-logo h3 {
    font-size: 0.8rem;
  }

  .cards {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
  }

  .carousel-slide img {
    width: 100%;
    height: auto;
    max-height: 300px;
    min-height: 300px;
    object-fit: cover;
    display: block;
  }

  .jumbotron {
    background-position: center;
  }

  .footer {
    flex-direction: column;
    justify-content: start;
    align-items: center;
  }

  .footer-right {
    width: 100%;
  }

  @media only screen and (max-width: 768px) {
    nav {
      display: none; /* Ensure the menu is hidden by default */
      position: absolute;
      top: 90px;
      left: 0;
      right: 0;
      flex-direction: column;
      background-color: rgba(255, 255, 255, 0.95);
      padding: 10px;
      box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }

    nav.active {
      display: flex;
    }
  }

  nav a {
    padding: 10px;
    width: 100%;
    text-align: center;
    margin: 5px 0;
    font-size: 1rem;
  }

  .menu-toggle {
    display: flex;
  }

  .text-jumbotron {
    padding: 80px 0 0 5%;
  }

  .text-jumbotron h1 {
    font-size: 1.8rem;
  }

  .program .card {
    padding: 20px 15px;
  }

  .carousel-slide img {
    min-height: 250px;
  }

  .carousel-indicators {
    bottom: 40px;
  }
}

@media only screen and (max-width: 480px) {
  header {
    height: 70px;
  }

  .logo img {
    width: 30px;
  }

  .text-logo h3 {
    font-size: 0.7rem;
    margin-left: 0.5rem;
  }

  .text-jumbotron {
    padding: 60px 0 0 5%;
    font-size: 1rem;
  }

  .text-jumbotron h1 {
    font-size: 1.5rem;
  }

  .text-jumbotron a {
    padding: 10px 15px;
    font-size: 0.9rem;
  }

  .visi h1,
  .misi h1,
  .program .card h1 {
    font-size: 1.5rem;
  }

  .text-visi {
    font-size: 1rem;
    min-height: 100px;
  }

  .card {
    padding: 20px 10px;
    min-height: 250px;
  }

  .icon {
    height: 50px;
    width: 40px;
    padding: 8px 12px;
  }

  .card-item {
    font-size: 0.9rem;
  }

  .carousel-slide img {
    min-height: 200px;
  }

  .carousel-caption {
    padding: 8px;
    font-size: 0.8rem;
  }

  .carousel-indicators {
    bottom: 30px;
  }

  .carousel-btn {
    width: 25px;
    height: 25px;
    font-size: 12px;
  }

  .footer-right {
    display: flex;
    flex-direction: column;
  }

  .footer-item:first-child {
    align-items: start;
  }
}
