/* 桌面和手機選單連結基本樣式 */
.menu-link,
.mobile-link {
  text-decoration: none;
   
}

/* 桌面和手機選單連結懸停狀態  */
.menu-link:hover,
.mobile-link:hover {
  color: #fff3cd;
  text-shadow: 0 0 10px rgba(255, 255, 255,0.8); 
}

/* 桌面選單連結啟用狀態（黃色） */
.menu-link.active {
  color: rgb(223, 227, 0);
}

/* 手機選單連結啟用狀態（黃色） */
.mobile-link.active {
  color: rgb(223, 227, 0);
}

/* 導覽列外層容器（固定在頂部） */
.site-navbar {
  width: 100%;
  height: 70px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #262522;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 2000;
}

/* 導覽列內層容器（限制最大寬度） */
.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 70px;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0;
}

/* LOGO區域右邊距 */
.navbar-logo {
  position: relative;
  left: -16px; /* LOGO 向左偏移 32px P1-Luna20250829 */
}

/* LOGO群組容器（可點擊回首頁） */
.logo-group {
  display: flex;
  align-items: center;
  cursor: pointer;
}

/* LOGO圖片高度設定 */
.navbar-logo img {
  height: 50px;
}

/* 右側按鈕群組（手機版顯示） */
.right-group {
  display: none;
  width: 100%;
}

/* 桌面版主選單容器  P1-Luna20250829 width*/
.navbar-menu {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
  width: 648px;
  margin-right: 56px;
}

/* 桌面版選單項目容器 */
.navbar-menu > li {
  display: flex;
  align-items: center;
  height: 70px;
  justify-content: center;
}

/* 桌面版選單連結樣式 */
.menu-link {
  color: #fff;
  /*font-size: 16px; 字的大小 P1-Luna20250829
  font-weight: 300;變細*/
  padding: 0 16px;
  line-height: 70px;
  transition: color 0.5s ease, text-shadow 0.5s ease;
  white-space: nowrap;
  
}

/* 桌面版選單連結懸停效果 */
.menu-link:hover {
   color: #fff3cd;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

/* 下拉選單父容器 */
.dropdown {
  position: relative;
}

/* 下拉選單內容區 P1-Luna20250828 改名(dropdown-menu+2) */
.dropdown-menu2 {
  display: none;                     /* 預設隱藏 */
  position: absolute;                /* 絕對定位（相對於 .dropdown） */
  top: 100%;                         /* 從按鈕下方開始 */
  left: 0;                           /* 靠左對齊 */
  min-width: 0%;                     /* 最小寬度（這裡設 0% 幾乎等於無限制） */
  background: rgba(0, 0, 0, 0.5);    /* 半透明黑背景 */
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6); /* 陰影效果 */
  z-index: 1000;                     /* 蓋在其他元素上 */
  padding: 0;
  box-sizing: border-box;
  border-radius: 0;                   /* 不要圓角 */
}

/* 懸停時顯示下拉選單 P1-Luna20250828 改名(dropdown-menu+2)*/
.dropdown:hover .dropdown-menu2 {
  display: block;
}

/* 下拉選單項目樣式 P1-Luna20250828 改名(dropdown-item+2) */
.dropdown-item2 {
  display: block;           /* 讓 <a> 或 <button> 單獨占一行 */
  font-size: 16px;
  color: #fff;
  text-decoration: none;    /* 移除底線 */
  cursor: pointer;
  line-height: 30px;        /* 每一項的高度 */
  padding: 0 10px;          /* 左右間距 */
  box-sizing: border-box;
  white-space: nowrap;      /* 不換行 */
  text-align: right;        /* 文字靠右 */
}

/* 下拉選單項目懸停效果  P1-Luna20250828 改名(dropdown-item+2) */ 
.dropdown-item2:hover {
  color: rgb(223, 227, 0); 
  background: none;
}

/* 手機版全螢幕選單 */
.mobile-nav {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: rgb(13, 33, 48);
  display: flex;
  flex-direction: column;
  padding-top: 64px;
  z-index: 2050;
  opacity: 1;
  pointer-events: auto;
  max-height: 100vh;
  overflow-y: auto;
}

/* 隱藏手機選單 */
.mobile-nav.hide {
  display: none;
}

/* 手機選單關閉動畫 */
.mobile-nav.slideout {
  display: flex;
  animation: menuSlideOut 1s cubic-bezier(0.4, 2, 0.6, 1) forwards;
}

/* 選單滑出動畫 */
@keyframes menuSlideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0.2;
  }
}

/* 手機版選單連結樣式 */
.mobile-link {
  color: #fff;
  padding: 18px 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 最後一個選單項目和選單文字 */
.mobile-link,
.mobile-text {
  font-size: 18px;
}

/* 手機版選單連結懸停效果 */
.mobile-link:hover {
  color: rgb(223, 227, 0);
}

@media (max-width: 768px) {
  /* 手機版導覽列高度 */
  .site-navbar {
    height: 70px;
  }
  /* 手機版導覽列內層佈局 */
  .navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px 0 10px;
    height: 70px;
  }
  /* 手機版右側按鈕群組 */
  .right-group {
    display: flex;
    align-items: center;
    justify-content: flex-end;
  }
  /* LINE圖示樣式 */
  .mobile-line {
    display: inline-block;
    height: 45px;
    padding-right: 20%;
    margin-left: 8px;
    margin-top: 4px;
    vertical-align: middle;
    display: none;  /*隱藏LINE P1-Luna20250829*/
  }
  /* 固定漢堡按鈕基本設定 */
  .menu-toggle-fixed {
    display: flex;
    align-items: center;
  }

  /* 隱藏桌面選單 */
  .navbar-menu {
    display: none;
  }

  /* 固定漢堡按鈕 */
  .menu-toggle-fixed {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 40px;
    width: 40px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 2100;
  }

  /* 固定漢堡按鈕線條 */
  .menu-toggle-fixed span {
    display: block;
    width: 24px;
    height: 3px;
    background: #fff;
    margin: 3.5px 0;
    border-radius: 1px;
    transition: none;
  }

  /* 動畫漢堡按鈕（X按鈕） */
  .menu-toggle-anim {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 40px;
    width: 40px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 2100;
    margin-left: auto;
    margin-right: 20px;
    margin-top: -48px;
  }

  /* 動畫漢堡按鈕線條 */
  .menu-toggle-anim span {
    display: block;
    width: 24px;
    height: 3px;
    background: #fff;
    margin: 3.5px 0;
    border-radius: 1px;
    transition: transform 0.18s linear, opacity 0.13s linear;
  }

  /* X按鈕第一條線變換 */
  .menu-toggle-anim.active span:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
  }

  /* X按鈕第二條線隱藏 */
  .menu-toggle-anim.active span:nth-child(2) {
    opacity: 0;
    transform: scale(0);
    visibility: hidden;
  }

  /* X按鈕第三條線變換 */
  .menu-toggle-anim.active span:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
  }

  /* 手機主選單上邊距 */
  .mobile-menu {
    margin-top: 80px !important;
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
  }

  /* 子選單佈局 */
  .mobile-submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
  }

  /* 手機子選單字體大小 */
  .mobile-submenu .mobile-link {
    font-size: 16px;
  }

  /* 手機選單連結寬度 */
  .mobile-link {
    position: relative;
    width: 200px;
  }

  /* 手機選單箭頭位置 */
  .mobile-arrow {
    position: absolute;
    right: 0;
  }

  /* 手機選單箭頭展開狀態 */
  .mobile-arrow.open {
    transform: rotate(180deg);
  }
}
