/* ============================================
   探索世界 - 旅遊網站樣式
   風格：極簡、文青、莫蘭迪色系
   ============================================ */

/* CSS Variables */
:root {
    /* 莫蘭迪色系 */
    --primary: #7d8a8e;
    --primary-light: #a8b5b8;
    --primary-dark: #5c6b6d;
    
    /* 背景色 */
    --bg-main: #f8f8f8;
    --bg-card: #ffffff;
    --bg-section: #f4f4f4;
    
    /* 字色 */
    --text-dark: #333333;
    --text-medium: #666666;
    --text-light: #999999;
    
    /* 其他 */
    --accent: #b8c4c7;
    --border: #e8e8e8;
    --shadow: rgba(125, 138, 142, 0.1);
    
    /* 字體 */
    --font-serif: 'Noto Serif TC', 'Songti TC', serif;
    --font-sans: 'Noto Sans TC', 'PingFang TC', sans-serif;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-main);
    color: var(--text-dark);
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    background-image: url('https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=1920&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(45, 55, 58, 0.3),
        rgba(45, 55, 58, 0.5)
    );
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 0 24px;
}

.hero-title {
    font-family: var(--font-serif);
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.2em;
    margin-bottom: 16px;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: rgba(255, 255, 255, 0.85);
    font-weight: 300;
    letter-spacing: 0.1em;
}

/* ============================================
   Section Title
   ============================================ */
.section-title {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-dark);
    text-align: center;
    margin-bottom: 48px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background: var(--primary-light);
    margin: 16px auto 0;
}

/* ============================================
   Categories Section
   ============================================ */
.categories {
    padding: 80px 0;
    background: var(--bg-main);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.category-card {
    display: block;
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(125, 138, 142, 0.2);
}

.category-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    transition: transform 0.4s ease;
}

.category-card:hover .category-image {
    transform: scale(1.03);
}

.category-info {
    padding: 24px;
    text-align: center;
}

.category-icon {
    display: block;
    font-size: 2rem;
    margin-bottom: 8px;
}

.category-info h3 {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.category-info p {
    font-size: 0.9rem;
    color: var(--text-medium);
    font-weight: 300;
}

/* ============================================
   Featured Articles Section
   ============================================ */
.featured {
    padding: 80px 0;
    background: var(--bg-section);
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
}

.article-card {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(125, 138, 142, 0.2);
}

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

.article-content {
    padding: 28px;
}

.article-tag {
    display: inline-block;
    font-size: 0.75rem;
    color: var(--primary);
    background: rgba(125, 138, 142, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 12px;
    font-weight: 500;
    letter-spacing: 0.05em;
}

.article-content h3 {
    font-family: var(--font-serif);
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 12px;
    line-height: 1.5;
}

.article-content p {
    font-size: 0.95rem;
    color: var(--text-medium);
    font-weight: 300;
    margin-bottom: 16px;
    line-height: 1.7;
}

.read-more {
    display: inline-flex;
    align-items: center;
    font-size: 0.9rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.read-more:hover {
    color: var(--primary-dark);
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--text-dark);
    color: rgba(255, 255, 255, 0.7);
    padding: 48px 0;
    text-align: center;
}

.footer p {
    font-size: 0.95rem;
    font-weight: 300;
    margin-bottom: 8px;
}

.footer .copyright {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 16px;
}

/* ============================================
   Article Page Styles
   ============================================ */
.article-header {
    position: relative;
    height: 60vh;
    min-height: 400px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
}

.article-header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        transparent 30%,
        rgba(0, 0, 0, 0.7)
    );
}

.article-header-content {
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 48px 0;
}

.article-header .container {
    max-width: 800px;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

.article-meta .tag {
    background: var(--primary);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
}

.article-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
    margin-bottom: 12px;
}

.article-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 300;
}

.article-body {
    padding: 64px 0;
    background: var(--bg-main);
}

.article-body .container {
    max-width: 720px;
}

.article-body h2 {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 48px 0 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary-light);
}

.article-body p {
    font-size: 1.05rem;
    color: var(--text-medium);
    line-height: 2;
    margin-bottom: 24px;
    font-weight: 400;
}

.article-body blockquote {
    border-left: 4px solid var(--primary-light);
    padding: 20px 24px;
    margin: 32px 0;
    background: rgba(125, 138, 142, 0.08);
    font-style: italic;
    color: var(--text-medium);
}

.article-body ul, .article-body ol {
    margin: 24px 0;
    padding-left: 24px;
    color: var(--text-medium);
}

.article-body li {
    margin-bottom: 12px;
    line-height: 1.8;
}

.article-footer {
    padding: 32px 0;
    background: var(--bg-section);
    text-align: center;
}

.back-link {
    display: inline-flex;
    align-items: center;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: var(--primary-dark);
}

/* ============================================
   Category Page Styles
   ============================================ */
.page-header {
    background: var(--bg-section);
    padding: 64px 0;
    text-align: center;
}

.page-header .category-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.page-header h1 {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.page-header p {
    font-size: 1.1rem;
    color: var(--text-medium);
    font-weight: 300;
}

.category-articles {
    padding: 64px 0;
}

.category-articles .articles-grid {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
    .hero-title {
        letter-spacing: 0.1em;
    }
    
    .section-title {
        margin-bottom: 32px;
    }
    
    .categories, .featured {
        padding: 48px 0;
    }
    
    .category-grid {
        gap: 16px;
    }
    
    .articles-grid {
        gap: 24px;
    }
    
    .article-content {
        padding: 20px;
    }
    
    .article-body {
        padding: 40px 0;
    }
    
    .article-body h2 {
        margin: 32px 0 16px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.category-card,
.article-card {
    animation: fadeInUp 0.6s ease forwards;
}

.category-card:nth-child(1) { animation-delay: 0.1s; }
.category-card:nth-child(2) { animation-delay: 0.2s; }
.category-card:nth-child(3) { animation-delay: 0.3s; }
.category-card:nth-child(4) { animation-delay: 0.4s; }

.article-card:nth-child(1) { animation-delay: 0.1s; }
.article-card:nth-child(2) { animation-delay: 0.2s; }
.article-card:nth-child(3) { animation-delay: 0.3s; }