/* === 深圳市百年公益基金会 — 清新简洁版 === */

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

:root {
    --green: #2d8c6c;
    --green-light: #e8f5f0;
    --teal: #1a7a5a;
    --text: #333;
    --text-light: #666;
    --text-muted: #999;
    --bg: #fafbfc;
    --white: #fff;
    --border: #e8ecef;
    --shadow: 0 2px 12px rgba(0,0,0,0.06);
    --radius: 10px;
    --max-width: 960px;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

html { font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--green); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--teal); }

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

/* Skip link */
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.screen-reader-text:focus {
    position: fixed; top: 10px; left: 10px; width: auto; height: auto; clip: auto;
    background: var(--green); color: #fff; padding: 12px 20px; border-radius: 6px; z-index: 9999;
}

/* Header */
.site-header {
    background: linear-gradient(135deg, #1a6b4a 0%, #2d8c6c 50%, #3da87a 100%);
    padding: 36px 0 28px;
    text-align: center;
}
.site-branding { 
    max-width: var(--max-width); margin: 0 auto; padding: 0 24px;
    display: flex; flex-direction: column; align-items: center; gap: 2px;
}

/* Logo + Title row */
.site-branding-top {
    display: flex; flex-direction: column; align-items: center; gap: 10px;
}

/* Logo */
.site-logo img {
    width: 64px; height: 64px; border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.3);
    background: #fff; padding: 3px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    transition: transform 0.3s;
}
.site-logo img:hover { transform: scale(1.08); }

.site-title { font-size: 1.6rem; font-weight: 700; line-height: 1.3; color: #fff; }
.site-title a { color: #fff; }
.site-title a:hover { color: rgba(255,255,255,0.85); }
.site-description { 
    color: rgba(255,255,255,0.85); font-size: 0.78rem; font-weight: 400;
    letter-spacing: 0.06em;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255,255,255,0.18);
}

/* Navigation */
.primary-navigation { 
    max-width: var(--max-width); 
    margin: 22px auto 0; 
    padding: 0 24px;
}
.menu-button-container { display: none; }
.primary-navigation .primary-menu-container { 
    display: flex; justify-content: center; flex-wrap: wrap; gap: 4px;
}
.primary-navigation ul { list-style: none; display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; }
.primary-navigation li { position: relative; }
.primary-navigation > div > ul > li > a {
    display: block; padding: 8px 18px; color: rgba(255,255,255,0.85);
    border-radius: 20px; font-size: 0.9rem; font-weight: 500;
    transition: all 0.2s;
}
.primary-navigation > div > ul > li > a:hover,
.primary-navigation > div > ul > li.current-menu-item > a,
.primary-navigation > div > ul > li.current-post-ancestor > a {
    background: rgba(255,255,255,0.15); color: #fff;
}

/* Sub menu */
.primary-navigation .sub-menu {
    display: none; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
    background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 8px 0; min-width: 160px; z-index: 100;
}
.primary-navigation li:hover > .sub-menu,
.primary-navigation li.submenu-open > .sub-menu { display: block; }
.primary-navigation .sub-menu li a {
    display: block; padding: 8px 20px; color: var(--text); font-size: 0.85rem;
    white-space: nowrap;
}
.primary-navigation .sub-menu li a:hover { background: var(--green-light); color: var(--green); }
.sub-menu-toggle { display: none; }

/* Content */
.site-content { max-width: var(--max-width); margin: 0 auto; padding: 40px 24px; }
.content-area { width: 100%; }

/* Page header */
.page-header { text-align: center; margin-bottom: 36px; }
.page-title { font-size: 1.5rem; color: var(--green); font-weight: 700; }
.page-title span { color: var(--text); }

/* Article cards (category/archive lists) */
article.post, article.page {
    background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 28px 32px; margin-bottom: 20px; transition: box-shadow 0.2s;
}
article.post:hover, article.page:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.1); }

/* Entry header */
.entry-header { margin-bottom: 16px; }
.entry-title, .entry-title a {
    font-size: 1.25rem; font-weight: 700; color: var(--text); line-height: 1.5;
}
.entry-title a:hover { color: var(--green); }

/* Single post */
.single .entry-header { text-align: center; margin-bottom: 32px; }
.single .entry-title { font-size: 1.6rem; }
.entry-content { font-size: 1rem; line-height: 1.9; }
.entry-content p { margin-bottom: 1.2em; }
.entry-content a { border-bottom: 1px solid var(--green); }
.entry-content a:hover { border-bottom-color: var(--teal); }

/* Entry footer */
.entry-footer {
    margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border);
    font-size: 0.82rem; color: var(--text-muted); display: flex; flex-wrap: wrap; gap: 12px;
}
.entry-footer a { color: var(--text-light); }
.entry-footer a:hover { color: var(--green); }

/* More link */
.more-link {
    display: inline-block; padding: 4px 14px; background: var(--green-light);
    border-radius: 20px; font-size: 0.85rem; margin-left: 6px;
}

/* Post navigation */
.post-navigation { margin-top: 40px; }
.nav-links { display: flex; justify-content: space-between; gap: 16px; }
.nav-previous, .nav-next { flex: 1; }
.nav-previous a, .nav-next a {
    display: block; padding: 20px; background: var(--white); border-radius: var(--radius);
    box-shadow: var(--shadow); text-decoration: none; transition: box-shadow 0.2s;
}
.nav-previous a:hover, .nav-next a:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.1); }
.meta-nav { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 4px; }
.post-title { font-size: 0.95rem; color: var(--text); font-weight: 600; }
.nav-next { text-align: right; }
.meta-nav svg { width: 16px; height: 16px; vertical-align: -2px; }

/* Pagination */
.pagination { margin-top: 40px; text-align: center; }
.pagination .nav-links { justify-content: center; flex-wrap: wrap; gap: 6px; }
.pagination .page-numbers {
    display: inline-block; padding: 8px 16px; background: var(--white);
    border-radius: 6px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); font-size: 0.9rem;
    color: var(--text-light);
}
.pagination .page-numbers.current { background: var(--green); color: #fff; }
.pagination .page-numbers:hover:not(.current):not(.dots) { background: var(--green-light); color: var(--green); }

/* Footer */
.site-footer { text-align: center; padding: 40px 24px; background: var(--white); border-top: 1px solid var(--border); }
.site-footer .site-name { font-size: 0.9rem; color: var(--text-light); margin-bottom: 8px; }
.site-footer .site-name a { color: var(--green); }
.site-footer .powered-by { font-size: 0.78rem; color: var(--text-muted); }
.site-footer .powered-by a { color: var(--text-muted); }

/* Mobile */
@media (max-width: 768px) {
    .site-header { padding: 28px 0 22px; }
    .site-branding { gap: 12px; }
    .site-logo img { width: 52px; height: 52px; }
    .site-title { font-size: 1.3rem; }
    .site-description { font-size: 0.82rem; }
    
    .menu-button-container { display: flex; justify-content: center; }
    .menu-button-container button {
        background: rgba(255,255,255,0.15); border: none; color: #fff; 
        padding: 10px 24px; border-radius: 20px; cursor: pointer; font-size: 0.9rem;
    }
    .dropdown-icon.open, .dropdown-icon.close { display: inline-flex; align-items: center; gap: 6px; }
    .dropdown-icon svg { flex-shrink: 0; }
    .menu-button-container button[aria-expanded="false"] .dropdown-icon.close { display: none; }
    .menu-button-container button[aria-expanded="true"] .dropdown-icon.open { display: none; }
    .primary-navigation .primary-menu-container { display: none; }
    .primary-navigation .primary-menu-container.toggled { display: flex; }
    .primary-navigation ul { flex-direction: column; align-items: center; }
    .primary-navigation .sub-menu { position: static; transform: none; box-shadow: none; text-align: center; background: rgba(255,255,255,0.08); border-radius: 8px; margin-top: 4px; }
    .sub-menu-toggle {
        display: inline-flex; align-items: center; justify-content: center;
        width: 28px; height: 28px; margin-left: 4px;
        background: rgba(255,255,255,0.12); border: none; border-radius: 50%;
        color: #fff; font-size: 1rem; cursor: pointer; vertical-align: middle;
    }
    .sub-menu-toggle:hover { background: rgba(255,255,255,0.25); }
    .sub-menu-toggle[aria-expanded="false"] .icon-minus { display: none; }
    .sub-menu-toggle[aria-expanded="true"] .icon-plus { display: none; }
    
    .site-content { padding: 24px 16px; }
    article.post, article.page { padding: 20px; }
    .single .entry-title { font-size: 1.3rem; }
    .nav-links { flex-direction: column; }
    .nav-next { text-align: left; }
}

/* Sub-navigation grid (category landing pages) */
.subnav-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px; margin-top: 8px;
}
.subnav-card {
    display: flex; flex-direction: column; gap: 6px;
    padding: 28px 24px;
    background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
    text-decoration: none; color: var(--text);
    transition: all 0.2s; border: 1px solid transparent;
}
.subnav-card:hover {
    border-color: var(--green); box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}
.subnav-card .subnav-title {
    font-size: 1.05rem; font-weight: 600; color: var(--text);
}
.subnav-card .subnav-desc {
    font-size: 0.82rem; color: var(--text-muted); line-height: 1.5;
}
.subnav-card:hover .subnav-title { color: var(--green); }
@media (max-width: 768px) {
    .subnav-grid { grid-template-columns: 1fr; }
    .subnav-card { padding: 22px 20px; }
}

/* Hide old WP cruft */
.wp-block-button__link { all: unset; }
.wp-smiley, .emoji { display: inline !important; height: 1em !important; width: 1em !important; }
.aligncenter { text-align: center; }
.has-text-align-center { text-align: center; }
.has-text-align-left { text-align: left; }
.has-text-align-right { text-align: right; }

/* Hide Elementor stuff */
.elementor-kit, [class*="elementor-"], [data-elementor-type] { all: unset; }
.elementor-widget-container, .elementor-heading-title { all: unset; }
