
:root {
    --primary: #1B6B3A;
    --primary-hover: #145a2e;
    --primary-light: #e8f5e9;
    --bg-header: #1a2332;
    --bg-main: #F5F7FA;
    --bg-card: #FFFFFF;
    --text-primary: #111827;
    --text-secondary: #6B7280;
    --text-light: #9CA3AF;
    --radius: 12px;
    --font: 'Inter', 'Noto Sans SC', 'Noto Sans', system-ui, sans-serif;
    --sidebar-width: 320px;
    --max-width: 1280px;
    --accent-red: #DC2626;
    --accent-blue: #2563EB;
    --accent-amber: #D97706;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }

/* Header */
.site-header {
    background: var(--bg-header);
    color: white;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

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

.site-logo {
    font-size: 1.3rem;
    font-weight: 800;
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    flex-shrink: 0;
}

.site-logo .icon { font-size: 1.5rem; }
.logo-img { height: 42px; width: auto; border-radius: 6px; }
.logo-text { letter-spacing: -0.5px; }
.logo-us { color: #6B9B7B; }
.logo-imm { color: #7B9BBF; }
.logo-dot { color: #6B9B7B; }

.header-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 1;
    min-width: 0;
}

.header-nav a {
    color: rgba(255,255,255,0.85);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

.header-nav a:hover { color: white; }
.header-nav a.active { color: white; border-bottom: 2px solid var(--primary); padding-bottom: 2px; }

.lang-switcher {
    display: flex;
    gap: 4px;
    margin-left: 16px;
    padding-left: 16px;
    border-left: 1px solid rgba(255,255,255,0.2);
}

.lang-switcher a {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
    transition: all 0.2s;
}

.lang-switcher a:hover { background: rgba(255,255,255,0.1); color: white; }
.lang-switcher a.active { background: var(--primary); color: white; }

/* Main Layout */
.main-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 24px;
    display: grid;
    grid-template-columns: 1fr var(--sidebar-width);
    gap: 24px;
}

.main-full {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 24px;
}

/* Hero Card */
.hero-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    min-height: 360px;
    max-height: 420px;
    margin-bottom: 24px;
    background: var(--bg-header);
    cursor: pointer;
    transition: transform 0.2s;
    display: block;
}

.hero-card:hover { transform: translateY(-2px); }

.hero-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px 32px 32px;
    background: linear-gradient(transparent 0%, rgba(0,0,0,0.7) 40%, rgba(0,0,0,0.9) 100%);
    color: white;
}

.hero-overlay h1 {
    font-size: 1.6rem;
    line-height: 1.3;
    margin-bottom: 12px;
    max-width: 70%;
}

.hero-overlay .hero-meta {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.7);
    display: flex;
    gap: 16px;
    align-items: center;
}

.hero-cta {
    display: inline-block;
    margin-top: 12px;
    padding: 10px 24px;
    background: var(--primary);
    color: white;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.hero-cta:hover { background: var(--primary-hover); color: white; }

/* Story Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.story-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.story-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.card-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-body h3 {
    font-size: 1.05rem;
    line-height: 1.4;
    margin-bottom: 8px;
}

.card-body h3 a { color: var(--text-primary); }
.card-body h3 a:hover { color: var(--primary); }

.card-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: auto;
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.card-meta .source-link { font-size: 0.8rem; }
.card-meta .via-source { font-size: 0.7rem; }
.card-date { white-space: nowrap; margin-left: auto; }

.source-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.tag-pill {
    display: inline-block;
    padding: 3px 10px;
    background: var(--bg-main);
    color: var(--text-secondary);
    border-radius: 20px;
    font-size: 0.78rem;
    margin: 2px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.tag-pill:hover, .tag-pill.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Sidebar */
.sidebar { display: flex; flex-direction: column; gap: 24px; }

.sidebar-section {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.sidebar-section h3 {
    font-size: 1rem;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary);
}

.top-story-item {
    padding: 8px 0;
    border-bottom: 1px solid var(--bg-main);
}

.top-story-item:last-child { border-bottom: none; }

.top-story-item a {
    color: var(--text-primary);
    font-size: 0.88rem;
    font-weight: 500;
    line-height: 1.4;
}

.top-story-item a:hover { color: var(--primary); }

/* Article Page */
.article-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 24px;
}

.article-hero-img {
    width: 100%;
    max-height: 450px;
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: 24px;
}

.article-body {
    background: var(--bg-card);
    padding: 32px;
    border-radius: var(--radius);
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.article-body h1 { font-size: 1.8rem; line-height: 1.3; margin-bottom: 16px; }
.article-body h2 { font-size: 1.3rem; margin: 24px 0 12px; color: var(--primary); }
.article-body h3 { font-size: 1.1rem; margin: 20px 0 10px; }
.article-body p { margin-bottom: 16px; line-height: 1.8; }
.article-body ul, .article-body ol { margin: 12px 0 12px 24px; }
.article-body li { margin-bottom: 6px; line-height: 1.6; }
.article-body a { color: var(--primary); text-decoration: underline; }
.article-body code { background: var(--bg-main); padding: 2px 6px; border-radius: 4px; font-size: 0.9em; }

.source-link {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}
.source-link:hover { text-decoration: underline; }
.via-source { color: var(--text-light); font-weight: 400; font-size: 0.8em; }

.article-source-footer {
    margin-top: 32px;
    padding-top: 16px;
    border-top: 1px solid var(--bg-main);
}
.article-source-footer a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 10px 20px;
    background: var(--primary);
    color: white;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: background 0.2s;
}
.article-source-footer a:hover { background: var(--primary-hover); color: white; }

.article-meta {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 24px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 16px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

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

.photo-credit {
    font-size: 0.75rem;
    color: var(--text-light);
    text-align: right;
    margin-top: -20px;
    margin-bottom: 16px;
}

/* Knowledge Base */
.knowledge-hero {
    background: linear-gradient(135deg, var(--bg-header), #2d4a5e);
    color: white;
    padding: 48px 32px;
    border-radius: var(--radius);
    margin-bottom: 32px;
    text-align: center;
}

.knowledge-hero h1 { font-size: 2rem; margin-bottom: 12px; }
.knowledge-hero p { font-size: 1.1rem; opacity: 0.85; max-width: 600px; margin: 0 auto; }

.knowledge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.knowledge-category {
    margin-bottom: 40px;
}

.knowledge-category h2 {
    font-size: 1.3rem;
    color: var(--primary);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-light);
}

.knowledge-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    transition: transform 0.2s, box-shadow 0.2s;
    border-left: 4px solid var(--primary);
}

.knowledge-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.knowledge-card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.knowledge-card h3 a { color: var(--text-primary); }
.knowledge-card h3 a:hover { color: var(--primary); }

/* Footer */
.site-footer {
    background: var(--bg-header);
    color: rgba(255,255,255,0.7);
    padding: 32px 24px;
    margin-top: 48px;
    text-align: center;
    font-size: 0.85rem;
    line-height: 1.8;
}

.site-footer a { color: rgba(255,255,255,0.85); }

/* Knowledge Base Sidebar */
.kb-sidebar-card {
    background: #fff;
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.06);
    border: 1px solid #e2e8f0;
}

.kb-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.kb-header-icon { color: #64748b; display: flex; }
.kb-header-title { font-size: 1.1rem; font-weight: 600; color: #0f172a; }

.kb-search-wrap {
    position: relative;
    margin-bottom: 12px;
}

.kb-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    display: flex;
}

.kb-search {
    width: 100%;
    height: 36px;
    padding: 0 12px 0 34px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #f1f5f9;
    font-size: 0.875rem;
    font-family: var(--font);
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.2s;
}

.kb-search:focus { border-color: #22c55e; }

.kb-nav { display: flex; flex-direction: column; gap: 2px; }

.kb-section { border-radius: 8px; }

.kb-section-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 10px;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #334155;
    font-family: var(--font);
    transition: background 0.15s;
}

.kb-section-trigger:hover { background: #f8fafc; }

.kb-section-icon { color: #64748b; display: flex; flex-shrink: 0; }
.kb-section-title { flex: 1; text-align: left; }

.kb-chevron {
    display: flex;
    color: #94a3b8;
    transition: transform 0.2s;
}

.kb-section-open > .kb-section-trigger .kb-chevron { transform: rotate(90deg); }

.kb-section-items {
    padding: 2px 0 4px 0;
}

.kb-nav-item {
    display: block;
    padding: 6px 10px 6px 34px;
    min-height: 36px;
    font-size: 0.85rem;
    line-height: 1.4;
    color: #334155;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.15s, color 0.15s;
}

.kb-nav-item:hover {
    background: #f8fafc;
    color: #334155;
}

.kb-nav-item:active,
.kb-nav-item.active {
    background: #ecfdf5;
    color: #16a34a;
}

.kb-nav-item-hidden { display: none !important; }

/* Q&A Section */
.qa-section { max-height: 600px; overflow: hidden; position: relative; }
.qa-list { max-height: 520px; overflow-y: auto; padding-right: 4px; }
.qa-list::-webkit-scrollbar { width: 4px; }
.qa-list::-webkit-scrollbar-thumb { background: var(--text-light); border-radius: 2px; }
.qa-item { padding: 8px 0; border-bottom: 1px solid var(--bg-main); }
.qa-item:last-child { border-bottom: none; }
.qa-item a {
    color: var(--text-primary);
    font-size: 0.85rem;
    line-height: 1.5;
    display: block;
    transition: color 0.2s;
}
.qa-item a:hover { color: var(--primary); }
.qa-item a::before {
    content: "Q: ";
    color: var(--primary);
    font-weight: 700;
}

/* Responsive */
@media (max-width: 1023px) {
    .main-container { grid-template-columns: 1fr; }
    .hero-overlay h1 { max-width: 100%; font-size: 1.4rem; }

}

@media (max-width: 767px) {
    .cards-grid { grid-template-columns: 1fr; }
    .hero-card { height: 280px; }
    .hero-overlay { padding: 24px 16px 16px; }
    .hero-overlay h1 { font-size: 1.1rem; max-width: 100%; }
    .hero-overlay .hero-meta { font-size: 0.75rem; }
    .hero-cta { padding: 8px 16px; font-size: 0.8rem; }
    .site-header { padding: 0 12px; }
    .header-inner { gap: 12px; }
    .site-logo { font-size: 1rem; }
    .site-logo .icon { font-size: 1.2rem; }
    .header-nav { gap: 10px; }
    .header-nav a { font-size: 0.75rem; }
    .lang-switcher { margin-left: 6px; padding-left: 6px; gap: 2px; }
    .lang-switcher a { padding: 3px 6px; font-size: 0.72rem; }
    .article-body { padding: 20px; }
    .knowledge-grid { grid-template-columns: 1fr; }
    .main-container { padding: 16px; }
}
