/* ========================================
   i乌镇 - CSS样式表
   设计风格：现代中国风 + 互联网气质
   ======================================== */

/* 变量定义 */
:root {
    --primary: #1a365d;        /* 乌镇蓝 - 深靛蓝 */
    --primary-light: #2c5282;  /* 浅蓝 */
    --accent: #c53030;        /* 点缀红 */
    --bg-light: #f7fafc;
    --bg-dark: #1a202c;
    --text: #2d3748;
    --text-light: #718096;
    --white: #ffffff;
    --border: #e2e8f0;
    --shadow: rgba(26, 54, 93, 0.1);
    
    --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    --radius: 8px;
    --radius-lg: 16px;
    --transition: all 0.3s ease;
}

/* 重置与基础 */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    color: var(--text);
    line-height: 1.6;
    background: var(--white);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

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

/* 导航栏 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px var(--shadow);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.2;
}

.logo-domain {
    display: block;
    font-size: 0.65rem;
    font-weight: 400;
    color: var(--text-light);
    letter-spacing: 0.05em;
}

.logo-i {
    color: var(--accent);
    font-style: italic;
}

.nav-menu {
    display: flex;
    gap: 40px;
}

.nav-menu a {
    color: var(--text);
    font-weight: 500;
    padding: 8px 0;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: var(--transition);
}

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

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle span {
    width: 25px;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

/* 英雄区 */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="30" r="1.5" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="70" r="2.5" fill="rgba(255,255,255,0.08)"/><circle cx="30" cy="80" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="70" cy="60" r="1.8" fill="rgba(255,255,255,0.08)"/></svg>') repeat;
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: var(--white);
    padding: 20px;
}

.hero-title {
    font-size: clamp(3rem, 10vw, 6rem);
    font-weight: 800;
    letter-spacing: 0.05em;
    margin-bottom: 10px;
    animation: fadeInUp 0.8s ease;
}

.hero-i {
    color: #ffd700;
    font-style: italic;
}

.hero-subtitle {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 300;
    margin-bottom: 20px;
    opacity: 0.9;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-desc {
    font-size: 1.1rem;
    opacity: 0.8;
    margin-bottom: 40px;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.hero-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.6s both;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--white);
    color: var(--primary);
}

.btn-primary:hover {
    background: #ffd700;
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.3);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border-color: var(--white);
}

.btn-outline:hover {
    background: var(--white);
    color: var(--primary);
}

.hero-scroll {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: var(--white);
    opacity: 0.7;
    animation: bounce 2s infinite;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(10px); }
}

/* 通用区块 */
.section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 10px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
}

/* 关于乌镇 */
.about {
    background: var(--bg-light);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text p {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: var(--text);
}

.about-stats {
    display: flex;
    gap: 40px;
    margin-top: 40px;
}

.stat {
    text-align: center;
}

.stat-num {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
}

.about-visual {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.about-card {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px var(--shadow);
    transition: var(--transition);
}

.about-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 60px var(--shadow);
}

.about-card h3 {
    color: var(--primary);
    margin-bottom: 10px;
}

.about-card p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* 景点推荐 */
.spots-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.spot-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: 0 5px 30px var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border);
}

.spot-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: 0 20px 50px var(--shadow);
}

.spot-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.spot-card h3 {
    color: var(--primary);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.spot-card p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* 美食推荐 */
.food {
    background: var(--bg-light);
}

.food-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.food-item {
    background: var(--white);
    padding: 40px 30px;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: 0 5px 30px var(--shadow);
    transition: var(--transition);
    border: 2px solid transparent;
}

.food-item:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
}

.food-emoji {
    font-size: 3rem;
    display: block;
    margin-bottom: 15px;
}

.food-item h4 {
    color: var(--text);
    font-size: 1.1rem;
}

/* 旅游攻略 */
.guide-timeline {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
}

.guide-timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary), var(--accent));
}

.timeline-item {
    position: relative;
    padding-left: 60px;
    padding-bottom: 40px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: 12px;
    top: 5px;
    width: 18px;
    height: 18px;
    background: var(--accent);
    border-radius: 50%;
    border: 4px solid var(--white);
    box-shadow: 0 0 0 2px var(--accent);
}

.timeline-content {
    background: var(--white);
    padding: 25px 30px;
    border-radius: var(--radius);
    box-shadow: 0 5px 30px var(--shadow);
}

.timeline-content h4 {
    color: var(--primary);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.timeline-content p {
    color: var(--text-light);
}

/* ========================================
   页脚 - 统一Flex 4列布局
   ======================================== */
.footer {
    background: var(--primary);
    color: var(--white);
    padding: 80px 0 0;
}

.footer-inner {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 30px;
    padding-bottom: 40px;
}

.footer-brand,
.footer-col {
    flex: 1;
    min-width: 180px;
}

.footer-logo {
    font-size: 1.8rem;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 15px;
}

.footer-logo .logo-i {
    color: #ffd700;
}

.footer-brand .brand-en {
    font-size: 0.9rem;
    opacity: 0.9;
}

.footer-brand p {
    opacity: 0.8;
    line-height: 1.8;
}

.footer-col h4 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: #ffd700;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    opacity: 0.8;
    transition: var(--transition);
}

.footer-col ul li a:hover {
    opacity: 1;
    color: #ffd700;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 25px 0;
    text-align: center;
    opacity: 0.7;
}

/* ========================================
   响应式设计
   ======================================== */

/* 平板 */
@media (max-width: 1024px) {
    .spots-grid,
    .food-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .about-grid {
        gap: 40px;
    }
}

/* 手机端 */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 20px;
        gap: 0;
        box-shadow: 0 10px 30px var(--shadow);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-menu li {
        border-bottom: 1px solid var(--border);
    }
    
    .nav-menu a {
        display: block;
        padding: 15px 0;
    }
    
    .hero {
        min-height: 100svh;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .about-stats {
        justify-content: center;
    }
    
    .about-visual {
        grid-template-columns: 1fr;
    }
    
    .spots-grid,
    .food-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }
    
    /* 页脚 - 手机端保持4列一行，用overflow-x滚动 */
    .footer-inner {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 8px;
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .footer-brand,
    .footer-col {
        flex: 0 0 25%;
        min-width: 140px;
    }
}

/* 小屏手机 */
@media (max-width: 480px) {
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 250px;
    }
    
    .about-stats {
        flex-wrap: wrap;
        gap: 20px;
    }
    
    .stat {
        flex: 1;
        min-width: 80px;
    }
    
    .stat-num {
        font-size: 2rem;
    }
}
