﻿@charset "utf-8";

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft JhengHei', Arial, sans-serif;
}

body {
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden; /* 防止水平捲軸 */
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ===== 導航欄樣式 ===== */
header {
    background-color: #fff9c4;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    position: relative;
}

.logo {
    color: #8b7355;
    font-size: 26px;
    font-weight: bold;
    display: flex;
    align-items: center;
}

.logo-icon {
    margin-right: 10px;
    font-size: 28px;
}

.logo span {
    color: #e74c3c;
}

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-item {
    position: relative;
}

.nav-link {
    color: #8b7355;
    text-decoration: none;
    padding: 12px 18px;
    display: block;
    transition: all 0.3s ease;
    border-radius: 4px;
    font-weight: 500;
}

.nav-link:hover {
    background-color: #e74c3c;
    color: #fff;
}

.dropdown-menu {
    position: absolute;
    background-color: white;
    min-width: 240px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    border-radius: 6px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: all 0.3s ease;
    list-style: none;
    z-index: 1001;
    padding: 10px 0;
}

.dropdown-menu li {
    border-bottom: 1px solid #f0f0f0;
}

.dropdown-menu li:last-child {
    border-bottom: none;
}

.dropdown-menu a {
    color: #333;
    padding: 12px 20px;
    display: block;
    text-decoration: none;
    transition: all 0.2s ease;
}

.dropdown-menu a:hover {
    background-color: #f8f9fa;
    color: #e74c3c;
    padding-left: 25px;
}

.nav-item:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 10px;
    z-index: 1002;
    width: 40px;
    height: 40px;
    position: relative;
    transition: all 0.3s ease;
}

/* 三條槓和X圖標樣式 */
.mobile-toggle .hamburger {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 18px;
    transition: all 0.4s cubic-bezier(0.68, -0.6, 0.32, 1.6);
}

.mobile-toggle .hamburger span {
    display: block;
    position: absolute;
    height: 2px;
    width: 100%;
    background: #8b7355;
    border-radius: 2px;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: all 0.4s cubic-bezier(0.68, -0.6, 0.32, 1.6);
}

.mobile-toggle .hamburger span:nth-child(1) {
    top: 0px;
    transform-origin: left center;
}

.mobile-toggle .hamburger span:nth-child(2) {
    top: 8px;
    transform-origin: left center;
}

.mobile-toggle .hamburger span:nth-child(3) {
    top: 16px;
    transform-origin: left center;
}

.mobile-toggle.active .hamburger span:nth-child(1) {
    top: 0px;
    left: 3px;
    transform: rotate(45deg);
}

.mobile-toggle.active .hamburger span:nth-child(2) {
    width: 0%;
    opacity: 0;
}

.mobile-toggle.active .hamburger span:nth-child(3) {
    top: 16px;
    left: 3px;
    transform: rotate(-45deg);
}

/* 行動裝置選單容器 */
.mobile-menu-container {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu-container.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu {
    position: absolute;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100%;
    background: white;
    padding: 80px 20px 20px;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.mobile-menu-container.active .mobile-menu {
    right: 0;
}

.mobile-menu ul {
    list-style: none;
}

.mobile-menu li {
    border-bottom: 1px solid #eee;
}

.mobile-menu a {
    display: block;
    padding: 15px 10px;
    color: #333;
    text-decoration: none;
    font-size: 16px;
    transition: all 0.3s ease;
}

.mobile-menu a:hover {
    background: #f8f9fa;
    color: #e74c3c;
}

/* 橫幅樣式 */
.header-banner {
    width: 100%;
    position: relative;
    overflow: hidden;
}

.banner-image {
    width: 100%;
    height: auto;
    display: none;
}

.desktop-img {
    display: block;
}

/* 內容文字 */
.content-text {
    text-align: center;
    padding: 20px 0;
    background: white;
    margin-bottom: 20px;
}

.content-text h1 {
    color: #2c3e50;
    font-size: 1.8rem;
    margin: 0;
}

/* ===== 行動裝置工具列樣式 ===== */
.mobile-toolbar {
    display: none;
    background: #776248;
    padding: 8px 0;
    border-top: 2px solid rgba(231, 76, 60, 0.3);
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 999;
    box-shadow: 0 -3px 10px rgba(0,0,0,0.2);
}

.mobile-toolbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.mobile-toolbar-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.mobile-tool-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: white;
    transition: transform 0.3s ease;
}

.mobile-tool-item:hover {
    transform: translateY(-3px);
}

.mobile-tool-icon {
    width: 30px;
    height: 30px;
    margin-bottom: 5px;
}

.mobile-tool-label {
    font-size: 12px;
    text-align: center;
}

/* 頁尾樣式 */
footer {
    background-color: #8b7355;
    color: white;
    padding: 3rem 0 0;
    margin-top: 3rem;
    position: relative;
    width: 100%;
    overflow: hidden;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 0 15px;
}

.footer-section h3 {
    color: #f39c12;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.footer-section p, .footer-section a {
    color: #ecf0f1;
    margin-bottom: 0.8rem;
    display: block;
    text-decoration: none;
}

.footer-section a:hover {
    color: #f39c12;
}

.copyright {
    text-align: center;
    padding: 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.9rem;
    color: #bdc3c7;
    margin-top: 2rem;
}

/* 頁尾工具列 */
.footer-toolbar {
    background: linear-gradient(135deg, #1a2a3a 0%, #2c3e50 100%);
    color: white;
    padding: 12px 0;
    border-top: 3px solid rgba(231, 76, 60, 0.3);
    margin-top: 2rem;
    width: 100%;
}

.footer-toolbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.footer-toolbar-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-info {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.separator {
    color: #bdc3c7;
}

.footer-info a {
    color: #ecf0f1;
    text-decoration: none;
}

.footer-info a:hover {
    color: #f39c12;
}

/* 響應式設計 */
@media (max-width: 1024px) {
    .tablet-img {
        display: block;
    }
    .desktop-img {
        display: none;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .mobile-toggle {
        display: block;
    }
    
    .mobile-toolbar {
        display: block;
    }
    
    .mobile-img {
        display: block;
    }
    .tablet-img, .desktop-img {
        display: none;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
      /* text-align: center;  */ 
    } 
    
    .footer-info {
        flex-direction: column;
        gap: 5px;
    }
    
    .separator {
        display: none;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 22px;
    }
    
    .content-text h1 {
        font-size: 1.4rem;
    }
    
    .mobile-toolbar-grid {
        gap: 5px;
    }
    
    .mobile-tool-label {
        font-size: 11px;
    }
}

/* 精細控制版本 */
.footer-toolbar-grid {
    display: flex;
    justify-content: flex-start; /* 大螢幕靠左 */
    align-items: center;
}

/* 平板設備調整 */
@media (max-width: 1024px) {
    .footer-toolbar-grid {
        justify-content: center; /* 平板時置中 */
    }
}

/* 手機設備隱藏 */
@media (max-width: 768px) {
    .footer-toolbar {
        display: none;
    }
}

/* 或者只隱藏內容但保留空間 */
@media (max-width: 768px) {
    .footer-info {
        display: none;
    }
    
    .footer-toolbar {
        background: transparent; /* 讓背景透明 */
        border-top: none; /* 移除上邊框 */
        padding: 5px 0; /* 最小padding */
    }
}