/* 1. CSS变量 */
:root {
    --primary: #e74c3c;
    --dark: #2c3e50;
    --light: #666;
    --bg: #f8f9fa;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --radius: 10px;
    --transition: 0.3s ease;
    --spacing: 1rem;
    --header-height: 120px;
    --container: 1200px;
    --bg-image-1: url('https://images.unsplash.com/photo-1499856871958-5b9627545d1a?w=1920&h=1080&fit=crop');
    --bg-image-2: url('https://images.unsplash.com/photo-1515542622106-78bda8ba0e5b?w=1920&h=1080&fit=crop');
    --bg-image-3: url('https://images.unsplash.com/photo-1513026705753-bc3fffca8bf4?w=1920&h=1080&fit=crop');
}

/* 2. 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font: 16px/1.6 'Microsoft YaHei';
    overflow-x: hidden;
    /* 防止横向滚动 */
    width: 100%;
}

/* 3. 布局工具类 */
.flex {
    display: flex;
    align-items: center;
}

.grid {
    display: grid;
    gap: var(--spacing);
}

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--spacing);
}

/* 4. 导航栏 */
header {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    background: #fff;
    height: var(--header-height);
    display: flex;
    justify-content: center;
}

header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
}

@media (prefers-color-scheme: dark) {
    header.scrolled {
        background: rgba(26, 32, 44, 0.95);
    }
}

/* header 内容容器 */
.header-container {
    display: flex;
    width: 100%;
    max-width: var(--container);
    padding: 0 2rem;
    align-items: center;
}

/* Logo 样式 */
.logo img {
    height: 120px;
    width: auto;
    display: block;
}

/* 导航栏样式 */
nav {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 2rem;
}

.logo {
    flex-shrink: 0;
}

.nav-links {
    margin-left: auto;
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--dark);
    text-decoration: none;
}

/* 导航栏激活状态 */
.nav-links a.active {
    color: var(--primary);
    font-weight: 600;
}

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

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

/* 5. Hero区域 */
.hero {
    min-height: 100vh;
    padding-top: var(--header-height);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    /* 添加默认背景 */
    background: linear-gradient(45deg, var(--dark), var(--primary));
    /* 默认渐变背景 */
    background-image: var(--bg-image-1);
    /* 图片会在加载完成后覆盖渐变背景 */
    background-size: cover;
    background-position: center;
    transition: background-image 0.3s ease;
    /* 平滑过渡 */
}

/* 可选：添加图片加载占位动画 */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.1) 50%,
            rgba(255, 255, 255, 0) 100%);
    animation: shimmer 1.5s infinite;
    pointer-events: none;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* Hero 内容样式优化 */
.hero-content {
    position: relative;
    z-index: 2;
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    color: white;
}

/* 标题样式优化 */
.hero h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-shadow: 2px 4px 8px rgba(0, 0, 0, 0.3);
    background: linear-gradient(to right, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0.8));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: fadeIn 1s ease-out;
}

/* 描述文字样式优化 */
.hero p {
    font-size: 1.4rem;
    margin-bottom: 2rem;
    font-weight: 400;
    letter-spacing: 1px;
    text-shadow: 1px 2px 4px rgba(0, 0, 0, 0.3);
    opacity: 0.9;
    line-height: 1.8;
}

/* Hero 特性样式优化 */
.hero-features {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 2.5rem 0;
}

.hero-feature {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.hero-feature:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.hero-feature i {
    color: var(--primary);
    margin-right: 0.5rem;
}

.hero-feature span {
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* 6. 线路卡片 */
.tour-grid,
.sales-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    /* 减小最小宽度 */
    gap: 2rem;
    margin: 2rem auto;
    max-width: var(--container);
    padding: 0 var(--spacing);
    width: 100%;
}

.tour-card,
.sales-card {
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease forwards;
    animation-delay: calc(var(--card-index, 0) * 0.1s);
}

.tour-card:hover,
.sales-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.tour-card:nth-child(1) {
    --card-index: 1;
}

.tour-card:nth-child(2) {
    --card-index: 2;
}

.tour-card:nth-child(3) {
    --card-index: 3;
}

/* 7. 模态框 */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
    padding: 2rem 1rem;
}

.modal-content {
    position: relative;
    background: white;
    border-radius: var(--radius);
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal.show .modal-content {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--light);
    background: var(--bg);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    padding: 0;
    z-index: 10;
}

.close-modal:hover {
    background: var(--primary);
    color: white;
    transform: rotate(90deg);
}

/* 8. 响应式 */
@media (max-width: 768px) {
    .nav-links.active {
        display: flex;
        flex-direction: column;
        background: white;
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        padding: 1rem 0;
        box-shadow: var(--shadow);
    }

    .nav-links a {
        padding: 1rem 2rem;
    }

    .nav-contact {
        display: none;
        /* 移动端隐藏联系方式 */
    }

    .menu-toggle {
        display: block;
        font-size: 1.5rem;
        padding: 0.5rem;
    }

    .tour-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        margin: 0;
        border-radius: 0;
    }
}

/* 修改 logo 样式 */
.logo img {
    height: 120px;
    width: auto;
    display: block;
    margin-left: 0;
    /* 确保靠左对齐 */
}

.nav-contact {
    display: none;
    /* 或者完全删除这个类的样式 */
}

/* 补充 Hero 区域样式 */
.hero-features {
    display: flex;
    justify-content: center;
    gap: var(--spacing);
    margin: 2rem 0;
}

.hero-feature {
    display: flex;
    align-items: center;
    gap: var(--spacing);
    padding: 0.8rem 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50px;
    backdrop-filter: blur(4px);
}

.hero-feature i {
    color: var(--primary);
}

.hero-feature span {
    color: white;
    font-weight: 500;
}

/* 补充线路卡片样式 */
.tour-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.tour-card h3 {
    padding: 1.2rem 1.5rem;
    color: var(--dark);
}

.tour-info {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 1.5rem;
    background: var(--bg);
}

.tour-highlights {
    padding: 1rem 1.5rem;
}

.tour-price {
    padding: 1rem 1.5rem;
    text-align: right;
}

.tour-price .price {
    font-size: 2rem;
    color: var(--primary);
}

.tour-card button {
    width: calc(100% - 3rem);
    margin: 0.5rem 1.5rem 1.5rem;
    padding: 1rem 0;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    z-index: 1;
}

.tour-card button:hover {
    background: var(--dark);
    transform: translateY(-2px);
}

.tour-card button i {
    pointer-events: none;
}

.tour-card button:hover i {
    transform: translateX(5px);
}

/* 补充其他必要样式... */

/* 补充 section 基础样式 */
section {
    padding: 4rem 5%;
    max-width: var(--container);
    margin: 0 auto;
    scroll-margin-top: var(--header-height);
    width: 100%;
    overflow: hidden;
    /* 防止子元素溢出 */
}

section h2 {
    text-align: center;
    font-size: 2.4rem;
    color: var(--dark);
    margin-bottom: 2rem;
}

/* 补充特色服务样式 */
.tour-features {
    display: flex;
    flex-wrap: wrap;
    /* 允许在小屏幕上换行 */
    justify-content: center;
    gap: 2rem;
    margin: 4rem auto;
    max-width: var(--container);
    padding: 0 var(--spacing);
    width: 100%;
}

/* 特色服务卡片样式 */
.feature {
    flex: 1;
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid transparent;
    /* 添加透明边框 */
    position: relative;
    /* 为伪元素定位 */
    overflow: hidden;
    /* 控制伪元素不溢出 */
}

.feature:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
    /* 显示边框 */
}

/* 图标样式 */
.feature i {
    font-size: 2.8rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
}

.feature:hover i {
    transform: scale(1.1);
    /* 图标放大效果 */
}

/* 标题样式 */
.feature h4 {
    font-size: 1.4rem;
    color: var(--dark);
    margin-bottom: 1rem;
}

/* 描述文字样式 */
.feature p {
    color: var(--light);
    line-height: 1.6;
}

/* 添加背景渐变效果 */
.feature::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), #f1c40f);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.feature:hover::before {
    transform: scaleX(1);
}

/* 关于我们样式优化 */
.about-content {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    margin: 3rem auto;
}

/* 公司介绍部分 */
.company-intro {
    line-height: 1.8;
    color: var(--light);
    background: white;
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* 优势和理念的容器 */
.about-bottom {
    display: flex;
    gap: 2rem;
    margin: 2rem 0;
}

/* 优势和理念卡片 */
.company-features,
.company-values {
    flex: 1;
    padding: 2rem;
    background: linear-gradient(45deg, var(--primary), #f1c40f);
    border-radius: var(--radius);
    color: white;
}

.company-features h3,
.company-values h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.company-features ul,
.company-values ul {
    list-style: none;
    padding: 0;
}

.company-features li,
.company-values li {
    margin: 0.8rem 0;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .about-bottom {
        flex-direction: column;
        /* 移动端时改为垂直排列 */
    }
}

/* 补充联系我们样式 */
.contact-info {
    background: var(--bg);
    padding: 2rem;
    border-radius: var(--radius);
    margin-bottom: 3rem;
}

.contact-info p {
    margin: 1rem 0;
    color: var(--light);
}

.contact-info i {
    color: var(--primary);
    margin-right: 1rem;
}

/* 销售团队整体样式 */
.sales-team {
    padding: 2rem;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.sales-team h3 {
    text-align: center;
    font-size: 1.8rem;
    color: var(--dark);
    margin-bottom: 3rem;
}

/* 顾问卡片网格布局 */
.sales-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin: 0 auto;
}

/* 顾问卡片样式 */
.sales-card {
    background: white;
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
    border: 1px solid #eee;
}

.sales-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

/* 二维码图片样式 */
.sales-card .qrcode {
    width: 180px;
    height: 180px;
    border-radius: 10px;
    margin: 0 auto 1.5rem;
    display: block;
}

/* 顾问信息样式 */
.sales-info h4 {
    font-size: 1.4rem;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.sales-info .title {
    color: var(--primary);
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.sales-info .specialty {
    background: var(--bg);
    color: var(--light);
    padding: 0.8rem 1.2rem;
    border-radius: 50px;
    font-size: 0.9rem;
    display: inline-block;
    margin-bottom: 1.5rem;
}

.sales-info .contact {
    color: #666;
    font-size: 0.9rem;
}

.sales-info .contact i {
    color: #07c160;
    /* 微信绿色 */
    margin-right: 0.5rem;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .sales-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .sales-card {
        max-width: 350px;
        margin: 0 auto;
    }
}

/* 页脚样式优化 */
footer {
    text-align: center;
    padding: 2rem;
    background: var(--dark);
    color: white;
}

footer p {
    margin: 0.5rem 0;
}

.beian a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.beian a:hover {
    color: white;
}

/* CTA按钮样式 */
.cta-button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
}

.cta-button:hover {
    background: var(--dark);
    transform: translateY(-2px);
}

/* 补充模态框内容样式 */
.tour-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin: 2rem 0;
}

.tour-highlights-detail ul {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.modal-body {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease 0.1s;
}

.modal.show .modal-body {
    opacity: 1;
    transform: translateY(0);
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal.show {
    animation: fadeIn 0.3s forwards;
}

/* 动画效果补充 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.menu-toggle {
    display: none;
    /* 默认隐藏 */
    background: none;
    border: none;
    cursor: pointer;
}

.menu-toggle:hover {
    color: var(--primary);
}

html {
    scroll-behavior: smooth;
}

/* 添加渐变边框效果 */
.tour-card::after,
.sales-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
    padding: 2px;
    background: linear-gradient(45deg, var(--primary), #f1c40f);
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tour-card:hover::after,
.sales-card:hover::after {
    opacity: 1;
}

/* 确保所有 section 不会溢出 */
section {
    padding: 4rem 5%;
    max-width: var(--container);
    margin: 0 auto;
    scroll-margin-top: var(--header-height);
    width: 100%;
    overflow: hidden;
    /* 防止子元素溢出 */
}

/* 确保图片不会溢出容器 */
img {
    max-width: 100%;
    height: auto;
}

/* 修改特色服务布局 */
.tour-features {
    display: flex;
    flex-wrap: wrap;
    /* 允许在小屏幕上换行 */
    justify-content: center;
    gap: 2rem;
    margin: 4rem auto;
    max-width: var(--container);
    padding: 0 var(--spacing);
    width: 100%;
}

/* 线路卡片样式优化 */
.tour-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: all 0.3s ease;
}

/* 图片容器 */
.img-container {
    position: relative;
    height: 220px;
    overflow: hidden;
}

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

.tour-card:hover .img-container img {
    transform: scale(1.05);
}

/* 卡片内容 */
.tour-card h3 {
    font-size: 1.5rem;
    color: var(--dark);
    padding: 1.5rem 1.5rem 0.5rem;
}

.tour-card>p {
    color: var(--light);
    padding: 0 1.5rem 1rem;
    font-size: 0.95rem;
}

/* 行程信息 */
.tour-info {
    display: flex;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: var(--bg);
    color: var(--light);
    font-size: 0.9rem;
}

.tour-info span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tour-info i {
    color: var(--primary);
}

/* 行程亮点 */
.tour-highlights {
    padding: 1.5rem;
}

.tour-highlights p {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--light);
    margin: 0.5rem 0;
    font-size: 0.95rem;
}

.tour-highlights i {
    color: var(--primary);
    font-size: 0.8rem;
}

/* 价格区域 */
.tour-price {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--bg);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.price-info {
    display: flex;
    align-items: baseline;
    gap: 0.3rem;
}

.price {
    font-size: 1.8rem;
    color: var(--primary);
    font-weight: bold;
}

.per-person {
    color: var(--light);
    font-size: 0.9rem;
}

/* 模态框内容样式 */
.tour-modal-content {
    color: var(--dark);
}

.tour-modal-content h2 {
    color: var(--dark);
    font-size: 2rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--bg);
}

.tour-description {
    color: var(--light);
    line-height: 1.8;
    margin-bottom: 2rem;
}

.tour-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin: 2rem 0;
}

.detail-item {
    background: var(--bg);
    padding: 1.5rem;
    border-radius: var(--radius);
    text-align: center;
}

.detail-item i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.detail-item h4 {
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.detail-item p {
    color: var(--light);
}

.tour-highlights-detail {
    margin: 2rem 0;
}

.tour-highlights-detail h3 {
    color: var(--dark);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tour-highlights-detail i {
    color: var(--primary);
}

.tour-highlights-detail ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    list-style: none;
    padding: 0;
}

.tour-highlights-detail li {
    position: relative;
    padding-left: 1.5rem;
    color: var(--light);
    line-height: 1.6;
}

.tour-highlights-detail li::before {
    content: '★';
    position: absolute;
    left: 0;
    color: var(--primary);
}

.tour-contact {
    margin-top: 2rem;
    padding: 2rem;
    background: var(--bg);
    border-radius: var(--radius);
    text-align: center;
}

.tour-contact h3 {
    color: var(--dark);
    margin-bottom: 1rem;
}

.tour-contact p {
    color: var(--light);
    margin-bottom: 1.5rem;
}

.tour-contact .phone {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    font-size: 1.5rem;
    font-weight: bold;
}

@media (max-width: 768px) {
    .tour-details {
        grid-template-columns: 1fr;
    }

    .tour-highlights-detail ul {
        grid-template-columns: 1fr;
    }
}