/*
Theme Name: CharityNews 公益新聞
Theme URI: http://charitynews.chinduo.com
Author: 社團法人唯愛公益協會附設綠綠發芽希望工坊
Description: 專為社團法人唯愛公益協會附設綠綠發芽希望工坊設計的公益新聞媒體平台主題
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: charitynews
*/

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@300;400;500;700;900&display=swap');

/* ===========================
   Reset & Base
=========================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: 'Noto Sans TC', 'Microsoft JhengHei', Arial, sans-serif; color: #1e293b; background: #f8fafc; line-height: 1.6; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }

/* ===========================
   Top Banner (SEO Keyword)
=========================== */
.top-banner {
    background: #1a3a5c;
    color: #93c5fd;
    text-align: center;
    padding: 8px 20px;
    font-size: 13px;
    letter-spacing: 0.5px;
}
.top-banner strong { color: #fff; }

/* ===========================
   Header
=========================== */
.site-header {
    background: #fff;
    border-bottom: 3px solid #2563eb;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}
.site-logo { display: flex; align-items: center; gap: 12px; }
.logo-icon {
    width: 44px; height: 44px;
    background: linear-gradient(135deg, #2563eb, #16a34a);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; color: white; font-weight: 900;
}
.logo-text { display: flex; flex-direction: column; }
.logo-main { font-size: 22px; font-weight: 900; color: #1a3a5c; line-height: 1.2; }
.logo-main span { color: #2563eb; }
.logo-sub { font-size: 11px; color: #64748b; letter-spacing: 1px; }
.site-nav ul { list-style: none; display: flex; gap: 4px; }
.site-nav ul li a {
    display: block; padding: 8px 14px;
    font-size: 14px; font-weight: 500; color: #334155;
    border-radius: 6px; transition: all 0.2s;
}
.site-nav ul li a:hover,
.site-nav ul li.current-menu-item a { background: #eff6ff; color: #2563eb; }

/* ===========================
   Hero Section
=========================== */
.site-hero {
    background: linear-gradient(135deg, #1a3a5c 0%, #2563eb 55%, #16a34a 100%);
    padding: 70px 20px;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}
.site-hero::before {
    content: '';
    position: absolute; top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
}
.hero-inner { max-width: 900px; margin: 0 auto; position: relative; z-index: 1; }
.hero-tag {
    display: inline-block;
    background: rgba(255,255,255,0.18);
    border: 1px solid rgba(255,255,255,0.4);
    color: #fff; padding: 5px 18px;
    border-radius: 30px; font-size: 13px;
    margin-bottom: 20px; letter-spacing: 1px;
}
.hero-title {
    font-size: 40px; font-weight: 900;
    line-height: 1.35; margin-bottom: 16px;
    text-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.hero-subtitle { font-size: 18px; opacity: 0.9; margin-bottom: 32px; font-weight: 300; }
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.btn-primary {
    background: #fff; color: #2563eb;
    padding: 12px 28px; border-radius: 8px;
    font-weight: 700; font-size: 15px;
    transition: all 0.2s; border: 2px solid transparent;
}
.btn-primary:hover { background: transparent; color: #fff; border-color: #fff; }
.btn-outline {
    background: transparent; color: #fff;
    padding: 12px 28px; border-radius: 8px;
    font-weight: 700; font-size: 15px;
    border: 2px solid rgba(255,255,255,0.7); transition: all 0.2s;
}
.btn-outline:hover { background: rgba(255,255,255,0.18); }

/* ===========================
   Breaking News Ticker
=========================== */
.news-ticker {
    background: #2563eb; color: white;
    padding: 10px 0; overflow: hidden;
    display: flex; align-items: center;
}
.ticker-label {
    background: #dc2626; color: white;
    padding: 4px 16px; font-size: 13px; font-weight: 700;
    white-space: nowrap; flex-shrink: 0; margin-right: 20px;
}
.ticker-content { overflow: hidden; flex: 1; }
.ticker-track {
    display: flex;
    animation: ticker-scroll 35s linear infinite;
    white-space: nowrap;
}
.ticker-track:hover { animation-play-state: paused; }
.ticker-item { font-size: 14px; padding-right: 60px; }
.ticker-item::before { content: '▶ '; color: #93c5fd; margin-right: 4px; }
@keyframes ticker-scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* ===========================
   Container & Section Headers
=========================== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section-header {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 28px; padding-bottom: 16px;
    border-bottom: 2px solid #e2e8f0;
}
.section-header h2 { font-size: 22px; font-weight: 800; color: #1a3a5c; }
.section-tag {
    background: #2563eb; color: white;
    padding: 3px 12px; border-radius: 4px;
    font-size: 12px; font-weight: 700;
}

/* ===========================
   News Section
=========================== */
.news-section { padding: 52px 0; background: #fff; }
.news-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 28px; }

.featured-article { border-radius: 12px; overflow: hidden; background: #f1f5f9; }
.featured-img {
    width: 100%; height: 260px;
    background: linear-gradient(135deg, #dbeafe 0%, #dcfce7 100%);
    display: flex; align-items: center; justify-content: center; font-size: 64px;
    object-fit: cover;
}
.featured-content { padding: 24px; }
.article-category {
    display: inline-block;
    background: #eff6ff; color: #2563eb;
    padding: 3px 10px; border-radius: 4px;
    font-size: 12px; font-weight: 700; margin-bottom: 10px;
}
.featured-content h3 { font-size: 20px; font-weight: 800; color: #1a3a5c; margin-bottom: 10px; line-height: 1.4; }
.featured-content p { font-size: 14px; color: #64748b; line-height: 1.7; }
.article-meta { display: flex; gap: 16px; margin-top: 14px; font-size: 12px; color: #94a3b8; }

.news-list { display: flex; flex-direction: column; gap: 14px; }
.news-item {
    display: flex; gap: 14px; padding: 14px;
    border-radius: 8px; background: #f8fafc;
    border: 1px solid #e2e8f0; transition: all 0.2s; cursor: pointer;
}
.news-item:hover { border-color: #bfdbfe; background: #eff6ff; transform: translateX(4px); }
.news-thumb {
    width: 80px; height: 68px; border-radius: 6px; flex-shrink: 0;
    background: linear-gradient(135deg, #dbeafe, #dcfce7);
    display: flex; align-items: center; justify-content: center; font-size: 28px;
    overflow: hidden;
}
.news-thumb img { width: 100%; height: 100%; object-fit: cover; }
.news-info h4 {
    font-size: 14px; font-weight: 700; color: #1e293b;
    margin-bottom: 6px; line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
}
.news-info .date { font-size: 12px; color: #94a3b8; }

/* ===========================
   Activities Section
=========================== */
.activities-section { padding: 52px 0; background: #f0f9ff; }
.activities-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.activity-card {
    background: white; border-radius: 12px; overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.2s, box-shadow 0.2s;
}
.activity-card:hover { transform: translateY(-4px); box-shadow: 0 10px 28px rgba(0,0,0,0.12); }
.card-img {
    height: 155px;
    background: linear-gradient(135deg, #eff6ff, #f0fdf4);
    display: flex; align-items: center; justify-content: center; font-size: 52px;
}
.card-body { padding: 20px; }
.card-body .tag {
    display: inline-block;
    background: #dcfce7; color: #16a34a;
    padding: 3px 10px; border-radius: 4px;
    font-size: 12px; font-weight: 700; margin-bottom: 10px;
}
.card-body h3 { font-size: 16px; font-weight: 700; color: #1a3a5c; margin-bottom: 8px; line-height: 1.4; }
.card-body p { font-size: 13px; color: #64748b; line-height: 1.6; }
.card-footer {
    padding: 12px 20px;
    border-top: 1px solid #f1f5f9;
    display: flex; justify-content: space-between; align-items: center;
    font-size: 12px; color: #94a3b8;
}
.card-footer a { color: #2563eb; font-weight: 600; }

/* ===========================
   About / Mission Section
=========================== */
.about-section {
    padding: 64px 0;
    background: linear-gradient(135deg, #1a3a5c, #2563eb);
    color: white;
}
.about-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.about-text h2 { font-size: 28px; font-weight: 900; margin-bottom: 6px; line-height: 1.3; }
.about-text .keyword { color: #86efac; font-size: 15px; margin-bottom: 20px; display: block; }
.about-text p { font-size: 15px; opacity: 0.9; line-height: 1.8; margin-bottom: 14px; }
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.stat-item {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 12px; padding: 24px; text-align: center;
}
.stat-number { font-size: 38px; font-weight: 900; color: #86efac; display: block; line-height: 1; margin-bottom: 8px; }
.stat-label { font-size: 13px; opacity: 0.8; line-height: 1.4; }

/* ===========================
   Footer
=========================== */
.site-footer { background: #0f172a; color: #94a3b8; padding: 48px 0 0; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; padding-bottom: 40px; }
.footer-about h3 { color: white; font-size: 18px; font-weight: 800; margin-bottom: 12px; }
.footer-about p { font-size: 13px; line-height: 1.8; margin-bottom: 16px; }
.footer-keyword {
    font-size: 12px; color: #86efac;
    background: rgba(22,163,74,0.1);
    border: 1px solid rgba(22,163,74,0.3);
    padding: 8px 14px; border-radius: 6px; display: inline-block;
}
.footer-links h4 {
    color: white; font-size: 14px; font-weight: 700;
    margin-bottom: 16px; padding-bottom: 8px;
    border-bottom: 1px solid #1e293b;
}
.footer-links ul { list-style: none; }
.footer-links ul li { margin-bottom: 10px; }
.footer-links ul li a {
    font-size: 13px; color: #94a3b8;
    transition: color 0.2s; display: flex; align-items: center; gap: 6px;
}
.footer-links ul li a::before { content: '›'; color: #2563eb; }
.footer-links ul li a:hover { color: white; }
.footer-copyright {
    border-top: 1px solid #1e293b; padding: 20px 0;
    text-align: center; font-size: 12px; color: #64748b;
}

/* ===========================
   Responsive
=========================== */
@media (max-width: 1024px) {
    .news-grid { grid-template-columns: 1fr; }
    .about-inner { grid-template-columns: 1fr; gap: 40px; }
    .footer-inner { grid-template-columns: 1fr 1fr; }
    .footer-about { grid-column: 1 / -1; }
}
@media (max-width: 768px) {
    .hero-title { font-size: 26px; }
    .activities-grid { grid-template-columns: 1fr; }
    .site-nav { display: none; }
    .footer-inner { grid-template-columns: 1fr; }
}
