/* 黑色半透明遮罩層 */
.navbar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.navbar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 導航列基礎樣式 */
.navbar-custom {
    background: transparent;
    padding: 15px 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

/* 滾動後或選單展開時的背景樣式 */
.navbar-custom.scrolled,
.navbar-custom.menu-open {
    background: #0E435C;
    opacity: 0.9;
}

.navbar-custom .container-fluid {
    width: 90vw;
    margin: 0 auto;
    position: relative;
}

/* Logo */
.logo {
    max-width: 105px;
    height: auto;
}

/* 導航選單 - 絕對居中 */
.navbar-nav {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

/* Bootstrap 導航連結覆寫 */
.navbar-nav .nav-link {
    color: #fff !important;
    font-size: 16px;
    font-weight: bold;
    letter-spacing: 0.48px;
    white-space: nowrap;
    padding: 8px 16px;
}

.navbar-nav .nav-link:hover {
    opacity: 0.8;
}

/* Bootstrap 漢堡按鈕覆寫 */
.navbar-toggler {
    border: none;
    padding: 8px;
}

.navbar-toggler:focus {
    box-shadow: none;
    outline: none;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* 右側按鈕組容器 */
.navbar-right-buttons {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: auto;
}

/* 平板 CTA 按鈕 (預設隱藏，只在漢堡選單顯示時出現) */
.tablet-cta-button {
    display: none;
    text-decoration: none;
}

.tablet-cta-button img {
    height: 44px;
    width: auto;
    display: block;
}

/* 自定義 Bootstrap 斷點：1130px */
/* 在 >= 1130px 時展開選單，隱藏漢堡按鈕 */
@media (min-width: 1130px) {
    .navbar-expand-custom .navbar-toggler {
        display: none;
    }

    .navbar-expand-custom .navbar-collapse {
        display: flex !important;
        flex-basis: auto;
    }

    .navbar-expand-custom .navbar-nav {
        flex-direction: row;
    }
}

/* 在 < 1130px 時顯示漢堡選單和平板 CTA 按鈕 */
@media (max-width: 1129.98px) {
    .tablet-cta-button {
        display: inline-block;
        vertical-align: middle;
    }

    .tablet-cta-button img {
        height: 50px;
        width: auto;
        display: block;
    }
}

/* CTA 按鈕 */
.cta-button {
    position: relative;
    width: 202px;
    height: 44px;
    cursor: pointer;
}

.cta-button img {
    width: 100%;
    height: 100%;
}

.cta-button .btc-icon {
    position: absolute;
    left: 5px;
    top: 4px;
    width: 35px;
    height: 35px;
}

.cta-button .btn-text {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 16px;
    font-weight: 900;
    letter-spacing: 0.32px;
    text-shadow: 0px 0px 30px rgba(61, 30, 5, 0.2);
}

.cta-button .btn-logo {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    object-fit: contain;
}

/* 響應式調整 */
@media (max-width: 1400px) {
    .navbar-nav .nav-link {
        font-size: 14px;
        padding: 8px 12px;
    }
}

@media (max-width: 1290px) {
    .navbar-custom .container-fluid {
        width: 95vw;
    }

    .navbar-nav .nav-link {
        font-size: 13px;
        padding: 8px 10px;
    }
}

/* 小螢幕調整 (Bootstrap 自動處理展開/收起) */
@media (max-width: 767.98px) {
    .navbar-cta{
        display: none;
    }
    .navbar-custom {
        padding: 10px 0;
    }

    .logo {
        max-width: 90px;
    }

    .navbar-collapse {
        /* background: rgba(0, 0, 0, 0.95); */
        padding: 20px;
        margin-top: 15px;
        border-radius: 8px;
    }

    /* 取消絕對定位，恢復正常流 */
    .navbar-nav {
        position: static;
        transform: none;
        text-align: center;
    }

    .navbar-nav .nav-link {
        font-size: 16px;
        padding: 12px;
        opacity: 0.8;
        border: 1px solid #FFFFFF;
        border-radius: 6px;
        margin: 8px 0;
    }

    .navbar-cta {
        text-align: center;
        margin-top: 15px;
    }

    .cta-button {
        width: 100%;
        max-width: 280px;
        height: 50px;
        margin: 0 auto;
    }
}
