﻿/* ===== Global Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: #ffffff;
    color: #1e2a3a;
    line-height: 1.6;
    scroll-behavior: smooth;
}

a {
    text-decoration: none;
    transition: color 0.3s;
    color: inherit;
}

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

ul,
li {
    list-style: none;
}

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

/* ===== Header & Navigation ===== */
.site-header {
    background: #ffffff;
    border-bottom: 1px solid #eaeef2;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background 0.3s, box-shadow 0.3s;
}

.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: 72px;
}

.logo a {
    text-decoration: none;
    font-weight: 600;
    font-size: 1.7rem;
    letter-spacing: -0.5px;
    color: #0b2b40;
}

.logo span {
    color: #0066a1;
    font-weight: 300;
}

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

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

.main-nav a {
    text-decoration: none;
    color: #2c3e50;
    font-weight: 500;
    font-size: 1rem;
    transition: color 0.2s;
}

.main-nav a:hover,
.main-nav li.active a {
    color: #0066a1;
    border-bottom: 2px solid #0066a1;
    padding-bottom: 4px;
}

/* ===== Announcement Bar ===== */
.announcement-bar {
    background: #f2f6f9;
    padding: 12px 0;
    border-bottom: 1px solid #dce5ec;
    font-size: 0.95rem;
}

.announcement-bar a {
    color: #0066a1;
    font-weight: 500;
    text-decoration: underline;
}

/* ===== Cards & Common Components ===== */
.card-img img {
    width: 100%;
    height: auto;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: 12px;
    transition: transform 0.3s ease;
}

.card:hover img {
    transform: scale(1.02);
}

.card-content {
    flex: 1;
}

.category-tag {
    display: inline-block;
    background: #e4ecf5;
    color: #0066a1;
    padding: 4px 10px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    margin-bottom: 8px;
}

.category-tag.tech {
    background: #e1f0fa;
    color: #03588c;
}

.category-tag.environment {
    background: #e0f0e5;
    color: #1d6b41;
}

.category-tag.health {
    background: #fee9e0;
    color: #b13e3e;
}

.card h3,
.card h4 {
    line-height: 1.4;
    margin-bottom: 6px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.card h3 a,
.card h4 a {
    text-decoration: none;
    color: #1e2a3a;
    transition: color 0.2s;
}

.card h3 a:hover {
    color: #0066a1;
}

.excerpt {
    color: #4a5b6b;
    font-size: 0.95rem;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.meta {
    font-size: 0.85rem;
    color: #6c7a8a;
}

/* ===== Homepage Specific ===== */
.section-spotlight {
    padding: 48px 0 24px;
}

.spotlight-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 32px;
}

.spotlight-stack {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.card-stacked {
    display: flex;
    gap: 16px;
    background: #fff;
    border-radius: 12px;
}

.card-stacked .card-img {
    flex: 0 0 120px;
}

.card-stacked .card-img img {
    width: 120px;
    height: 90px;
    object-fit: cover;
    border-radius: 8px;
}

.section-category-grid {
    padding: 32px 0;
    background: #fafcfd;
}

.section-title {
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 32px;
    letter-spacing: -0.3px;
    border-left: 5px solid #0066a1;
    padding-left: 20px;
}

.section-title span {
    font-weight: 600;
    color: #0066a1;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-bottom: 48px;
}

.card-simple {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
    transition: all 0.2s;
}

.card-simple:hover {
    box-shadow: 0 12px 24px -8px rgba(0, 70, 150, 0.15);
    transform: translateY(-4px);
}

.card-simple .card-content {
    padding: 20px;
}

.card-highlight {
    border: 1px solid #c9ddec;
}

.feature-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.card-horizontal {
    display: flex;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.card-horizontal .card-img {
    flex: 0 0 240px;
}

.card-horizontal .card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-horizontal .card-content {
    padding: 20px;
}

.section-popular-tags {
    padding: 40px 0;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.tag {
    background: #eef2f6;
    padding: 8px 18px;
    border-radius: 40px;
    font-size: 0.9rem;
    color: #1e2a3a;
    transition: background 0.2s;
    cursor: default;
}

.tag:hover {
    background: #d4e0eb;
}

.static-filter {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    background: #f2f6f9;
    padding: 16px 20px;
    border-radius: 48px;
}

.fake-select select {
    padding: 8px 24px 8px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 40px;
    background: white;
    font-size: 0.95rem;
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%23333" stroke-width="2"><polyline points="6 9 12 15 18 9"/></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.section-latest-list {
    padding: 40px 0 60px;
}

.list-news {
    border-top: 1px solid #e2e8f0;
}

.list-item {
    display: flex;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid #edf2f7;
    text-decoration: none;
    color: #1e2a3a;
}

.list-item:hover .list-headline {
    color: #0066a1;
}

.list-time {
    font-weight: 500;
    min-width: 80px;
    color: #4a5b6b;
}

.list-headline {
    font-size: 1.1rem;
}

/* ===== Category / Listing Page ===== */
.breadcrumb-nav {
    margin: 24px 0 16px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 12px 20px;
    background: #f2f6f9;
    border-radius: 50px;
    font-size: 0.95rem;
}

.breadcrumb li {
    display: flex;
    align-items: center;
}

.breadcrumb li:not(:last-child)::after {
    content: "›";
    margin: 0 12px;
    color: #8a9cb0;
    font-size: 1.2rem;
    line-height: 1;
}

.breadcrumb a {
    color: #0066a1;
    text-decoration: none;
    font-weight: 500;
}

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

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

.category-layout {
    display: grid;
    grid-template-columns: 70% 28%;
    gap: 48px;
    padding: 32px 0;
}

.category-title {
    font-size: 2.2rem;
    font-weight: 400;
    margin-bottom: 24px;
    letter-spacing: -0.3px;
    border-left: 5px solid #0066a1;
    padding-left: 20px;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.sidebar {
    background: #eff7ff;
    padding: 24px;
    border-radius: 24px;
    align-self: start;
}

.sidebar-widget {
    margin-bottom: 40px;
}

.sidebar-widget h4 {
    margin-bottom: 16px;
    font-weight: 600;
}

.author-card {
    text-align: center;
    background: #ffffff;
    padding: 32px 24px;
    border-radius: 24px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.02);
    border: 1px solid #eaf0f6;
}

.author-avatar {
    width: 100px;
    height: 100px;
    margin: 0 auto 16px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #ffffff;
    box-shadow: 0 4px 12px rgba(0, 102, 161, 0.15);
}

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

.author-name {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1e2a3a;
}

.author-bio {
    font-size: 0.9rem;
    color: #5a6f82;
    line-height: 1.6;
}

.sidebar-list {
    list-style: none;
    margin-top: 8px;
}

.sidebar-list li {
    margin-bottom: 14px;
    border-bottom: 1px dashed #dde5ed;
    padding-bottom: 10px;
    background: #dbedff;
    padding: 10px;
    border-radius: 10px;
}

.sidebar-list li:last-child {
    border-bottom: none;
}

.sidebar-list a {
    text-decoration: none;
    color: #1e2a3a;
    font-weight: 500;
    transition: color 0.2s;
    display: inline-block;
}

.sidebar-list a:hover {
    color: #0066a1;
}

.sidebar-list.with-time li {
    display: flex;
    align-items: center;
    gap: 12px;

}

.sidebar-list.with-time .list-time {
    font-size: 0.85rem;
    font-weight: 500;
    color: #0066a1;
    min-width: 55px;
}

.category-counts a {
    display: flex;
    justify-content: space-between;
    width: 100%;
}

.category-counts .count {
    color: #6f8a9f;
    font-weight: 400;
    font-size: 0.9rem;
}

.pagination-wrapper {
    margin: 48px 0 20px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.page-numbers {
    display: inline-block;
    padding: 10px 16px;
    border: 1px solid #d0deed;
    border-radius: 40px;
    text-decoration: none;
    color: #1e2a3a;
    font-weight: 500;
    transition: all 0.2s;
    background: white;
    min-width: 48px;
    text-align: center;
}

.page-numbers.current {
    background: #0066a1;
    border-color: #0066a1;
    color: white;
}

.page-numbers:hover:not(.current) {
    background: #e6f0fa;
    border-color: #9bb7d4;
}

.prev,
.next {
    font-weight: 600;
    padding: 10px 22px;
}

/* ===== Article Detail Page ===== */
.article-main {
    width: 100%;
}

.full-article h1 {
    font-size: 2.6rem;
    line-height: 1.2;
    margin: 0 0 0.5rem;
}

.article-subhead {
    font-size: 1.3rem;
    font-weight: 400;
    color: #4a5b6b;
    margin-top: -0.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
    border-left: 3px solid #cbd5e1;
    padding-left: 1.2rem;
}

.article-meta-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
    margin: 1.5rem 0 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #4f6f8f;
    font-size: 0.95rem;
}

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

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

.author-mini span {
    font-weight: 600;
    color: #1e2a3a;
}

.views::before {
    content: "👁️";
    margin-right: 0.3rem;
    opacity: 0.7;
}

.article-categories {
    margin: 2rem 0 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.article-categories .category-tag {
    background: #eef2f6;
    color: #1e2a3a;
    font-weight: 500;
}

.author-bio-card {
    background: #f9fbfd;
    border-radius: 24px;
    padding: 2rem;
    margin: 2.5rem 0;
    display: flex;
    gap: 1.8rem;
    align-items: center;
    border: 1px solid #eaf0f6;
}

.author-bio-card img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
    box-shadow: 0 4px 12px rgba(0, 102, 161, 0.1);
}

.author-bio-card h4 {
    font-size: 1.4rem;
    margin-bottom: 0.3rem;
}

.author-bio-card p {
    color: #3b4c5c;
    font-size: 0.98rem;
    line-height: 1.6;
}

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

.related-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
    transition: all 0.2s;
    border: 1px solid #edf2f7;
}

.related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -8px rgba(0, 70, 150, 0.15);
}

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

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

.related-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

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

.article-body img {
    margin: 0 auto;
}

.article-body p {
    font-size: 0.985rem;
    letter-spacing: 0.2px;
    color: #171717;
    line-height: 1.75;
    margin-bottom: 1.6rem;
}

.article-body h2 {
    font-size: 1.7rem;
    margin: 2rem 0 1rem;
    font-weight: 600;
    color: #0b2b40;
}

.article-body blockquote {
    border-left: 5px solid #0066a1;
    background: #f2f7fb;
    padding: 24px;
    font-style: italic;
    margin: 32px 0;
    border-radius: 0 16px 16px 0;
}

.share-block {
    border-top: 1px dashed #cbd5e1;
    padding: 32px 0;
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.share-btn {
    background: #eef2f6;
    border: none;
    padding: 10px 18px;
    border-radius: 40px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.share-btn:hover {
    background: #d0e0f0;
}

.comments-section {
    margin-top: 40px;
}

.comment {
    background: #f6f9fc;
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 16px;
}

.comment-date {
    color: #6b7c8c;
    font-size: 0.85rem;
    margin-left: 16px;
}

.comment-form {
    margin-top: 32px;
}

.comment-form textarea {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 16px;
    padding: 16px;
    font-family: inherit;
    margin-bottom: 16px;
    resize: vertical;
}

.comment-form button {
    background: #0066a1;
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 40px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.comment-form button:hover {
    background: #004b80;
}

/* ===== Author Profile Page ===== */
.author-profile {
    max-width: 1000px;
    margin: 0 auto 3rem;
    background: #ffffff;
    border-radius: 32px;
    padding: 2.5rem;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.03);
    border: 1px solid #eaf0f6;
}

.author-header {
    display: flex;
    gap: 2.5rem;
    align-items: center;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.author-avatar-large {
    flex-shrink: 0;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #ffffff;
    box-shadow: 0 8px 20px rgba(0, 102, 161, 0.15);
}

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

.author-title {
    flex: 1;
}

.author-title h1 {
    font-size: 2.8rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
    letter-spacing: -0.02em;
    color: #0b2b40;
}

.author-role {
    font-size: 1.2rem;
    color: #0066a1;
    font-weight: 500;
    margin-bottom: 0.8rem;
}

.author-social {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.author-social a {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    background: #f0f6fc;
    border-radius: 40px;
    color: #1e2a3a;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}

.author-social a:hover {
    background: #0066a1;
    color: white;
}

.author-bio-text {
    margin: 2rem 0;
    line-height: 1.8;
    color: #2c3e50;
    font-size: 1.05rem;
    border-left: 4px solid #cbd5e1;
    padding-left: 1.8rem;
}

.author-detail-body {
    margin-top: 2rem;
}

.author-detail-body p {
    margin-bottom: 1.5rem;
    font-size: 1rem;
    line-height: 1.7;
    color: #1e2a3a;
}

.author-section-title {
    font-size: 1.8rem;
    font-weight: 500;
    margin: 3rem 0 1.5rem;
    border-left: 5px solid #0066a1;
    padding-left: 1.2rem;
}

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

/* ===== Footer ===== */
.site-footer {
    background: #0b1a26;
    color: #cbd5e1;
    padding: 60px 0 30px;
}

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

.site-footer a {
    color: #cbd5e1;
}

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

.footer-col .logo {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.footer-col h4 {
    color: white;
    margin-bottom: 16px;
    font-weight: 500;
}

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

.footer-col li {
    margin-bottom: 10px;
}

.footer-col a {
    color: #b0c4d9;
    text-decoration: none;
    transition: color 0.2s;
}

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

/* ===== Back to Top ===== */
#backToTop {
    position: fixed;
    bottom: 40px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #0066a1;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: opacity 0.2s, background 0.2s;
    z-index: 99;
}

#backToTop:hover {
    background: #004b80;
}

/* ===== Responsive Design ===== */
@media (max-width: 900px) {
    .spotlight-grid {
        grid-template-columns: 1fr;
    }

    .category-grid {
        grid-template-columns: 1fr 1fr;
    }

    .feature-row {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .category-layout,
    .article-wrapper {
        grid-template-columns: 100%;
    }

    .hamburger {
        display: block;
    }

    .main-nav {
        position: fixed;
        top: 54px;
        left: 0;
        right: 0;
        background: white;
        padding: 20px;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        display: none;
    }

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

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

    .author-articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}


@media (max-width:768px) {
    .site-header {
        position: relative;
    }

    .header-container {
        height: 54px;
    }
}

@media (max-width: 600px) {

    .category-grid,
    .articles-grid {
        grid-template-columns: 1fr;
    }

    .card-horizontal {
        flex-direction: column;
    }

    .card-horizontal .card-img {
        flex: auto;
    }

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

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .list-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .full-article h1 {
        font-size: 1.4rem;
    }

    .article-meta-bar {
        gap: 0.5rem;
    }

    .meta-item,
    .author-mini span {
        font-size: 0.75rem;
    }

    .views::before {
        margin: 0;
    }

    .article-subhead {
        font-size: 1.1rem;
    }

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

    .related-grid {
        grid-template-columns: 1fr;
    }

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

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

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

    .author-social {
        justify-content: center;
    }

    .author-articles-grid {
        grid-template-columns: 1fr;
    }

    .author-profile {
        padding: 1.5rem;
    }
}