/* style.css - VisitCanton.net */

:root {
    --primary-color: #0056b3; /* 商务蓝 */
    --accent-color: #ff6b6b;  /* 活力橙 */
    --text-dark: #333333;
    --text-light: #666666;
    --bg-light: #f8f9fa;
    --white: #ffffff;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

a { text-decoration: none; color: inherit; }

/* 导航栏 */
header {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

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

.logo { font-size: 1.5rem; font-weight: bold; color: var(--primary-color); }
.nav-links a { margin-left: 20px; font-weight: 500; color: var(--text-dark); }
.nav-links a:hover { color: var(--accent-color); }

/* 首屏 Hero Section */
.hero {
background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('../images/hero.jpg');
    background-size: cover;
    background-position: center;
    height: 80vh; /* 占据屏幕80%的高度 */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    margin-top: 60px;
}

.hero-content h1 { font-size: 3rem; margin-bottom: 1rem; }
.hero-content p { font-size: 1.2rem; margin-bottom: 2rem; }

.btn-main {
    background: var(--accent-color);
    color: var(--white);
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: bold;
    transition: 0.3s;
}
.btn-main:hover { background: #ff5252; }

/* 内容容器 */
.container { max-width: 1200px; margin: 0 auto; padding: 40px 20px; }

/* 特色板块 Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: -50px; /* 让卡片稍微重叠Hero区域，更有设计感 */
    position: relative;
    z-index: 10;
}

.feature-card {
    background: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    /* 新增：让卡片高度一致，按钮沉底 */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%; 
}

/* 工具板块 */
.tools-section { text-align: center; padding: 60px 0; }
.tools-section h2 { margin-bottom: 30px; font-size: 2rem; }

/* 页脚 */
footer {
    background: var(--text-dark);
    color: var(--white);
    text-align: center;
    padding: 20px;
    margin-top: 50px;
}

/* --- 新增：Travel Essentials 板块样式 --- */
.essentials-section {
    background-color: #f0f7ff; /* 淡淡的蓝色背景，区别于白色 */
    padding: 60px 0;
    margin-top: 50px;
}

.essentials-header {
    text-align: center;
    margin-bottom: 40px;
}

.essentials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* 自动适应手机和电脑 */
    gap: 20px;
}

.info-box {
    background: white;
    padding: 25px;
    border-radius: 8px;
    border-left: 4px solid var(--accent-color); /* 左边加一条橙色竖线，很显眼 */
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.info-box h4 {
    margin-bottom: 10px;
    font-size: 1.2rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
}

.info-box span {
    font-size: 1.5rem;
    margin-right: 10px;
}

.info-box p {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 0;
}
/* --- 汉堡菜单样式 (PC端默认隐藏) --- */
.hamburger {
    display: none; /* 电脑上不显示 */
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .hero-content h1 { font-size: 2rem; }
    
    .hamburger { display: block; }

    .nav-links {
        display: none; 
        position: absolute;
        top: 100%; /* 确保紧贴 Header 底部 */
        left: 0;
        width: 100%;
        background-color: #ffffff; /* 必须是纯白背景，防止透明 */
        flex-direction: column;
        align-items: center;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1); /* 加深阴影 */
        padding: 20px 0;
        z-index: 9999; /* 层级设为最高，防止被遮挡 */
    }

    .nav-links.active {
        display: flex; 
    }

    .nav-links a {
        margin: 15px 0;
        font-size: 1.1rem;
        display: block; /* 增大点击区域 */
        width: 100%;
        text-align: center;
    }
}

/* 回到顶部按钮 */
#backToTop {
    display: none; /* 默认隐藏 */
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99;
    font-size: 20px;
    border: none;
    outline: none;
    background-color: var(--accent-color); /* 用你的橙色 */
    color: white;
    cursor: pointer;
    padding: 10px 15px;
    border-radius: 50%; /* 圆形 */
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: 0.3s;
}

#backToTop:hover {
    background-color: #333; /* 悬停变黑 */
}

/* --- 社交图标与微信弹窗样式 --- */

/* 图标容器 */
.social-links {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

/* 按钮样式 */
.social-btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: bold;
    text-decoration: none;
    transition: 0.3s;
    cursor: pointer;
    border: none;
    font-size: 14px;
}

/* WhatsApp 绿色 */
.btn-whatsapp {
    background-color: #25D366;
    color: white;
}
.btn-whatsapp:hover { background-color: #128C7E; }

/* WeChat 绿色 */
.btn-wechat {
    background-color: #07C160;
    color: white;
}
.btn-wechat:hover { background-color: #06a050; }

/* --- 微信二维码弹窗 (Modal) --- */
.wechat-modal {
    display: none; /* 默认隐藏 */
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8); /* 黑色半透明背景 */
    align-items: center;
    justify-content: center;
}

.wechat-modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    max-width: 300px;
    position: relative;
    animation: zoomIn 0.3s; /* 简单的放大动画 */
}

.wechat-modal img {
    width: 100%;
    max-width: 250px;
    display: block;
    margin: 0 auto 10px;
}

/* 简单的动画定义 */
@keyframes zoomIn {
    from {transform: scale(0.8); opacity: 0;}
    to {transform: scale(1); opacity: 1;}
}