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

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

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

ul {
    list-style: none;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    padding: 12px 0;
    transition: background-color 0.3s, box-shadow 0.3s, backdrop-filter 0.3s;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid #eaeef5;
}

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

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

.logo a {
    font-size: 1.8rem;
    font-weight: 600;
    text-decoration: none;
    color: #162b4d;
    letter-spacing: -0.02em;
}

.logo span {
    color: #c44536;
    font-weight: 400;
}

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

.main-nav a {
    text-decoration: none;
    color: #2a3b5c;
    font-weight: 500;
    font-size: 1.05rem;
    transition: color 0.2s, border-bottom 0.2s;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
}

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

.hamburger {
    display: none;
    background: none;
    border: 1px solid #ccc;
    font-size: 2rem;
    cursor: pointer;
    padding: 0 10px;
    border-radius: 6px;
}

.breaking-bar {
    background: #fbe9e7;
    padding: 8px 0;
    border-bottom: 1px solid #ffcdc2;
    font-size: 0.95rem;
}

.breaking-label {
    background: #c44536;
    color: white;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 20px;
    margin-right: 12px;
    text-transform: uppercase;
}

.breaking-text {
    font-weight: 500;
}


.card {
    background: white;
    border-radius: 20px;
    padding: 16px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.02);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #f0f2f7;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 30px rgba(0, 20, 40, 0.08);
}

.card-img {
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    border-radius: 16px;
    margin-bottom: 16px;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: scale 0.4s ease;
}

.card:hover .card-img img {
    scale: 1.02;
}

.tag {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #c44536;
    letter-spacing: 0.3px;
    margin-bottom: 6px;
}

.card h3,
.card h4 {
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 8px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card h3 a,
.card h4 a {
    text-decoration: none;
    color: inherit;
}

.card h3 a:hover,
.card h4 a:hover {
    color: #c44536;
}

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

.meta {
    font-size: 0.85rem;
    color: #7b8ba0;
    display: flex;
    gap: 12px;
    margin-top: auto;
}


.card-horizontal {
    display: flex;
    flex-direction: row;
    gap: 20px;
    grid-column: span 3;
    margin-bottom: 20px;
}

.card-horizontal .card-img {
    width: 40%;
    margin-bottom: 0;
}

.card-horizontal .card-content {
    width: 60%;
}


.card-grid {
    display: grid;
    gap: 28px;
}

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

.col-3 {
    grid-template-columns: repeat(3, 1fr);
}


.breadcrumb-nav {
    margin: 20px 0 10px;
}

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

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

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

.breadcrumb-ol a {
    text-decoration: none;
    color: #4a5f7a;
}

.breadcrumb-ol a:hover {
    color: #c44536;
}

.breadcrumb-ol .current {
    color: #162b4d;
    font-weight: 600;
}


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

.category-item {
    background: white;
    border-radius: 28px;
    padding: 28px 12px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    border: 1px solid #e7ecf5;
    transition: 0.2s;
}

.category-item:hover {
    background: #fdf4f2;
    border-color: #c44536;
    transform: scale(1.02);
}

.cat-emoji {
    font-size: 2.4rem;
    display: block;
}

.cat-name {
    font-weight: 600;
    font-size: 1.1rem;
}

.cat-count {
    font-size: 0.85rem;
    color: #6f7d98;
}


.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-item,
.tag-cloud a {
    background: #edf2f9;
    padding: 6px 14px;
    border-radius: 40px;
    text-decoration: none;
    color: #1e2b3c;
    font-size: 0.9rem;
    transition: 0.2s;
}

.tag-item:hover,
.tag-cloud a:hover {
    background: #c44536;
    color: white;
}


.pagination {
    margin: 40px 0;
    display: flex;
    gap: 12px;
    justify-content: center;
}

.pagination a,
.pagination span {
    padding: 8px 14px;
    border-radius: 30px;
    background: white;
    border: 1px solid #e2e8f0;
    text-decoration: none;
    color: #2d4059;
}

.pagination .current {
    background: #162b4d;
    color: white;
    border-color: #162b4d;
}

.pagination .prev,
.pagination .next {
    padding: 8px 18px;
    font-weight: 500;
}


.sidebar-widget {
    background: #fff;
    border-radius: 24px;
    padding: 24px 22px;
    margin-bottom: 30px;
    border: 1px solid #edf2f9;
}

.sidebar-widget h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #162b4d;
    border-left: 5px solid #c44536;
    padding-left: 15px;
}

.recent-list,
.category-side-list {
    list-style: none;
}

.recent-list li,
.category-side-list li {
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px dashed #e2eaf2;
}

.recent-list li:last-child,
.category-side-list li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.recent-list a {
    text-decoration: none;
    color: #2a3b5c;
    font-weight: 500;
    display: block;
    line-height: 1.4;
    transition: color 0.2s;
}

.recent-list a:hover {
    color: #c44536;
}

.recent-list span {
    font-size: 0.8rem;
    color: #8f9fb1;
}

.category-side-list a {
    text-decoration: none;
    color: #2a3b5c;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.2s;
}

.category-side-list a:hover {
    color: #c44536;
}

.category-side-list .count {
    background: #edf2f9;
    padding: 3px 10px;
    border-radius: 40px;
    font-size: 0.8rem;
    color: #3f506e;
}


.author-card {
    background: #fff;
    border-radius: 24px;
    padding: 24px 20px;
    text-align: center;
    border: 1px solid #edf2f9;
    margin-bottom: 30px;
}

.author-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 16px;
    border: 3px solid #c44536;
}

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

.author-bio {
    color: #5c6b82;
    font-size: 0.95rem;
    line-height: 1.5;
}


.two-col-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.main-content {
    width: 70%;
}

.article-main {
    width: 70%;
}

.sidebar {
    width: 27%;
    margin-left: auto;
}

@media (max-width: 900px) {

    .main-content,
    .article-main,
    .sidebar {
        width: 100%;
    }
}


.section {
    margin: 40px 0;
}

.section-title {
    font-size: 2rem;
    font-weight: 600;
    color: #162b4d;
    margin-bottom: 30px;
}

.featured-grid {
    margin-bottom: 20px;
}


.category-header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    margin: 20px 0;
}

.sort-filter {
    display: flex;
    align-items: center;
    gap: 12px;
}

.fake-select {
    border: 1px solid #ccc;
    border-radius: 30px;
    padding: 8px 20px;
    background: white;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: default;
}

.arrow {
    font-size: 12px;
}

.category-grid-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

@media (max-width: 600px) {
    .category-grid-list {
        grid-template-columns: 1fr;
    }
}


.article-header h1 {
    font-size: 2.8rem;
    line-height: 1.2;
    color: #0a1a2b;
    margin: 0 0 10px 0;
}

.article-subhead {
    font-size: 1.3rem;
    color: #4a5f7a;
    font-weight: 400;
    margin-bottom: 20px;
}

.meta-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    color: #5f6f84;
    font-size: 0.95rem;
}

.author-mini {
    display: flex;
    align-items: center;
    gap: 12px;
}

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

.author-mini span {
    font-weight: 600;
    color: #162b4d;
}

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

.updated::before {
    content: "🕒";
    margin-right: 4px;
}

.article-img {
    margin: 30px 0;
    border-radius: 24px;
    overflow: hidden;
}

.article-body {
    font-size: 0.985rem;
    letter-spacing: 0.2px;
    color: #171717;
    line-height: 1.7;
    margin: 30px 0;
}

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

.article-body p {
    margin-bottom: 1.8em;
}

.article-body h2,
.article-body h3 {
    margin: 1.5em 0 0.8em;
    color: #162b4d;
}

.article-category {
    margin: 30px 0 20px;
}

.article-category .tag {
    font-size: 0.9rem;
    background: #edf2f9;
    padding: 5px 18px;
    border-radius: 40px;
    color: #162b4d;
    text-transform: none;
}

.author-info-card {
    background: #f9fcff;
    border-radius: 24px;
    padding: 28px;
    display: flex;
    gap: 25px;
    align-items: center;
    border: 1px solid #e2eaf2;
    margin: 40px 0 30px;
}

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

.author-details h3 {
    font-size: 1.4rem;
    margin-bottom: 8px;
    color: #162b4d;
}

.author-details p {
    color: #4f5a6b;
    line-height: 1.5;
}

.share-section {
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 30px 0 20px;
    padding: 15px 0;
    border-top: 1px solid #e2eaf2;
    border-bottom: 1px solid #e2eaf2;
    flex-wrap: wrap;
}

.share-label {
    font-weight: 600;
    color: #162b4d;
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.share-btn-icon {
    background: #edf2f9;
    border: none;
    border-radius: 10px;
    padding: 10px;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.2s;
    color: #2a3b5c;
}

.share-btn-icon:hover {
    background: #c44536;
    color: white;
}

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

.comment-item {
    background: white;
    border-radius: 20px;
    padding: 22px;
    margin-bottom: 20px;
    border: 1px solid #eef3f9;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.comment-author img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
}

.comment-author strong {
    font-size: 1.1rem;
    color: #162b4d;
}

.comment-date {
    font-size: 0.85rem;
    color: #8f9fb1;
    margin-left: auto;
}

.comment-text {
    color: #2c3e50;
    line-height: 1.6;
}

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

.comment-form textarea {
    width: 100%;
    padding: 16px;
    border-radius: 20px;
    border: 1px solid #d4e0f0;
    font-family: inherit;
    resize: vertical;
    background: white;
}

.comment-form button {
    background: #162b4d;
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 40px;
    font-weight: 600;
    margin-top: 15px;
    cursor: default;
    opacity: 0.8;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 25px;
}

@media (max-width: 700px) {
    .related-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .article-header h1 {
        font-size: 1.8rem;
    }
}

@media (max-width: 400px) {
    .article-header h1 {
        font-size: 1.5rem;
    }
}


.author-page {
    max-width: 1000px;
    margin: 0 auto;
}

.author-hero-card {
    background: white;
    border-radius: 40px;
    padding: 40px;
    margin: 30px 0 40px;
    border: 1px solid #edf2f9;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.02);
    display: flex;
    gap: 45px;
    align-items: center;
    flex-wrap: wrap;
}

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

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

.author-hero-info {
    flex: 1;
    min-width: 280px;
}

.author-hero-info h1 {
    font-size: 2.8rem;
    line-height: 1.2;
    color: #162b4d;
    margin-bottom: 10px;
}

.author-hero-title {
    font-size: 1.3rem;
    color: #c44536;
    font-weight: 500;
    margin-bottom: 20px;
}

.author-hero-bio {
    font-size: 1.1rem;
    color: #2a3b5c;
    line-height: 1.6;
    margin-bottom: 20px;
}

.author-social {
    display: flex;
    gap: 16px;
}

.author-social a {
    background: #edf2f9;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #162b4d;
    font-size: 1.4rem;
    transition: 0.2s;
}

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

.author-detail-body {
    background: white;
    border-radius: 32px;
    padding: 40px;
    margin: 30px 0;
    border: 1px solid #edf2f9;
    font-size: 1.05rem;
    line-height: 1.7;
    color: #1e293b;
}

.author-detail-body h2 {
    font-size: 1.8rem;
    color: #162b4d;
    margin: 1.5em 0 0.8em;
}

.author-detail-body p {
    margin-bottom: 1.5em;
}

.author-articles {
    margin: 50px 0;
}

@media (max-width: 550px) {
    .author-hero-card {
        padding: 25px;
        gap: 20px;
        text-align: center;
        justify-content: center;
    }

    .author-hero-avatar {
        width: 140px;
        height: 140px;
        margin: 0 auto;
    }

    .author-hero-info h1 {
        font-size: 2rem;
    }
}


.site-footer {
    background: #162b4d;
    color: #d4e0f0;
    padding: 50px 0 30px;
    margin-top: 60px;
}

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

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

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

@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

.footer-col a {
    color: #b4c8e5;
    text-decoration: none;
    line-height: 2;
}

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

.footer-logo {
    font-size: 1.8rem;
    color: white;
    margin-bottom: 10px;
}

.footer-logo span {
    color: #c44536;
}


#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #162b4d;
    color: white;
    border: none;
    font-size: 1.6rem;
    cursor: pointer;
    display: none;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
    transition: 0.2s;
    z-index: 99;
}

#backToTop:hover {
    background: #c44536;
}

@media (max-width: 768px) {
    .category-grid {
        grid-template-columns: 100%;
    }

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

    .site-header {
        position: relative;
    }

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

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

    .main-nav .nav-list {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .hamburger {
        display: block;
    }
}