/* 重慶成都九寨溝8日7夜家族旅行網頁版行程指南 - 樣式表 */

/* 基本樣式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 基本字體和顏色設置 */
:root {
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --accent-color: #e74c3c;
    --text-color: #333;
    --light-text: #666;
    --bg-color: #f9f9f9;
    --card-bg: #fff;
    --border-color: #ddd;
    --header-bg: #2c3e50;
    --header-text: #fff;
}

body {
    font-family: 'Noto Sans TC', 'Microsoft JhengHei', sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
}

/* 容器樣式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* 頁頭樣式 */
header {
    background-color: var(--header-bg);
    color: var(--header-text);
    padding: 20px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: relative;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
}

.logo a {
    color: var(--header-text);
    text-decoration: none;
}

/* 導航樣式 */
nav ul {
    display: flex;
    list-style: none;
    flex-wrap: wrap;
}

nav ul li {
    margin-left: 20px;
    margin-bottom: 5px;
}

nav ul li a {
    color: var(--header-text);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: var(--secondary-color);
}

/* 主要內容區域 */
main {
    padding: 40px 0;
}

/* 頁腳樣式 */
footer {
    background-color: var(--header-bg);
    color: var(--header-text);
    padding: 20px 0;
    text-align: center;
    margin-top: 40px;
}

/* 卡片樣式 */
.card {
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 30px;
}

.card ul,
.card ol {
    padding-left: 24px;
}

.card li {
    padding-left: 8px;
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--primary-color);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

/* 住宿安排樣式 */
.accommodation {
    margin: 20px 0;
}

.accommodation-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.accommodation-days {
    background-color: var(--primary-color);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    margin-right: 15px;
    font-weight: bold;
}

/* 行程預覽樣式 */
.itinerary-preview {
    margin: 20px 0;
}

.day-preview {
    display: block;
    padding: 15px;
    margin-bottom: 15px;
    background-color: var(--card-bg);
    border-left: 5px solid var(--primary-color);
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    text-decoration: none;
    color: var(--text-color);
    transition: transform 0.3s, box-shadow 0.3s;
}

.day-preview:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.day-title {
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 5px;
}

/* 預算總結樣式 */
.budget-summary {
    margin: 20px 0;
}

.budget-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.budget-total {
    font-weight: bold;
    margin-top: 15px;
    text-align: right;
}

/* 每日行程頁面樣式 */
.day-header {
    background-color: var(--primary-color);
    color: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.day-header h1 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.day-header .date {
    font-size: 1.2rem;
    opacity: 0.9;
}

.section {
    margin-bottom: 30px;
}

.section-title {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.section-title i {
    margin-right: 10px;
}

/* 行程項目樣式 */
.itinerary-item {
    margin-bottom: 25px;
    padding-left: 20px;
    border-left: 3px solid var(--secondary-color);
}

.itinerary-item h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--secondary-color);
}

/* 地圖連結樣式 */
.map-link {
    color: var(--primary-color);
    text-decoration: underline;
}

/* 圖片樣式 */
.image-container {
    margin: 20px 0;
    border-radius: 8px;
    overflow: hidden;
    max-height: 500px;
}

.image-container img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    transition: transform 0.3s ease;
    will-change: transform;
}

.image-container:hover img {
    transform: scale(1.02);
}

/* 實用提示樣式 */
.tips {
    background-color: #f8f9fa;
    border-left: 5px solid var(--secondary-color);
    padding: 15px;
    margin: 20px 0;
    border-radius: 5px;
}

/* 美食輪播樣式 */
.food-slider-container {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 20px;
}
        
.food-slide {
    flex: 0 0 auto;
    width: 250px;
    margin-right: 15px;
    scroll-snap-align: start;
}

.food-slide img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.food-slide:hover img {
    transform: scale(1.05);
}

.food-slide p {
    text-align: center;
    margin-top: 8px;
    font-size: 0.9rem;
}

.food-category {
    margin-top: 30px;
    margin-bottom: 10px;
    font-weight: bold;
    color: var(--primary-color);
}

/* 導航按鈕樣式 */
.nav-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
}

.nav-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s, transform 0.2s;
}

.nav-button:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

.nav-button.disabled {
    background-color: var(--light-text);
    cursor: not-allowed;
}

.nav-button.home {
    background-color: var(--secondary-color);
}

.nav-button.home:hover {
    background-color: #27ae60;
}

/* 首頁英雄區域 */
.hero {
    position: relative;
    height: 500px;
    background-image: url('/images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-bottom: 40px;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 0 20px;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

/* 行程總結樣式 */
.summary-text {
    line-height: 1.8;
}

.summary-text p {
    margin-bottom: 15px;
}

/* 優化圖片加載 */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 響應式設計 */
@media (max-width: 992px) {
    .hero {
        height: 400px;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .image-container {
        max-height: 400px;
    }
}

@media (max-width: 768px) {
    .logo {
        font-size: 1.5rem;
    }
    
    nav ul li {
        margin-left: 15px;
    }
    
    .route {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .route-item {
        margin-bottom: 10px;
    }
    
    .accommodation-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .accommodation-days {
        margin-bottom: 10px;
    }
    
    .food-slide {
        width: 200px;
    }
    
    .hero {
        height: 350px;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .day-header h1 {
        font-size: 1.8rem;
    }
    
    .image-container {
        max-height: 350px;
    }
}

@media (max-width: 576px) {
header .container {
    flex-direction: column;
}
.logo {
    margin-bottom: 15px;
}
    
    nav {
        width: 100%;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    nav ul li {
        margin: 5px 10px;
    }
    
    .day-header h1 {
        font-size: 1.5rem;
    }
    
    .day-header .date {
        font-size: 1rem;
    }
    
    .card-title {
        font-size: 1.3rem;
    }
    
    .section-title {
        font-size: 1.2rem;
    }
    
    .itinerary-item h3 {
        font-size: 1.1rem;
    }
    
    .food-slide {
        width: 160px;
    }
    
    .hero {
        height: 300px;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .nav-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-button {
        text-align: center;
    }
    
    .image-container {
        max-height: 300px;
    }
}

/* 加載優化 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* 打印樣式 */
@media print {
    header, footer, .nav-buttons {
        display: none;
    }
    
    body {
        background-color: white;
        color: black;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
    }
    
    .image-container {
        max-height: none;
    }
    
    .day-header {
        background-color: white;
        color: black;
        border: 1px solid #ddd;
    }
    
    a {
        color: black;
        text-decoration: none;
    }
    
    .map-link::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
    }
}

