header {
    padding: 0 !important /*解決在windows上點擊dialog 會移動的問題*/;
    font-family: "Roboto", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", "sans-serif", "Font Awesome 5 Pro" !important;
    /* 解決在EC字體不一的問題*/
}
.header {
    width: 100%;
    padding: 16px 40px 12px;

    display: flex;
    flex-direction: column;
    gap: 28px;

    border-bottom: 1px solid #d9dbdc;
    background-color: #fff;
    justify-content: space-between;

    z-index: 99;

    @media (max-width: 1220px) {
        gap: 0;
        padding: 16px 12px;
    }

    @media (max-width:768px) {
        padding: 12px 8px;
    }
}

.header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
}

.logo-with-menu-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.navbar-toggler {
    display: none;
    font-size: 16px !important;

    padding: 12px 8px !important;
    outline: none !important;

    background: none;
    border: none;

    @media (max-width: 1220px) {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
    }
}

.navbar-toggler-icon {
    cursor: pointer;
    content: none !important;
    width: 24px;
    height: 24px;
}
.navbar-toggler[aria-expanded="true"] .open-btn {
  display: none !important;
}

.navbar-toggler[aria-expanded="true"] .close-btn {
  display: block !important;
}

.navbar-toggler[aria-expanded="false"] .open-btn {
  display: block !important;
}

.navbar-toggler[aria-expanded="false"] .close-btn {
  display: none !important;
}

.logo-container {
    display: flex;

    @media (max-width: 576px) {
        align-items: center;
    }
}

.logo-container:hover {
    text-decoration: none;
}

.logo-zh {
    max-width: 140px;
    margin-right: 16px;
    height: 30px;
    display: block;

    @media (max-width: 576px) {
        max-width: 114px;
        margin-right: 12px;
        
    }
}

.logo-en {
    max-width: 170px;
    margin-right: 16px;
    height: 30px;
    display: block;
    @media (max-width: 576px) {
        max-width: 135px;
        margin-right: 12px;
        
    }
}

.logo-word::before {
    content: "";
    display: block;
    width: 2px;
    height: 30px;
    background-color: #d9dbdc;
    margin-right: 16px;

    @media (max-width: 576px) {
        margin-right: 8px;
        height: 25px; 
        
    }
}

.logo-word {
    color: #0093c1;
    font-size: 20px;
    font-weight: 500;
    line-height: 24px;
    letter-spacing: 1px;
    height: 30px;
    margin-top: 2px;

    display: flex;
    align-items: end;

    @media (max-width: 576px) {
        font-size: 16px;
        line-height: 20px;
        align-items: self-end;  
    }
}

.function-container {
    display: flex;
    gap: 32px;
    align-items: center;
}

.lang-change {
    color: #0c0e1f !important;
    font-size: 20px !important;
    font-weight: 700;
    line-height: 24px;

    cursor: pointer;
}

.lang-change span {
    color: #0c0e1f;
    font-size: 20px;
    font-weight: 700;
    line-height: 24px;

    @media (max-width:1220px) {
        font-size: 16px;
        line-height: normal;    
    }
}

.lang-change:hover {
    color: #0c0e1f;
    text-decoration: none;
}

.web-function-btn {
    display: block;

    @media (max-width: 1220px) {
        display: none !important;
    }
}

.notice {
    cursor: pointer;
    position: relative;
    padding: 8px !important;
}

.notice img {
    width: 24px !important;
    height: 24px !important;
}

.notice.unread::after {
    content: "";
    position: absolute;
    display: block;
    top: 6px;
    right: 12px;
    width: 8px;
    height: 8px;
    background-color: #eb4751;
    border: 1px solid #fff;
    border-radius: 20px;
    z-index: 1;
}
.login-btn {
    border-radius: 12px;
    border: 1.5px solid #d9dbdc;
    color: #0c0e1f;
    font-size: 20px;
    font-weight: 700;
    line-height: 24px;
    background-color: inherit;

    cursor: pointer;

    display: flex;
    align-items: center;
    gap: 8px;
    outline: none !important;
}

.login-btn-mob {
    padding: 0 !important;
    min-width: 52px;
    min-height: 36px;
    justify-content: center;
}

.login-word{
    display: block;
    padding: 8px !important;

    @media (max-width:1220px) {
        font-size: 16px;
        line-height: normal;
    }
}

.login-btn a,
.login-btn a:visited,
.login-btn a:hover,
.login-btn a:focus,
.login-btn a:active,
.login-btn a:focus-visible,
.login-btn a:focus-within {
    color: #0c0e1f;
    outline: none!important;
}

.user-info,
.user-info a,
.user-info a:visited,
.user-info a:hover,
.user-info a:focus,
.user-info a:active,
.user-info a:focus-visible,
.user-info a:focus-within{
    color: #0c0e1f;
    font-size: 20px;
    font-weight: 700;
    line-height: 24px;
    outline: none;
}

.login-icon {
    width: 24px;
    height: 24px;
}

.web-menu {
    justify-content: flex-start;
    gap: 32px;
    border: none !important;
    flex-direction: row !important;

    @media (max-width: 1220px) {
        flex-direction: column !important;
        width: 100%;
        gap: 4px;

        height: 90%;
        overflow: auto;
    }
}

.web-menu::-webkit-scrollbar {
    background-color: inherit;
    width: 4px;
}

.web-menu::-webkit-scrollbar-thumb {
    background-color: #D9DBDC;
    border-radius: 12px;
}

.navbar {
    padding: 0 !important;
    @media (max-width: 1220px) {
        position: static !important;
        margin: 0 !important;
    }
}

.navbar-collapse {
    @media (max-width: 1220px) {
        position: absolute !important;
        width: 100vw;
        height: calc(100dvh - 74px);
        /* height: 100dvh; */
        left: 0;
        top: 74px;
        background-color: #fff;
        z-index: 1000;

        padding: 16px 8px 16px 8px;

        display: flex;
        flex-direction: column;
        gap: 8px;

        /* 視覺過渡：避免動高度 */
        opacity: 0;
        transform: translateY(-6px);
        transition: opacity 0.35s ease-in-out, transform 0.35s ease-in-out;
    }

    @media (max-width:768px) {
        top: 57px;
        height: calc(100dvh - 57px);
    }
}

.web-menu-item,
.nav-link-first {
    color: #0c0e1f;
    text-align: center;
    font-size: 18px;
    font-weight: 400;
    line-height: 20px;
    padding: 4px !important;

    cursor: pointer;
    text-decoration: none;
    outline: none;

    @media (max-width: 1220px) {
        text-align: start;
        padding: 12px !important;
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        line-height: normal;
    }
}

.web-menu-item span,
.nav-link-first,
.nav-link-first span,
.nav-link-first:visited,
.web-menu-item:visited{
    color: #0c0e1f;
    text-align: center;
    font-size: 18px;
}

.web-menu-item span::after,
.nav-link-first span::after {
    content: attr(data-text);
    font-weight: 700;
    visibility: hidden;
    height: 0;
    overflow: hidden;
    display: block;
}

.web-menu-item:hover,
.web-menu-item.active,
.web-menu-item:focus,
.web-menu-item:active,
.web-menu-item:focus-visible,
.web-menu-item:focus-within,
.nav-link-first:hover,
.nav-link-first:focus,
.nav-link-first:active,
.nav-link-first:focus-visible,
.nav-link-first:focus-within  {
    color: #0c0e1f !important;
    font-weight: 700;
    text-decoration: none;
    outline: none;

    @media (max-width: 1220px) {
        font-weight: 400;
        border-radius: 12px;
        background-color: #f6f7f7 !important;
    }
}

.web-menu .navbar-nav {
    flex-direction: row;
}

.web-menu .nav-item-only {
    display: flex;
    @media (max-width: 1220px) {
        display: block;
    }
}

.web-menu .dropdown-toggle::after,
.login-btn.dropdown-toggle::after {
    display: none;
}


.web-menu .nav-item.dropdown  .dropdown-item-icon {
    display: none;
    @media (max-width: 1220px) {
        display: block;
        
    }
} 

.web-menu .nav-item .dropdown-item-icon {
    display: none;
}

.web-menu .dropdown {
    @media (max-width: 1220px) {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }
}

.web-menu .dropdown-menu {
    position: absolute !important;

    @media (max-width: 1220px) {
        position: static !important;
    }
}

.web-menu .dropdown-item{
    color: #014865;
    font-size: 18px;
    font-weight: 500;
    line-height: 20px; /* 125% */
    padding: 8px !important;

    @media (max-width: 1220px) {
        padding: 12px 12px 12px 52px !important;
        font-weight: 400;
        display: flex;
        justify-content: space-between;
        align-items: center;
        color: #0C0E1F;
    }
}

.login-btn .dropdown-item {
    color: #0c0e1f;
    font-size: 16px;
    font-weight: 400;
    line-height: 20px; /* 125% */
    padding: 8px !important;
    min-width: 120px;

    @media (max-width: 1220px) {
        padding: 12px 12px 12px 52px !important;
        display: flex;
        justify-content: space-between;
        align-items: center;
        color:  #0C0E1F;
        font-size: 18px;
        line-height: normal;
    }
}

.web-menu .dropdown-item.active{
    background-color: #fff !important;
    @media (max-width: 1220px) {
        background-color: #f4fbff !important;
        color:  #006E91;
        font-weight: 500;
    }
}

.web-menu .dropdown-item.active > .sub-item-icon-active,
.web-menu .dropdown-item:hover > .sub-item-icon-active {
    display: none !important;
    @media (max-width:1220px) {
        display: block !important;
    }
}

.web-menu .dropdown-item.active > .sub-item-icon,
.web-menu .dropdown-item:hover > .sub-item-icon  {
    display: none;
}


.web-menu .dropdown-item > .sub-item-icon {
    display: block;
}

.web-menu .dropdown-item > .sub-item-icon-active {
    display: none !important;
}

.web-menu .dropdown-item.active span {
    @media (max-width: 1220px) {
        color:  #006E91;
    }
}

.web-menu .dropdown-item span,
.web-menu .dropdown-item:hover span,
.web-menu .dropdown-item:visited{
    color: #014865;
    font-size: 18px;

    @media (max-width:1220px) {
        font-weight: 400;
        line-height: normal;
    }
}


.web-menu .dropdown-item:hover span {
    @media (max-width:1220px) {
        color:#006E91;
        font-weight: 400;
        line-height: normal;
    }
}

.web-menu .dropdown-item span  {
    @media (max-width:1220px) {
        color:  #0C0E1F;
        font-weight: 400;
        line-height: normal;
    }
}

.web-menu .web-menu-item.active > .dropdown-item-icon {
    transform: rotate(0deg);
}

.web-menu .dropdown-item.active > .dropdown-item-icon {
    transform: rotate(0deg);
}

.dropdown-item-icon {
    width: 20px;
    height: 20px;

    transform: rotate(180deg);
    transition: transform 0.35s ease-in-out;

    display: none;

    @media (max-width: 1220px) {
        display: block;
    }
}

.web-menu .dropdown-item:hover,
.web-menu .dropdown-item:active,
.web-menu .dropdown-item:focus,
.web-menu .dropdown-item:focus-visible,
.web-menu .dropdown-item:focus-within {
    color: #014865;
    background-color: unset !important;
    outline: none !important;
    background-color: #fff !important;

    @media (max-width: 1220px) {
        border-radius: 12px;
        font-weight: 400;
        line-height: normal;
        background-color: #f4fbff !important;
    }
}

.web-menu .sub-dropdown-item {
    color: #0c0e1f;
    font-size: 16px;
    font-weight: 400;
    line-height: 20px; /* 125% */
    padding: 8px;
    white-space: nowrap;
    min-width: 120px;
    max-width: 214px;
    display: flex;

    @media (max-width: 1220px) {
        outline: #fff 2px solid;
        outline-offset: -2px;
        padding: 12px 12px 12px 68px !important;
        min-width: unset;
        max-width: none !important;
        display: block;
    }
}

.sub-dropdown-item span::after{
    content: attr(data-text);
    font-weight: 500;
    visibility: hidden;
    height: 0;
    overflow: hidden;
    display: block;

    @media (max-width:1220px) {
        font-weight: 400;
    }
} 

.web-menu .sub-dropdown-item span,
.web-menu .sub-dropdown-item:visited span,
.web-menu .sub-dropdown-item:visited {
    color: #0c0e1f;
    font-size: 16px;
    font-weight:400;
    display: inline-block;
    width: 100%;
    line-height: 20px;

    @media (max-width:1220px) {
        line-height: normal;
    }
}

.web-menu .sub-dropdown-item:active span,
.web-menu .sub-dropdown-item:hover span {
    color: #006e91;
    font-weight: 500;
    @media (max-width:1220px) {
        font-weight: 400;
        color: #0c0e1f;
    }
}


.web-menu .sub-dropdown-item:hover,
.web-menu .sub-dropdown-item:active,
.web-menu .sub-dropdown-item:focus,
.web-menu .sub-dropdown-item:focus-visible,
.web-menu .sub-dropdown-item:focus-within,
.login-btn .dropdown-item:hover,
.login-btn .dropdown-item:active,
.login-btn .dropdown-item:focus,
.login-btn .dropdown-item:focus-visible,
.login-btn .dropdown-item:focus-within {
    color: #006e91;
    font-weight: 500;
    text-decoration: none;
    background-color: #f4fbff;
    border-radius: 8px;

    @media (max-width: 1220px) {
        border-radius: 12px;
        font-weight: 400;
        background-color: #f6f7f7;
        outline: 2px solid #0093C1;
        color: #0C0E1F;
        outline-offset: -2px;
        line-height: normal;
        color: #0c0e1f;
    }
}

.web-menu .dropdown-menu.show {
    display: flex;
}

.web-menu .sub-dropdown-item:focus {
    outline: 2px solid #006e91;
    outline-offset: -2px;
}

.web-menu .dropdown-menu{
    padding: 24px 32px !important;
    gap: 24px;
    margin: 0 !important;
    top: 61px !important;
    box-shadow: 0 4px 24px 0 rgba(2, 4, 22, 0.08);
    border: none !important;
    border-radius: 16px !important;

    @media (max-width: 1220px) {
        gap: 4px;
        flex-direction: column !important;
        padding: 0 !important;
        border-radius: 0 !important;
        box-shadow: none;
    }
} 

.login-btn .dropdown-menu  {
    padding: 24px!important;
    gap: 8px !important;
    margin: 0 !important;
    top: 18px !important;
    left: calc(-35px - 22px)!important;
    box-shadow: 0 4px 24px 0 rgba(2, 4, 22, 0.08);
    border: none !important;
    border-radius: 16px !important;

    @media (min-width:1540px) {
        left: calc(-44px - 22px)!important;
    }
}

.web-menu .sub-dropdown-menu{
    display: flex;
    flex-direction: column;
    gap: 8px;
    @media (max-width: 1220px) {
        display: none;
        gap: 4px;
    }
}

.login-btn .dropdown-menu  {
    @media (max-width: 1220px) {
        display: none;
    }
}

.login-btn .dropdown-menu.show  {
    display: flex;
    flex-direction: column;

    @media (max-width: 1220px) {
        display: none;
    }
}

.web-menu .sub-dropdown-menu.show {
    display: flex;
    flex-direction: column;
    gap: 8px;

    @media (max-width: 1220px)  {
        gap: 4px;
    }
}

.web-menu .dropdown-menu::after{
    content: "";
    position: absolute;
    display: block;
    width: 25px;
    height: 25px;
    background: url("/FubonCMS/images/header/web-menu-decorate.svg") no-repeat center center;
    top: -18px;
    left: 20px;

    @media (max-width: 1220px) {
        display: none;
    }
}

.login-btn .dropdown-menu::after  {
    content: "";
    position: absolute;
    display: block;
    width: 25px;
    height: 25px;
    background: url("/FubonCMS/images/header/web-menu-decorate.svg") no-repeat center center;
    top: -18px;
    right: 30px;
}

.web-menu .dropdown-item-block {
    min-width:120px;
    max-width: 214px;
    display: flex;
    flex-direction: column;
    gap: 8px;

    @media (max-width: 1220px) {
        min-width: auto;
        max-width: none !important;
        width: 100%;
        gap: 4px;
    }
}

.mob-function-container {
    width: 100%;
    justify-content: space-between;

    display: none;

    @media (max-width: 1220px) {
        display: flex;
    }
}

.login-btn-mob-container {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-right: 8px;
}

.mob-function-container .lang-change {
    display: flex;
    gap: 4px;
    align-items: center;
    justify-content: center;
    padding: 8px 0;
    margin-left: 16px;
}

.mob-function-container .lang-change img {
    width: 20px !important;
    height: 20px !important;
}

.lang-icon {
    width: 24px;
    height: 24px;
}

.navbar .collapsing {
    height: auto !important;
    transition: none !important;
}

/* Bootstrap 會在展開時加 .show，這裡用純視覺動畫呈現 */
.navbar-collapse.show {
    opacity: 1;
    transform: none;
}

.navbar-collapse:not(.show) {
    visibility: visible;
    @media (max-width: 1220px) {
        pointer-events: none;
        visibility: hidden; /* 避免螢幕閱讀器誤讀可視內容 */
    }
}


.mob-function-btn {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 20px;
    font-weight: 700;
    line-height: 24px;
}

.icon-btn {
    border-radius: 12px;
    background: #FFF;
    padding: 12px;
    border: none;
    display: flex
;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    outline: none !important;
}

.modal-solid-btn {
    background-color: #0093C1;
    color: #FFF;
    border: 1.5px solid #0093C1;
    outline: none !important;
}