/* ===== 全局样式 ===== */
:root {
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --accent-color: #e74c3c;
    --transition-slow: 0.5s ease;
    --transition-medium: 0.3s ease;
    --transition-fast: 0.15s ease;
    --font-main: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-heading: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 62.5%; /* 1rem = 10px */
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    font-size: 1.6rem;
    line-height: 1.7;
    color: var(--dark-color);
    background-color: var(--light-color);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

h1 {
    font-size: 4.8rem;
}

h2 {
    font-size: 3.6rem;
}

h3 {
    font-size: 2.4rem;
}

p {
    margin-bottom: 1.5rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-color);
}

.container {
    width: 100%;
    max-width: 120rem;
    margin: 0 auto;
    padding: 0 2rem;
}

.btn {
    display: inline-block;
    padding: 1.2rem 2.4rem;
    background-color: var(--primary-color);
    color: white;
    border-radius: 0.4rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
    transition: all var(--transition-medium);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.1);
    transition: width var(--transition-medium);
    z-index: -1;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    color: white;
}

.btn:hover::before {
    width: 100%;
}

img {
    max-width: 100%;
    height: auto;
}

.section-title {
    text-align: center;
    margin-bottom: 5rem;
    position: relative;
    padding-bottom: 1.5rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 8rem;
    height: 0.3rem;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
}

.section-description {
    text-align: center;
    max-width: 80rem;
    margin: -3rem auto 4rem;
    font-size: 1.8rem;
    color: #777;
}

/* ===== 导航栏 ===== */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: background-color var(--transition-medium);
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 7rem;
    padding: 0 2rem;
    transition: all var(--transition-medium);
}

.scrolled-nav {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    height: 6rem;
}

.logo {
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--light-color);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
    transition: color var(--transition-medium);
}

.scrolled-nav .logo {
    color: var(--dark-color);
    text-shadow: none;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 2.5rem;
}

.nav-links a {
    color: var(--light-color);
    font-size: 1.6rem;
    font-weight: 500;
    position: relative;
    transition: all var(--transition-medium);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width var(--transition-medium);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.scrolled-nav .nav-links a {
    color: var(--dark-color);
}

.hamburger {
    display: none;
    cursor: pointer;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--light-color);
    margin: 5px 0;
    transition: all var(--transition-medium);
}

.scrolled-nav .hamburger span {
    background-color: var(--dark-color);
}

/* ===== 英雄区 (视差效果) ===== */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.3)), url('../images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    color: var(--light-color);
    text-align: center;
}

.hero-content {
    max-width: 80rem;
    padding: 0 2rem;
}

.hero h1 {
    font-size: 5.6rem;
    margin-bottom: 2rem;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
}

.hero p {
    font-size: 2.2rem;
    margin-bottom: 3rem;
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.5);
}

/* ===== 地图部分 ===== */
.map-section {
    padding: 10rem 0 15rem;
    background-color: #f8f9fa;
}

.map-container {
    height: 50rem;
    border-radius: 0.8rem;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative; /* 添加相对定位 */
}

/* 地图加载状态 */
.map-container .loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.9);
    z-index: 1000;
    font-size: 1.8rem;
    color: #777;
}

.map-container .loading:before {
    content: "";
    display: block;
    width: 50px;
    height: 50px;
    margin-bottom: 2rem;
    border-radius: 50%;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top-color: var(--primary-color);
    animation: spin 1s infinite linear;
}

/* Leaflet 地图自定义样式 */
.custom-popup .leaflet-popup-content-wrapper {
    background-color: white;
    border-radius: 0.6rem;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.custom-popup .leaflet-popup-content {
    margin: 0;
    padding: 0;
}

.custom-popup .leaflet-popup-tip {
    background-color: white;
}

.map-popup {
    padding: 15px;
}

.map-popup img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.map-popup img:hover {
    transform: scale(1.02);
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}

.leaflet-container {
    font-family: var(--font-main);
}

.leaflet-control-zoom {
    border-radius: 0.4rem !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
}

.leaflet-control-zoom a {
    color: var(--dark-color) !important;
}

.leaflet-marker-icon {
    transition: transform 0.3s;
}

.leaflet-marker-icon:hover {
    transform: scale(1.2);
}

.map-error {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 2rem;
    text-align: center;
    color: var(--accent-color);
    background-color: #fff;
    border-radius: 0.8rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    max-width: 80%;
    z-index: 500;
}

/* ===== 懒加载图片效果 ===== */
.lazy-load {
    opacity: 0;
    transition: opacity 0.3s;
}

.lazy-loaded {
    opacity: 1;
}

/* ===== 响应式设计 ===== */
@media (max-width: 1200px) {
    html {
        font-size: 56.25%; /* 9px */
    }
}

@media (max-width: 992px) {
    html {
        font-size: 50%; /* 8px */
    }
    
    
}

@media (max-width: 768px) {
    html {
        font-size: 50%; /* 8px */
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        background-color: #fff;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
        z-index: 1001;
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-links li {
        margin: 2rem 0;
    }
    
    .nav-links a {
        color: var(--dark-color);
        font-size: 2rem;
    }
    
    .hamburger {
        display: block;
        z-index: 1002;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    .hero h1 {
        font-size: 4.5rem;
    }
    
    
}

@media (max-width: 576px) {
    .hero h1 {
        font-size: 3.8rem;
    }
    
    .hero p {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 3rem;
    }
    
    
}

/* ===== 离线提示 ===== */
.offline-message {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 9999;
    background-color: #fff;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    border-radius: 0.8rem;
    padding: 1.5rem 2rem;
    animation: slideIn 0.3s ease;
    max-width: 350px;
}

.offline-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.offline-content i {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.offline-content p {
    margin: 0 0 1.5rem;
    text-align: center;
    font-size: 1.4rem;
    color: #333;
}

.retry-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 5rem;
    font-size: 1.4rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.retry-btn:hover {
    background-color: var(--primary-dark-color);
    transform: translateY(-2px);
}

@keyframes slideIn {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
} 
