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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

/* 变量 */
:root {
    --primary-color: #e63946; /* 重庆红 */
    --secondary-color: #1d3557; /* 深蓝 */
    --light-color: #f1faee;
    --dark-color: #2b2d42;
    --transition: all 0.3s ease;
}

/* 导航栏 */
#navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: transparent;
    padding: 1.5rem 0;
    z-index: 1000;
    transition: var(--transition);
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

#navbar.scrolled .logo h1,
#navbar.scrolled .nav-links a,
#navbar.scrolled .hamburger {
    color: var(--dark-color);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo h1 {
    color: #fff;
    font-size: 1.8rem;
    transition: var(--transition);
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

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

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

.hamburger {
    display: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
}

/* 主视觉区 */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('https://images.unsplash.com/photo-1550989460-0adf9ea622e2?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
}

.hero-content {
    max-width: 800px;
    padding: 0 2rem;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--primary-color);
    color: #fff;
    text-decoration: none;
    border-radius: 30px;
    font-size: 1.2rem;
    font-weight: bold;
    transition: var(--transition);
    border: 2px solid var(--primary-color);
}

.btn:hover {
    background: transparent;
    color: var(--primary-color);
}

/* 通用区块样式 */
.section {
    padding: 5rem 0;
}

.bg-light {
    background: #f9f9f9;
}

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

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--dark-color);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--primary-color);
}

/* 城市简介 */
.about-content {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.about-text {
    flex: 1;
}

.about-text h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.about-text p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.features {
    list-style: none;
    margin-top: 2rem;
}

.features li {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.features i {
    color: var(--primary-color);
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.about-image {
    flex: 1;
}

.about-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* 著名景点 */
.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

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

.card-img {
    height: 250px;
    overflow: hidden;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card:hover .card-img img {
    transform: scale(1.1);
}

.card-content {
    padding: 1.5rem;
}

.card-content h3 {
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
}

/* 特色美食 */
.food-content {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.food-image {
    flex: 1;
}

.food-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.food-text {
    flex: 1;
}

.food-text h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.food-text > p {
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.food-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

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

.food-item i {
    color: var(--primary-color);
    margin-right: 10px;
}

/* 页脚 */
footer {
    background: var(--dark-color);
    color: #fff;
    padding: 3rem 0 1rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.footer-logo h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.social-links a {
    color: #fff;
    font-size: 1.5rem;
    margin-left: 1rem;
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* 动画类 */
.fade-in {
    opacity: 0;
    animation: fadeIn 1s ease forwards;
}

.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.delay-1 {
    animation-delay: 0.3s;
}

.delay-2 {
    animation-delay: 0.6s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 响应式设计 */
@media (max-width: 992px) {
    .about-content,
    .food-content {
        flex-direction: column;
    }
    
    .about-image,
    .food-image {
        order: -1;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 70%;
        background: var(--dark-color);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: var(--transition);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        margin: 1.5rem 0;
    }

    .hamburger {
        display: block;
        z-index: 1001;
    }

    #navbar.scrolled .hamburger {
        color: var(--dark-color);
    }

    .hamburger.active {
        color: #fff !important;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .hero p {
        font-size: 1.2rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
}