/* ==================== 全局樣式 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #8B0000;
    --secondary-color: #D4AF37;
    --light-bg: #FFF8DC;
    --dark-text: #1a1a1a;
    --accent-color: #C41E3A;
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Microsoft YaHei', '微軟雅黑', SimHei, '黑體', Arial, sans-serif;
    color: var(--dark-text);
    line-height: 1.6;
    background-color: #f9f9f9;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==================== 導航欄 ==================== */
.navbar {
    background: linear-gradient(135deg, var(--primary-color) 0%, #a01a1a 100%);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--secondary-color);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--secondary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 5px 0;
    transition: var(--transition);
}

/* ==================== 英雄區域 ==================== */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    padding: 80px 0;
    gap: 40px;
    background: linear-gradient(135deg, rgba(139, 0, 0, 0.05) 0%, rgba(212, 175, 55, 0.05) 100%);
}

.hero-content h1 {
    font-size: 3.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-content p {
    font-size: 1.3rem;
    color: #555;
    margin-bottom: 2rem;
}

.cta-button {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(139, 0, 0, 0.3);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(139, 0, 0, 0.4);
}

.hero-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

/* ==================== 通用區域樣式 ==================== */
section {
    padding: 60px 0;
}

.section-title {
    font-size: 2.8rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-align: center;
}

.section-subtitle {
    font-size: 1.2rem;
    color: #777;
    text-align: center;
    margin-bottom: 3rem;
}

/* ==================== 哲學思想區域 ==================== */
.philosophy {
    background-color: #fff;
}

.philosophy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 3rem;
}

.philosophy-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    border-top: 5px solid var(--primary-color);
}

.philosophy-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.philosophy-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.philosophy-card h3 {
    padding: 1.5rem 1.5rem 0.5rem;
    color: var(--primary-color);
    font-size: 1.5rem;
}

.philosophy-card p {
    padding: 0 1.5rem 1.5rem;
    color: #666;
    line-height: 1.8;
}

/* ==================== 藝術文化區域 ==================== */
.art {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.05) 0%, rgba(139, 0, 0, 0.05) 100%);
}

.art-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 3rem;
}

.art-item {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.art-item:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.art-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: var(--transition);
}

.art-item:hover img {
    filter: brightness(0.9);
}

.art-info {
    padding: 1.5rem;
}

.art-info h3 {
    color: var(--primary-color);
    margin-bottom: 0.8rem;
    font-size: 1.3rem;
}

.art-info p {
    color: #666;
    line-height: 1.7;
}

/* ==================== 飲食文化區域 ==================== */
.cuisine {
    background-color: #fff;
}

.cuisine-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 25px;
    margin-top: 3rem;
}

.cuisine-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    position: relative;
}

.cuisine-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.cuisine-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: var(--transition);
}

.cuisine-card:hover img {
    filter: brightness(0.85);
}

.cuisine-card h3 {
    padding: 1.2rem 1.2rem 0.5rem;
    color: var(--primary-color);
    font-size: 1.3rem;
}

.cuisine-card p {
    padding: 0 1.2rem;
    color: #666;
    font-size: 0.95rem;
}

.region {
    display: inline-block;
    background: var(--secondary-color);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    margin: 1rem 1.2rem;
}

/* ==================== 節慶傳統區域 ==================== */
.festivals {
    background: linear-gradient(135deg, rgba(139, 0, 0, 0.05) 0%, rgba(212, 175, 55, 0.05) 100%);
}

.festivals-timeline {
    margin-top: 3rem;
    position: relative;
}

.festivals-timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.timeline-item {
    margin-bottom: 50px;
    position: relative;
}

.timeline-item:nth-child(odd) {
    margin-left: 0;
    margin-right: auto;
    padding-right: 50%;
    text-align: right;
}

.timeline-item:nth-child(even) {
    margin-left: auto;
    margin-right: 0;
    padding-left: 50%;
}

.timeline-dot {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    background: var(--secondary-color);
    border: 4px solid white;
    border-radius: 50%;
    top: 20px;
    z-index: 2;
    box-shadow: 0 0 0 4px var(--primary-color);
}

.timeline-content {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.timeline-content h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.timeline-content p {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.8;
}

.timeline-content img {
    width: 100%;
    border-radius: 8px;
    max-height: 250px;
    object-fit: cover;
}

/* ==================== 聯絡區域 ==================== */
.contact {
    background-color: #fff;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-top: 3rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-form input,
.contact-form textarea {
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(139, 0, 0, 0.2);
}

.submit-button {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    font-weight: bold;
    transition: var(--transition);
}

.submit-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(139, 0, 0, 0.3);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.info-item {
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(139, 0, 0, 0.05) 0%, rgba(212, 175, 55, 0.05) 100%);
    border-left: 5px solid var(--primary-color);
    border-radius: 8px;
}

.info-item h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.info-item p {
    color: #666;
}

/* ==================== 頁腳 ==================== */
.footer {
    background: linear-gradient(135deg, var(--primary-color) 0%, #a01a1a 100%);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer p {
    margin: 0.5rem 0;
}

/* ==================== 響應式設計 ==================== */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        display: none;
    }

    .nav-menu.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--primary-color);
        padding: 1rem;
        gap: 1rem;
    }

    .hero {
        grid-template-columns: 1fr;
        padding: 40px 0;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }

    .hero-image {
        order: -1;
    }

    .section-title {
        font-size: 2rem;
    }

    .festivals-timeline::before {
        left: 10px;
    }

    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even) {
        padding-left: 60px;
        padding-right: 0;
        text-align: left;
        margin-left: 0;
        margin-right: 0;
    }

    .timeline-dot {
        left: 0;
        transform: translateX(0);
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .philosophy-grid,
    .art-grid,
    .cuisine-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.8rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .nav-menu {
        gap: 1rem;
    }
}
