/* -------------------------Navbar 基礎設定 ----------------------*/
.navbar {
  padding-top: 0.1rem;
  padding-bottom: 0.75rem;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
  background-color: rgba(255, 255, 255, 0) !important; /* 透明 */
  height: auto; /* 預設桌機可自適應 */
}

.offcanvas-header {
  background-color: #ffffff; /* ✅ 白底 */
  color: #333;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center; /* ✅ 標題置中（先置中所有內容） */
  position: relative;
}

.offcanvas-title {
  color: #333 !important; /* ✅ 字體顏色 */
  font-size: 20px;
  margin: 0 auto;
  text-align: center;
  width: 100%;
}

.menu-close-button {
  position: absolute;
  right: 1rem;
  top: 1rem;
  color: #333;
  z-index: 2;
  font-size: 20px;
}

.photo-menu-container {
  width: 100%;
  text-align: center;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.photo-menu-img {
  width: 100%;
  max-width: 420px;
  height: auto;
  display: block;
  margin: 0 auto;
}

.bg-dark {
  height: 100%;
}

.menu-close-button {
  width: 1.8rem !important;
  height: 1.8rem !important;
}

.menu-item {
  width: 100%;
  text-align: center;
  color: white;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3); /* ✅ 細線 */
  text-decoration: none;
  font-size: 24px;
  padding-top: 1.3rem;
  padding-bottom: 1.3rem;
}

.menu-item:hover {
  background-color: rgba(255, 255, 255, 0.05); /* 輕微 hover 效果 */
}

.menu-item img {
  display: block;
  margin: 0 auto;
}

.custom-navbar {
  padding-left: 5%;
  padding-right: 5%;
}

.navbar-inner {
  width: 80%;
  margin: -10px auto 0; /* 向上推 10px，視覺更貼近上方 */
}

/* 導覽文字樣式 */
.navbar-brand {
  font-weight: 700;
  color: white;
  font-size: 24px;
}

.navbar-nav .nav-link {
  color: white;
  font-weight: 500;
  padding: 0.5rem 1rem;
  font-size: 22px;
}

/* 登入按鈕區 */
.login-box {
  background-color: #333333;
  width: 125px;
  height: 100px;
  position: relative;
  z-index: 1040;
}

/* 白線貼齊 navbar 底部 */
.nav-bottom-line {
  position: absolute;
  top: 72px;
  left: 0;
  width: 100%;
  height: 1px;
  background-color: white;
  z-index: 1020;
}

/* 桌機：預設顯示桌機版，隱藏漢堡 */
.desktop-menu {
  display: flex !important;
}
.hamburger-btn {
  display: none !important;
}

/* 手機選單樣式 */
.offcanvas.offcanvas-end {
  width: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(3px);
}

/* 手機 offcanvas 內容樣式 */
.offcanvas-body a.btn {
  font-size: 18px;
  padding: 0.75rem 1.5rem;
}
.offcanvas-body img {
  filter: brightness(0) invert(1);
}

/* Grid 導覽區域 */
.nav-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  column-gap: 1rem;
  padding: 0 1.5rem;
  list-style: none;
}

/* 滾動後加入背景白 + 陰影 + 字變深色 */
.custom-navbar.scrolled {
  background-color: #ffffff !important;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.custom-navbar.scrolled .navbar-brand,
.custom-navbar.scrolled .nav-link {
  color: #333 !important;
}

/* 確保 navbar 高度 & flex 對齊 */
.custom-navbar {
  height: 80px;
  display: flex;
  align-items: center;
}

/* 滾動後切換 icon */
.custom-navbar .menu-icon-dark {
  display: none !important;
}
.custom-navbar.scrolled .menu-icon-white {
  display: none !important;
}
.custom-navbar.scrolled .menu-icon-dark {
  display: inline !important;
}

/* navbar 高度 + 垂直對齊 */
.custom-navbar {
  height: 80px;
  display: flex;
  align-items: center;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  background-color: rgba(255, 255, 255, 0); /* 預設透明 */
}

.custom-link {
  color: #333;
  text-decoration: none;
}

.modal-register {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  z-index: 9999;
}

.modal-content-box {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  background: #fff;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  box-sizing: border-box;
}

.modal-register {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  width: 100%;
  height: 100%;
  display: none;
}

.modal-register .modal-backdrop {
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
}

.register-content {
  position: relative;
  z-index: 10000;
  background: #fff;
  width: 100%;
  max-width: 540px;
  margin: 5vh auto;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.2);
  overflow-y: auto;
  max-height: 90vh;
}

.register-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
}

.register-title {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.register-subtitle {
  font-size: 14px;
  color: #555;
  margin-bottom: 1.5rem;
}

.register-form {
  display: flex;
  flex-direction: column;
}

.register-form label {
  margin-top: 1rem;
  margin-bottom: 0.25rem;
  font-weight: bold;
  font-size: 14px;
}

.register-form input[type="text"],
.register-form input[type="email"],
.register-form input[type="password"],
.register-form input[type="tel"],
.register-form input[type="date"] {
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 14px;
  width: 100%;
  box-sizing: border-box;
}

.gender-options {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}

.gender-btn {
  flex: 1;
  padding: 0.6rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-weight: bold;
  font-size: 14px;
}

.gender-btn.active {
  border: 2px solid #333;
  background-color: #f2f2f2;
}

.upload-box {
  margin-top: 0.5rem;
  padding: 2rem;
  border: 1px dashed #999;
  border-radius: 8px;
  text-align: center;
  color: #999;
  font-size: 14px;
  cursor: pointer;
}

.submit-btn {
  margin-top: 2rem;
  padding: 0.8rem;
  background-color: #000;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
}

.cancel-btn {
  margin-top: 1rem;
  padding: 0.8rem;
  border: 1px solid #333;
  background-color: #fff;
  color: #333;
  border-radius: 8px;
  font-weight: bold;
}
.gender-btn {
  flex: 1;
  padding: 0.6rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-weight: bold;
  font-size: 14px;
  transition: 0.2s;
}

.gender-btn.active {
  border: 2px solid #333;
  background-color: #f4f4f4;
}

.upload-box {
  border: 1px dashed #ccc;
  padding: 2rem;
  text-align: center;
  color: #999;
  font-size: 14px;
  cursor: pointer;
  border-radius: 8px;
  background: #fafafa;
}

.upload-box:hover {
  background: #f0f0f0;
}

.avatar-image {
  max-width: 100%;
  max-height: 120px;
  border-radius: 50%;
  object-fit: cover;
}

.circle-loading {
  width: 48px;
  height: 48px;
  border: 4px solid #ccc;
  border-top: 4px solid #333;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

.gender-btn {
  position: relative;
  flex: 1;
  padding: 0.6rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-weight: bold;
  font-size: 14px;
  transition: 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gender-btn.active {
  border: 2px solid #333;
  background-color: #f4f4f4;
}

/* ✅ 打勾符號樣式 */
.gender-btn.active::before {
  content: "✓";
  font-size: 14px;
  color: #333;
  margin-right: 6px;
  display: inline-block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 768px) {
  .offcanvas-body .text-center {
    display: block !important;
    padding-top: 1rem;
    /* padding-bottom: 1rem; */
    min-height: auto !important;
    height: auto !important; /* 重要：清除強制高度 */
  }
}
/*--------------RWD: >= 1440px-----------------*/
@media (min-width: 1440px) {
  .navbar-nav .nav-link {
    padding: 0.5rem 0.5rem;
    font-size: 24px !important;
  }

  .nav-grid {
    padding: 0 1rem;
  }
}

/*--------------RWD: 1024px - 1439px----------------*/
@media (min-width: 1024px) and (max-width: 1439px) {
  .navbar-nav .nav-link {
    padding: 0 0;
    font-size: 22px !important;
  }

  .navbar-brand {
    max-width: 300px;
  }

  .nav-grid {
    padding: 0;
  }

  .navbar-inner {
    margin-top: -25px;
  }
}

/*--------------RWD: 768px - 1023px----------------*/
@media (min-width: 768px) and (max-width: 1023px) {
  .navbar-nav .nav-link {
    padding: 0;
    font-size: 14px;
  }

  .navbar-brand {
    max-width: 250px;
  }

  .nav-grid {
    padding: 0;
  }

  .navbar-inner {
    margin-top: -25px;
  }

  .gap-4 {
    gap: 0.9rem !important;
  }

  .custom-navbar {
    padding-left: 2%;
    padding-right: 2%;
  }
}

/*--------------RWD: <= 767px（手機進入漢堡）----------------*/
@media (max-width: 820px) {
  .navbar-nav .nav-link {
    padding: 0;
    font-size: 14px !important;
  }

  .gap-4 {
    gap: 0.5rem !important;
  }
}

@media (max-width: 767px) {
  .desktop-menu {
    display: none !important;
  }
  .hamburger-btn {
    display: block !important;
  }

  .custom-navbar {
    height: 80px;
  }
}

/*--------------RWD: > 768px（漢堡隱藏）----------------*/
@media (min-width: 768px) {
  .desktop-menu {
    display: flex !important;
  }
  .hamburger-btn {
    display: none !important;
  }

  .offcanvas-title {
    font-size: 24px;
  }
}

/*--------------RWD: 480px - 767px 手機直式 ----------------*/
@media (min-width: 480px) and (max-width: 767px) {
  /* 如需客製尺寸樣式可補寫 */
  .navbar-brand {
    max-width: 330px;
  }

  .custom-navbar {
    height: 50px;
  }
}

/*--------------RWD: <= 479px 小手機 ----------------*/
@media (max-width: 479px) {
  /* 如需客製尺寸樣式可補寫 */
  .navbar-brand {
    max-width: 280px;
  }

  .custom-navbar {
    height: 50px;
  }

  .offcanvas-title {
    font-size: 20px;
  }

  .menu-close-button {
    font-size: 16px;
  }
}
/* -------------------------END Navbar 設定 ----------------------*/

/*---------------------------Login------------------------*/
/* Modal 樣式 */
.login-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  z-index: 9999;
}
.modal-backdrop {
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 1;
}

.modal-title {
  font-weight: bold;
}

.modal-content-box {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%); /* ✅ 完美置中 */
  z-index: 2;
  width: 100%;
  max-width: 400px; /* ✅ 這是你控制「最大寬度」的地方 */
  margin: 0 auto;
  background: #fff;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  box-sizing: border-box;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 16px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
}
.input-group {
  display: flex;
  align-items: center;
  border: 1px solid #ccc;
  margin-bottom: 1rem;
  border-radius: 4px;
  padding: 0.5rem;
}
.input-icon {
  margin-right: 0.5rem;
}
.input-group input {
  border: none;
  outline: none;
  flex: 1;
}
.btn-submit {
  width: 100%;
  background-color: #000;
  color: #fff;
  padding: 0.75rem;
  border: none;
  border-radius: 4px;
  font-weight: bold;
}
.btn-google {
  width: 100%;
  margin-top: 1rem;
  padding: 0.6rem;
  border: 1px solid #ccc;
  background-color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 4px;
}

.btn-line {
  width: 100%;
  margin-top: 1rem;
  padding: 0.6rem;
  border: 1px solid #ccc;
  background-color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 4px;
}

.swal2-container {
  z-index: 9999 !important; /* 確保比 modal 高 */
}

@media (max-width: 576px) {
  .modal-content-box {
    max-width: 90vw; /* ✅ 小螢幕最多佔 90% */
    padding: 1.5rem 1rem; /* ✅ 縮小內距 */
  }
}

@media (min-width: 577px) and (max-width: 768px) {
  .modal-content-box {
    max-width: 400px;
  }
}

@media (min-width: 769px) {
  .modal-content-box {
    max-width: 500px; /* 可以拉寬一點 */
  }
}

/*--------------------------------------------------------*/

/* ----------------------Footer-------------------------*/
footer.footer {
  background-color: #2c2c2c;
  color: white;
}
footer.footer h5 {
  font-weight: 600;
  margin-bottom: 0.5rem;
}
footer.footer p {
  margin: 0.25rem 0;
  font-size: 0.95rem;
}
.footer .social-icon {
  transition: opacity 0.3s ease;
}
.footer .social-icon:hover {
  opacity: 0.7;
}

/* 回到頂部按鈕 */
.back-to-top {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background-color: #fff;
  color: #000;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
  font-size: 20px;
  text-decoration: none;
  transition: background 0.3s;
}
.back-to-top:hover {
  background-color: #ddd;
}

.mb-1,
.mb-2,
.mb-3 {
  font-weight: 400;
}

.footer-h5 {
  font-weight: 700;
}

@media (max-width: 768px) {
  .container .footer-h5 {
    font-size: 1.2rem;
  }

  .container .mb-1 {
    font-size: 0.85rem;
  }

  .bg-dark .small-icon {
    width: 35px;
    height: 35px;
  }
}
/* -------字型統一設定 -------------*/
body {
  font-family: "Microsoft JhengHei", sans-serif;
  color: #333;
  font-weight: bold;
}

/* 字重樣式 */
.font-bold {
  font-weight: bold;
}

.news-header h2,
.map-header h2,
.video-carousel-header h2 {
  font-weight: 700; /* 或使用 bolder, 或具體數值例如 800/900，視字型支援情況 */
}

.font-regular {
  font-weight: normal;
}

.back-to-top-btn {
  width: 45px;
  height: 45px;
  border-radius: 50%; /* ✅ 正圓形 */
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* -------字型統一設定 -------------*/

/*--------------Navbar 1440px-----------------*/
@media (min-width: 1440px) {
} /*end--------------Navbar 1440px-----------------*/

/*--------------Navbar 1024px-1440px----------------*/
@media (min-width: 1024px) and (max-width: 1440px) {
} /*end--------------Navbar 1024px-1440px-----------------*/

/*--------------Navbar 768px-1023px----------------*/
@media (min-width: 768px) and (max-width: 1023px) {
} /*end--------------Navbar 768px-1023px-----------------*/

/*--------------Navbar 480px-767px----------------*/
@media (min-width: 480px) and (max-width: 767px) {
} /*end--------------Navbar 480px-767px-----------------*/

/*--------------Navbar 479px-----------------*/
@media (max-width: 479px) {
} /*end--------------Navbar 479px-----------------*/

/* end----------------------Footer-------------------------*/
