/* ==========================================================================
   全站共用樣式 (Base, Utilities, Navbar, Footer)
   ========================================================================== */

/* 自訂變數 */
:root {
    --primary-yellow: #f8cd24; /* 品牌主色：黃色 */
    --text-main: #2b2b2b;      /* 主要文字顏色 */
    --text-muted: #888888;     /* 次要/靜音文字顏色 */
    --bg-light-gray: #f8f9fa;  /* 淺灰背景色 */
}

/* 全域設定 */
body {
    font-family: 'Noto Sans TC', sans-serif;
    color: var(--text-main);
    line-height: 1.6;
    letter-spacing: 0.03em;
}

/* 輔助類 (Utilities) */
.text-primary-yellow {
    color: var(--primary-yellow) !important;
}

.bg-primary-yellow {
    background-color: var(--primary-yellow) !important;
}

.bg-light-gray {
    background-color: var(--bg-light-gray) !important;
}

.tracking-widest {
    letter-spacing: 0.15em;
}

.leading-relaxed {
    line-height: 1.8;
}

.max-w-1320 {
    max-width: 1320px;
}

.cursor-pointer {
    cursor: pointer;
}

/* 標題與裝飾線 */
.accent-line {
    width: 45px;
    height: 3px;
    border-radius: 2px;
}

/* 共用按鈕樣式 */
.btn-primary-yellow {
    background-color: var(--primary-yellow);
    border-color: var(--primary-yellow);
    transition: all 0.3s ease;
}

.btn-primary-yellow:hover {
    background-color: #e5bd20;
    border-color: #e5bd20;
    color: #111 !important;
}

/* ==========================================================================
   Header & Navbar (導覽列)
   ========================================================================== */
.header {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.top-bar a {
    transition: color 0.2s ease;
}

.top-bar a:hover {
    color: #ffc453 !important;
}

.navbar-nav .nav-link {
    padding: 0.5rem 1.5rem !important;
    color: var(--text-main) !important;
    transition: color 0.3s;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-yellow) !important;
}

.eng-subtitle {
    font-size: 0.65rem;
    letter-spacing: 0.05em;
    color: #ffc453 !important;
}

/* 桌面版 Dropdown 互動 (Hover 展開) */
@media (min-width: 992px) {
    .navbar .nav-item:hover .dropdown-menu {
        display: block;
        margin-top: 0;
        animation: fadeIn 0.3s ease-in-out;
    }
}

.dropdown-menu {
    border-top: 3px solid var(--primary-yellow) !important;
    border-radius: 0 0 0.4rem 0.4rem;
    padding: 0.5rem 0;
}

.dropdown-item {
    padding: 0.6rem 1.5rem;
    font-size: 0.95rem;
    color: #444;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background-color: #fafafa;
    color: var(--primary-yellow);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Footer (頁尾)
   ========================================================================== */
.footer-links a {
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--primary-yellow) !important;
}

.social-icons a {
    width: 36px;
    height: 36px;
    transition: all 0.3s ease;
    border-color: #dee2e6 !important;
}

.social-icons a:hover {
    background-color: var(--primary-yellow);
    border-color: var(--primary-yellow) !important;
    color: #fff !important;
    transform: translateY(-3px);
}

.copyright-text {
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.border-top-light {
    border-top: 1px solid #f0f0f0;
}

/* 回到頂端按鈕 */
#btn-back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: none;
    z-index: 1050;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-yellow);
    color: #111;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    display: none; /* Default hidden */
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

#btn-back-to-top:hover {
    background-color: #e5bd20;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}
