@charset "UTF-8";

/* =========================================
   SCSS 变量定义 (IE10 兼容性核心)
   ========================================= */
/* 1. 品牌色彩 (Brand Colors) */
/* 2. 中性色 (Neutrals) */
/* 3. 字体栈 (Typography) */
/* 4. 阴影 (Shadows) */
/* 注意：IE10 支持 rgba，但不完全支持 hsla 的透明度，这里提供 rgba 替代值 */
/* 5. 布局常量 (Layout) */
/* =========================================
   NAVBAR (Shared Component)
   ========================================= */
/* Decorative gradient background for navbar */
.navbar-gradient-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 26rem;
  background: linear-gradient(180deg, rgb(165, 216, 255), rgba(197.5, 231, 255, 0.5), rgba(230, 246, 255, 0));
  z-index: 999;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.3s ease;
}

/* Hide gradient on mobile by default (moved from localized media query) */
@media screen and (max-width: 768px) {
  .navbar-gradient-bg {
    display: none;
  }
}

/* Navbar Container */
.navbar {
  width: 100%;
  height: 12rem;
  /* 120px */
  background-color: transparent;
  border-bottom: 1px solid transparent;
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 1000;
}

/* Show navbar background when dropdown is active (triggered by hovering on content) */
.navbar.dropdown-active,
.navbar.navbar-solid {
  background-color: white;
  border-bottom: 1px solid #e7e7e7;
}

.navbar-container {
  width: min(92vw, 168rem);
  /* 1680px */
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.3s ease;
}

/* Global Content Padding for Layouts using .content-wrapper */
.content-wrapper {
  padding-top: 12rem;
}

/* Logo */
.nav-logo {
  height: 4.815rem;
  /* Floor to prevent it from "disappearing" */
  width: auto;
  -o-object-fit: contain;
  object-fit: contain;
  flex-shrink: 0;
}

/* Priority Spacers for Navbar */
.nav-spacer-left {
  flex-grow: 999;
  /* High priority to fill space first */
  min-width: 2rem;
  max-width: 8rem;
  /* Max 80px */
  height: 1px;
}

.nav-spacer-right {
  flex-grow: 999;
  /* High priority to fill space first */
  min-width: 2rem;
  max-width: 22.4rem;
  /* Max 224px */
  height: 1px;
}

/* Navigation Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
  /* Minimum spacing between text items */
  flex-grow: 1;
  margin: 0;
  /* Margins handled by priority spacers now */
  justify-content: space-between;
}

.nav-item {
  position: relative;
  cursor: pointer;
  white-space: nowrap;
  margin-right: 0;
}

.nav-text {
  font-size: 2.4rem;
  /* 24px */
  font-family: var(--font-primary);
  font-weight: 400;
}

.nav-item.active .nav-text {
  color: var(--color-brand-blue);
  font-weight: 500;
  /* Medium weight */
}

.nav-indicator {
  position: absolute;
  bottom: -1rem;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  /* Match text width */
  height: 0.2rem;
  /* Adjusted to 0.2rem */
  background-color: var(--color-brand-blue);
  border-radius: 0.1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.nav-item.active .nav-indicator {
  opacity: 1;
}

.nav-item:hover .nav-indicator {
  opacity: 1;
}

/* Functional Area */
.nav-functional {
  display: flex;
  align-items: center;
  /* gap removed */
  flex-shrink: 0;
  width: 39rem;
  justify-content: flex-end;
}

.func-item {
  display: flex;
  align-items: center;
  position: relative;
  margin-right: 1.8rem;
  /* 18px */
  cursor: pointer;
}

.func-item:last-child {
  margin-right: 0;
}

.func-more-mobile {
  display: none;
}

/* Accessibility Feature */
/* Accessibility Feature */
.func-access {
  width: 9.6rem;
  height: 3rem;
  background-color: #41b051;
  border-radius: 1.5rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  position: relative;
  z-index: 1;
}

.access-bg {
  display: none;
}

.access-content-group {
  display: contents;
}

.access-icon-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 2.4rem;
}

.access-text {
  font-size: 1.6rem;
  color: white;
  margin-left: -0.4rem;
}

/* E-Bank Login (Merged from Personal Business Page) */
.func-ebank {
  width: 11.52rem;
  height: 3rem;
  background-color: #00487f;
  border-radius: 1.5rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  gap: 0.6rem;
}

.nav-functional .func-text{
  display: none;
}

.ebank-bg {
  display: none;
}

.ebank-content-group {
  display: contents;
}

.ebank-icon-wrapper {
  width: 2.2rem;
  height: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ebank-icon {
  width: 100%;
  height: 100%;
  -o-object-fit: contain;
  object-fit: contain;
}

.ebank-text {
  font-size: 1.6rem;
  font-weight: 400;
  color: white;
  margin: 0;
  white-space: nowrap;
}

/* Search Icon */
.func-search {
  width: 3rem;
  height: 3rem;
  background-color: #00487f;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.search-icon-wrapper {
  display: contents;
}

.search-icon {
  width: 2.4rem;
  height: 2.4rem;
}

/* Text Info (IPv6 / Phone) */
.func-text {
  /* gap removed */
  display: flex;
  align-items: center;
}

.text-ipv6 {
  margin-right: 0.8rem;
}

.text-ipv6,
.text-phone {
  font-size: 1.6rem;
  font-family: var(--font-primary);
  white-space: nowrap;
}

.text-ipv6 {
  color: #333;
}

.text-phone {
  color: var(--color-brand-red);
}

/* =========================================
   NAV DROPDOWN (Mega Menu)
   ========================================= */
.nav-dimmer {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 950;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.nav-dropdown {
  display: none;
  position: fixed;
  top: 12rem;
  /* Matches navbar height */
  left: 0;
  width: 100%;
  z-index: 1100;
  background-color: white;
  overflow: hidden;
}

.mobile-menu-overlay {
  display: none;
}

.nav-menu-container {
  width: 100%;
  position: relative;
  background-color: white;
}

.nav-menu-content {
  display: grid;
  /* 1680px / 6 = 280px per column */
  grid-template-columns: repeat(6, 28rem);
  gap: 0;
  width: 168rem;
  position: relative;
  left: 50%;
  margin-left: -84rem;
  padding-top: 4rem;
  padding-bottom: 8rem;
  background-color: white;
  position: relative;
}
.nav-menu-content-more{
  position: absolute; 
  right: -20px; 
  top: 50%; 
  transform: translateY(-50%);
  width: 2.5rem; 
  height: 2.5rem;
  background: url("../images/asset/icon-external-link.svg") no-repeat center center;
  background-size: contain;
  opacity: 0.3;
}
.nav-menu-content-more:hover{
  background: url("../images/more2.png") no-repeat center center;
  background-size: contain;
  opacity: 1;
}

.nav-menu-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-left: 2.8rem;
  padding-right: 2rem;
  position: relative;
  box-sizing: border-box;
}

/* Left border for all columns except the first */
.nav-menu-col:not(:first-child)::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 100%;
  background-color: rgba(196, 196, 196, 0.66);
}

.nav-menu-col h3 {
  font-size: 2.2rem;
  font-family: var(--font-primary);
  font-weight: 700;
  color: var(--color-brand-blue);
  line-height: 1.5;
  margin-bottom: 2.4rem;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.2s;
}

.nav-menu-col h3:hover {
  color: var(--color-brand-red);
}

.nav-menu-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-menu-col li {
  font-size: 2rem;
  font-family: var(--font-primary);
  font-weight: 400;
  color: #606060;
  line-height: 1.5;
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s;
}

.nav-menu-col li:last-child {
  margin-bottom: 0;
}

.nav-menu-col li:hover {
  color: var(--color-brand-red);
}

.nav-menu-col li::before {
  content: "";
  display: inline-block;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background-color: var(--color-brand-blue);
  margin-right: 0.8rem;
  flex-shrink: 0;
  transition: background-color 0.2s;
}

.nav-menu-col li:hover::before {
  background-color: var(--color-brand-red);
}

.nav-functional .func-ebank {
  position: relative;
}
.nav-functional .ebank-popup {
  position: absolute;
  top: calc(100% + 10px);
  right: -50px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 4px 4px 12px 0px rgba(0, 48, 85, 0.4);
  padding: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
  min-width: 200px;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.nav-functional .func-ebank:hover .ebank-popup {
  visibility: visible;
  opacity: 1;
}
.nav-functional .popup-btn {
  display: block;
  width: 100%;
  text-align: center;
  padding: 2px 15px;
  background: none;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-size: 14px;
  background-color: #ffffff;
}
.nav-functional .popup-btn:hover {
  background-color: #f5f5f5;
}

/* =========================================
   RESPONSIVE LOGIC
   ========================================= */
/* @1200px (Tablet/Compact Desktop) */
@media (max-width: 1200px) {

  /* Navbar Adjustment */
  .nav-text {
    font-size: 1.9rem;
    /* ~16px @ 1rem=8.5px */
  }

  .nav-logo {
    height: 3.6rem;
  }

  /* Hide IPv6 and Phone text */
  .text-ipv6,
  .text-phone {
    display: none;
  }

  /* Ensure icons align right properly and container shrinks */
  .nav-functional {
    justify-content: flex-end;
    width: auto !important;
    /* Allow shrinking to content */
  }

  /* Hide E-bank Button on narrow screens, Keep Access Button visible */
  /* Note: .func-ebank might not exist on all pages, but if it does, hide it here */
  .func-ebank {
    display: none !important;
  }
}

/* @768px (Mobile) */
@media (max-width: 768px) {

  /* Global Mobile Navigation */
  .navbar {
    height: 5rem;
    /* 50px @ 1rem=10px */
    background-color: white !important;
    border-bottom: 1px solid #e7e7e7 !important;
  }

  .content-wrapper {
    padding-top: 5rem;
  }

  .nav-links,
  .access-text,
  .func-text,
  .ebank-text,
  .nav-spacer-left,
  .nav-spacer-right {
    display: none !important;
  }

  /* Navigation Icons Mobile */
  .func-access {
    width: 2.8rem;
    height: 2.8rem;
    /* 28px */
    border-radius: 50%;
    padding: 0;
    gap: 0;
  }

  .access-icon-wrapper {
    width: 1.6rem;
    height: 1.6rem;
  }

  .access-icon {
    width: 100%;
    height: 100%;
    -o-object-fit: contain;
    object-fit: contain;
  }

  /* Handle E-bank button on mobile (Hide it normally, as mobile has 'more' menu or bottom nav) */
  .func-ebank {
    display: none !important;
  }

  .nav-logo {
    height: 2.6rem;
    width: auto;
    max-height: none;
  }

  /* 50px * 0.52 */
  .func-search {
    width: 2.8rem;
    height: 2.8rem;
  }

  .search-icon {
    width: 1.6rem;
    height: 1.6rem;
    -o-object-fit: contain;
    object-fit: contain;
  }

  .navbar-container {
    width: calc(100% - 4rem);
    justify-content: space-between;
  }

  .func-item {
    margin-right: 1.8rem;
    /* 18px */
  }

  /* Target specific hidden items to be safe */
  .func-more-mobile {
    margin-right: 0;
    display: flex;
    width: 2.8rem;
    height: 2.8rem;
    align-items: center;
    justify-content: center;
  }

  .func-more-mobile img {
    width: 100%;
    height: 100%;
    -o-object-fit: contain;
    object-fit: contain;
  }

  .floating-icons{
    display: none;
  }
  .shortcut-container{
    display: none;
  }
  .shortcut-bg{
    display: none;
  }

  /* Hide Desktop Dropdown */
  .nav-dropdown,
  .nav-dimmer {
    display: none !important;
  }

  /* Mobile Menu Overlay */
  .mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 5rem;
    /* 50px @ 10px per rem */
    left: 0;
    width: 100%;
    height: calc(100vh - 5rem);
    background-color: rgba(0, 72, 127, 0.9);
    /* 0.9 blue background for remaining screen */
    z-index: 1050;
    overflow-y: auto;
    padding-bottom: 100px;
  }

  .mobile-menu-overlay.active {
    display: block;
  }

  .mobile-menu-item .menu-text {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
  
  .mobile-menu-item {
    height: 4rem;
    /* 40px @ 10px per rem */
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4vw;
    /* Align to navbar icons (4vw margin) */
    font-size: 1.6rem;
    /* 16px */
    cursor: pointer;
    box-sizing: border-box;
  }

  .mobile-menu-item.level-1 {
    background: rgba(0, 72, 127, 0.9);
    color: white;
    border-bottom: 1px solid #0077D5;
    /* 1px highlight border */
  }

  .mobile-menu-item.level-2 {
    background: rgba(255, 255, 255, 0.9);
    /* White with 0.9 opacity */
    color: #333;
    padding-left: calc(4vw + 1.6rem);
    border-bottom: 1px solid #f0f0f0;
  }

  .mobile-menu-item.level-3 {
    background: rgb(243, 243, 243);
    color: #333;
    padding-left: calc(4vw + 3.2rem);
    border-bottom: 1px solid #e0e0e0;
  }

  .mobile-menu-item.level-4 {
    background: rgb(235, 235, 235);
    color: #666;
    padding-left: calc(4vw + 4.8rem);
    border-bottom: 1px solid #dcdcdc;
  }

  .mobile-menu-item .menu-arrow {
    width: 1.8rem;
    /* 18px @ 1rem=10px */
    height: 1.8rem;
    /* 18px @ 1rem=10px */
    transition: transform 0.3s;
  }

  /* Level 1: White Icon (Default) */
  .mobile-menu-item.level-1 .menu-arrow {
    filter: none;
    /* Already white */
  }

  /* Level 2 & 3: #303030 Icon */
  .mobile-menu-item.level-2 .menu-arrow,
  .mobile-menu-item.level-3 .menu-arrow {
    filter: brightness(0) saturate(100%) invert(18%) sepia(0%) saturate(0%) hue-rotate(221deg) brightness(96%) contrast(93%);
  }

  .mobile-menu-item.expanded .menu-arrow {
    transform: rotate(180deg);
  }

  .mobile-submenu {
    display: none;
  }

  .mobile-submenu.open {
    display: block;
  }
}

/*# sourceMappingURL=navbar.css.map */