﻿/* 立即生效：預設隱藏靜態導覽項目，等待 JavaScript 初始化完成後顯示 */
.navbar-nav .nav-item.static-nav-item {
    display: none !important;
}
/* JavaScript 初始化完成後顯示導覽項目 */
.navbar-nav.nav-ready .nav-item.static-nav-item {
    display: list-item !important;
}
.navbar-brand {
    font-size: 24px;
    font-weight: 700;
    color: #004767 !important;
}


.navbar-nav .nav-link {
    color: #374151 !important;
    font-weight: 500;
    padding: 8px 15px !important;
    margin: 0 5px;
    border-radius: 4px;
    transition: all 0.3s;
}

    .navbar-nav .nav-link:hover,
    .navbar-nav .nav-link.active {
        color: #004767 !important;
        background-color: #e0f2fe;
        font-weight: 700;
    }

.navbar {
    background-color: #ffffff !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* 自定義樣式調整 */
.btn-primary {
    background-color: #004767;
    border-color: #004767;
}

    .btn-primary:hover {
        background-color: #fff;
        color: #004767;
        border-color: #004767;
    }

.btn-outline-primary {
    color: #004767;
    border-color: #004767;
}

    .btn-outline-primary:hover {
        background-color: #004767;
        border-color: #004767;
        color: white;
    }

/* 登入模態框樣式 */
.modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal-header {
    background: linear-gradient(135deg, #004767, #2c3e50);
    color: white;
    border-radius: 15px 15px 0 0;
    border-bottom: none;
    padding: 1.5rem;
}

    .modal-header .btn-close {
        filter: invert(1);
    }

.modal-title {
    font-weight: 600;
    font-size: 1.25rem;
}

.modal-body {
    padding: 2rem;
}

.form-label {
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-control {
    border-radius: 8px;
    border: 2px solid #e5e7eb;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

    .form-control:focus {
        border-color: #004767;
        box-shadow: 0 0 0 0.2rem rgba(0, 71, 103, 0.25);
    }

.form-check-input:checked {
    background-color: #004767;
    border-color: #004767;
}

.btn-primary {
    background: linear-gradient(135deg, #004767, #2c3e50);
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

    .btn-primary:hover {
        background: linear-gradient(135deg, #003d5a, #1a252f);
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(0, 71, 103, 0.3);
    }

.btn-outline-secondary {
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

    .btn-outline-secondary:hover {
        transform: translateY(-1px);
    }

/* 登入成功後的導航欄樣式 */
.user-menu {
    position: relative;
}

.user-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: linear-gradient(135deg, #004767, #2c3e50);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    margin-right: 0.5rem;
}

.dropdown-menu {
    border-radius: 10px;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    padding: 0.5rem 0;
}

.dropdown-item {
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    border-radius: 0;
}

    .dropdown-item:hover {
        background-color: #f8f9fa;
        color: #004767;
    }

    .dropdown-item i {
        margin-right: 0.5rem;
        width: 16px;
    }

/* 隱藏區域下拉選單 */
#regionDropdownContainer {
    display: none !important;
}

/* 回到頂部按鈕樣式 */
#backToTopBtn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #004767, #2c3e50);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 71, 103, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

    #backToTopBtn:hover {
        background: linear-gradient(135deg, #003d5a, #1a252f);
        transform: translateY(-5px);
        box-shadow: 0 6px 20px rgba(0, 71, 103, 0.5);
    }

    #backToTopBtn.show {
        opacity: 1;
        visibility: visible;
    }

    #backToTopBtn i {
        animation: bounce 2s infinite;
    }

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-5px);
    }

    60% {
        transform: translateY(-3px);
    }
}

/* 手機版導航欄優化 */
@media (max-width: 991px) {
    .navbar {
        box-shadow: 0 2px 8px rgba(0, 71, 103, 0.12);
        padding: 0.75rem 0;
    }

    .navbar-brand {
        font-size: 1.25rem;
    }

    .navbar-toggler {
        border: 2px solid #004767;
        border-radius: 8px;
        padding: 0.5rem 0.75rem;
    }

        .navbar-toggler:focus {
            box-shadow: 0 0 0 3px rgba(0, 71, 103, 0.15);
        }

    .navbar-collapse {
        margin-top: 1rem;
        padding: 1rem;
        background-color: #f8f9fa;
        border-radius: 10px;
        box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
    }

    .navbar-nav .nav-link {
        padding: 0.75rem 1rem !important;
        margin: 0.25rem 0;
        border-radius: 8px;
        font-size: 1rem;
    }

    .navbar-nav .nav-item {
        margin: 0;
    }

    #backToTopBtn {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}

@media (max-width: 576px) {
    .navbar-brand {
        font-size: 1.1rem;
    }

    .container {
        padding-left: 2.5rem;
        padding-right: 2.5rem;
    }

    #backToTopBtn {
        bottom: 15px;
        right: 15px;
        width: 42px;
        height: 42px;
        font-size: 16px;
    }
}

/* Footer 樣式 */
.site-footer {
    padding: 1.5rem 0;
}

.footer-logo {
    height: 40px;
    width: auto;
}

.footer-text {
    color: #374151;
    font-size: 0.9rem;
    margin: 0;
    text-decoration: none;
    transition: color 0.3s ease;
}

    .footer-text:hover {
        color: #004767;
    }

.footer-privacy-section {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
