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

body {
    font-family: -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #ffffff;
    color: #1a1a1a;
    line-height: 1.5;
    scroll-behavior: smooth;
}

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

img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 16px;
}

ul,
ol {
    list-style: none;
}

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

/* ========== TYPOGRAPHY ========== */
h1,
h2,
h3,
h4 {
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
}

.section-title {
    font-size: 2rem;
    margin: 2rem 0;
    position: relative;
    display: inline-block;
}

.section-title:after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: #1e3c72;
    margin-top: 8px;
    border-radius: 3px;
}

/* ========== HEADER (with scroll effect) ========== */
.site-header {
    position: sticky;
    top: 0;
    background: #ffffff;
    z-index: 1000;
    padding: 16px 0;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.site-header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

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

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

.nav-menu a:hover,
.nav-menu a.active {
    border-bottom-color: #1e3c72;
    color: #1e3c72;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 6px;
}

.hamburger span {
    width: 26px;
    height: 2px;
    background: #1a1a1a;
    transition: 0.2s;
}

/* ========== TOP BANNER ========== */
.top-banner {
    background: #f0f4fa;
    padding: 12px 0;
    font-size: 0.9rem;
    text-align: center;
    border-bottom: 1px solid #e2e8f0;
}

.top-banner a {
    font-weight: 600;
    color: #1e3c72;
}

/* ========== BREADCRUMB ========== */
.breadcrumb-area {
    margin: 2rem 0 1.5rem;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    background: #f9fbfe;
    border-radius: 40px;
    padding: 0.75rem 1.5rem;
    font-size: 0.85rem;
}

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

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

.breadcrumb a {
    color: #1e3c72;
    font-weight: 500;
}

.breadcrumb .current {
    color: #5b6e8c;
}

/* ========== LAYOUT (two columns) ========== */
.two-columns {
    display: grid;
    grid-template-columns: 70% 28%;
    gap: 2rem;
    flex-wrap: wrap;
    margin: 2rem 0 3rem;
}

.main-content {
    flex: 2.5;
    min-width: 0;
}

.sidebar {
    flex: 1;
    min-width: 240px;
}

/* ========== CARDS (common) ========== */
.card {
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.02), 0 2px 4px rgba(0, 0, 0, 0.03);
}

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

.card-img {
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

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

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

.card-content {
    padding: 1.25rem;
}

.card-meta {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #5b6e8c;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.card-title {
    font-size: 1.4rem;
    margin: 1rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-excerpt {
    color: #3a4a6e;
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ========== LIST CARD (category page) ========== */
.card-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.card-item {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    background: #fff;
    border-radius: 28px;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02), 0 1px 2px rgba(0, 0, 0, 0.03);
    padding: 0.5rem;
}

.card-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 30px -12px rgba(0, 0, 0, 0.08);
}

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

.card-item .card-content {
    flex: 1;
    padding: 0.25rem 0.5rem 0.25rem 0;
}

.read-more {
    font-weight: 600;
    font-size: 0.8rem;
    color: #1e3c72;
}

/* ========== FEATURE CARD (homepage) ========== */
.feature-card {
    background: #f9fbfe;
    border-radius: 32px;
    padding: 2rem;
    transition: 0.2s;
    margin-bottom: 25px;
}

.feature-card:hover {
    background: #ffffff;
    box-shadow: 0 20px 35px -12px rgba(0, 0, 0, 0.08);
}

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

.card-horizontal .card-img {
    flex: 1.2;
    min-width: 200px;
}

.card-horizontal .card-content {
    flex: 2;
}

/* ========== CATEGORY GRID (homepage) ========== */
.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.hot-topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
}

.topic-card {
    background: #ffffff;
    border: 1px solid #eef2f8;
    border-radius: 28px;
    padding: 1.25rem;
    text-align: center;
    transition: all 0.2s;
}

.topic-card:hover {
    border-color: #cbdde9;
    transform: translateY(-4px);
}

/* ========== SIDEBAR MODULES ========== */
.sidebar-card {
    background: #f9fbfe;
    border-radius: 28px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.author-card {
    text-align: center;
}

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

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

.author-name {
    font-size: 1.2rem;
    font-weight: 700;
}

.author-bio {
    font-size: 0.85rem;
    color: #4a5c7c;
    margin-top: 0.5rem;
}

.sidebar-list {
    list-style: none;
    margin-top: 0.5rem;
}

.sidebar-list li {
    margin-bottom: 0.8rem;
    border-bottom: 1px solid #eef2f8;
    padding-bottom: 0.6rem;
}

.sidebar-list a {
    font-weight: 500;
    display: block;
}

.sidebar-list small {
    font-size: 0.7rem;
    color: #7e92b0;
}

.cat-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.8rem;
}

.cat-tag {
    background: white;
    border: 1px solid #dce5ec;
    padding: 0.3rem 1rem;
    border-radius: 40px;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.cat-tag:hover {
    background: #1e3c72;
    color: white;
    border-color: #1e3c72;
}

/* ========== ARTICLE DETAILS ========== */
.article-header {
    margin-bottom: 2rem;
}

.article-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.article-subtitle {
    font-size: 1.2rem;
    color: #4a5c7c;
    font-weight: 400;
    margin-bottom: 1.5rem;
    border-left: 3px solid #1e3c72;
    padding-left: 1rem;
}

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

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #5b6e8c;
}

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

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

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

.article-content p {
    margin-bottom: 1.4rem;
}

.article-content h3 {
    margin: 1.8rem 0 1rem;
}


.article-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1.5rem 0 2rem;
    padding-top: 1rem;
    border-top: 1px solid #eef2f8;
}

.cat-badge {
    background: #f0f4fa;
    padding: 0.3rem 1rem;
    border-radius: 40px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #1e3c72;
}

.author-bio-card {
    background: #f9fbfe;
    border-radius: 28px;
    padding: 1.8rem;
    display: flex;
    gap: 1.5rem;
    margin: 2rem 0;
}

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

.author-bio-info p {
    color: #4a5c7c;
    font-size: 0.9rem;
}

.share-section {
    margin: 2rem 0;
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.share-label {
    font-weight: 600;
}

.share-btn {
    background: #f0f4fa;
    padding: 0.5rem 1rem;
    border-radius: 40px;
    font-size: 0.8rem;
    transition: 0.2s;
    cursor: pointer;
}

.share-btn:hover {
    background: #e2e8f0;
    transform: translateY(-2px);
}

.comment-section {
    margin: 2rem 0;
    background: #fafcff;
    border-radius: 32px;
    padding: 1.8rem;
}

.comment-list {
    margin: 1.5rem 0;
}

.comment-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eef2f8;
}

.comment-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #e2e8f0;
    flex-shrink: 0;
}

.comment-body p {
    margin-top: 0.3rem;
    color: #2c3e50;
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 0.8rem;
    margin-bottom: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    font-family: inherit;
}

.btn {
    background: #1e3c72;
    color: white;
    border: none;
    padding: 0.7rem 1.6rem;
    border-radius: 40px;
    font-weight: 500;
    cursor: pointer;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.related-card {
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

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

.related-card-img {
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

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

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

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

.related-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ========== AUTHOR PROFILE PAGE ========== */
.author-profile {
    max-width: 900px;
    margin: 0 auto 3rem;
}

.author-header {
    text-align: center;
    margin: 2.5rem 0;
}

.author-header .author-avatar {
    width: 180px;
    height: 180px;
}

.author-title {
    font-size: 1.1rem;
    color: #1e3c72;
    font-weight: 500;
    margin-bottom: 1rem;
}

.author-bio-short {
    max-width: 600px;
    margin: 0 auto;
    color: #4a5c7c;
    font-size: 1rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 1.5rem 0;
}

.social-link {
    background: #f0f4fa;
    padding: 0.5rem 1rem;
    border-radius: 40px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: 0.2s;
}

.social-link:hover {
    background: #e2e8f0;
    transform: translateY(-2px);
}

.author-details {
    background: #ffffff;
    border-radius: 32px;
    padding: 2rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.02), 0 2px 4px rgba(0, 0, 0, 0.03);
    margin-bottom: 2rem;
}

.author-details h2 {
    font-size: 1.6rem;
    margin-bottom: 1rem;
    border-left: 4px solid #1e3c72;
    padding-left: 1rem;
}

.author-details p {
    margin-bottom: 1.2rem;
    line-height: 1.7;
    color: #2c3e50;
}

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

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

.article-list {
    list-style: none;
    margin-top: 1rem;
}

.article-list li {
    margin-bottom: 1rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid #eef2f8;
}

.article-list a {
    font-weight: 500;
    display: block;
    margin-bottom: 0.2rem;
}

.article-list a:hover {
    color: #1e3c72;
}

.btn-outline {
    display: inline-block;
    background: transparent;
    border: 1px solid #1e3c72;
    color: #1e3c72;
    padding: 0.5rem 1.2rem;
    border-radius: 40px;
    font-weight: 500;
    transition: 0.2s;
    margin-top: 0.5rem;
}

.btn-outline:hover {
    background: #1e3c72;
    color: white;
}

/* ========== PAGINATION ========== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    margin: 3rem 0 1rem;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 40px;
    background: #f1f5f9;
    font-weight: 500;
    transition: 0.2s;
}

.pagination a:hover {
    background: #e2e8f0;
}

.pagination .active-page {
    background: #1e3c72;
    color: white;
}

.pagination .disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* ========== FOOTER ========== */
.site-footer {
    background: #f8fafd;
    margin-top: 4rem;
    padding: 3rem 0 2rem;
    border-top: 1px solid #e2edf2;
}

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

.footer-col h4 {
    font-size: 1.1rem;
    margin-bottom: 1.2rem;
}

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

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

.footer-col a {
    color: #4a5c7c;
    font-size: 0.9rem;
}

.footer-col a:hover {
    color: #1e3c72;
}

.copyright {
    text-align: center;
    font-size: 0.8rem;
    color: #6c7e9e;
}

.copyright a {
    color: #6c7e9e;
}

/* ========== BACK TO TOP ========== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #1e3c72;
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: 0.2s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 99;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .article-meta {
        gap: 0.5rem;
    }

    .meta-item {
        font-size: 0.75rem;
    }

    .two-columns {
        grid-template-columns: 100%;
    }

    .category-grid {
        grid-template-columns: 100%;
    }

    .container {
        padding: 0 20px;
    }

    .hamburger {
        display: flex;
    }

    .site-header {
        position: relative;
    }

    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        flex-direction: column;
        background: white;
        width: 80%;
        height: calc(100vh - 80px);
        padding: 2rem;
        box-shadow: 2px 0 20px rgba(0, 0, 0, 0.05);
        transition: left 0.3s ease;
        gap: 1.5rem;
        z-index: 999;
    }

    .nav-menu.active {
        left: 0;
    }

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

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

    .card-item .card-img {
        flex: auto;
        width: 100%;
    }

    .main-content,
    .sidebar {
        flex: 1 1 100%;
    }

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

    .article-title {
        font-size: 1.4rem;
    }

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

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

    .article-title {
        font-size: 1.4rem;
    }

    .author-header .author-avatar {
        width: 120px;
        height: 120px;
    }

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

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

    .author-bio-avatar {
        margin: 0 auto;
    }
}