/* ==========================================
   上海前灘雅辰酒店 - 設計樣式表 (CSS)
   ========================================== */

/* 1. 設計系統與變數 (Design Tokens) */
:root {
    --primary-color: #8E6F52;    /* 雅辰招牌溫潤木質調 */
    --primary-light: #B49A80;
    --primary-dark: #624933;
    
    --accent-color: #A0522D;     /* 侘寂陶土紅/赭石色 */
    --accent-hover: #CD853F;
    --accent-light: #EADBC8;     /* 溫暖米白色 */
    
    --bg-light: #FBF9F6;         /* 暖白紙感背景 */
    --bg-dark: #1C1714;          /* 溫潤暗褐灰背景 */
    --bg-dark-card: #2B231F;     /* 暗褐色卡片背景 */
    
    --text-main: #3E3835;        /* 暖深褐主字 */
    --text-muted: #7E7570;       /* 暖中灰副字 */
    --text-light: #FFFFFF;       /* 白色文字 */
    --text-gold: #EADBC8;        /* 米色文字 */
    
    --font-serif: 'Playfair Display', Georgia, serif;
    --font-sans: 'Noto Sans TC', 'Inter', -apple-system, sans-serif;
    
    --transition-smooth: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    --border-radius-sm: 8px;
    --border-radius-md: 16px;
    --border-radius-lg: 24px;
    
    --container-width: 1200px;
    --header-height: 80px;
}

/* 2. 重設與基礎樣式 (Reset & Base) */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    color: var(--text-main);
    background-color: var(--bg-light);
    line-height: 1.75;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-smooth);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

/* 3. 通用佈局與排版 (Utilities) */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

.section-padding {
    padding: 120px 0;
}

.dark-bg {
    background-color: var(--bg-dark);
    color: var(--text-light);
}

.text-center {
    text-align: center;
}

.section-header {
    max-width: 750px;
    margin: 0 auto 80px auto;
}

.section-tag {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--primary-color);
    text-transform: uppercase;
    margin-bottom: 14px;
}

.section-tag.tag-earth {
    color: var(--primary-light);
}

.section-title {
    font-family: var(--font-serif);
    font-size: 2.6rem;
    font-weight: 700;
    margin-bottom: 24px;
    letter-spacing: 1px;
    line-height: 1.35;
}

.text-white {
    color: var(--text-light) !important;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    font-weight: 300;
}

.text-beige {
    color: var(--primary-light) !important;
}

.section-desc {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.dark-bg .section-desc {
    color: #D6CFCB;
}

/* 按鈕樣式 */
.btn {
    display: inline-block;
    padding: 15px 30px;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 1.5px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition-smooth);
    border: 2px solid transparent;
}

.btn-earth {
    background-color: var(--primary-color);
    color: var(--text-light);
}

.btn-earth:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(142, 111, 82, 0.25);
}

.btn-earth-outline {
    background-color: transparent;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-earth-outline:hover {
    background-color: var(--primary-color);
    color: var(--text-light);
    transform: translateY(-2px);
}

.btn-white-outline {
    background-color: transparent;
    border-color: var(--text-light);
    color: var(--text-light);
}

.btn-white-outline:hover {
    background-color: var(--text-light);
    color: var(--text-main);
    transform: translateY(-2px);
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 4px;
    background-color: rgba(142, 111, 82, 0.1);
    color: var(--primary-color);
    border: 1px solid rgba(142, 111, 82, 0.2);
}

/* 4. 頂部導航欄 (Header) */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: transparent;
    z-index: 1000;
    transition: var(--transition-smooth);
    border-bottom: 1px solid rgba(142, 111, 82, 0.1);
}

.main-header.scrolled {
    background-color: rgba(251, 249, 246, 0.95);
    backdrop-filter: blur(10px);
    height: 70px;
    box-shadow: 0 4px 25px rgba(142, 111, 82, 0.08);
    border-bottom: 1px solid rgba(142, 111, 82, 0.15);
}

.nav-container {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon {
    font-size: 1.5rem;
}

.logo-text {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--text-main);
}

/* 滾動時若為暗色背景可調整 */
.main-header.scrolled .logo-text {
    color: var(--text-main);
}

.nav-links {
    display: flex;
    gap: 36px;
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
    position: relative;
    padding: 8px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition-smooth);
}

.nav-links a:hover {
    color: var(--text-main);
}

.nav-links a:hover::after {
    width: 100%;
}

/* 預設非 scrolled 狀態下在 Hero 上需要白色文字 */
body:not(.scrolled-active) .main-header:not(.scrolled) .logo-text {
    color: var(--text-light);
}
body:not(.scrolled-active) .main-header:not(.scrolled) .nav-links a {
    color: rgba(255, 255, 255, 0.85);
}
body:not(.scrolled-active) .main-header:not(.scrolled) .nav-links a:hover {
    color: var(--text-light);
}
body:not(.scrolled-active) .main-header:not(.scrolled) .btn-earth-outline {
    border-color: var(--text-light);
    color: var(--text-light);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* 手機版選單切換按鈕 */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
}

.mobile-toggle .bar {
    width: 24px;
    height: 2px;
    background-color: var(--text-main);
    transition: var(--transition-smooth);
}

body:not(.scrolled-active) .main-header:not(.scrolled) .mobile-toggle .bar {
    background-color: var(--text-light);
}

/* 5. 英雄橫幅 (Hero Section) */
.hero {
    position: relative;
    height: 100vh;
    min-height: 650px;
    display: flex;
    align-items: center;
    background-color: var(--bg-dark);
    /* 侘寂感木色漸層 */
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(142, 111, 82, 0.25) 0%, transparent 60%),
        linear-gradient(135deg, #181412 0%, #2f2520 50%, #46372f 100%);
    color: var(--text-light);
    overflow: hidden;
}

.hero-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.2) 60%, rgba(28, 23, 20, 1) 100%);
    z-index: 1;
}

.hero-container {
    position: relative;
    z-index: 2;
    padding-top: 80px;
}

.hero-content {
    max-width: 800px;
}

.hero-badge {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 5px;
    color: var(--primary-light);
    border: 1px solid rgba(180, 154, 128, 0.4);
    padding: 6px 16px;
    margin-bottom: 24px;
    background-color: rgba(28, 23, 20, 0.5);
    backdrop-filter: blur(5px);
    border-radius: 4px;
}

.hero-title {
    font-family: var(--font-serif);
    font-size: 4.2rem;
    line-height: 1.25;
    font-weight: 700;
    margin-bottom: 28px;
    letter-spacing: 2px;
}

.hero-title span {
    color: var(--primary-light);
    background: linear-gradient(120deg, var(--primary-light) 0%, #ecd3b0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-description {
    font-size: 1.15rem;
    font-weight: 300;
    line-height: 1.85;
    color: rgba(251, 249, 246, 0.85);
    margin-bottom: 44px;
    max-width: 680px;
}

.hero-actions {
    display: flex;
    gap: 20px;
}

/* 滾動指示器 */
.hero-scroll-indicator {
    position: absolute;
    bottom: 35px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 2;
    opacity: 0.8;
}

.hero-scroll-indicator .mouse {
    width: 24px;
    height: 40px;
    border: 2px solid rgba(251, 249, 246, 0.35);
    border-radius: 20px;
    position: relative;
}

.hero-scroll-indicator .wheel {
    width: 4px;
    height: 8px;
    background-color: var(--primary-light);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollWheel 2s infinite;
}

.hero-scroll-indicator .text {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 2px;
    color: rgba(251, 249, 246, 0.55);
    text-transform: uppercase;
}

@keyframes scrollWheel {
    0% { opacity: 1; transform: translate(-50%, 0); }
    100% { opacity: 0; transform: translate(-50%, 14px); }
}

/* 6. Section 1: 品牌理念 (Concept) */
.concept-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 80px;
    align-items: center;
}

.concept-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 40px;
}

.feature-item {
    display: flex;
    flex-direction: column;
}

.feature-icon {
    font-size: 2.2rem;
    margin-bottom: 16px;
}

.feature-item h4 {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--primary-dark);
}

.feature-item p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.concept-visual {
    position: relative;
    height: 480px;
    border-radius: var(--border-radius-lg);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    box-shadow: 0 35px 70px rgba(142, 111, 82, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    overflow: hidden;
}

.clay-decoration {
    position: absolute;
    bottom: -60px;
    left: -60px;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(160, 82, 45, 0.25) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 1;
}

.spotlight-card {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--border-radius-md);
    padding: 44px;
    color: var(--text-light);
    z-index: 2;
    text-align: center;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

.spotlight-badge {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--text-light);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 4px;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.spotlight-card h3 {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    color: var(--accent-light);
    margin-bottom: 16px;
    letter-spacing: 1px;
}

.spotlight-card p {
    font-size: 0.95rem;
    line-height: 1.8;
    color: rgba(251, 249, 246, 0.8);
}

/* 7. Section 2: 雅辰時光故事時間軸 (Timeline) */
.timeline-wrapper {
    position: relative;
    max-width: 1000px;
    margin: 60px auto 0 auto;
    padding: 20px 0;
}

/* 中間縱線 */
.timeline-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: linear-gradient(to bottom, transparent, rgba(180, 154, 128, 0.3) 10%, rgba(180, 154, 128, 0.3) 90%, transparent);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    width: 50%;
    padding: 0 40px;
    margin-bottom: 80px;
    display: flex;
}

/* 偶數卡片排在右邊 */
.timeline-item:nth-child(even) {
    left: 50%;
    justify-content: flex-start;
}

/* 奇數卡片排在左邊 */
.timeline-item:nth-child(odd) {
    left: 0;
    justify-content: flex-end;
    text-align: right;
}

/* 軸點 */
.timeline-dot {
    position: absolute;
    top: 24px;
    width: 14px;
    height: 14px;
    background-color: var(--accent-color);
    border: 3px solid var(--bg-dark);
    border-radius: 50%;
    z-index: 10;
    box-shadow: 0 0 0 3px rgba(160, 82, 45, 0.4);
    transition: var(--transition-smooth);
}

.timeline-item:nth-child(even) .timeline-dot {
    left: -7px;
}

.timeline-item:nth-child(odd) .timeline-dot {
    right: -7px;
}

.timeline-item:hover .timeline-dot {
    background-color: var(--text-light);
    box-shadow: 0 0 0 6px var(--accent-color);
}

/* 時間標籤 */
.timeline-time {
    position: absolute;
    top: 18px;
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-light);
    letter-spacing: 1px;
}

.timeline-item:nth-child(even) .timeline-time {
    left: -120px;
    text-align: right;
    width: 80px;
}

.timeline-item:nth-child(odd) .timeline-time {
    right: -120px;
    text-align: left;
    width: 80px;
}

/* 內容卡片 */
.timeline-content-card {
    width: 100%;
    max-width: 440px;
    background-color: var(--bg-dark-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    transition: var(--transition-smooth);
}

.timeline-item:hover .timeline-content-card {
    transform: translateY(-6px);
    border-color: rgba(180, 154, 128, 0.25);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.35);
}

.timeline-img-wrapper {
    position: relative;
    height: 240px;
    overflow: hidden;
    cursor: pointer;
}

.timeline-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.timeline-item:hover .timeline-img {
    transform: scale(1.05);
}

.img-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.35);
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.timeline-img-wrapper:hover .img-overlay {
    opacity: 1;
}

.zoom-icon {
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 500;
    background-color: rgba(142, 111, 82, 0.85);
    padding: 6px 16px;
    border-radius: 20px;
    border: 1px solid rgba(234, 219, 200, 0.3);
}

.timeline-body {
    padding: 24px;
}

.timeline-body h3 {
    font-family: var(--font-serif);
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-light);
}

.timeline-body p {
    font-size: 0.88rem;
    color: #C0B7B3;
    line-height: 1.7;
}

/* 8. Section 3: 思方匯 (Townsquare) */
.townsquare-showcase-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 40px;
}

.ts-showcase-card {
    background-color: var(--text-light);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: 0 20px 45px rgba(142, 111, 82, 0.05);
    transition: var(--transition-smooth);
    border: 1px solid rgba(142, 111, 82, 0.06);
}

.ts-showcase-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 60px rgba(142, 111, 82, 0.12);
    border-color: rgba(142, 111, 82, 0.2);
}

.ts-img-container {
    position: relative;
    height: 320px;
    overflow: hidden;
    cursor: pointer;
}

.ts-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.ts-showcase-card:hover .ts-img {
    transform: scale(1.04);
}

.ts-showcase-card:hover .img-overlay {
    opacity: 1;
}

.ts-info {
    padding: 36px;
}

.ts-info h3 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 16px;
}

.ts-info p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.75;
}

/* 9. Section 4: 旅人相簿 (Gallery) */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 240px;
    gap: 20px;
    margin-top: 40px;
}

/* 相簿拼接排版 */
.gallery-item {
    position: relative;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.gallery-item:nth-child(1) { grid-column: span 2; grid-row: span 2; }
.gallery-item:nth-child(2) { grid-column: span 2; grid-row: span 1; }
.gallery-item:nth-child(5) { grid-column: span 2; grid-row: span 1; }
.gallery-item:nth-child(9) { grid-column: span 2; grid-row: span 1; }
.gallery-item:nth-child(11) { grid-column: span 4; grid-row: span 1; }

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.gallery-hover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(28, 23, 20, 0.95) 0%, rgba(142, 111, 82, 0.3) 100%);
    opacity: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px;
    transition: var(--transition-smooth);
}

.gallery-item:hover .gallery-img {
    transform: scale(1.05);
}

.gallery-item:hover .gallery-hover {
    opacity: 1;
}

.plus-icon {
    font-size: 1.8rem;
    color: var(--primary-light);
    position: absolute;
    top: 20px;
    right: 20px;
}

.gallery-hover h4 {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    color: var(--text-light);
    margin-bottom: 6px;
    font-weight: 600;
}

.gallery-hover p {
    font-size: 0.85rem;
    color: var(--primary-light);
}

/* 10. Lightbox 燈箱 */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(18, 14, 12, 0.97);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 85%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border: 3px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
    border-radius: var(--border-radius-sm);
}

.lightbox-caption {
    color: var(--text-light);
    margin-top: 20px;
    font-size: 1rem;
    text-align: center;
    font-weight: 300;
    max-width: 650px;
    line-height: 1.7;
    background-color: rgba(28, 23, 20, 0.8);
    padding: 12px 24px;
    border-radius: 30px;
    border: 1px solid rgba(180, 154, 128, 0.15);
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 30px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 3rem;
    background: none;
    border: none;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.lightbox-close:hover {
    color: var(--primary-light);
}

.lightbox-prev, .lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 3rem;
    cursor: pointer;
    padding: 20px;
    transition: var(--transition-smooth);
}

.lightbox-prev:hover, .lightbox-next:hover {
    color: var(--primary-light);
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

/* 11. 頁尾 (Footer) */
.site-footer {
    background-color: var(--bg-dark);
    color: var(--text-light);
    padding: 90px 0 40px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-container {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 80px;
    margin-bottom: 60px;
}

.footer-brand h3 {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    margin: 12px 0 6px 0;
    color: var(--primary-light);
    letter-spacing: 1px;
}

.brand-sub {
    font-size: 0.85rem;
    color: #9E8E85;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 24px;
}

.brand-desc {
    font-size: 0.9rem;
    color: #C0B7B3;
    max-width: 480px;
    line-height: 1.8;
}

.footer-links-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.footer-links h4 {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    color: var(--text-light);
    margin-bottom: 24px;
    letter-spacing: 1px;
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.footer-links ul a {
    font-size: 0.9rem;
    color: #C0B7B3;
}

.footer-links ul a:hover {
    color: var(--primary-light);
    padding-left: 6px;
}

.footer-links p {
    font-size: 0.9rem;
    color: #C0B7B3;
    margin-bottom: 14px;
    line-height: 1.7;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding-top: 30px;
}

.footer-bottom-container {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #7E7570;
}

/* 12. 滾動動畫 (Scroll reveal) */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-on-scroll.appear {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s forwards ease;
}

.delay-1 { animation-delay: 0.2s; transition-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; transition-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; transition-delay: 0.6s; }

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

/* 13. 響應式網頁設計 (Media Queries) */
@media (max-width: 1024px) {
    .section-padding {
        padding: 90px 0;
    }
    
    .hero-title {
        font-size: 3.4rem;
    }
    
    .concept-grid {
        grid-template-columns: 1fr;
        gap: 60px;
    }
    
    .concept-visual {
        height: 400px;
    }
    
    /* 中型螢幕時間軸調整為單側 */
    .timeline-line {
        left: 20px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 50px;
        padding-right: 0;
        margin-bottom: 50px;
    }
    
    .timeline-item:nth-child(even),
    .timeline-item:nth-child(odd) {
        left: 0;
        justify-content: flex-start;
        text-align: left;
    }
    
    .timeline-item:nth-child(even) .timeline-dot,
    .timeline-item:nth-child(odd) .timeline-dot {
        left: 13px;
        right: auto;
    }
    
    .timeline-item:nth-child(even) .timeline-time,
    .timeline-item:nth-child(odd) .timeline-time {
        position: relative;
        top: 0;
        left: 0;
        right: auto;
        display: block;
        width: auto;
        margin-bottom: 10px;
        text-align: left;
    }
    
    .timeline-content-card {
        max-width: 100%;
    }
    
    .townsquare-showcase-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 200px;
    }
    
    .gallery-item:nth-child(1) { grid-column: span 2; grid-row: span 2; }
    .gallery-item:nth-child(5) { grid-column: span 2; grid-row: span 1; }
    .gallery-item:nth-child(9) { grid-column: span 2; grid-row: span 1; }
    
    .footer-container {
        grid-template-columns: 1fr;
        gap: 50px;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 70px;
    }
    
    .hero-title {
        font-size: 2.4rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .hero-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .hero-actions .btn {
        width: 100%;
        text-align: center;
    }
    
    .section-title {
        font-size: 1.9rem;
    }
    
    .mobile-toggle {
        display: flex;
        z-index: 1100;
    }
    
    /* 手機選單彈出抽屜 */
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background-color: var(--bg-dark);
        display: flex;
        align-items: center;
        justify-content: center;
        transition: var(--transition-smooth);
        z-index: 1050;
        box-shadow: -10px 0 40px rgba(0,0,0,0.5);
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-links {
        flex-direction: column;
        align-items: center;
        gap: 36px;
    }
    
    .nav-links a {
        font-size: 1.2rem;
        color: var(--text-light);
    }
    
    /* 漢堡按鈕旋轉動畫 */
    .mobile-toggle.active .bar:nth-child(1) {
        transform: rotate(45deg) translate(5px, 6px);
        background-color: var(--text-light);
    }
    
    .mobile-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-toggle.active .bar:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -6px);
        background-color: var(--text-light);
    }
    
    .ts-img-container {
        height: 240px;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 250px;
    }
    
    .gallery-item:nth-child(1) { grid-column: span 1; grid-row: span 1; }
    .gallery-item:nth-child(5) { grid-column: span 1; grid-row: span 1; }
    .gallery-item:nth-child(9) { grid-column: span 1; grid-row: span 1; }
    
    .footer-bottom-container {
        flex-direction: column;
        align-items: center;
        gap: 12px;
        text-align: center;
    }
}
