/* Font imports - Add at the top of site.css */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    /*    --primary-color: #e74c3c;*/
    --primary-color: #ff6b00;
    --secondary-color: #2c3e50;
    --tertiary-color: #ff6b00;
    --text-dark: #333;
    --text-light: #666;
    --border-color: #e0e0e0;
    --bg-light: #f8f9fa;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    /*font-family: 'Microsoft YaHei', 'PingFang SC', -apple-system, BlinkMacSystemFont, sans-serif;*/
    color: var(--text-dark);
    line-height: 1.7;
}

    /* Chinese font styling */
    body.lang-zh,
    body[lang^="zh"] {
        font-family: 'Noto Sans SC', 'Microsoft YaHei', 'PingFang SC', sans-serif;
    }

    /* English font styling */
    body.lang-en,
    body[lang="en"] {
        font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    }

    /* Fallback for other languages */
    body:not(.lang-zh):not(.lang-en):not([lang^="zh"]):not([lang="en"]) {
        font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    }

html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

html {
    position: relative;
    min-height: 100%;
}

a:hover {
    text-decoration: none !important;
}

/* Article Content Images */
article.article-content img {
    min-width: 100% !important;
    max-width: 100% !important;
    height: auto;
    object-fit: contain;
}

/* Ad Spaces */
.ad-banner {
    background: #f0f0f0;
    border: 1px dashed #ccc;
    padding: 20px;
    text-align: center;
    margin: 20px 0;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
    display: none;
}

    .ad-banner.leaderboard {
        min-height: 90px;
    }

    .ad-banner.in-article {
        margin: 40px 0;
    }


    .ad-banner.sidebar {
        min-height: 250px;
        margin-bottom: 30px;
    }

    .ad-banner.sticky-sidebar {
        position: sticky;
        top: 20px;
    }

/* Ad Banner Full Width */
.ad-banner-full {
    width: 100%;
    margin: 30px 0;
}

/* Responsive */
@media (max-width: 768px) {
    .ad-banner.desktop-only {
        display: none;
    }

    .main-nav .nav-link {
        padding: 12px 15px;
    }
}

@media (min-width: 769px) {
    .ad-banner.mobile-only {
        display: none;
    }
}

/* End Ad Spaces */

/* Sidebar Widget - Popular Post */
.sidebar-widget {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    position: sticky;
    top: 130px;
}

.widget-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px; /* merged: prefer tighter spacing */
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.popular-post {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

    .popular-post:last-child {
        border-bottom: none;
        margin-bottom: 0;
        padding-bottom: 0;
    }

.popular-post-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.popular-post-title {
    font-size: 14px;
    line-height: 1.4;
    margin: 0;
}

    .popular-post-title a {
        color: var(--text-dark);
        text-decoration: none;
    }

        .popular-post-title a:hover {
            color: var(--primary-color);
        }

.popular-post-meta {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 5px;
}
/* End Sidebar Widget - Popular Post */

/* Sidebar Widget - Facebook Widget */
.facebook-page-widget {
    margin-bottom: 30px;
}

    .facebook-page-widget .card {
        border: 1px solid #e4e6eb;
        border-radius: 8px;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    }

    .facebook-page-widget .card-title {
        color: #1877f2;
        font-weight: 600;
    }

        .facebook-page-widget .card-title i {
            margin-right: 8px;
        }
/* End Sidebar Widget - Facebook Widget */

/* Article Post Card */
.article-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid #f0f0f0;
}

    .article-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 12px 24px rgba(0,0,0,0.12);
        border-color: var(--primary-color);
    }

.article-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-card:hover .article-thumbnail {
    transform: scale(1.05);
}

.article-content {
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-category {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color), #667eea);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    /*margin-bottom: 12px;*/
    text-decoration: none;
    transition: all 0.3s ease;
    align-self: flex-start;
}

    .article-category:hover {
        transform: translateX(3px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    }

.article-title {
    font-size: 13pt;
    font-weight: 700;
    line-height: 1.5;
    letter-spacing: -0.3px;
}

    .article-title a {
        color: #1a1a1a;
        text-decoration: none;
        transition: color 0.3s ease;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

        .article-title a:hover {
            color: var(--primary-color);
        }

.article-excerpt {
    color: #666;
    font-size: 11pt;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    width: 100%; /* ensure it's a proper box */
    flex: 0 0 auto; /* prevent flex from stretching it */
    margin-bottom: 12px;
    display: none;
}

.article-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 12px;
    color: #999;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

    .article-meta span {
        display: flex;
        align-items: center;
        gap: 5px;
    }

    .article-meta i {
        color: var(--primary-color);
        font-size: 13px;
    }

@media (max-width: 768px) {
    .article-thumbnail {
        height: 180px;
    }
}
/* End Article Post Card */

/* Load More Articles Button */
/* Load More Button */
.load-more-container {
    text-align: center;
    padding: 40px 0;
    display: none;
}

    .load-more-container.show {
        display: block;
    }

.load-more-btn {
    background: var(--primary-color, #007bff);
    color: white;
    border: none;
    padding: 12px 40px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .load-more-btn:hover {
        background: var(--primary-dark, #0056b3);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
    }

    .load-more-btn:disabled {
        background: #ccc;
        cursor: not-allowed;
        transform: none;
    }
/* End Load More Articles Button */
