/**
 * Header 組件樣式
 * @package mytheme
 */

/* Header 樣式 */

.site-header {
  display: flex;
  width: 100%;
  justify-content: center;
  position: fixed;
  top: 0;
  height: 160px;
  align-items: center;
  background: #fff;
  z-index: 999;
  box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
}
.header-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  padding: 31px 0 0;
  align-items: center;
  justify-content: center;
  position: relative;
}

.site-logo {
  max-width: 270px;
}

.header-hr {
  width: 100%;
  height: 1px;
  background-color: #686868;
  margin: 20px 0 0;
}

.site-navigation {
  height: 100%;
  align-content: center;
  -webkit-align-content
}

.primary-menu {
  display: flex;
  gap: 24px;
  white-space: nowrap;
}
.primary-menu li {
  color: #000;
}

.primary-menu .current-menu-item > a,
.primary-menu .current-menu-parent > a,
.primary-menu .current-menu-ancestor > a,
.primary-menu .current_page_item > a,
.primary-menu .current_page_parent > a,
.primary-menu .current_page_ancestor > a {
  color: #0b2f53;
}

.slide-menu-overlay,
.slide-menu {
  display: none;
}

.contact-link {
  border-radius: 0px 0px 20px 20px;
  background-color: #0b2f53;
  position: absolute;
  top: 0;
  right: 285px;
  display: flex;
  height: 93px;
  width: 100%;
  max-width: 218px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #fff;
  font-size: var(--font-size-xl);
  font-weight: 500;
  transition: filter 0.3s ease;
}

.contact-link:hover {
  filter: brightness(0.93);
}

.contact-btn-icon {
  width: 25px;
}

.mobile-menu-wrap {
  height: 0;
}

@media (max-width: 1440px) {
  .site-header {
  }

  .site-logo {
    max-width: 220px;
  }

  .contact-link {
    height: 80px;
    max-width: 180px;
    font-size: var(--font-size-lg);
    right: 5%;
  }
}

@media (max-width: 1024px) {
  .site-navigation {
    display: none;
  }
  .header-container {
    margin: 0 0 0 8px;
    height: 100%;
  }

  .mobile-menu-wrap {
    display: flex;
    gap: 14px;
    align-items: center;
  }
}

/* ==================== 手機 (max-width: 480px) ==================== */
@media (max-width: 1024px) {
  .site-header {
    height: 36px;
    background-color: #fff;
    box-shadow: 0 4px 2px rgba(0, 0, 0, 0.25);
  }

  /* container：右側留 36px 給漢堡，內容區置中 */
  .header-container {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0 0 0 44px;
    margin: 0;
    box-sizing: border-box;
    gap: 0;
    position: relative;
  }

  /* logo：總寬 126，圖 47×14 + 文 14.22 + gap 5.33 */
  .site-logo {
    max-width: 126px;
    width: 126px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
  }

  .site-logo .custom-logo-link,
  .site-logo a {
    display: flex;
    align-items: center;
    height: 16px;
  }

  .site-logo img.custom-logo {
    max-height: 14px !important;
    height: 14px;
    width: auto;
    display: block;
  }

  .header-hr {
    display: none;
  }

  /* 聯絡我們：橢圓白底深藍邊框 67×20 */
  .contact-link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    width: 85px;
    right: 0;
    max-width: none;
    border: 1px solid var(--color-primary);
    border-radius: 100px;
    background-color: #fff;
    color: var(--color-primary);
    font-family: "Inter", var(--font-family-base);
    font-size: var(--font-size-lg);
    font-weight: 400;
    line-height: 1;
    text-align: center;
    box-sizing: border-box;
    gap: 0;
  }

  .contact-link:hover {
    background-color: #fff;
    color: var(--color-primary);
    filter: none;
  }

  /* 漢堡按鈕：右側深藍方塊 36×36，絕對靠右 */
  .menu-toggle {
    position: relative;
    top: 0;
    right: 0;
    width: 36px;
    height: 36px;
    background-color: var(--color-primary);
    flex: none;
    border: none;
    cursor: pointer;
    padding: 0;
  }

  .hamburger-icon,
  .hamburger-icon::before,
  .hamburger-icon::after {
    width: 20px;
    height: 2px;
    background-color: #fff;
  }

  .hamburger-icon::before {
    top: -6px;
  }

  .hamburger-icon::after {
    top: 6px;
  }
}
