/* ============================================
   CN Trip Essentials - Main Stylesheet
   Created: 2026-04-29
   Description: 中国旅行攻略网站主样式
   ============================================ */

/* CSS Variables */
:root {
    --primary: #1a365d;
    --primary-light: #2c5282;
    --accent: #ed8936;
    --accent-dark: #dd6b20;
    --bg-light: #faf8f5;
    --bg-white: #ffffff;
    --text-dark: #2d3748;
    --text-medium: #4a5568;
    --text-light: #718096;
    --border: #e2e8f0;
    --shadow: 0 2px 10px rgba(0,0,0,0.08);
    --shadow-hover: 0 8px 30px rgba(0,0,0,0.12);
    --radius: 12px;
    --max-width: 1200px;
    --transition: 0.3s ease;
}

/* Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-dark);
    background: var(--bg-light);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

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

img {
    max-width: 100%;
    height: auto;
}

/* Container */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ============ HEADER ============ */
.header {
    background: var(--bg-white);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--primary);
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: var(--primary);
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.nav ul {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav a {
    color: var(--text-medium);
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
    padding: 4px 0;
}

.nav a:hover,
.nav a.active {
    color: var(--primary);
}

.nav a.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent);
    border-radius: 1px;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-dark);
}

/* ============ HERO ============ */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(237,137,54,0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.hero .container {
    position: relative;
    z-index: 1;
    max-width: 800px;
    text-align: center;
}

.hero h1 {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 32px;
    line-height: 1.6;
}

/* Search Bar */
.search-bar {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    background: rgba(255,255,255,0.15);
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50px;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.search-bar input {
    flex: 1;
    padding: 14px 24px;
    border: none;
    background: transparent;
    color: white;
    font-size: 1rem;
    outline: none;
}

.search-bar input::placeholder {
    color: rgba(255,255,255,0.6);
}

.search-bar button {
    padding: 14px 28px;
    background: var(--accent);
    color: white;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition);
}

.search-bar button:hover {
    background: var(--accent-dark);
}

/* ============ SECTION TITLES ============ */
.section-title {
    text-align: center;
    padding: 60px 0 40px;
}

.section-title h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
}

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

/* ============ FEATURED GRID ============ */
.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
    padding: 0 20px 60px;
    max-width: var(--max-width);
    margin: 0 auto;
}

.featured-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all var(--transition);
}

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

.card-image {
    height: 220px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.card-image .card-tag {
    position: absolute;
    top: 16px;
    left: 16px;
    background: var(--accent);
    color: white;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.card-content {
    padding: 24px;
}

.card-content h3 {
    font-size: 1.25rem;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.card-content p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 16px;
}

.card-content .card-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.85rem;
    color: var(--text-light);
}

/* ============ QUICK GUIDE CARDS ============ */
.quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 0 20px 60px;
    max-width: var(--max-width);
    margin: 0 auto;
}

.quick-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    text-align: center;
    transition: all var(--transition);
    cursor: pointer;
}

.quick-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.quick-card .icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.quick-card h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--primary);
}

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

/* ============ BLOG SECTION ============ */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
    padding: 0 20px 60px;
    max-width: var(--max-width);
    margin: 0 auto;
}

.blog-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
    transition: all var(--transition);
    display: block;
}

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

.blog-card .blog-tag {
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.blog-card h3 {
    font-size: 1.2rem;
    margin: 12px 0;
    color: var(--text-dark);
    line-height: 1.4;
}

.blog-card p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
}

.blog-card .blog-meta {
    margin-top: 16px;
    font-size: 0.85rem;
    color: var(--text-light);
}

/* ============ NEWSLETTER ============ */
.newsletter {
    background: var(--primary);
    color: white;
    padding: 60px 0;
    text-align: center;
}

.newsletter h2 {
    font-size: 1.8rem;
    margin-bottom: 12px;
}

.newsletter p {
    opacity: 0.8;
    margin-bottom: 28px;
}

.newsletter-form {
    display: flex;
    max-width: 440px;
    margin: 0 auto;
    gap: 10px;
}

.newsletter-form input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50px;
    background: rgba(255,255,255,0.1);
    color: white;
    font-size: 0.95rem;
    outline: none;
}

.newsletter-form input::placeholder {
    color: rgba(255,255,255,0.5);
}

.newsletter-form button {
    padding: 12px 28px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition);
}

.newsletter-form button:hover {
    background: var(--accent-dark);
}

/* ============ FOOTER ============ */
.footer {
    background: var(--text-dark);
    color: rgba(255,255,255,0.7);
    padding: 50px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer h4 {
    color: white;
    font-size: 1rem;
    margin-bottom: 16px;
}

.footer p {
    font-size: 0.9rem;
    line-height: 1.7;
}

.footer ul {
    list-style: none;
}

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

.footer ul a {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.6);
    transition: color var(--transition);
}

.footer ul a:hover {
    color: var(--accent);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 24px;
    text-align: center;
    font-size: 0.85rem;
}

/* ============ DESTINATION PAGE ============ */
.dest-hero {
    height: 350px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.dest-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2), rgba(0,0,0,0.6));
}

.dest-hero-content {
    position: relative;
    z-index: 1;
    color: white;
    padding: 100px 20px 40px;
    max-width: 800px;
}

.dest-hero-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.dest-hero-content p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.dest-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px 60px;
}

.dest-content h2 {
    font-size: 1.5rem;
    color: var(--primary);
    margin: 40px 0 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--accent);
    display: inline-block;
}

.dest-content p {
    margin-bottom: 18px;
    line-height: 1.8;
}

.dest-content ul,
.dest-content ol {
    margin: 16px 0 24px 24px;
}

.dest-content li {
    margin-bottom: 10px;
    line-height: 1.7;
}

.dest-sidebar {
    position: sticky;
    top: 80px;
}

.info-box {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
}

.info-box h4 {
    font-size: 1rem;
    margin-bottom: 14px;
    color: var(--primary);
}

.info-box ul {
    list-style: none;
    padding: 0;
}

.info-box li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
}

.info-box li:last-child {
    border-bottom: none;
}

.dest-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px 60px;
}

/* ============ BLOG ARTICLE ============ */
.article-container {
    max-width: 760px;
    margin: 0 auto;
    padding: 40px 20px 60px;
}

.article-container h1 {
    font-size: 2.2rem;
    line-height: 1.3;
    color: var(--text-dark);
    margin-bottom: 16px;
}

.article-meta {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.article-container h2 {
    font-size: 1.5rem;
    color: var(--primary);
    margin: 40px 0 16px;
}

.article-container h3 {
    font-size: 1.2rem;
    color: var(--text-dark);
    margin: 28px 0 12px;
}

.article-container p {
    margin-bottom: 18px;
    line-height: 1.8;
}

.article-container ul,
.article-container ol {
    margin: 16px 0 24px 24px;
}

.article-container li {
    margin-bottom: 10px;
    line-height: 1.7;
}

.tip-box {
    background: #ebf8ff;
    border-left: 4px solid #3182ce;
    padding: 16px 20px;
    margin: 24px 0;
    border-radius: 0 8px 8px 0;
}

.warning-box {
    background: #fffaf0;
    border-left: 4px solid var(--accent);
    padding: 16px 20px;
    margin: 24px 0;
    border-radius: 0 8px 8px 0;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 1.8rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .nav ul {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 20px;
        gap: 16px;
        box-shadow: var(--shadow);
    }

    .nav.open ul {
        display: flex;
    }

    .mobile-toggle {
        display: block;
    }

    .featured-grid,
    .blog-grid {
        grid-template-columns: 1fr;
    }

    .quick-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .dest-layout {
        grid-template-columns: 1fr;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .search-bar {
        flex-direction: column;
        border-radius: 12px;
    }

    .search-bar button {
        border-radius: 0 0 10px 10px;
    }
}
