/* ============================================
   Europe Train - Global Styles
   全局样式文件 - 所有页面引用
   ============================================ */

/* CSS Variables */
:root {
    --primary: #e65100;
    --primary-dark: #bf360c;
    --secondary: #00c853;
    --accent: #ffab00;
    --text: #202124;
    --text-light: #5f6368;
    --bg: #ffffff;
    --bg-light: #fff8e1;
    --border: #ffe0b2;
    --shadow: 0 1px 2px 0 rgba(230,81,0,0.2), 0 1px 3px 1px rgba(230,81,0,0.15);
    --shadow-lg: 0 4px 8px 3px rgba(230,81,0,0.15), 0 1px 1px 0 rgba(230,81,0,0.1);
    --radius: 8px;
    --radius-lg: 16px;
    --max-width: 1200px;
}

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

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

/* ============================================
   Header & Navigation
   ============================================ */
.header {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
}

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

.nav {
    display: flex;
    gap: 32px;
}

.nav a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

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

.lang-switcher {
    display: flex;
    gap: 8px;
    align-items: center;
}

.lang-switcher a {
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    color: var(--text-light);
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.lang-switcher a:hover {
    color: var(--primary);
    background: var(--bg-light);
}

.lang-switcher a.active {
    color: var(--primary);
    background: var(--bg-light);
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    position: relative;
    height: 600px;
    background: linear-gradient(135deg, rgba(255,111,0,0.8) 0%, rgba(255,143,0,0.8) 50%, rgba(255,179,0,0.8) 100%),
                url('../images/hero.jpg') center/cover;
    color: white;
    padding: 80px 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.hero h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 20px;
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto 32px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* ============================================
   Search Box
   ============================================ */
.search-box {
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    gap: 12px;
    background: white;
    padding: 8px;
    border-radius: 50px;
    box-shadow: var(--shadow-lg);
}

.search-box input {
    flex: 1;
    border: none;
    padding: 12px 20px;
    font-size: 16px;
    outline: none;
    background: transparent;
}

.search-box button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.search-box button:hover {
    background: var(--primary-dark);
}

/* ============================================
   Features Section
   ============================================ */
.features {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 64px 24px;
}

.features h2 {
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 48px;
}

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

.feature-card {
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.feature-image {
    height: 180px;
    background-size: cover;
    background-position: center;
}

.feature-content {
    padding: 24px;
}

.feature-content h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
}

.feature-content p {
    color: var(--text-light);
    font-size: 15px;
}

/* ============================================
   Routes Section
   ============================================ */
.routes {
    background: var(--bg-light);
    padding: 64px 24px;
}

.routes-inner {
    max-width: var(--max-width);
    margin: 0 auto;
}

.routes h2 {
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 48px;
}

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

.route-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.route-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.route-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
}

.route-title {
    position: absolute;
    bottom: 16px;
    left: 16px;
    color: white;
    font-size: 18px;
    font-weight: 600;
    z-index: 1;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.route-content {
    padding: 24px;
}

.route-content h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.route-content p {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 16px;
}

.route-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--text-light);
}

.route-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.route-meta span::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    margin-right: 4px;
}

/* ============================================
   Articles Section
   ============================================ */
.articles {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 64px 24px;
}

.articles h2 {
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 16px;
}

.articles > p {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 32px;
}

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

.article-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

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

/* Article Image - improved readability */
.article-image {
    height: 180px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5), 0 1px 2px rgba(0,0,0,0.3);
    position: relative;
}

.article-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(230,81,0,0.85) 0%, rgba(191,54,12,0.85) 100%);
    z-index: 1;
}

.article-image span,
.article-image::after {
    position: relative;
    z-index: 2;
}

.article-content {
    padding: 24px;
}

.article-content h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.article-content h3 a {
    color: var(--text);
    text-decoration: none;
}

.article-content h3 a:hover {
    color: var(--primary);
}

.article-content p {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 12px;
}

.article-meta {
    display: flex;
    gap: 8px;
    align-items: center;
}

.tag {
    background: var(--bg-light);
    color: var(--primary);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.date {
    color: var(--text-light);
    font-size: 12px;
}

/* ============================================
   Languages Section
   ============================================ */
.languages {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 64px 24px;
    text-align: center;
}

.languages h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 16px;
}

.languages > p {
    color: var(--text-light);
    font-size: 18px;
    margin-bottom: 32px;
}

.lang-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 50px;
    text-decoration: none;
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.lang-btn:hover:not(.disabled) {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.lang-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--text);
    color: white;
    padding: 48px 24px;
    text-align: center;
}

.footer p {
    opacity: 0.7;
    font-size: 14px;
}

/* ============================================
   Article Page Styles
   ============================================ */
.article {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 32px 24px;
}

.article-header {
    text-align: center;
    margin-bottom: 48px;
}

.article-header h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.3;
}

.article-header .subtitle {
    font-size: 18px;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto;
}

.article-meta-header {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 24px;
    font-size: 14px;
    color: var(--text-light);
}

.article-content {
    max-width: 800px;
    margin: 0 auto;
}

.article-content h2 {
    font-size: 28px;
    font-weight: 700;
    margin: 48px 0 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
}

.article-content h3 {
    font-size: 22px;
    font-weight: 600;
    margin: 32px 0 16px;
}

.article-content p {
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 20px;
    color: var(--text);
}

.article-content ul,
.article-content ol {
    margin: 20px 0;
    padding-left: 24px;
}

.article-content li {
    margin-bottom: 12px;
    line-height: 1.6;
}

.article-content strong {
    color: var(--primary-dark);
}

.article-content a {
    color: var(--primary);
    text-decoration: none;
}

.article-content a:hover {
    text-decoration: underline;
}

/* Comparison Table */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.comparison-table th {
    background: var(--primary);
    color: white;
    padding: 16px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
}

.comparison-table td {
    padding: 16px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.comparison-table tr:hover {
    background: var(--bg-light);
}

.comparison-table .highlight {
    background: var(--bg-light);
    font-weight: 600;
}

.comparison-table .winner {
    color: var(--secondary);
    font-weight: 700;
}

/* Info Box */
.info-box {
    background: var(--bg-light);
    border-left: 4px solid var(--primary);
    padding: 20px;
    margin: 24px 0;
    border-radius: 0 var(--radius) var(--radius) 0;
}

.info-box h4 {
    margin-top: 0;
    margin-bottom: 12px;
    color: var(--primary);
}

.info-box p {
    margin-bottom: 0;
}

.info-box ul {
    margin: 0;
}

/* Quick Summary */
.quick-summary {
    background: var(--primary);
    color: white;
    padding: 24px;
    border-radius: var(--radius-lg);
    margin: 24px 0;
}

.quick-summary h3 {
    color: white;
    margin-top: 0;
    margin-bottom: 16px;
}

.quick-summary ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.quick-summary li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    color: white;
}

.quick-summary li:last-child {
    border-bottom: none;
}

/* Article Tags */
.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 24px 0;
}

.article-tags .tag {
    background: var(--bg-light);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

/* Author Box */
.author-box {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-light);
    padding: 24px;
    border-radius: var(--radius-lg);
    margin: 48px 0;
}

.author-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    font-weight: 700;
    flex-shrink: 0;
}

.author-info h4 {
    margin: 0 0 4px 0;
    font-size: 16px;
}

.author-info p {
    margin: 0;
    font-size: 14px;
    color: var(--text-light);
}

/* Related Articles */
.related-articles {
    margin: 48px 0;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}

.related-articles h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 24px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.related-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s;
}

.related-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.related-card h4 {
    margin: 0 0 8px 0;
    font-size: 15px;
}

.related-card p {
    margin: 0;
    font-size: 13px;
    color: var(--text-light);
}

/* Breadcrumb */
.breadcrumb {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 16px 24px;
    font-size: 14px;
    color: var(--text-light);
}

.breadcrumb a {
    color: var(--text-light);
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb .separator {
    margin: 0 8px;
    color: var(--text-light);
}

.breadcrumb .current {
    color: var(--text);
    font-weight: 500;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
    .hero h1 { font-size: 32px; }
    .hero p { font-size: 16px; }
    .nav { display: none; }
    .feature-grid,
    .route-grid,
    .articles-grid { grid-template-columns: 1fr; }
    .article-header h1 { font-size: 28px; }
    .article-content h2 { font-size: 24px; }
    .comparison-table { font-size: 13px; }
    .comparison-table th,
    .comparison-table td { padding: 12px 8px; }
    .author-box { flex-direction: column; text-align: center; }
    .header-inner { flex-wrap: wrap; height: auto; padding: 12px 24px; }
    .lang-switcher { margin-top: 8px; }
}

@media (max-width: 480px) {
    .hero { height: 400px; padding: 40px 16px; }
    .hero h1 { font-size: 24px; }
    .search-box { flex-direction: column; border-radius: 16px; }
    .search-box button { width: 100%; }
    .features,
    .routes,
    .articles { padding: 40px 16px; }
}
