/* Define color variables for the site */
:root {
  --main-bg-color: #ffffff;
  --second-bg-color: #19673d;
  --text-color: #333333;
  --accent-color: #fcd135;
}

html {
    scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'manrope', sans-serif;
}

#header {
  position: fixed; /* Changed from sticky to fixed */
  top: 0;
  left: 0;
  width: 100%; /* Ensure it spans the full width */
  display: flex;
  align-items: center;
  padding: 10px 10%;
  background: var(--second-bg-color);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  z-index: 9999;
  transition: top 0.3s ease, background-color 0.3s ease;
  flex-wrap: wrap;
}

.font-barrio {
  font-family: 'Barrio', system-ui;
}

nav {
  justify-content: space-between;
  display: flex;
  align-items: center;
  width: 100%;
  position: relative;
}

.logo {
  width: auto;
  height: 35px;
  margin: 5px;
}

.menu-toggle {
  display: none; /* Hidden by default on desktop */
  flex-direction: column;
  align-items: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-left: auto;
}

.menu-icon {
  background-color: white;
  height: 3px;
  width: 25px;
  margin: 3px 0;
  transition: 0.3s;
}

.nav-menu {
  list-style-type: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  flex-direction: row;
}

.nav-menu li {
  cursor: pointer;
  display: inline;
  margin-left: 20px;
}

.nav-menu li:first-child {
  margin-left: 0;
}

.nav-menu li a {
  color: white;
  text-decoration: none;
  padding: 10px 15px;
  font-weight: bold;
}

.nav-menu li a.active {
  color: var(--accent-color);
}

.nav-menu li a:hover {
  color: var(--accent-color);
}

#home {
    position: relative;
    overflow: hidden;
}
/* --- MODIFIED --- */
.owl-carousel .item {
    position: relative; /* Needed for the overlay */
}
.owl-carousel .item img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    /* The background property was removed from here */
}
/* --- NEW RULE for the overlay --- */
.owl-carousel .image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* This creates a 30% opacity black overlay */
    background: linear-gradient(to top, rgba(0,0,0,0.7), rgba(0,0,0,0.2));
    /* Ensures it doesn't cover the nav arrows */
    z-index: 1;
}

#image-carousel .owl-nav {
    z-index: 2; /* Make sure nav is above the overlay */
}
#image-carousel .owl-nav button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--second-bg-color) !important;
  border-radius: 9999px !important;
  width: 40px !important;
  height: 40px !important;
  color: white !important;
  opacity: 0.8;
  transition: opacity 0.3s;
}
#image-carousel .owl-nav button:hover { opacity: 1; }
#image-carousel .owl-nav button.owl-prev { left: 1rem; }
#image-carousel .owl-nav button.owl-next { right: 1rem; }
#image-carousel .owl-nav button span { font-size: 1.5rem; line-height: 1; }

#image-carousel.owl-carousel {
    height: 100%;
}

/* Force Owl's internal containers to also be full height */
#image-carousel .owl-stage-outer,
#image-carousel .owl-stage,
#image-carousel .owl-item {
    height: 100%;
}

#location-nav {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding-bottom: 32px;   
    z-index: 2; /* Make sure location nav is above the overlay */
}
#location-carousel .item {
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    cursor: pointer;
    padding: 10px;
    transition: all 0.3s ease;
    transform: scale(0.9);
    font-size: 1rem;
}
#location-carousel .owl-item.center .item {
    color: white;
    transform: scale(1.3) translateY(-5px);
    font-size: 1rem;
    font-style: bold;
}
#location-carousel .owl-nav { display: none; }
#active-indicator {
    position: absolute;
    bottom: 55px;
    height: 2px;
    width: 100px;
    background-color: white;
    transition: left 0.4s ease;
}
#active-indicator::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background-color: white;
    border-radius: 50%;
}

/* --- Styles for Location Page Gallery Carousel --- */
#gallery-carousel {
  padding: 0 40px; /* Add some padding so nav arrows don't overlap images */
}

#gallery-carousel .owl-nav button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--second-bg-color) !important;
  border-radius: 9999px !important;
  width: 40px !important;
  height: 40px !important;
  color: white !important;
  opacity: 0.8;
  transition: opacity 0.3s;
}

#gallery-carousel .owl-nav button:hover {
  opacity: 1;
}

#gallery-carousel .owl-nav button.owl-prev {
  left: -20px;
}

#gallery-carousel .owl-nav button.owl-next {
  right: -20px;
}

#gallery-carousel .owl-nav button span {
  font-size: 1.5rem;
  line-height: 1;
}

/* --- Style for Disabled Owl Carousel Nav Buttons --- */
#gallery-carousel .owl-nav button.disabled {
    opacity: 0.2;
  cursor: not-allowed;
}

.image-container {
  /* overflow: hidden; */
  border-radius: 0.5rem; /* This should match the 'rounded-lg' on your image */
}

/* 2. Set up a smooth transition for the image itself. */
.image-container {
  transition: transform 0.4s ease-in-out;
}

/* 3. When you hover over the image, scale it up slightly. */
.image-container:hover {
  transform: scale(1.02);
}

/* ============================================= */
/* == STYLING UNTUK DROPDOWN NAVIGASI DESKTOP == */
/* ============================================= */

/* Hanya berlaku untuk layar lebar (desktop) */
@media (min-width: 769px) {
  /* Wadah untuk item dropdown */
  .dropdown {
    position: relative;
  }

  /* Menu dropdown yang tersembunyi */
  .dropdown-menu {
    display: block;
    position: absolute;
    top: 120%; /* Posisi sedikit di bawah tautan utama */
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--second-bg-color);
    border-radius: 8px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
    padding: 10px 0;
    min-width: 220px;
    z-index: 1000;
    
    /* Sembunyikan secara default dengan opacity dan visibility */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, top 0.3s ease;
  }

  /* Tampilkan dropdown saat mengarahkan kursor ke item .dropdown */
  /* Tampilkan dropdown saat item .dropdown memiliki kelas .is-open */
  .dropdown.is-open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    top: 100%; /* Posisi akhir saat muncul */
  }

  /* Styling untuk setiap item di dalam dropdown */
  .dropdown-menu li {
    display: block;
    margin: 0;
  }

  .dropdown-menu li a {
    display: block;
    padding: 12px 20px;
    color: white;
    white-space: nowrap; /* Mencegah teks membungkus */
    transition: background-color 0.2s ease;
  }

  /* Efek hover pada item dropdown */
  .dropdown-menu li a:hover {
    cursor: pointer;
    background-color: var(--accent-color);
    color: var(--second-bg-color) !important; /* Ganti warna teks saat di-hover */
  }
  /* Tambahkan ini di dalam blok @media (min-width: 769px) */

  /* 1. Beri transisi pada ikon panah agar perputarannya mulus */
  .dropdown > a .fa-chevron-down {
    transition: transform 0.3s ease-in-out;
  }

  /* 2. Putar ikon panah saat dropdown memiliki kelas .is-open */
  .dropdown.is-open > a .fa-chevron-down {
    transform: rotate(180deg);
  }

  /* Tambahkan ini di dalam blok @media (min-width: 769px) */

  /* Ganti blok CSS ini di dalam @media (min-width: 769px) */

  /* Siapkan teks untuk animasi */
  .dropdown-text {
    display: inline-block;
    /* Percepat transisi untuk efek klik yang tajam */
    transition: transform 0.3s ease-in-out;
  }

  /* Beri efek skala saat tautan sedang aktif (diklik & ditahan) */
  .dropdown > a:active .dropdown-text {
    transform: scale(0.9);
  }

}

/* Styles for Mobile Devices */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex; /* Show the hamburger menu */
  }

  .nav-menu {
    display: block; /* Use block for better control with max-height */
    position: absolute;
    /* Position it below the header and align with content */
    top: 100%; 
    left: 10%;
    right: 10%;
    width: auto; /* Let left/right positioning determine width */
    
    background-color: var(--main-bg-color);
    border-radius: 8px;
    z-index: 300;
    max-height: 0; /* Hidden by default */
    overflow: hidden;
    transition: max-height 0.5s ease-in-out;
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2);
    margin: 10px 0 0 0; /* Add a small margin from the top */
    padding: 0; /* Reset padding */
  }

  .nav-menu.is-active {
      max-height: 70vh; /* Batasi tinggi menu hingga 70% dari tinggi layar */
      overflow-y: auto; /* Tambahkan scroll jika konten lebih panjang dari max-height */
  }

  .nav-menu li {
    width: 100%;
    text-align: center;
    margin: 0;
  }
  
  /* Make each link a full-width block for easier tapping */
  .nav-menu li a {
    display: block;
    padding: 15px;
    color: var(--text-color); /* Set dark text color for the white background */
    border-top: 1px solid #f0f0f0;
  }

  .nav-menu li:first-child a {
    border-top: none; /* Remove border from the first item */
  }
  
  /* Active and hover colors will still work correctly */
  .nav-menu li a.active,
  .nav-menu li a:hover {
    background-color: #f7f7f7;
    color: var(--accent-color);
  }
  
  /* This style was for the icon itself, which is fine */
  .menu-toggle.active-icon .menu-icon {
    background-color: var(--accent-color);
  }

  /* Tambahkan kode ini di dalam blok @media (max-width: 768px) */

  /* --- Styling Dropdown untuk Mobile --- */

  /* Atur ulang posisi item dropdown induk */
  .nav-menu .dropdown {
    width: 100%;
  }

  /* Atur ulang tautan dropdown utama agar ikonnya berada di kanan */
  /* Pastikan aturan ini ada di dalam @media (max-width: 768px) */

  .nav-menu .dropdown > a {
    width: 100%;
    text-align: center;
    margin: 0;
  }

  /* Atur ulang menu dropdown untuk tampilan mobile */
  .dropdown-menu {
    position: static; /* Hapus positioning absolut */
    box-shadow: none;
    background-color: #f7f7f7; /* Beri warna latar yang sedikit berbeda */
    border-radius: 0;
    padding: 0;
    margin: 0;
    min-width: 100%;
    
    /* Gunakan max-height untuk animasi akordeon */
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out;
  }

  /* Tampilkan menu saat kelas .is-open aktif */
  .dropdown.is-open .dropdown-menu {
    max-height: 500px; /* Sesuaikan jika item lebih banyak */
  }

  /* Beri gaya pada tautan di dalam dropdown */
  .dropdown-menu li a {
    margin: 0;
    width: 100%;
    text-align: center;
    font-weight: normal;
    font-size: small;
  }

  /* Animasi untuk ikon panah */
  .dropdown .fa-chevron-down {
    transition: transform 0.3s ease-in-out;
  }

  /* Putar ikon panah saat dropdown terbuka */
  .dropdown.is-open > a .fa-chevron-down {
      transform: rotate(180deg);
  }

  /* --- Mobile Carousel Adjustments --- */
  #location-nav {
    padding-bottom: 16px; /* Reduce bottom spacing on mobile */
  }

  #location-carousel .item {
    font-size: 0.8rem; /* Smaller font for the location names */
    font-weight: 500;
    transform: scale(1); /* Reset scaling for non-centered items */
  }

  #location-carousel .owl-item.center .item {
    transform: scale(1.2); /* Less dramatic scaling for the center item */
    font-weight: 700;
  }

  #image-carousel .owl-nav button {
    width: 32px !important; /* Smaller navigation buttons */
    height: 32px !important;
  }
  #image-carousel .owl-nav button span {
    font-size: 1.2rem; /* Smaller arrow icon */
  }

}

