/* Existing styles you gave here... */

.logo {
  font-size: 24px;
  font-weight: 700;
  color: white;
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo img {
  width: 40px;
  height: auto;
}

 .nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.4);         /* สีพื้นหลังโปร่งแสง */
    backdrop-filter: blur(10px);                 /* เอฟเฟกต์เบลอหลัก */
    -webkit-backdrop-filter: blur(10px);         /* รองรับ Safari */
    color: white;
    z-index: 9998;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* เส้นขอบด้านล่างบางๆ */
  }

.nav-menu {
  display: flex;
  gap: 20px;
}

.nav-link {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

.nav-link:hover {
  color: #6e5227;
}

.nav-link.active {
  background-color: transparent; /* สีคาราเมล/น้ำตาลอ่อน */
  color: #3e2f1c;
  font-weight: bold;
}

/* Submenu styles */
.has-submenu {
  position: relative;
  cursor: pointer;
}

.submenu {
  position: absolute;
  top: 100%; /* ให้อยู่ใต้ปุ่ม Rooms */
  left: 0;
  background-color: #fff;
  padding: 10px 0;
  min-width: 180px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  border-radius: 6px;
  display: none; /* ซ่อนเริ่มต้น */
  z-index: 999;
}

.submenu-link {
  display: block;
  padding: 10px 15px;
  color: #333;
  text-decoration: none;
  white-space: nowrap;
}

.submenu-link:hover {
  color: #6e5227 !important;
  background-color: transparent;
}

.submenu-link:last-child {
  border-bottom: none;
}

.submenu-toggle {
  margin-left: 5px;
  float: right;
  transition: transform 0.3s ease;
  font-size: 14px;
}

.menu-button {
  display: none;
  font-size: 28px;
  color: white;
  cursor: pointer;
}

.has-submenu.open .submenu {
  display: block; /* แสดงเมื่อเปิด */
}
.has-submenu .submenu-toggle {
  margin-left: 5px;
  transition: transform 0.3s;
}

/* หมุนลูกศรเมื่อเปิด submenu */
.has-submenu.open > .submenu-toggle {
  transform: rotate(90deg);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .menu-button {
    display: block;
    font-size: 24px;
    cursor: pointer;
    color: white;
  }

  .nav-menu {
    position: fixed;
    top: 70px;
    right: 0;
    width: 250px;
    height: calc(100% - 70px);
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    flex-direction: column;
    padding: 20px;
    z-index: 9999;
  }

  .nav-link {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

.nav-link:hover {
  color: #6e5227;
}

  .nav-menu.show {
    height: auto;
    transform: translateX(0);
  }

  .nav-menu .nav-link,
  .nav-menu .has-submenu {
    padding: 10px 15px;
    color: #333;
    display: block;
  }

  .has-submenu {
    cursor: pointer;
    position: static;
  }

  .submenu {
    position: static;
    display: none;
    padding-left: 20px;
    background-color: transparent;
    box-shadow: none;
    min-width: unset;
    padding-top: 5px;
    padding-bottom: 5px;
      max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
  }

  .has-submenu.open .submenu {
    display: block;
    max-height: 500px; /* ปรับความสูงให้เพียงพอกับเนื้อหา submenu */
    padding-top: 5px;
    padding-bottom: 5px;
  }

  .submenu-link {
    color: #555;
    padding: 8px 0;
  }
}
