﻿/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: #fafafa;
    color: #111;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

ul,
li {
    list-style: none;
}

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

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: #111;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    aspect-ratio: 4 / 3;
    background: #eaeef2;
}

/* ===== HEADER & NAVIGATION (with scroll effect) ===== */
.site-header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background 0.2s, box-shadow 0.2s;
}

.site-header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(8px);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo a {
    font-weight: 700;
    font-size: 1.6rem;
    letter-spacing: -0.5px;
}

.logo span {
    font-weight: 300;
    color: #2b6f9c;
}

.main-nav .nav-list {
    display: flex;
    gap: 1.8rem;
    list-style: none;
}

.main-nav a {
    font-weight: 500;
    padding: 0.2rem 0;
    border-bottom: 2px solid transparent;
    transition: 0.2s;
}

.main-nav a:hover,
.main-nav a.active {
    border-bottom-color: #2b6f9c;
    color: #2b6f9c;
}

.hamburger {
    display: none;
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
}

/* ===== TOP ANNOUNCEMENT ===== */
.top-announcement {
    background: #f0f5fa;
    padding: 0.6rem 0;
    font-size: 0.9rem;
    border-bottom: 1px solid #ddd;
}

.top-announcement a {
    color: #2b6f9c;
    font-weight: 500;
}

/* ===== BREADCRUMB (consistent across pages) ===== */
.breadcrumb {
    margin: 0 0 1rem 0;
}

.breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    background: #f5f7fa;
    padding: 0.6rem 1.2rem;
    border-radius: 40px;
    font-size: 0.85rem;
}

.breadcrumb li:not(:last-child)::after {
    content: "›";
    margin: 0 0.6rem;
    color: #888;
}

.breadcrumb a {
    color: #2b6f9c;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb [aria-current="page"] {
    color: #333;
    font-weight: 500;
}

/* ===== SECTION TITLES ===== */
.section {
    padding: 3rem 0;
}

.section-title {
    font-size: 2rem;
    font-weight: 500;
    margin-bottom: 2rem;
    letter-spacing: -0.02em;
    border-left: 6px solid #2b6f9c;
    padding-left: 1rem;
}

/* ===== CARD STYLES (shared across all pages) ===== */
.card {
    background: #fff;
    border-radius: 0;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
    border: 1px solid #f0f0f0;
    border-radius: 15px;
}

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

.img-link {
    overflow: hidden;
    display: block;
}

.img-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.card:hover .img-link img {
    transform: scale(1.03);
}

.card-content {
    padding: 1.2rem 1rem 1rem;
}

.card-content h3 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 1.5rem;
}

.category-tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 0.2rem 0.6rem;
    background: #eef2f7;
    color: #2b2b2b;
    margin-bottom: 0.5rem;
}

.category-tag.world {
    background: #dde9f5;
    color: #1a4d70;
}

.category-tag.tech {
    background: #e1f0e8;
    color: #1f6d5a;
}

.category-tag.health {
    background: #fce9e9;
    color: #aa4e4e;
}

.category-tag.politics {
    background: #f2e5d5;
    color: #8b5a2b;
}

.category-tag.special {
    background: #f1e1fa;
    color: #6b3f8c;
}

h3,
h4 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.5rem;
}

h3 a,
h4 a {
    color: #111;
}

h3 a:hover,
h4 a:hover {
    color: #2b6f9c;
}

.excerpt {
    color: #444;
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.meta {
    font-size: 1rem;
    color: #6f6f6f;
}

/* ===== GRID LAYOUTS (homepage specific) ===== */
.featured-grid-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.card-vertical-group {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.card-row-three {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.special-grid {
    display: grid;
    gap: 2rem;
}

.card-horizontal {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.card-horizontal .img-link {
    flex: 0 0 20%;
    width: 100%;
    height: 100%;
}

.card-horizontal .card-content {
    flex: 1;
    padding-left: 0;
}

/* ===== HOT TOPICS (cloud) ===== */
.hot-topics {
    background: #f9fbfd;
}

.topic-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.topic {
    background: white;
    border: 1px solid #ddd;
    padding: 0.4rem 1rem;
    border-radius: 40px;
    font-size: 0.9rem;
    transition: 0.1s;
}

.topic:hover {
    background: #2b6f9c;
    color: white;
    border-color: #2b6f9c;
}

/* ===== FOOTER ===== */
.site-footer {
    background: #111;
    color: #ccc;
    padding: 2rem 0;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.footer-col h3 {
    color: white;
    font-size: 1.5rem;
}

.footer-col h4 {
    color: white;
    margin-bottom: 1rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 0.5rem;
}

.footer-col a {
    color: #aaa;
}

.footer-col a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    font-size: 0.8rem;
}

.footer-bottom p {
    text-align: center;
    margin: 0;
}

.footer-bottom a {
    font-size: 0.8rem;
    color: #ccc;
}

/* ===== BACK TO TOP BUTTON ===== */
#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 44px;
    height: 44px;
    background: #2b6f9c;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: 0.2s;
    z-index: 99;
}

#backToTop:hover {
    opacity: 1;
    transform: scale(1.05);
}

/* ===== PAGE HEADER (list & detail) ===== */
.page-header {
    background: #fff;
    padding: 2rem 0;
    border-bottom: 1px solid #eee;
}

.page-header h1 {
    font-weight: 500;
    font-size: 2.2rem;
    margin-bottom: 1rem;
}

.header-sub {
    font-size: 1.2rem;
    color: #666;
    font-weight: 300;
}

/* ===== FILTER BAR (static dropdown, no js) ===== */
.filter-bar {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.css-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-trigger {
    border: 1px solid #ccc;
    background: white;
    padding: 0.5rem 2rem 0.5rem 1rem;
    border-radius: 30px;
    cursor: default;
    font-size: 0.9rem;
    position: relative;
}

.dropdown-trigger .arrow {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.7rem;
}

.dropdown-menu {
    position: absolute;
    top: 120%;
    left: 0;
    background: white;
    border: 1px solid #eee;
    list-style: none;
    padding: 0.5rem 0;
    border-radius: 8px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.05);
    min-width: 150px;
    opacity: 0;
    pointer-events: none;
    transition: 0.1s;
    z-index: 10;
}

.css-dropdown:hover .dropdown-menu {
    opacity: 1;
    pointer-events: auto;
}

.dropdown-menu li {
    padding: 0.4rem 1rem;
}

.dropdown-menu li:hover {
    background: #f5f5f5;
}

/* ===== LIST PAGE LAYOUT (main + sidebar) ===== */
.list-layout {
    display: grid;
    grid-template-columns: 70% 28%;
    gap: 3rem;
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.list-item {
    margin-bottom: 1.5rem;
}

.list-item .img-link {
    flex: 0 0 40%;
}

.sidebar-widget {
    margin-bottom: 2rem;
}

.sidebar-widget h4 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid #eee;
    padding-bottom: 0.5rem;
}

/* ===== SIDEBAR COMPONENTS (补充) ===== */
.link-list {
    list-style: none;
}

.link-list li {
    margin-bottom: 0.6rem;
    background: #f3f3f3;
    padding: 10px;
    border-radius: 10px;
}

.link-list a {
    color: #2b2b2b;
    font-weight: 400;
    transition: color 0.1s;
}

.link-list a:hover {
    color: #2b6f9c;
    text-decoration: underline;
}

.update-list {
    list-style: none;
}

.update-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.6rem;
    font-size: 1rem;
    background: #f3f3f3;
    padding: 10px;
    border-radius: 10px;
}

.update-list a {
    color: #2b2b2b;
    flex: 1;
    padding-right: 0.5rem;
}

.update-list a:hover {
    color: #2b6f9c;
    text-decoration: underline;
}

.update-date {
    color: #888;
    font-size: 0.8rem;
    white-space: nowrap;
}

.category-list {
    list-style: none;
}

.category-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.6rem;
    border-bottom: 1px dashed #eee;
    padding-bottom: 0.4rem;
    background: #f3f3f3;
    padding: 10px;
    border-radius: 10px;
}

.category-list a {
    color: #2b2b2b;
    font-weight: 400;
}

.category-list a:hover {
    color: #2b6f9c;
}

.cat-count {
    background: #f0f0f0;
    padding: 0.1rem 0.5rem;
    border-radius: 20px;
    font-size: 0.7rem;
    color: #555;
}

.author-card {
    text-align: center;
    padding: 1.5rem 1rem;
    background: #fff;
    border: 1px solid #f0f0f0;
}

.author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 1rem;
    border: 3px solid #f0f5fa;
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-card h4 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.author-bio {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.5;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-list a {
    background: #f0f0f0;
    padding: 0.3rem 0.8rem;
    font-size: 0.8rem;
    border-radius: 20px;
}

.archive-list {
    list-style: none;
}

.archive-list li {
    margin-bottom: 0.3rem;
}

.simple-form input,
.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 0.6rem;
    margin-bottom: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fefefe;
}

.btn {
    background: #2b6f9c;
    color: white;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 30px;
    font-weight: 500;
    cursor: default;
}

.pagination {
    display: flex;
    gap: 0.4rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.page,
.dots {
    display: inline-block;
    padding: 0.5rem 0.9rem;
    border: 1px solid #e0e0e0;
    background: white;
    color: #333;
}

.page.active {
    background: #2b6f9c;
    color: white;
    border-color: #2b6f9c;
}

.page.prev,
.page.next {
    font-weight: 500;
}

/* ===== DETAIL PAGE STYLES ===== */
.post-content {
    font-size: 0.985rem;
    letter-spacing: 0.2px;
    color: #171717;
    line-height: 1.75;
}

.post-content img{
    margin: 0 auto;
}

.post-header .subhead {
    font-size: 1.2rem;
    font-weight: 300;
    color: #3d3d3d;
    margin: 0.5rem 0 1rem;
    line-height: 1.5;
    border-left: 3px solid #2b6f9c;
    padding-left: 1rem;
}

.post-meta-bar {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    flex-wrap: wrap;
    margin: 1rem 0 1.5rem;
    font-size: 0.9rem;
    color: #555;
}

.author-mini {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.author-mini img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.view-count::before {
    content: "👁️";
    margin-right: 0.2rem;
    opacity: 0.7;
}

.post-content p {
    font-size: 0.985rem;
    letter-spacing: 0.2px;
    color: #171717;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.post-content h2 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
    font-weight: 600;
}

.post-tags {
    margin: 2rem 0;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.post-tags a {
    background: #f0f0f0;
    padding: 0.3rem 0.9rem;
    border-radius: 20px;
    font-size: 0.8rem;
    color: #333;
}

.post-tags a:hover {
    background: #2b6f9c;
    color: white;
}

.author-bio-card {
    display: flex;
    gap: 1.5rem;
    background: #f8fafc;
    padding: 2rem;
    margin: 2rem 0;
    border-radius: 12px;
    align-items: center;
}

.author-bio-card img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.author-bio-card h4 {
    margin-bottom: 0.5rem;
}

.author-bio-card p {
    font-size: 0.9rem;
    color: #3d3d3d;
}

.share-bar {
    padding: 1.5rem 0;
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.share-btn {
    background: #f0f0f0;
    border: none;
    padding: 0.3rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
}

.share-btn:hover {
    background: #2b6f9c;
    color: white;
}

.comments-section {
    margin-top: 3rem;
}

.comment {
    background: #f9f9f9;
    padding: 1rem;
    margin-bottom: 1rem;
    border-left: 4px solid #2b6f9c;
}

.comment-date {
    font-size: 0.8rem;
    color: #888;
    margin-left: 1rem;
}

.comment-form {
    background: #f5f5f5;
    padding: 2rem;
    margin-top: 2rem;
}

.comment-form input,
.comment-form textarea {
    background: white;
}

.related-posts h3{
    margin: 20px 0;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin: 2rem 0;
}

.related-card {
    background: #fff;
    border: 1px solid #f0f0f0;
    padding: 1rem;
    transition: 0.2s;
}

.related-card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

.related-card img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    margin-bottom: 0.8rem;
}

.related-card h5 {
    font-size: 1rem;
    margin-bottom: 0.3rem;
}

.related-card .meta {
    font-size: 0.75rem;
}

/* ===== AUTHOR PAGE STYLES ===== */
.author-page {
    padding: 3rem 0;
}

.author-header {
    display: flex;
    gap: 3rem;
    align-items: center;
    margin-bottom: 3rem;
    background: #fff;
    padding: 2.5rem;
    border-radius: 24px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.02);
    border: 1px solid #f0f0f0;
}

.author-avatar-large {
    flex-shrink: 0;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #f0f5fa;
}

.author-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-headline h1 {
    font-size: 2.8rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.author-tagline {
    font-size: 1.2rem;
    color: #2b6f9c;
    font-weight: 400;
    margin-bottom: 1rem;
}

.author-bio-short {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #2d2d2d;
    max-width: 700px;
}

.author-details {
    background: #fff;
    padding: 2.5rem;
    border-radius: 24px;
    border: 1px solid #f0f0f0;
    margin-top: 2rem;
}

.author-details h2 {
    font-size: 1.8rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    border-left: 6px solid #2b6f9c;
    padding-left: 1.2rem;
}

.author-details h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 2rem 0 1rem;
    color: #1f1f1f;
}

.author-details p {
    font-size: 1rem;
    line-height: 1.7;
    color: #2a2a2a;
    margin-bottom: 1.3rem;
}

.author-details ul {
    margin: 1rem 0 1.5rem 1.5rem;
    line-height: 1.7;
}

.author-details li {
    margin-bottom: 0.5rem;
}

.author-details a {
    color: #2b6f9c;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.author-details a:hover {
    text-decoration: none;
    color: #1a4d70;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {

    .card-content,
    .card-horizontal .card-content {
        padding: 16px;
    }

    .site-header {
        position: relative;
    }

    .header-container {
        height: 54px;
    }

    .post-meta-bar {
        gap: 0.5rem;
        font-size: 0.75rem;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 54px;
        left: 0;
        width: 100%;
        background: white;
        padding: 1rem;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    }

    .main-nav.active {
        display: block;
    }

    .nav-list {
        flex-direction: column;
        gap: 1rem;
    }

    .hamburger {
        display: block;
    }

    .featured-grid-wrapper {
        grid-template-columns: 1fr;
    }

    .card-row-three,
    .footer-grid,
    .list-layout,
    .related-grid {
        grid-template-columns: 100%;
    }

    .card-horizontal {
        flex-direction: column;
        align-items: flex-start;
    }

    .card-horizontal .img-link {
        width: 100%;
    }

    .filter-bar {
        flex-direction: column;
        align-items: start;
    }

    .post-header h1 {
        font-size: 1.4rem;
        /* approx 23px */
    }

    .author-header {
        flex-direction: column;
        text-align: center;
        padding: 1.8rem;
    }

    .author-headline h1 {
        font-size: 2.2rem;
    }

    .author-avatar-large {
        width: 140px;
        height: 140px;
    }

    .author-bio-card {
        flex-direction: column;
        text-align: center;
    }

    #backToTop {
        bottom: 20px;
        right: 20px;
    }
}