/*
Theme Name: SGTime
Theme URI: https://sgtime.ai
Author: SGTime Team
Description: AI-driven Singapore News Flash theme. Modern Redesign v2.
Version: 2.3.0
Text Domain: sgtime
*/

:root {
    /* Brand Colors */
    --color-primary: #ED2939;
    /* Singapore Red */
    --color-primary-light: #FF4D5A;
    --color-primary-dark: #C91F2E;

    /* AI/Tech Colors */
    --color-ai-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);

    /* Neutral Colors */
    --color-text-primary: #262626;
    --color-text-secondary: #595959;
    --color-text-tertiary: #8C8C8C;
    --color-text-disabled: #BFBFBF;

    /* Background Colors */
    --color-bg-page: #F5F5F5;
    --color-bg-card: #FFFFFF;
    --color-bg-hover: #FAFAFA;

    /* Border Colors */
    --color-border-light: #F0F0F0;
    --color-border-base: #E8E8E8;
    --color-border-dark: #D9D9D9;

    /* Functional Colors */
    --color-link: #1890FF;
    --color-success: #52C41A;
    --color-warning: #FAAD14;
    --color-error: #F5222D;

    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;

    /* Fonts */
    --font-family-base: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    --font-family-en: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family-base);
    background-color: var(--color-bg-page);
    color: var(--color-text-primary);
    line-height: 1.6;
    font-size: 14px;
}

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

ul {
    list-style: none;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    gap: 32px;
    align-items: flex-start;
}

.main-content {
    flex: 1;
    /* Approx 70% */
    min-width: 0;
}

.sidebar {
    width: 320px;
    /* Approx 30% fixed */
    flex-shrink: 0;
}

/* Header */
.site-header {
    background: #ffffff;
    border-bottom: 1px solid var(--color-border-base);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    margin-bottom: 32px;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    transition: opacity 0.2s;
}

.site-logo:hover {
    opacity: 0.85;
}

.logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #EF3340, #c62828);
    color: #ffffff;
    font-size: 20px;
    font-weight: 800;
    border-radius: 10px;
    font-family: var(--font-family-en);
    letter-spacing: -0.5px;
    box-shadow: 0 2px 8px rgba(239, 51, 64, 0.3);
}

.logo-wordmark {
    display: flex;
    align-items: baseline;
    gap: 0;
    font-size: 22px;
    letter-spacing: -0.3px;
}

.logo-text-singapore {
    color: var(--color-text-primary);
    font-weight: 800;
    font-family: var(--font-family-en);
}

.logo-text-time {
    color: #EF3340;
    font-weight: 800;
    font-family: var(--font-family-en);
}

.logo-ai-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    background: linear-gradient(135deg, #EF3340, #c62828);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 5px;
    letter-spacing: 1px;
    font-family: var(--font-family-en);
    box-shadow: 0 1px 4px rgba(239, 51, 64, 0.25);
}

/* Category Filter Bar */
.category-filter-bar {
    margin-bottom: 24px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    background: #fff;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid var(--color-border-light);
}

.cat-pill {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: all 0.2s;
    font-weight: 500;
    background: var(--color-bg-page);
    border: 1px solid transparent;
}

.cat-pill:hover,
.cat-pill.active {
    background: var(--color-primary);
    color: #ffffff;
    border-color: var(--color-primary);
}

/* Timeline Date Header */
.timeline-date-header {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-text-primary);
    padding: 12px 0;
    margin: 24px 0 16px 0;
    display: flex;
    align-items: center;
}

.timeline-date-header::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 16px;
    background: var(--color-primary);
    border-radius: 2px;
    margin-right: 12px;
}

/* News Stream Timeline Wrapper */
.news-stream {
    position: relative;
    padding-left: 20px;
    border-left: 2px solid #E8E8E8;
    margin-left: 80px;
}

/* Brief Card (Timeline Item) */
.brief-card {
    background: transparent;
    border-radius: 0;
    padding: 0 0 32px 24px;
    margin-bottom: 0px;
    border: none;
    box-shadow: none;
    position: relative;
    transition: none;
}

.brief-mobile-header {
    display: none;
    /* Hide mobile header by default on Desktop */
}

.brief-card:hover {
    border-color: transparent;
    box-shadow: none;
    transform: none;
}

/* Timeline Markers */
.brief-timeline-node {
    position: absolute;
    left: -27px;
    /* Line is at -20px padding + border width. Center dot on it. */
    top: 4px;
    /* Align with first line of text roughly */
    width: 12px;
    height: 12px;
    background: #ffffff;
    border: 3px solid var(--color-primary);
    border-radius: 50%;
    z-index: 2;
    box-shadow: 0 0 0 3px #ffffff;
    /* White halo to separate from line */
}

.brief-time-label {
    position: absolute;
    left: -110px;
    top: 0px;
    width: 70px;
    text-align: right;
    font-size: 14px;
    font-weight: 700;
    color: var(--color-text-primary);
    font-family: var(--font-family-en);
}

.brief-card:hover .brief-timeline-node {
    background: var(--color-primary);
    transform: scale(1.2);
    transition: all 0.2s;
}

.brief-card-body {
    background: #ffffff;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--color-border-base);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
    cursor: pointer;
    /* Whole card clickable */
}

.brief-card-body:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    /* Lift effect */
    border-color: var(--color-primary-light);
    transform: translateY(-2px);
}

/* Singapore-related news highlight */
.sg-highlight .brief-card-body {
    border-left: 3px solid #EF3340;
    background: linear-gradient(135deg, #fff5f5 0%, #ffffff 100%);
}

.sg-highlight .brief-summary {
    color: #c62828;
    font-weight: 700;
}

.sg-highlight .brief-card-body:hover {
    border-color: #EF3340;
    box-shadow: 0 8px 20px rgba(239, 51, 64, 0.12);
}

.brief-header {
    display: none;
    /* Hide header inside card for feed view as requested (no source name) */
}

.brief-content {
    margin-bottom: 0;
}

.brief-summary {
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text-primary);
    font-weight: 400;
    margin: 0;
    text-align: justify;
}

.brief-footer {
    display: none;
    /* Hide footer (read more) in feed view */
}

/* Responsive adjustments for timeline */
@media (max-width: 768px) {
    .news-stream {
        margin-left: 60px;
        padding-left: 15px;
    }

    .brief-time-label {
        left: -85px;
        font-size: 13px;
    }

    .brief-card-body {
        padding: 16px;
    }
}


.brief-cat-badge {
    padding: 2px 8px;
    background: var(--color-bg-page);
    border-radius: 4px;
    font-size: 12px;
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border-base);
}

.brief-read-more {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    color: var(--color-link);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.brief-read-more:hover {
    color: var(--color-primary);
    gap: 6px;
}

.brief-read-more::after {
    content: '→';
    transition: transform 0.2s;
}

.brief-read-more:hover::after {
    transform: translateX(2px);
}

/* Sidebar Modules */
.widget {
    margin-bottom: 24px;
}

.sidebar-module {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--color-border-base);
}

.sidebar-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--color-primary);
}

.sidebar-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 16px;
    background: var(--color-primary);
    border-radius: 2px;
}

.hot-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.hot-list-item {
    display: flex;
    align-items: flex-start;
    padding: 12px 8px;
    border-bottom: 1px solid var(--color-border-light);
    transition: all 0.2s;
    border-radius: 6px;
}

.hot-list-item:last-child {
    border-bottom: none;
}

.hot-list-item:hover {
    background: var(--color-bg-hover);
    padding-left: 12px;
}

.hot-list-rank {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: #F5F5F5;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    color: var(--color-text-tertiary);
    margin-right: 12px;
    margin-top: 2px;
}

/* Top 3 Ranks */
.hot-list-item:nth-child(1) .hot-list-rank {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #fff;
}

.hot-list-item:nth-child(2) .hot-list-rank {
    background: linear-gradient(135deg, #C0C0C0 0%, #A8A8A8 100%);
    color: #fff;
}

.hot-list-item:nth-child(3) .hot-list-rank {
    background: linear-gradient(135deg, #CD7F32 0%, #B8733C 100%);
    color: #fff;
}

.hot-list-text {
    font-size: 14px;
    color: var(--color-text-primary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-weight: 500;
}

/* Subscribe Module */
.subscribe-module {
    background: var(--color-ai-gradient);
    border-radius: 12px;
    padding: 24px;
    color: #ffffff;
    text-align: center;
}

.subscribe-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
}

.subscribe-desc {
    font-size: 13px;
    opacity: 0.9;
    margin-bottom: 16px;
    line-height: 1.5;
}

.subscribe-button {
    display: block;
    width: 100%;
    padding: 12px 24px;
    background: #ffffff;
    color: #764ba2;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    text-align: center;
    text-decoration: none;
    box-sizing: border-box;
}

.subscribe-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.subscribe-telegram {
    margin-top: 8px;
    color: #0088cc;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.subscribe-telegram:hover {
    background: #f0f8ff;
    color: #006da3;
}

/* Header Telegram Icon */
.header-telegram {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: var(--color-text-secondary);
    border-radius: 50%;
    transition: all 0.2s;
    flex-shrink: 0;
}

.header-telegram:hover {
    color: #0088cc;
    background: rgba(0, 136, 204, 0.08);
}

/* Live Notification */
.new-briefs-notification {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-primary);
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 24px;
    box-shadow: 0 4px 16px rgba(237, 41, 57, 0.3);
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 999;
    cursor: pointer;
    animation: slideInDown 0.3s ease-out;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px) translateX(-50%);
    }

    to {
        opacity: 1;
        transform: translateY(0) translateX(-50%);
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateY(-10px) translateX(-50%);
    }
}

/* Back to Top Button */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    background: #764ba2;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(118, 75, 162, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 1000;
}

#back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#back-to-top:hover {
    background: #5a3780;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(118, 75, 162, 0.4);
}

/* Enhanced Mobile Responsiveness */
@media (max-width: 900px) {
    .container {
        flex-direction: column;
        gap: 0;
        padding: 0 16px;
        /* standard mobile padding */
    }

    .main-content {
        width: 100%;
    }

    .sidebar {
        width: 100%;
        margin-top: 32px;
    }

    .category-filter-bar {
        overflow-x: auto;
        flex-wrap: nowrap;
        -ms-overflow-style: none;
        scrollbar-width: none;
        margin: 0 -16px 24px -16px;
        /* Edge to edge */
        padding: 16px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .category-filter-bar::-webkit-scrollbar {
        display: none;
    }

    .cat-pill {
        white-space: nowrap;
    }
}

@media (max-width: 768px) {

    /* Header Adjustments */
    .header-inner {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
        padding: 12px 16px;
    }

    .site-logo {
        justify-content: center;
    }

    .logo-icon {
        width: 30px;
        height: 30px;
        font-size: 16px;
        border-radius: 8px;
    }

    .logo-wordmark {
        font-size: 18px;
    }

    .header-right {
        display: flex;
        justify-content: center;
        width: 100%;
    }

    .header-search-form {
        width: 100%;
        max-width: 100%;
    }

    .header-search-form:focus-within {
        width: 100%;
    }

    /* Timeline Adjustments */
    .news-stream {
        /* Reduce left margin significantly */
        margin-left: 15px;
        padding-left: 20px;
        border-left: 2px solid #E8E8E8;
    }

    .brief-timeline-node {
        /* Move node closer to line */
        left: -27px;
    }

    .brief-time-label {
        display: none;
        /* Hide old timeline label on mobile */
    }

    .timeline-date-header {
        margin-left: 0;
        padding-left: 0;
        /* Reset */
    }

    /* Card Adjustments */
    .brief-card {
        padding: 0 0 16px 0;
        /* Removing excess left padding since time is moved */
        margin-bottom: 0;
    }

    .brief-card-body {
        padding: 12px 16px 16px 16px;
    }

    .brief-mobile-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 8px;
        padding-bottom: 8px;
        border-bottom: 1px dashed var(--color-border-light);
    }

    /* Hide the OLD timeline label on mobile since it's now inside the card */
    .brief-time-label {
        display: none !important;
    }

    .brief-mobile-time {
        font-weight: 700;
        color: var(--color-primary);
        font-family: var(--font-family-en);
        font-size: 14px;
        background: rgba(237, 41, 57, 0.05);
        padding: 2px 8px;
        border-radius: 4px;
    }

    .brief-mobile-cat {
        font-size: 12px;
        color: var(--color-text-tertiary);
        background: #f5f5f5;
        padding: 2px 8px;
        border-radius: 4px;
    }

    .brief-summary {
        font-size: 16px;
        /* Ensure readable font size */
        line-height: 1.6;
        text-align: left;
        /* Justify can look weird on mobile */
    }

    /* Back to Top adjustments */
    #back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
    }
}


/* Brief Article Detail Page */
.brief-detail-container {
    background: #ffffff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.brief-detail-header {
    margin-bottom: 30px;
}

.brief-meta-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--color-text-secondary);
}

.meta-item {
    display: flex;
    align-items: center;
}

.meta-item.source {
    font-weight: 600;
    color: var(--color-primary);
    background: rgba(237, 41, 57, 0.1);
    padding: 4px 10px;
    border-radius: 4px;
}

.meta-item.category {
    background: #f0f0f0;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
}

.brief-detail-title {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.4;
    font-family: var(--font-family-base);
    color: var(--color-text-primary);
}

.ai-summary-box {
    background: linear-gradient(to right, #f9fbfd, #ffffff);
    border-left: 4px solid #764ba2;
    padding: 24px;
    border-radius: 0 8px 8px 0;
    margin-bottom: 30px;
}

.ai-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #764ba2;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.ai-label .dot {
    width: 8px;
    height: 8px;
    background: #764ba2;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.ai-text {
    font-size: 18px;
    line-height: 1.8;
    color: var(--color-text-primary);
    font-weight: 500;
    text-align: justify;
}

.brief-actions {
    margin-bottom: 40px;
    display: flex;
    justify-content: flex-start;
}

.btn-visit-source {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1px solid var(--color-border-dark);
    color: var(--color-text-primary);
    padding: 10px 24px;
    border-radius: 24px;
    font-weight: 600;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-visit-source:hover {
    background: var(--color-text-primary);
    color: #ffffff;
    border-color: var(--color-text-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.original-content-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px dashed var(--color-border-base);
}

.section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-text-tertiary);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.raw-text {
    font-size: 15px;
    line-height: 1.7;
    color: var(--color-text-secondary);
    background: #fdfdfd;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--color-border-light);
    word-break: break-word;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(118, 75, 162, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(118, 75, 162, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(118, 75, 162, 0);
    }
}

@media (max-width: 768px) {
    .brief-detail-container {
        padding: 24px;
        border-radius: 0;
        box-shadow: none;
        background: transparent;
    }

    .brief-detail-title {
        font-size: 22px;
    }

    .ai-text {
        font-size: 16px;
    }
}

/* Header Search Form */
.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search-form {
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border-radius: 20px;
    padding: 4px 12px;
    border: 1px solid transparent;
    transition: all 0.2s;
    width: 240px;
}

.header-search-form:focus-within {
    background: #ffffff;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(237, 41, 57, 0.1);
    width: 280px;
    /* Slight expand */
}

.search-field {
    border: none;
    background: transparent;
    padding: 6px;
    font-size: 14px;
    width: 100%;
    outline: none;
    color: var(--color-text-primary);
}

.search-field::placeholder {
    color: var(--color-text-disabled);
}

.search-submit {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--color-text-tertiary);
    transition: color 0.2s;
    display: flex;
    align-items: center;
}

.search-submit:hover {
    color: var(--color-primary);
}

@media (max-width: 768px) {
    .header-search-form {
        width: 180px;
    }

    .header-search-form:focus-within {
        width: 200px;
    }
}

/* Standard Article Detail (single.php) */
.article-detail {
    background: #ffffff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    margin-bottom: 40px;
}

.article-header {
    margin-bottom: 30px;
    border-bottom: 1px solid var(--color-border-light);
    padding-bottom: 20px;
}

.article-cat-badge {
    background: var(--color-primary);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
}

.article-title {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--color-text-primary);
    margin: 16px 0;
}

.article-meta-row {
    font-size: 14px;
    color: var(--color-text-secondary);
    display: flex;
    gap: 20px;
}

.article-meta-item .meta-label {
    color: var(--color-text-tertiary);
    margin-right: 4px;
}

.article-featured-image {
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
}

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

.article-content-body {
    font-size: 16px;
    line-height: 1.8;
    color: var(--color-text-primary);
    word-wrap: break-word;
}

.article-content-body p {
    margin-bottom: 20px;
}

.article-content-body h2 {
    font-size: 24px;
    margin-top: 30px;
    margin-bottom: 16px;
    font-weight: 700;
}

.article-content-body h3 {
    font-size: 20px;
    margin-top: 24px;
    margin-bottom: 12px;
    font-weight: 700;
}

.article-content-body ul,
.article-content-body ol {
    margin-bottom: 20px;
    padding-left: 20px;
}

.article-content-body blockquote {
    border-left: 4px solid var(--color-primary);
    padding-left: 20px;
    margin-left: 0;
    color: var(--color-text-secondary);
    font-style: italic;
    background: #f9f9f9;
    padding: 16px;
}

.article-tags {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border-light);
}

.article-tags a {
    display: inline-block;
    background: #f0f2f5;
    padding: 6px 12px;
    border-radius: 20px;
    color: var(--color-text-secondary);
    font-size: 13px;
    margin-right: 8px;
    margin-bottom: 8px;
    text-decoration: none;
    transition: all 0.2s;
}

.article-tags a:hover {
    background: var(--color-primary);
    color: #fff;
}

/* Post Navigation */
.post-navigation-area {
    margin-top: 40px;
}

.post-navigation-area .nav-links {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.post-navigation-area .nav-previous,
.post-navigation-area .nav-next {
    flex: 1;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--color-border-light);
    transition: all 0.2s;
}

.post-navigation-area .nav-previous:hover,
.post-navigation-area .nav-next:hover {
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.post-navigation-area a {
    text-decoration: none;
    display: flex;
    flex-direction: column;
}

.nav-subtitle {
    font-size: 12px;
    color: var(--color-text-tertiary);
    text-transform: uppercase;
    margin-bottom: 4px;
    font-weight: 600;
}

.nav-title {
    font-size: 16px;
    color: var(--color-text-primary);
    font-weight: 700;
}

@media (max-width: 768px) {
    .article-title {
        font-size: 24px;
    }

    .article-detail {
        padding: 20px;
        border-radius: 8px;
    }

    .post-navigation-area .nav-links {
        flex-direction: column;
    }
}

/* Modal Base Styles */
.sgtime-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.sgtime-modal.active {
    display: flex;
}

.sgtime-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1;
}

.sgtime-modal-content {
    background: #ffffff;
    width: 90%;
    max-width: 480px;
    padding: 30px;
    border-radius: 16px;
    position: relative;
    z-index: 2;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.sgtime-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: #999;
    cursor: pointer;
    transition: color 0.2s;
    padding: 5px;
}

.sgtime-modal-close:hover {
    color: var(--color-primary);
}

.sgtime-modal-body h3 {
    font-size: 20px;
    margin-bottom: 8px;
    font-weight: 700;
}

/* Jetpack Form Overrides inside Modal */
.sgtime-modal .jetpack_subscription_widget {
    /* Reset if needed */
}

.sgtime-modal .jetpack_subscription_widget #subscribe-text {
    display: none;
    /* We have our own text */
}

.sgtime-modal .jetpack_subscription_widget p {
    margin-bottom: 0;
}

.sgtime-modal .jetpack_subscription_widget input[type="email"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    margin-bottom: 12px;
    background: #f9f9f9;
}

.sgtime-modal .jetpack_subscription_widget button[type="submit"] {
    width: 100%;
    padding: 12px;
    background: var(--color-primary);
    color: white;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s;
}

.sgtime-modal .jetpack_subscription_widget button[type="submit"]:hover {
    background: var(--color-primary-dark);
}

/* ============================================
   Breadcrumb Navigation
   ============================================ */
.brief-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 13px;
    color: var(--color-text-tertiary);
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--color-border-light);
}

.brief-breadcrumb a {
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.brief-breadcrumb a:hover {
    color: var(--color-primary);
}

.breadcrumb-sep {
    color: var(--color-text-disabled);
    font-size: 14px;
}

.breadcrumb-current {
    color: var(--color-text-tertiary);
    font-weight: 500;
}

/* ============================================
   Original English Title (Subtitle)
   ============================================ */
.brief-original-title {
    font-size: 15px;
    color: var(--color-text-tertiary);
    margin-top: 10px;
    line-height: 1.5;
    font-style: italic;
    padding-left: 12px;
    border-left: 3px solid var(--color-border-light);
}

/* ============================================
   Brief Post Navigation (Chinese)
   ============================================ */
.brief-post-navigation {
    display: flex;
    gap: 16px;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--color-border-light);
}

.brief-nav-link {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px 20px;
    background: #f9fafb;
    border: 1px solid var(--color-border-light);
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.25s ease;
}

.brief-nav-link:hover {
    border-color: var(--color-primary);
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.brief-nav-direction {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.brief-nav-title {
    font-size: 14px;
    color: var(--color-text-primary);
    line-height: 1.5;
    font-weight: 500;
}

.brief-nav-next {
    text-align: right;
}

@media (max-width: 768px) {
    .brief-post-navigation {
        flex-direction: column;
        gap: 12px;
    }

    .brief-nav-next {
        text-align: left;
    }

    .brief-breadcrumb {
        font-size: 12px;
        margin-bottom: 16px;
        padding-bottom: 12px;
    }

    .brief-original-title {
        font-size: 13px;
    }
}

/* ============================================
   Social Share Bar
   ============================================ */
.brief-share-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 30px;
    padding: 14px 0;
}

.share-label {
    font-size: 13px;
    color: var(--color-text-tertiary);
    font-weight: 500;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #f5f5f5;
    color: #666;
    text-decoration: none;
    transition: all 0.25s ease;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.share-whatsapp:hover {
    background: #25D366;
    color: #fff;
}

.share-telegram:hover {
    background: #0088cc;
    color: #fff;
}

.share-x:hover {
    background: #000;
    color: #fff;
}

/* ============================================
   Desktop Category Tag on Feed Cards
   ============================================ */
.brief-desktop-cat {
    display: inline-block;
    font-size: 12px;
    color: var(--color-text-tertiary);
    background: #f5f5f5;
    padding: 3px 10px;
    border-radius: 4px;
    margin-top: 10px;
    font-weight: 500;
}

@media (max-width: 768px) {
    .brief-desktop-cat {
        display: none;
        /* Mobile uses brief-mobile-cat instead */
    }
}

/* ============================================
   Footer Redesign
   ============================================ */
.site-footer {
    background: #1a1a2e;
    color: #a0a0b8;
    margin-top: 60px;
    padding: 0;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    gap: 40px;
    padding: 48px 24px 32px;
}

.footer-col {
    flex: 1;
}

.footer-heading {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 8px;
    font-size: 13px;
    line-height: 1.6;
}

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

.footer-links a:hover {
    color: #ffffff;
}

.footer-sources li {
    color: #8888a0;
    font-size: 13px;
}

.footer-about {
    font-size: 13px;
    line-height: 1.7;
    color: #8888a0;
}

.footer-email {
    font-size: 13px;
    margin-top: 8px;
    color: #8888a0;
}

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

.footer-email a:hover {
    color: #ffffff;
}

.footer-bottom {
    text-align: center;
    padding: 16px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 12px;
    color: #6a6a80;
}

.footer-bottom-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.footer-divider {
    color: #4a4a60;
    margin: 0 2px;
}

.recodex-link {
    display: inline-flex;
    align-items: center;
    transition: opacity 0.2s;
}

.recodex-link:hover {
    opacity: 0.8;
}

.recodex-icon {
    height: 24px;
    width: 24px;
}

.recodex-name {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.5px;
}

.recodex-label {
    font-size: 12px;
    color: #8888a0;
}

@media (max-width: 768px) {
    .footer-inner {
        flex-direction: column;
        gap: 28px;
        padding: 36px 20px 24px;
    }

    .brief-share-bar {
        flex-wrap: wrap;
        gap: 10px;
    }

    .footer-bottom-inner {
        flex-direction: column;
        gap: 6px;
    }

    .footer-divider {
        display: none;
    }

    .brief-post-navigation {
        flex-direction: column;
        gap: 10px;
    }

    .brief-nav-link {
        width: 100%;
    }
}

/* ============================================
   Skeleton Loading Animation
   ============================================ */
@keyframes shimmer {
    0% {
        background-position: -400px 0;
    }

    100% {
        background-position: 400px 0;
    }
}

.skeleton-card {
    display: flex;
    gap: 16px;
    padding: 20px 0;
    align-items: flex-start;
}

.skeleton-time {
    width: 45px;
    height: 16px;
    border-radius: 4px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 400px 100%;
    animation: shimmer 1.5s infinite;
    flex-shrink: 0;
}

.skeleton-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.skeleton-line {
    height: 14px;
    border-radius: 4px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 400px 100%;
    animation: shimmer 1.5s infinite;
}

.skeleton-line-full {
    width: 100%;
}

.skeleton-line-medium {
    width: 70%;
}

.skeleton-line-short {
    width: 45%;
}

.skeleton-tag {
    width: 50px;
    height: 20px;
    border-radius: 4px;
    margin-top: 4px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 400px 100%;
    animation: shimmer 1.5s infinite;
}

/* ============================================
   Related News Section
   ============================================ */
.related-news-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--color-border-light);
}

.related-news-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.related-news-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--color-border-light);
    text-decoration: none;
    transition: all 0.2s ease;
}

.related-news-item:last-child {
    border-bottom: none;
}

.related-news-item:hover {
    padding-left: 8px;
    background: rgba(0, 0, 0, 0.01);
}

.related-news-cat {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 600;
    color: #764ba2;
    background: rgba(118, 75, 162, 0.08);
    padding: 3px 8px;
    border-radius: 4px;
}

.related-news-text {
    flex: 1;
    font-size: 14px;
    color: var(--color-text-primary);
    line-height: 1.5;
    font-weight: 500;
}

.related-news-time {
    flex-shrink: 0;
    font-size: 12px;
    color: var(--color-text-disabled);
    font-family: var(--font-family-en);
}

@media (max-width: 768px) {
    .related-news-item {
        flex-wrap: wrap;
        gap: 6px;
    }

    .related-news-time {
        width: 100%;
        text-align: right;
    }
}

/* ============================================
   Single Nav (only one direction)
   ============================================ */
.brief-post-navigation.single-nav .brief-nav-link {
    flex: 1 1 100%;
}

/* ============================================
   404 Page
   ============================================ */
.error-404-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: 60px 20px;
}

.error-404-content {
    text-align: center;
    max-width: 480px;
}

.error-404-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.error-404-title {
    font-size: 96px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--color-primary), #667eea);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 8px;
}

.error-404-subtitle {
    font-size: 24px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 12px;
}

.error-404-desc {
    font-size: 15px;
    color: var(--color-text-secondary);
    margin-bottom: 32px;
    line-height: 1.6;
}

.error-404-btn {
    display: inline-block;
    padding: 12px 32px;
    background: linear-gradient(135deg, var(--color-primary), #667eea);
    color: #ffffff;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.error-404-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(118, 75, 162, 0.3);
}

/* ============================================
   Search Results
   ============================================ */
.search-results-header {
    padding: 30px 0 20px;
}

.search-results-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--color-text-primary);
}

.search-results-title span {
    color: var(--color-primary);
}

.no-results-message {
    text-align: center;
    padding: 60px 20px;
    color: var(--color-text-secondary);
    font-size: 15px;
}
/* ============================================================
   v2.1 Additions: Breaking badge, AI disclaimer, Daily digest
   ============================================================ */

/* Breaking news badge */
.brief-badge-breaking {
    display: inline-block;
    background: var(--color-primary, #ED2939);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    padding: 3px 7px;
    border-radius: 4px;
    margin-right: 6px;
    vertical-align: 2px;
    letter-spacing: 1px;
    animation: sgtime-badge-pulse 2s ease-in-out infinite;
}

@keyframes sgtime-badge-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.65; }
}

h1 .brief-badge-breaking {
    font-size: 14px;
    padding: 4px 9px;
    vertical-align: 6px;
}

/* AI disclaimer on brief detail pages & digest posts */
.ai-disclaimer {
    margin-top: 16px;
    padding: 10px 14px;
    background: var(--color-bg-hover, #FAFAFA);
    border-left: 3px solid var(--color-text-disabled, #BFBFBF);
    border-radius: 4px;
    font-size: 12px;
    color: var(--color-text-tertiary, #8C8C8C);
    line-height: 1.7;
}

/* Daily digest article */
.digest-intro {
    font-size: 16px;
    line-height: 1.9;
    color: var(--color-text-primary, #262626);
    background: var(--color-bg-hover, #FAFAFA);
    padding: 14px 18px;
    border-radius: 8px;
    border-left: 3px solid var(--color-primary, #ED2939);
}

.digest-list {
    padding-left: 20px;
}

.digest-list li {
    margin-bottom: 10px;
    line-height: 1.8;
}

.digest-list li a {
    color: var(--color-text-primary, #262626);
    text-decoration: none;
}

.digest-list li a:hover {
    color: var(--color-primary, #ED2939);
    text-decoration: underline;
}

.digest-outro {
    margin-top: 20px;
    color: var(--color-text-secondary, #595959);
    font-style: italic;
}

/* ============================================================
   v2.2 Additions: Leisure (吃喝玩乐) visual identity
   ============================================================ */

/* Warm orange category tags to separate lifestyle from news */
.leisure-card .brief-mobile-cat,
.leisure-card .brief-desktop-cat,
.leisure-card .meta-item.category {
    background: #FFF4E0;
    color: #D97706;
    border-color: #F5C97B;
}

/* Subtle warm accent on the timeline node */
.leisure-card .brief-timeline-node {
    background: #F39C12;
    border-color: #F39C12;
}

/* Leisure category pill in the filter bar */
.cat-pill[href*="leisure"] {
    color: #D97706;
}

.cat-pill[href*="leisure"]:hover {
    background: #FFF4E0;
    border-color: #F5C97B;
}
