﻿@charset "utf-8";

/* ===== CSS 重置與基礎設定 ===== */
* {
    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;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ===== CSS 變數定義 (設計系統) ===== */
:root {
    /* 字型設定 */
    --font-family-primary: "微軟正黑體", "Microsoft JhengHei", "Segoe UI", "Arial", sans-serif;
    --font-family-fallback: sans-serif;
    
    /* 文字顏色 */
    --text-color-primary: #555;
    --text-color-secondary: #666;
    --text-color-heading: #666;
    --text-color-subheading: #800080;
    --text-color-strong: #444;
    --text-color-strong-block: #AC3F26;
    --text-color-blue: blue;
    --text-color-white: #fff;
    --text-color-muted: #95a5a6;
    
    /* 背景顏色 */
    --bg-color-primary: #f8f9fa;
    --bg-color-secondary: #2c3e50;
    --bg-color-accent: #e74c3c;
    --bg-color-light: #fff;
    
    /* 基礎文字大小 (響應式) */
    --font-size-base: 1rem;
    --font-size-base-tablet: 1.1rem;
    --font-size-base-desktop: 1.2rem;
    
    /* 標題增量 */
    --font-increment-h1: 0.5rem;
    --font-increment-h2: 0.4rem;
    --font-increment-strong: 0.3rem;
    
    /* 行高設定 */
    --line-height-base: 1.6;
    --line-height-heading: 1.4;
    
    /* 字距設定 */
    --letter-spacing-base: 1px;
    
    /* 間距設定 */
    --margin-top-h1: 30px;
    --margin-top-other: 20px;
    --margin-bottom-base: 20px;
    --margin-bottom-mobile: 10px;
    
    /* 字重設定 */
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-bold: 600;
    --font-weight-bolder: 700;
    
    /* 容器設定 */
    --container-max-width: 1200px;
    --container-padding: 0 15px;
    
    /* 邊框設定 */
    --border-radius: 4px;
    --border-radius-lg: 6px;
}

/* ===== 基礎文字樣式 ===== */
body {
    font-family: var(--font-family-primary), var(--font-family-fallback);
    line-height: var(--line-height-base);
    letter-spacing: var(--letter-spacing-base);
    color: var(--text-color-primary);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
}

.main-content {
    flex: 1;
    padding: 40px 0;
}

/* ===== 內容區域文字樣式 ===== */
.content-text {
    font-size: var(--font-size-base);
    color: var(--text-color-primary);
    line-height: var(--line-height-base);
    font-weight: var(--font-weight-normal);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* 段落樣式 */
.content-text p {
    line-height: var(--line-height-base);
    margin-top: var(--margin-top-other);
    margin-bottom: var(--margin-bottom-base);
    font-weight: var(--font-weight-normal);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* 連結樣式 */
.content-text a {
    color: #8A2BE2;
    text-decoration: none;
    transition: color 0.3s ease;
    word-break: break-all;
}

.content-text a:hover {
    color: var(--text-color-strong-block);
    text-decoration: none;
}

/* 列表樣式 */
.content-text ul,
.content-text ol {
    margin: var(--margin-bottom-base) 0;
    padding-left: 2rem;
}

.content-text li {
    margin-bottom: 0.5rem;
    line-height: var(--line-height-base);
}

/* 表格樣式 */
.content-text table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--margin-bottom-base) 0;
    font-size: var(--font-size-base);
}

.content-text th,
.content-text td {
    padding: 0.75rem;
    border: 1px solid #ddd;
    text-align: left;
}

.content-text th {
    background-color: #f8f9fa;
    font-weight: var(--font-weight-bold);
    color: var(--text-color-heading);
}

.content-text td {
    color: var(--text-color-primary);
}

/* 圖片樣式 */
.content-text img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: var(--margin-bottom-base) 0;
    border-radius: var(--border-radius);
}

/* 引用樣式 */
.content-text blockquote {
    background: #f8f9fa;
    border-left: 4px solid #e74c3c;
    padding: 1rem 1.5rem;
    margin: var(--margin-bottom-base) 0;
    font-style: italic;
    color: var(--text-color-secondary);
}

/* 程式碼樣式 */
.content-text code {
    background: #f4f4f4;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: monospace;
    font-size: 0.9em;
    color: #e74c3c;
}

.content-text pre {
    background: #2c3e50;
    color: white;
    padding: 1rem;
    border-radius: var(--border-radius);
    overflow-x: auto;
    margin: var(--margin-bottom-base) 0;
}

.content-text pre code {
    background: none;
    padding: 0;
    color: inherit;
}

/* ===== 標題層級樣式 ===== */

/* H1 標題 */
.content-text h1 {
    color: #800080;
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 1px;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    position: relative;
    display: block;
    margin-top: var(--margin-top-h1);
    margin-bottom: var(--margin-bottom-base);
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* H2 標題 */
.content-text h2 {
    color: var(--text-color-subheading);
    font-size: calc(var(--font-size-base) + var(--font-increment-h2));
    line-height: var(--line-height-heading);
    font-weight: var(--font-weight-bolder);
    position: relative;
    display: block;
    margin-top: var(--margin-top-other);
    margin-bottom: var(--margin-bottom-base);
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f0f0f0;
}

/* H3 標題 */
.content-text h3 {
    color: var(--text-color-subheading);
    font-size: calc(var(--font-size-base) + var(--font-increment-h2) - 0.1rem);
    line-height: var(--line-height-heading);
    font-weight: var(--font-weight-bold);
    position: relative;
    display: block;
    margin-top: var(--margin-top-other);
    margin-bottom: var(--margin-bottom-base);
}

/* H4 標題 */
.content-text h4 {
    color: var(--text-color-subheading);
    font-size: calc(var(--font-size-base) + var(--font-increment-h2) - 0.2rem);
    line-height: var(--line-height-heading);
    font-weight: var(--font-weight-medium);
    position: relative;
    display: block;
    margin-top: var(--margin-top-other);
    margin-bottom: var(--margin-bottom-base);
}

/* H5 標題 */
.content-text h5 {
    color: var(--text-color-subheading);
    font-size: calc(var(--font-size-base) + var(--font-increment-h2) - 0.3rem);
    line-height: var(--line-height-heading);
    font-weight: var(--font-weight-normal);
    position: relative;
    display: block;
    margin-top: var(--margin-top-other);
    margin-bottom: var(--margin-bottom-base);
}

/* H6 標題 */
.content-text h6 {
    color: var(--text-color-secondary);
    font-size: calc(var(--font-size-base) + var(--font-increment-h2) - 0.4rem);
    line-height: var(--line-height-heading);
    font-weight: var(--font-weight-normal);
    position: relative;
    display: block;
    margin-top: var(--margin-top-other);
    margin-bottom: var(--margin-bottom-base);
}

/* ===== 強調文字樣式 ===== */

/* 一般強調 */
.content-text strong {
    color: var(--text-color-strong);
    font-weight: var(--font-weight-bold);
}

/* 區塊強調 */
.content-text strong.block {
    color: var(--text-color-strong-block);
    font-size: calc(var(--font-size-base) + var(--font-increment-strong));
    font-weight: var(--font-weight-bolder);
    margin-top: var(--margin-top-other);
    margin-bottom: 0px;
    display: block;
}

/* 斜體文字 */
.content-text em {
    font-style: italic;
    color: var(--text-color-secondary);
}

/* 底線文字 */
.content-text u {
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

/* 刪除線文字 */
.content-text s {
    text-decoration: line-through;
    color: var(--text-color-muted);
}

/* ===== 特殊元素處理 ===== */

/* BR 換行處理 */
.content-text br {
    display: block;
    margin-bottom: var(--margin-bottom-mobile);
    font-weight: inherit;
}

/* 水平分隔線 */
.content-text hr {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, transparent, #e74c3c, transparent);
    margin: 2rem 0;
    opacity: 0.6;
}

/* ===== 工具類別文字樣式 ===== */

/* 文字對齊 */
.content-text .text-left { text-align: left !important; }
.content-text .text-center { text-align: center !important; }
.content-text .text-right { text-align: right !important; }
.content-text .text-justify { text-align: justify !important; }

/* 次要粗體文字 */
.content-text .text-secondary-bold {
    font-weight: var(--font-weight-bold);
    color: var(--text-color-secondary);
}

/* 主要顏色文字 */
.content-text .text-primary {
    color: var(--text-color-blue);
    font-weight: var(--font-weight-normal);
}

/* 粗體文字 */
.content-text .text-bold {
    font-weight: var(--font-weight-bold);
}

/* 底線文字 */
.content-text .text-underline {
    text-decoration: underline;
    font-weight: var(--font-weight-normal);
}

/* 無底線文字 */
.content-text .text-no-underline {
    text-decoration: none !important;
}

/* 文字變形 */
.content-text .text-uppercase { text-transform: uppercase !important; }
.content-text .text-lowercase { text-transform: lowercase !important; }
.content-text .text-capitalize { text-transform: capitalize !important; }

/* 文字溢出處理 */
.content-text .text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 文字換行處理 */
.content-text .text-wrap { white-space: normal !important; }
.content-text .text-nowrap { white-space: nowrap !important; }

/* ===== 字型大小工具類 ===== */
.content-text .text-xs { font-size: 0.8rem !important; }
.content-text .text-sm { font-size: 0.9rem !important; }
.content-text .text-base { font-size: var(--font-size-base) !important; }
.content-text .text-lg { font-size: 1.1rem !important; }
.content-text .text-xl { font-size: 1.3rem !important; }
.content-text .text-2xl { font-size: 1.5rem !important; }
.content-text .text-3xl { font-size: 1.7rem !important; }

/* ===== 字重工具類 ===== */
.content-text .font-light { font-weight: 300 !important; }
.content-text .font-normal { font-weight: var(--font-weight-normal) !important; }
.content-text .font-medium { font-weight: var(--font-weight-medium) !important; }
.content-text .font-semibold { font-weight: 500 !important; }
.content-text .font-bold { font-weight: var(--font-weight-bold) !important; }
.content-text .font-extrabold { font-weight: var(--font-weight-bolder) !important; }

/* ===== 行高工具類 ===== */
.content-text .leading-tight { line-height: 1.25 !important; }
.content-text .leading-normal { line-height: var(--line-height-base) !important; }
.content-text .leading-loose { line-height: 2 !important; }

/* ===== 字距工具類 ===== */
.content-text .tracking-tight { letter-spacing: -0.5px !important; }
.content-text .tracking-normal { letter-spacing: normal !important; }
.content-text .tracking-wide { letter-spacing: var(--letter-spacing-base) !important; }

/* ===== 文字顏色工具類 ===== */
.content-text .text-default { color: var(--text-color-primary) !important; }
.content-text .text-muted { color: var(--text-color-muted) !important; }
.content-text .text-heading { color: var(--text-color-heading) !important; }
.content-text .text-subheading { color: var(--text-color-subheading) !important; }
.content-text .text-accent { color: var(--text-color-strong-block) !important; }
.content-text .text-white { color: var(--text-color-white) !important; }

/* ===== 背景顏色工具類 ===== */
.content-text .bg-primary { background-color: var(--bg-color-primary) !important; }
.content-text .bg-secondary { background-color: var(--bg-color-secondary) !important; }
.content-text .bg-accent { background-color: var(--bg-color-accent) !important; }
.content-text .bg-light { background-color: var(--bg-color-light) !important; }

/* ===== 邊框工具類 ===== */
.content-text .rounded { border-radius: var(--border-radius) !important; }
.content-text .rounded-lg { border-radius: var(--border-radius-lg) !important; }
.content-text .rounded-full { border-radius: 50% !important; }

/* ===== 間距工具類 ===== */
.content-text .m-0 { margin: 0 !important; }
.content-text .mt-0 { margin-top: 0 !important; }
.content-text .mb-0 { margin-bottom: 0 !important; }
.content-text .ml-0 { margin-left: 0 !important; }
.content-text .mr-0 { margin-right: 0 !important; }

.content-text .m-1 { margin: 0.25rem !important; }
.content-text .mt-1 { margin-top: 0.25rem !important; }
.content-text .mb-1 { margin-bottom: 0.25rem !important; }

.content-text .m-2 { margin: 0.5rem !important; }
.content-text .mt-2 { margin-top: 0.5rem !important; }
.content-text .mb-2 { margin-bottom: 0.5rem !important; }

.content-text .m-3 { margin: 1rem !important; }
.content-text .mt-3 { margin-top: 1rem !important; }
.content-text .mb-3 { margin-bottom: 1rem !important; }

.content-text .m-4 { margin: 1.5rem !important; }
.content-text .mt-4 { margin-top: 1.5rem !important; }
.content-text .mb-4 { margin-bottom: 1.5rem !important; }

.content-text .m-5 { margin: 3rem !important; }
.content-text .mt-5 { margin-top: 3rem !important; }
.content-text .mb-5 { margin-bottom: 3rem !important; }

.content-text .p-0 { padding: 0 !important; }
.content-text .pt-0 { padding-top: 0 !important; }
.content-text .pb-0 { padding-bottom: 0 !important; }

.content-text .p-1 { padding: 0.25rem !important; }
.content-text .pt-1 { padding-top: 0.25rem !important; }
.content-text .pb-1 { padding-bottom: 0.25rem !important; }

.content-text .p-2 { padding: 0.5rem !important; }
.content-text .pt-2 { padding-top: 0.5rem !important; }
.content-text .pb-2 { padding-bottom: 0.5rem !important; }

.content-text .p-3 { padding: 1rem !important; }
.content-text .pt-3 { padding-top: 1rem !important; }
.content-text .pb-3 { padding-bottom: 1rem !important; }

.content-text .p-4 { padding: 1.5rem !important; }
.content-text .pt-4 { padding-top: 1.5rem !important; }
.content-text .pb-4 { padding-bottom: 1.5rem !important; }

.content-text .p-5 { padding: 3rem !important; }
.content-text .pt-5 { padding-top: 3rem !important; }
.content-text .pb-5 { padding-bottom: 3rem !important; }

/* ===== 顯示與隱藏工具類 ===== */
.content-text .d-block { display: block !important; }
.content-text .d-inline { display: inline !important; }
.content-text .d-inline-block { display: inline-block !important; }
.content-text .d-flex { display: flex !important; }
.content-text .d-none { display: none !important; }

.content-text .visible { visibility: visible !important; }
.content-text .invisible { visibility: hidden !important; }

/* ===== 定位工具類 ===== */
.content-text .position-static { position: static !important; }
.content-text .position-relative { position: relative !important; }
.content-text .position-absolute { position: absolute !important; }
.content-text .position-fixed { position: fixed !important; }
.content-text .position-sticky { position: sticky !important; }

/* ===== 導航欄樣式 - 修正下邊緣立體效果與下拉選單z-index衝突 ===== */
header {
    background-color: #2c3e50;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    position: relative;
}

/* 下邊緣立體效果 - 降低z-index確保不影響下拉選單 */
header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, 
        rgba(231, 76, 60, 0.8) 0%, 
        rgba(231, 76, 60, 0.6) 25%, 
        rgba(231, 76, 60, 0.4) 50%, 
        rgba(231, 76, 60, 0.2) 75%, 
        transparent 100%);
    z-index: 1; /* 降低z-index，讓下拉選單可以顯示在上面 */
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    position: relative;
}

.logo {
    color: white;
    font-size: 22px;
    font-weight: bold;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 1001; /* 確保logo在下邊緣效果上方 */
}

.logo-icon {
    margin-right: 10px;
    font-size: 24px;
}

.logo span {
    color: #e74c3c;
}

.nav-menu {
    display: flex;
    list-style: none;
    position: relative;
    z-index: 1001; /* 確保導航菜單在下邊緣效果上方 */
}

.nav-item {
    position: relative;
    z-index: 1001; /* 確保導航項目在下邊緣效果上方 */
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 12px 18px;
    display: block;
    transition: all 0.3s ease;
    border-radius: 4px;
    font-weight: 500;
    position: relative;
    z-index: 1001;
}

.nav-link:hover {
    background-color: #e74c3c;
}

/* 下拉菜單 - 提高z-index確保在下邊緣效果上方 */
.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: 1002; /* 提高z-index，確保在下邊緣效果上方 */
    padding: 10px 0;
    top: 100%; /* 確保從導航項目底部開始 */
    left: 0;
}

.dropdown-menu li {
    border-bottom: 1px solid #f0f0f0;
    position: relative;
    z-index: 1002;
}

.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;
    position: relative;
    z-index: 1002;
}

.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: 1003; /* 漢堡按鈕在最上層 */
    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: white;
    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: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #e0a502;
    z-index: 1002; /* 提高z-index */
    max-height: 80vh;
    overflow-y: auto;
    transform: translateY(-10px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.mobile-menu-container.active {
    display: block;
    transform: translateY(0);
    opacity: 1;
}

.mobile-menu {
    background-color: #e0a502;
    transform: translateX(-10px);
    transition: transform 0.3s ease 0.1s;
}

.mobile-menu-container.active .mobile-menu {
    transform: translateX(0);
}

.mobile-menu ul {
    list-style: none;
}

.mobile-menu ul li {
    border-bottom: 2px solid #efcf79;
    position: relative;
    overflow: hidden;
    z-index: 1002;
}

/* 普通選單項背景色 */
.mobile-menu ul li:not(.has-submenu) {
    background-color: #6A0DAD;
}

/* 有下拉選單的選單項背景色 */
.mobile-menu ul li.has-submenu {
    background-color: #8B2DC9;
}

.mobile-menu ul li a {
    color: #fff;
    display: block;
    font-size: 20px;
    padding: 18px 20px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1002;
}

.mobile-menu ul li a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.mobile-menu ul li a:hover::before {
    left: 100%;
}

.mobile-menu ul li a:hover, .mobile-menu ul li a:active {
    background-color: #fab802;
    padding-left: 25px;
}

/* 加大下拉圖標 - 添加動畫 */
.mobile-menu ul li i {
    position: absolute;
    top: 50%;
    right: 30px;
    transform: translateY(-50%);
    display: block;
    width: 24px;
    height: 24px;
    overflow: hidden;
    background-position: center center;
    background-repeat: no-repeat;
    background-size: contain;
    font-size: 22px;
    font-weight: bold;
    text-align: center;
    line-height: 24px;
    color: white;
    transition: all 0.4s cubic-bezier(0.68, -0.6, 0.32, 1.6);
    border-radius: 50%;
    background-color: rgba(255,255,255,0.1);
}

.mobile-menu ul li i.touch-arrow-down::before {
    content: "+";
    display: block;
    transition: transform 0.4s ease;
}

.mobile-menu ul li i.touch-arrow-up::before {
    content: "-";
    display: block;
    transform: rotate(180deg);
}

.mobile-menu ul li a:hover i {
    background-color: rgba(255,255,255,0.2);
    transform: translateY(-50%) scale(1.1);
}

/* 子選單動畫效果 */
.mobile-menu ul ul {
    display: none;
    margin: 0;
    padding: 0;
    background-color: #7A3DB8;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), padding 0.3s ease;
    z-index: 1002;
}

.mobile-menu ul ul.active {
    display: block;
    max-height: 500px;
    padding: 10px 0;
}

.mobile-menu ul ul li {
    border-bottom: none;
    margin: 0;
    background-color: #7A3DB8;
    transform: translateX(-20px);
    opacity: 0;
    transition: all 0.4s ease;
    z-index: 1002;
}

.mobile-menu ul ul.active li {
    transform: translateX(0);
    opacity: 1;
}

/* 子選單項目的延遲動畫 */
.mobile-menu ul ul li:nth-child(1) { transition-delay: 0.05s; }
.mobile-menu ul ul li:nth-child(2) { transition-delay: 0.1s; }
.mobile-menu ul ul li:nth-child(3) { transition-delay: 0.15s; }
.mobile-menu ul ul li:nth-child(4) { transition-delay: 0.2s; }
.mobile-menu ul ul li:nth-child(5) { transition-delay: 0.25s; }
.mobile-menu ul ul li:nth-child(6) { transition-delay: 0.3s; }
.mobile-menu ul ul li:nth-child(7) { transition-delay: 0.35s; }
.mobile-menu ul ul li:nth-child(8) { transition-delay: 0.4s; }

.mobile-menu ul ul li a {
    padding: 16px 20px 16px 40px;
    font-size: 18px;
    transition: all 0.3s ease;
    z-index: 1002;
}

.mobile-menu ul ul li a:hover {
    background-color: #9B4DDB;
    padding-left: 45px;
}

/* ===== 大圖檔區域樣式 ===== */
.header-banner {
    width: 100%;
    position: relative;
    overflow: hidden;
    background-color: #f8f9fa;
}

.header-banner img {
    width: 100%;
    height: auto;
    display: block;
    transition: opacity 0.5s ease;
}

/* 桌面版圖片 (預設顯示) */
.header-banner .desktop-img {
    display: block;
}

/* 平板版圖片 (預設隱藏) */
.header-banner .tablet-img {
    display: none;
}

/* 手機版圖片 (預設隱藏) */
.header-banner .mobile-img {
    display: none;
}

/* 響應式圖片切換 */
@media (max-width: 992px) and (min-width: 768px) {
    .header-banner .desktop-img {
        display: none;
    }
    
    .header-banner .tablet-img {
        display: block;
    }
}

@media (max-width: 767px) {
    .header-banner .desktop-img {
        display: none;
    }
    
    .header-banner .mobile-img {
        display: block;
    }
}

/* 圖片載入前的佔位空間 */
.header-banner.placeholder {
    min-height: 300px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-banner.placeholder::before {
    content: "載入中...";
    color: #666;
    font-size: 1.2rem;
}

/* 圖片載入失敗的備用樣式 */
.header-banner.error {
    min-height: 200px;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}

/* 圖片說明文字樣式 */
.banner-caption {
    position: absolute;
    bottom: 30px;
    left: 0;
    right: 0;
    text-align: center;
    color: white;
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.6);
    font-size: 1.1rem;
    font-weight: 500;
    display: block;
}

.banner-caption p {
    margin: 5px 0 0 0;
    font-size: 1rem;
    line-height: 1.4;
}

/* 響應式文字調整 */
@media (max-width: 768px) {
    .banner-caption {
        display: none;
    }
    
    .banner-caption p {
        font-size: 0.9rem;
    }
}

/* ===== 主内容區域樣式 ===== */
.hero {
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('https://images.unsplash.com/photo-1551524164-6ca5f5f77e75?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 120px 0;
    text-align: center;
}

.hero h1 {
    font-size: 2.8rem;
    margin-bottom: 20px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

.hero p {
    font-size: 1.3rem;
    max-width: 800px;
    margin: 0 auto 40px;
}

.btn {
    display: inline-block;
    background-color: #e74c3c;
    color: white;
    padding: 14px 35px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    background-color: #c0392b;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.3);
}

.section {
    padding: 90px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
    font-size: 2.2rem;
    color: #2c3e50;
    position: relative;
}

.section-title:after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: #e74c3c;
    margin: 15px auto 0;
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.5s ease;
}

.section-title:hover:after {
    transform: scaleX(1);
}

/* ===== 頁尾導航列樣式 ===== */
.footer-nav {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 60px 0 25px;
    margin-top: auto;
}

.footer-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column h3 {
    color: #e74c3c;
    font-size: 1.4rem;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 4px;
    background: #e74c3c;
    border-radius: 2px;
}

.footer-column h3 .icon {
    font-size: 1.6rem;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(231, 76, 60, 0.1);
    border-radius: 10px;
    border: 2px solid rgba(231, 76, 60, 0.3);
    overflow: hidden;
}

.footer-column h3 .icon img {
    width: 30px;
    height: 30px;
    object-fit: contain;
    border-radius: 6px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 15px;
}

.footer-links a {
    color: #bdc3c7;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    padding: 8px 0;
    font-size: 1rem;
}

.footer-links a::before {
    content: '➤';
    margin-right: 15px;
    color: #e74c3c;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(231, 76, 60, 0.1);
    border-radius: 50%;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.footer-links a:hover {
    color: white;
    transform: translateX(10px);
}

.footer-links a:hover::before {
    transform: scale(1.3);
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.2);
    border-color: rgba(255, 107, 107, 0.5);
}

.contact-info {
    margin-top: 20px;
    background-color: #f8f4ff;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #e8e0ff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    color: #2c3e50;
    padding: 10px 0;
    border-bottom: 1px solid rgba(232, 224, 255, 0.5);
}

.contact-item:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

.contact-item .icon {
    margin-right: 15px;
    color: #e74c3c;
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(231, 76, 60, 0.1);
    border-radius: 8px;
    font-size: 1.4rem;
    border: 2px solid rgba(231, 76, 60, 0.2);
}

.contact-item:hover .icon {
    background: rgba(231, 76, 60, 0.2);
    transform: scale(1.1);
    border-color: rgba(231, 76, 60, 0.4);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    font-size: 1.4rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.social-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.social-link:hover::before {
    left: 100%;
}

.social-link:hover {
    background: #e74c3c;
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 20px rgba(231, 76, 60, 0.5);
    border-color: rgba(231, 76, 60, 0.5);
}

.footer-bottom {
    border-top: 2px solid rgba(255, 255, 255, 0.15);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.copyright {
    color: #95a5a6;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.copyright::before {
    content: '©';
    font-size: 1.2rem;
    color: #e74c3c;
}

.footer-bottom-links {
    display: flex;
    gap: 30px;
    list-style: none;
}

.footer-bottom-links a {
    color: #95a5a6;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-bottom-links a::before {
    content: '•';
    color: #e74c3c;
    font-size: 1.2rem;
}

.footer-bottom-links a:hover {
    color: #e74c3c;
    transform: translateY(-2px);
}

/* 回到頂部大按鈕 */
.back-to-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 60px;
    height: 60px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: #c0392b;
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 10px 25px rgba(231, 76, 60, 0.6);
}

/* ===== 頁尾底部工具列樣式 ===== */
.footer-toolbar {
    background: linear-gradient(135deg, #1a2a3a 0%, #2c3e50 100%);
    color: white;
    padding: 6px 0;
    border-top: 2px solid rgba(231, 76, 60, 0.3);
}

.footer-toolbar-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.footer-toolbar-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    min-height: 30px;
}

.footer-info-left {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #bdc3c7;
    font-size: 0.9rem;
    justify-content: flex-start;
}

.footer-info-right {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #bdc3c7;
    font-size: 0.9rem;
    justify-content: flex-end;
}

.update-info, .visit-count {
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.footer-info-left a,
.footer-info-right a {
    color: #bdc3c7;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.footer-info-left a:hover,
.footer-info-right a:hover {
    color: #e74c3c;
    transform: translateY(-2px);
}

.footer-info-left .separator,
.footer-info-right .separator {
    color: #7f8c8d;
    margin: 0 5px;
    font-size: 0.8rem;
}

/* ===== 行動裝置工具列樣式 ===== */
.mobile-toolbar {
    display: none;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    padding: 6px 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::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(231, 76, 60, 0.8) 25%, 
        rgba(231, 76, 60, 1) 50%, 
        rgba(231, 76, 60, 0.8) 75%, 
        transparent 100%);
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.4);
}

.mobile-toolbar-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 10px;
}

.mobile-toolbar-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    align-items: center;
}

.mobile-tool-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: white;
    transition: all 0.3s ease;
    padding: 4px 2px;
    border-radius: 6px;
}

.mobile-tool-item:hover {
    background-color: rgba(231, 76, 60, 0.2);
    transform: translateY(-2px);
}

.mobile-tool-icon {
    width: 32px;
    height: 32px;
    margin-bottom: 2px;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent !important; /* 確保沒有白色格線 */
    border: none !important;
    box-shadow: none !important;
}

.mobile-tool-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border: none !important;
    outline: none !important;
    background: transparent !important;
}

.mobile-tool-item:hover .mobile-tool-icon {
    transform: scale(1.1);
    background: transparent !important;
}

.mobile-tool-label {
    font-size: 0.65rem;
    text-align: center;
    font-weight: 500;
    line-height: 1.1;
}

/* ===== 響應式設計 ===== */
@media (max-width: 992px) {
    .nav-menu {
        display: none;
    }
    
    .mobile-toggle {
        display: block;
    }
    
    .hero {
        padding: 80px 0;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 25px;
        text-align: center;
    }
    
    .footer-bottom-links {
        justify-content: center;
    }
    
    .back-to-top {
        bottom: 30px;
        right: 30px;
        width: 55px;
        height: 55px;
    }
    
    .mobile-toolbar {
        display: block;
    }
    
    .footer-toolbar {
        display: none;
    }
    
    .footer-toolbar-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    /* 修正移動端導航z-index */
    .mobile-menu-container {
        z-index: 1002;
    }
}

@media (max-width: 768px) {
    .footer-nav {
        padding: 50px 0 20px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 35px;
    }
    
    .footer-column h3 {
        font-size: 1.3rem;
    }
    
    .footer-column h3 .icon {
        font-size: 1.6rem;
        width: 40px;
        height: 40px;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .footer-links a::before {
        font-size: 1.1rem;
        width: 22px;
        height: 22px;
    }
    
    .contact-item .icon {
        font-size: 1.3rem;
        width: 35px;
        height: 35px;
    }
    
    .footer-toolbar-grid {
        grid-template-columns: 1fr;
        gap: 10px;
        text-align: center;
    }
    
    .footer-info-left,
    .footer-info-right {
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
        font-size: 0.85rem;
    }
}

@media (max-width: 576px) {
    .hero {
        padding: 60px 0;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .mobile-menu ul li a {
        font-size: 18px;
        padding: 16px 20px;
    }
    
    .mobile-menu ul ul li a {
        padding: 14px 20px 14px 40px;
        font-size: 16px;
    }
    
    .footer-nav {
        padding: 40px 0 15px;
    }
    
    .footer-grid {
        gap: 30px;
    }
    
    .footer-bottom-links {
        flex-direction: column;
        gap: 15px;
    }
    
    .contact-item {
        font-size: 0.95rem;
    }
    
    .footer-links a {
        font-size: 0.95rem;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }
    
    .footer-toolbar {
        padding: 10px 0;
    }
    
    .footer-info-left,
    .footer-info-right {
        font-size: 0.8rem;
        gap: 8px;
    }
    
    .footer-info-left .separator,
    .footer-info-right .separator {
        margin: 0 3px;
    }
    
    .mobile-toolbar {
        padding: 5px 0;
    }
    
    .mobile-toolbar-container {
        padding: 0 8px;
    }
    
    .mobile-toolbar-grid {
        gap: 6px;
    }
    
    .mobile-tool-item {
        padding: 3px 1px;
    }
    
    .mobile-tool-icon {
        width: 30px;
        height: 30px;
        margin-bottom: 1px;
    }
    
    .mobile-tool-label {
        font-size: 0.6rem;
    }
}

@media (max-width: 360px) {
    .mobile-toolbar {
        padding: 4px 0;
    }
    
    .mobile-tool-icon {
        width: 28px;
        height: 28px;
    }
    
    .mobile-tool-label {
        font-size: 0.55rem;
    }
}

/* PC顯示設定 - 頁尾底部工具列 */
@media (min-width: 993px) {
    .footer-toolbar {
        display: block;
    }
}

/* 列印樣式 */
@media print {
    * {
        background: transparent !important;
        color: black !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    .btn, .mobile-toggle, .back-to-top, .footer-nav, header {
        display: none !important;
    }
}

/* 動畫效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.footer-column {
    animation: fadeInUp 0.8s ease forwards;
}

.footer-column:nth-child(1) { animation-delay: 0.1s; }
.footer-column:nth-child(2) { animation-delay: 0.2s; }
.footer-column:nth-child(3) { animation-delay: 0.3s; }
.footer-column:nth-child(4) { animation-delay: 0.4s; }

/* 懸停放大效果 */
.footer-column:hover h3 .icon {
    transform: scale(1.1);
    background: rgba(231, 76, 60, 0.2);
    border-color: rgba(231, 76, 60, 0.5);
}

/* ===== 響應式設計 - content-text ===== */


/* 手機裝置 (600px以下) */
@media (max-width: 600px) {
    .content-text {
        font-size: var(--font-size-base);
        padding: 0 10px;
    }
    
    .content-text br {
        display: block;
        margin-bottom: var(--margin-bottom-mobile);
    }
    
    .content-text h1 {
        font-size: 1.8rem;
        margin-top: calc(var(--margin-top-h1) * 0.7);
        margin-bottom: calc(var(--margin-bottom-base) * 0.7);
        line-height: 1.3;
    }
    
    .content-text h2 {
        font-size: 1.5rem;
        margin-top: calc(var(--margin-top-other) * 0.7);
        margin-bottom: calc(var(--margin-bottom-base) * 0.7);
    }
    
    .content-text h3 {
        font-size: 1.3rem;
        margin-top: calc(var(--margin-top-other) * 0.7);
        margin-bottom: calc(var(--margin-bottom-base) * 0.7);
    }
    
    .content-text h4 {
        font-size: 1.2rem;
        margin-top: calc(var(--margin-top-other) * 0.7);
        margin-bottom: calc(var(--margin-bottom-base) * 0.7);
    }
    
    .content-text h5 {
        font-size: 1.1rem;
        margin-top: calc(var(--margin-top-other) * 0.7);
        margin-bottom: calc(var(--margin-bottom-base) * 0.7);
    }
    
    .content-text h6 {
        font-size: 1rem;
        margin-top: calc(var(--margin-top-other) * 0.7);
        margin-bottom: calc(var(--margin-bottom-base) * 0.7);
    }
    
    .content-text strong.block {
        font-size: calc(var(--font-size-base) + var(--font-increment-strong) * 0.7);
    }
    
    .content-text ul,
    .content-text ol {
        padding-left: 1.5rem;
    }
    
    .content-text table {
        font-size: 0.9rem;
    }
    
    .content-text th,
    .content-text td {
        padding: 0.5rem;
    }
}

/* 平板裝置 (601px - 1199px) */
@media (min-width: 601px) and (max-width: 1199px) {
    .content-text {
        font-size: var(--font-size-base-tablet);
    }
    
    .content-text h1 {
        font-size: 2rem;
    }
    
    .content-text h2 {
        font-size: 1.7rem;
    }
    
    .content-text h3 {
        font-size: 1.5rem;
    }
}

/* 桌面裝置 (1200px以上) */
@media (min-width: 1200px) {
    .content-text {
        font-size: var(--font-size-base-desktop);
        max-width: 100%;
    }
    
    .content-text h1 {
        font-size: 2.2rem;
    }
    
    .content-text h2 {
        font-size: 1.8rem;
    }
    
    .content-text h3 {
        font-size: 1.6rem;
    }
}

/* 超小屏幕 (375px以下) */
@media (max-width: 375px) {
    .content-text {
        font-size: 0.95rem;
        padding: 0 8px;
    }
    
    .content-text h1 {
        font-size: 1.6rem;
        line-height: 1.4;
        padding: 1rem 0.5rem;
    }
    
    .content-text h2 {
        font-size: 1.3rem;
    }
    
    .content-text h3 {
        font-size: 1.1rem;
    }
    
    .content-text ul,
    .content-text ol {
        padding-left: 1.2rem;
    }
}



/* 確保content-text與footer的響應式縮進一致 */
.content-text {
    padding: 0 25px; /* 桌面版默認值 */
}

@media (max-width: 768px) {
    .content-text {
        padding: 0 20px; /* 平板和手機版調整 */
    }
}

@media (max-width: 576px) {
    .content-text {
        padding: 0 15px; /* 小手機版進一步調整 */
    }
}






/* 列印樣式 - content-text */
@media print {
    .content-text {
        color: black !important;
        font-size: 12pt !important;
        line-height: 1.4 !important;
    }
    
    .content-text h1 {
        color: black !important;
        font-size: 18pt !important;
        text-shadow: none !important;
    }
    
    .content-text a {
        color: black !important;
        text-decoration: underline !important;
    }
    
    .content-text img {
        max-width: 100% !important;
        height: auto !important;
    }
}

/* 動畫效果 - content-text */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-text {
    animation: fadeInUp 0.6s ease;
}

/* 高對比度模式支援 */
@media (prefers-contrast: high) {
    .content-text {
        color: #000;
    }
    
    .content-text a {
        color: #0000EE;
    }
}

/* 減少動畫模式支援 */
@media (prefers-reduced-motion: reduce) {
    .content-text {
        animation: none;
    }
}

/* ===== 手機版（小於480px）特定欄位置中 ===== */
@media (max-width: 480px) {
    .footer-column:nth-child(2),
    .footer-column:nth-child(3),
    .footer-column:nth-child(4) {
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-bottom: 10px;
    }
    
    .footer-column:nth-child(2) h3,
    .footer-column:nth-child(3) h3,
    .footer-column:nth-child(4) h3 {
        justify-content: center;
        text-align: center;
        margin-bottom: 15px;
    }
    
    .footer-column:nth-child(2) h3::after,
    .footer-column:nth-child(3) h3::after,
    .footer-column:nth-child(4) h3::after {
        left: 50%;
        transform: translateX(-50%);
        width: 50px;
    }
    
    .footer-column:nth-child(2) h3 .icon,
    .footer-column:nth-child(3) h3 .icon,
    .footer-column:nth-child(4) h3 .icon {
        margin-right: 10px;
        margin-bottom: 0;
        transform: scale(1);
    }
    
    .footer-column:nth-child(2) .footer-links,
    .footer-column:nth-child(3) .footer-links,
    .footer-column:nth-child(4) .footer-links {
        padding-left: 0;
        text-align: center;
        width: 100%;
        margin-top: 0;
    }
    
    .footer-column:nth-child(2) .footer-links li,
    .footer-column:nth-child(3) .footer-links li,
    .footer-column:nth-child(4) .footer-links li {
        display: flex;
        justify-content: center;
        margin-bottom: 8px;
    }
    
    .footer-column:nth-child(2) .footer-links li:last-child,
    .footer-column:nth-child(3) .footer-links li:last-child,
    .footer-column:nth-child(4) .footer-links li:last-child {
        margin-bottom: 15px;
    }
    
    .footer-column:nth-child(2) .footer-links a,
    .footer-column:nth-child(3) .footer-links a,
    .footer-column:nth-child(4) .footer-links a {
        justify-content: center;
        text-align: center;
        padding: 8px 15px;
        font-size: 1rem;
    }
    
    .footer-column:nth-child(2) .footer-links a::before,
    .footer-column:nth-child(3) .footer-links a::before,
    .footer-column:nth-child(4) .footer-links a::before {
        transform: scale(1);
        margin-right: 12px;
        width: 25px;
        height: 25px;
        font-size: 1.2rem;
    }
    
    .footer-column:nth-child(2),
    .footer-column:nth-child(3),
    .footer-column:nth-child(4) {
        padding-bottom: 10px;
        background-color: transparent;
    }
    
    .footer-column:nth-child(2) .footer-links,
    .footer-column:nth-child(3) .footer-links,
    .footer-column:nth-child(4) .footer-links {
        background-color: rgba(255, 255, 255, 0.05);
        border-radius: 6px;
        padding: 10px;
        margin-top: 5px;
    }
}

/* ===== 超小螢幕（小於400px）進一步調整 ===== */
@media (max-width: 400px) {
    .footer-column:nth-child(2) h3,
    .footer-column:nth-child(3) h3,
    .footer-column:nth-child(4) h3 {
        flex-direction: row;
        gap: 8px;
        font-size: 1.3rem;
    }
    
    .footer-column:nth-child(2) h3 .icon,
    .footer-column:nth-child(3) h3 .icon,
    .footer-column:nth-child(4) h3 .icon {
        transform: scale(1);
        margin-right: 8px;
    }
    
    .footer-column:nth-child(2) .footer-links a,
    .footer-column:nth-child(3) .footer-links a,
    .footer-column:nth-child(4) .footer-links a {
        padding: 10px 15px;
        font-size: 0.95rem;
    }
    
    .footer-column:nth-child(2) .footer-links li:last-child,
    .footer-column:nth-child(3) .footer-links li:last-child,
    .footer-column:nth-child(4) .footer-links li:last-child {
        margin-bottom: 20px;
    }
    
    .footer-column:nth-child(2) .footer-links a::before,
    .footer-column:nth-child(3) .footer-links a::before,
    .footer-column:nth-child(4) .footer-links a::before {
        transform: scale(1);
        margin-right: 10px;
        width: 22px;
        height: 22px;
        font-size: 1.1rem;
    }
}

/* ===== 超小螢幕（小於350px） ===== */
@media (max-width: 350px) {
    .footer-column:nth-child(2) h3,
    .footer-column:nth-child(3) h3,
    .footer-column:nth-child(4) h3 {
        font-size: 1.2rem;
    }
    
    .footer-column:nth-child(2) .footer-links a,
    .footer-column:nth-child(3) .footer-links a,
    .footer-column:nth-child(4) .footer-links a {
        font-size: 0.9rem;
        padding: 8px 12px;
    }
    
    .footer-column:nth-child(2) .footer-links li:last-child,
    .footer-column:nth-child(3) .footer-links li:last-child,
    .footer-column:nth-child(4) .footer-links li:last-child {
        margin-bottom: 15px;
    }
    
    .footer-column:nth-child(2) .footer-links a::before,
    .footer-column:nth-child(3) .footer-links a::before,
    .footer-column:nth-child(4) .footer-links a::before {
        transform: scale(0.9);
        margin-right: 8px;
        width: 20px;
        height: 20px;
        font-size: 1rem;
    }
}


/* 頁尾樣式 */


.fenglin-v2-site-footer {
    background-color: #2a2a2a;
    color: #ccc;
    padding: 60px 0 30px;
    position: relative;
    overflow: hidden;
}

.fenglin-v2-site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 100%;
    background-color: #2a2a2a;
    z-index: -1;
}      
        .fenglin-v2-footer-content {
            display: grid;
            grid-template-columns: 1fr;
            gap: 40px;
            margin-bottom: 40px;
        }
        
        @media (min-width: 768px) {
            .fenglin-v2-footer-content {
                grid-template-columns: repeat(2, 1fr);
            }
        }
        
        @media (min-width: 992px) {
            .fenglin-v2-footer-content {
                grid-template-columns: repeat(4, 1fr);
            }
        }
        
        .fenglin-v2-footer-section h3 {
            color: white;
            font-size: 1.3rem;
            margin-bottom: 20px;
            padding-bottom: 10px;
            border-bottom: 2px solid var(--fenglin-v2-secondary-color);
        }
        
        .fenglin-v2-footer-section p {
            line-height: 1.6;
            margin-bottom: 15px;
        }
        
        .fenglin-v2-contact-item {
            display: flex;
            align-items: flex-start;
            gap: 10px;
            margin-bottom: 15px;
        }
        
        .fenglin-v2-contact-icon {
            font-size: 1.2rem;
            min-width: 24px;
        }
        
        .fenglin-v2-social-links {
            display: flex;
            gap: 15px;
            margin-top: 20px;
        }
        
        .fenglin-v2-social-link {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 40px;
            height: 40px;
            background-color: #444;
            color: white;
            border-radius: 50%;
            text-decoration: none;
            font-size: 1.2rem;
            transition: var(--fenglin-v2-transition);
        }
        
        .fenglin-v2-social-link:hover {
            background-color: var(--fenglin-v2-primary-color);
            transform: translateY(-3px);
        }
        
        .fenglin-v2-map-container {
            border-radius: var(--fenglin-v2-border-radius);
            overflow: hidden;
            box-shadow: var(--fenglin-v2-shadow-sm);
        }
        
        .fenglin-v2-footer-links {
            list-style: none;
        }
        
        .fenglin-v2-footer-links li {
            margin-bottom: 10px;
        }
        
        .fenglin-v2-footer-links a {
            color: #ccc;
            text-decoration: none;
            transition: var(--fenglin-v2-transition);
        }
        
        .fenglin-v2-footer-links a:hover {
            color: var(--fenglin-v2-secondary-color);
            padding-left: 5px;
        }
        
        .fenglin-v2-footer-bottom {
            border-top: 1px solid #444;
            padding-top: 30px;
            text-align: center;
        }
