/* =========================================
   css/style.css - 完整版样式表
   ========================================= */

/* 1. 全局重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f4f4f4;
    color: #333;
    line-height: 1.6;
}

/* 2. 导航栏 (带联系方式) */
header {
    background-color: #2c3e50;
    color: #fff;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* 允许换行，防止手机端挤压 */
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
}

/* 联系方式列表样式 */
.contact-info {
    list-style: none;
    display: flex;
    gap: 15px; /* 各个联系方式之间的间距 */
}

.contact-info li a {
    color: #ecf0f1;
    text-decoration: none;
    font-size: 0.95rem;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 6px 12px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.contact-info li a:hover {
    background-color: #3498db;
    color: #fff;
}

/* 3. 头部大图区域 (完美居中) */
.hero {
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('../images/travel1.jpg');
    background-size: cover;
    background-position: center;
    height: 60vh;
    
    /* 核心居中代码 */
    display: flex;
    justify-content: center; /* 水平居中 */
    align-items: center;     /* 垂直居中 */
    
    text-align: center;
    color: #fff;
}

.hero-content {
    padding: 0 20px; /* 左右留白，防止小屏幕贴边 */
    max-width: 800px; /* 限制最大宽度 */
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 35px;
    background-color: #3498db;
    color: #fff;
    text-decoration: none;
    border-radius: 30px;
    font-weight: bold;
    transition: background 0.3s, transform 0.3s;
}

.btn:hover {
    background-color: #2980b9;
    transform: scale(1.05); /* 鼠标悬停稍微放大 */
}

/* 4. 图片画廊部分 */
.gallery-section {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    color: #2c3e50;
}

.gallery-grid {
    display: grid;
    /* 响应式网格：自动填充，最小宽度300px */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-5px);
}

.card img {
    width: 100%;
    height: 200px; /* 固定高度，防止参差不齐 */
    object-fit: cover; /* 保持图片比例，裁切多余部分 */
    display: block;
}

.card-info {
    padding: 15px;
}

.card-info h3 {
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.card-info p {
    font-size: 0.9rem;
    color: #666;
}

/* 5. 页脚 */
footer {
    background-color: #2c3e50;
    color: #fff;
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
}

/* =========================================
   6. 手机端适配 (屏幕宽度小于768px时生效)
   ========================================= */
@media (max-width: 768px) {
    /* 导航栏变成上下排列 */
    .nav-flex {
        flex-direction: column;
        gap: 15px;
    }
    
    /* 联系方式变成竖排，或者紧凑排列 */
    .contact-info {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }

    /* 头部文字稍微变小，防止溢出 */
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
}