/* ============================================================
   WL-Bot Layout CSS (頁面框架)
   Navbar、Footer、佈局相關樣式（手機版預設）
   ============================================================ */

/* === 1. Navbar Base Styles (預設手機版) === */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--nav-height);
    background: linear-gradient(to bottom, rgba(0,0,0,0.9), transparent);
    z-index: 1000;
    transition: background 0.3s ease;
}

[data-theme="light"] .navbar {
    background: linear-gradient(to bottom, rgba(248,249,250,0.95), transparent);
}

.navbar-brand img,
.navbar-logo {
    height: 45px;
    width: auto;
    display: block;
}

/* 漢堡按鈕 (預設樣式) */
.navbar-toggler {
    border: none;
    padding: 0;
    width: 30px;
    height: 24px;
    position: relative;
    z-index: 1050;
    transition: opacity 0.3s;
}

.toggler-line {
    display: block;
    position: absolute;
    height: 2px;
    width: 100%;
    background: #fff;
    border-radius: 2px;
    left: 0;
    transition: background-color 0.3s ease;
}

[data-theme="light"] .toggler-line {
    background: #212529;
}

.toggler-line:nth-child(1) { top: 0; }
.toggler-line:nth-child(2) { top: 11px; }
.toggler-line:nth-child(3) { top: 22px; }

/* 手機版 Navbar Collapse (預設隱藏) */
.navbar-collapse {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--nav-bg-mobile);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1040;
    
    opacity: 0;
    visibility: hidden;
    transform: scale(0.95);
    transition: all 0.3s ease;
}

.navbar-collapse.show {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

/* 手機版選單項目 */
.navbar-nav {
    text-align: center;
    width: 100%;
    padding: 0;
}

.nav-item {
    margin: 15px 0;
    transform: translateY(10px);
    opacity: 0;
    animation: slideUp 0.4s forwards;
}

.nav-item:nth-child(1) { animation-delay: 0.1s; }
.nav-item:nth-child(2) { animation-delay: 0.15s; }
.nav-item:nth-child(3) { animation-delay: 0.2s; }
.nav-item:nth-child(4) { animation-delay: 0.25s; }

.nav-link {
    font-size: 20px;
    color: var(--text-secondary);
    font-weight: 300;
    letter-spacing: 2px;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
    transform: scale(1.05);
}

.mobile-close-btn {
    display: none;
}

/* 漢堡按鈕變形為 X */
.navbar-toggler[aria-expanded="true"] {
    z-index: 2001;
    transition: all 0.3s ease;
}

.navbar-toggler[aria-expanded="true"] .toggler-line:nth-child(1) {
    transform: rotate(45deg);
    top: 11px;
}

.navbar-toggler[aria-expanded="true"] .toggler-line:nth-child(2) {
    opacity: 0;
}

.navbar-toggler[aria-expanded="true"] .toggler-line:nth-child(3) {
    transform: rotate(-45deg);
    top: 11px;
}

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === 2. Footer Base Styles (預設手機版) === */
footer {
    margin-top: auto;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.8) 100%);
    border-top: none;
    padding: 1.5rem 0 1rem;
    transition: background 0.3s ease;
}

[data-theme="light"] footer {
    background: linear-gradient(to bottom, rgba(248,249,250,0) 0%, rgba(248,249,250,0.9) 100%);
}

footer.bg-dark,
footer .bg-dark {
    background-color: transparent;
}

footer h5,
footer h6 {
    font-weight: 400;
    color: var(--text-primary);
    opacity: 0.9;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 14px;
}

footer .text-muted {
    color: var(--text-secondary);
    opacity: 0.7;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-link:hover {
    color: var(--text-primary);
    text-shadow: 0 0 15px rgba(0,0,0,0.2);
}

[data-theme="light"] .footer-link {
    color: var(--text-main);
}

[data-theme="light"] .footer-link:hover {
    color: var(--accent-gold);
    text-shadow: 0 0 10px rgba(0,0,0,0.3);
}

footer a.text-muted {
    color: var(--text-secondary);
    opacity: 0.7;
    text-decoration: none;
    transition: all 0.3s ease;
}

footer a.text-muted:hover {
    color: var(--text-primary);
    text-shadow: 0 0 15px rgba(0,0,0,0.2);
}

[data-theme="light"] footer a.text-muted:hover {
    text-shadow: 0 0 10px rgba(0,0,0,0.3);
}

footer .border-secondary {
    border-color: var(--glass-border);
}

footer .fa-line {
    color: #00c300;
}

footer .text-success {
    color: #00c300;
}

footer .text-info {
    color: #0dcaf0;
}

footer .row {
    text-align: center;
}

footer .col-md-6 {
    margin-bottom: 1rem;
}

footer .text-md-end {
    text-align: center;
}

[data-theme="light"] footer.text-white,
[data-theme="light"] footer .text-white,
[data-theme="light"] footer.text-white * {
    color: var(--text-main);
}

[data-theme="light"] footer p,
[data-theme="light"] footer p *,
[data-theme="light"] footer h5,
[data-theme="light"] footer h6 {
    color: var(--text-main);
}

[data-theme="light"] footer small,
[data-theme="light"] footer .text-muted {
    color: var(--text-muted);
}
