
/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft YaHei", "SimSun", sans-serif;
}

/* 全局配色变量 */
:root {
    --primary-brown: #8B7355;
    --light-brown: #D4C4B0;
    --bg-cream: #F8F5F0;
    --text-dark: #333333;
    --text-light: #666666;
    --white: #FFFFFF;
}

body {
    background-color: var(--bg-cream);
    color: var(--text-dark);
    line-height: 1.6;
}

/* 轮播横幅 - 移到最顶部 */
.banner {
    width: 100%;
    height: 500px;
    background: url('../images/1.webp') center/cover no-repeat;
    position: relative;
    overflow: hidden;
}

.banner::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(139, 115, 85, 0.2), rgba(139, 115, 85, 0.1));
}

/* 头部导航栏 - 放在banner下方 */
header {
    background-color: var(--primary-brown);
    padding: 18px 0;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    position: sticky;
    top: 0;
    z-index: 999;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo {
    color: var(--white);
    font-size: 28px;
    font-weight: bold;
    letter-spacing: 4px;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 40px;
}

/* 导航文字放大 */
nav a {
    color: var(--white);
    text-decoration: none;
    font-size: 18px;
    font-weight: 500;
    transition: all 0.3s;
    padding: 5px 2px;
}

nav a:hover {
    opacity: 0.9;
    border-bottom: 2px solid #fff;
}

/* 主体容器 */
.container {
    max-width: 1200px;
    margin: 50px auto;
    padding: 0 20px;
}

/* 走进玉溪模块 */
.section-title {
    text-align: center;
    font-size: 26px;
    color: var(--primary-brown);
    margin-bottom: 30px;
    font-weight: bold;
    letter-spacing: 2px;
}

.intro-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
    margin-bottom: 50px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--light-brown);
}

.intro-card {
    background-color: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 12px rgba(0,0,0,0.08);
    transition: transform 0.3s;
}

.intro-card:hover {
    transform: translateY(-8px);
}

.intro-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.intro-card h3 {
    text-align: center;
    padding: 15px 0 10px;
    color: var(--primary-brown);
    font-size: 18px;
    font-weight: bold;
}

.intro-card p {
    padding: 0 18px 22px;
    font-size: 15px;
    color: var(--text-light);
    line-height: 1.8;
}

/* 景点轮播模块 */
.scenic-carousel {
    position: relative;
    margin-bottom: 50px;
    padding: 0 10px;
}

.carousel-container {
    display: flex;
    gap: 18px;
    overflow: hidden;
    scroll-behavior: smooth;
}

.carousel-item {
    flex: 0 0 calc(20% - 14.4px);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 12px rgba(0,0,0,0.1);
    transition: 0.3s;
}

.carousel-item:hover {
    transform: scale(1.03);
}

.carousel-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background-color: rgba(139, 115, 85, 0.85);
    color: var(--white);
    border: none;
    border-radius: 50%;
    font-size: 22px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s;
}

.carousel-btn:hover {
    background-color: var(--primary-brown);
}

.prev-btn {
    left: -10px;
}

.next-btn {
    right: -10px;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--light-brown);
    cursor: pointer;
    transition: background-color 0.3s;
}

.dot.active {
    background-color: var(--primary-brown);
    width: 24px;
    border-radius: 5px;
}

/* 非遗美食模块 */
.food-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 50px;
}

.food-card {
    background-color: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 12px rgba(0,0,0,0.08);
    transition: transform 0.3s;
}

.food-card:hover {
    transform: translateY(-8px);
}

.food-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.food-card p {
    text-align: center;
    padding: 12px 0;
    color: var(--primary-brown);
    font-size: 16px;
    font-weight: 500;
}

/* 页脚 */
footer {
    background-color: var(--primary-brown);
    color: var(--white);
    padding: 30px 0;
    text-align: center;
    font-size: 15px;
}

footer ul {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 30px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

footer a {
    color: var(--white);
    text-decoration: none;
    transition: opacity 0.3s;
}

footer a:hover {
    opacity: 0.8;
}



/* 响应式适配 - DW/手机/平板完美兼容 */
@media (max-width: 992px) {
    .intro-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .carousel-item {
        flex: 0 0 calc(33.33% - 12px);
    }
    .food-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .banner {
        height: 320px;
    }
}

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 15px;
    }
    nav ul {
        gap: 20px;
        flex-wrap: wrap;
        justify-content: center;
    }
    nav a {
        font-size: 16px;
    }
    .banner {
        height: 240px;
    }
    .intro-grid {
        grid-template-columns: 1fr;
    }
    .carousel-item {
        flex: 0 0 calc(50% - 9px);
    }
    .food-grid {
        grid-template-columns: 1fr;
    }
    .prev-btn, .next-btn {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
}
