/*
Theme Name: Flavor Theme
Template: generatepress
Description: 新闻资讯列表风格子主题
Version: 3.1
*/

/* === Google Fonts === */
@import url('https://fonts.googleapis.com/css2?family=Newsreader:wght@400;500;600;700&family=Roboto:wght@300;400;500;700&display=swap');

/* === Global: Flat Content-First === */
body {
    background: #f4f7fa;
    color: #1f2937;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: #1a73e8;
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover {
    color: #1558b0;
}

/* === Header === */
.site-header {
    background: #fff;
    border-bottom: 2px solid #1a73e8;
    position: sticky;
    top: 0;
    z-index: 999;
}

.inside-header {
    display: flex;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 60px;
}

.main-title a,
.site-title a {
    color: #1a73e8;
    font-family: 'Newsreader', Georgia, serif;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.main-navigation {
    margin-left: 40px;
}

.main-navigation .main-nav > ul {
    display: flex;
    gap: 0;
    align-items: center;
    height: 60px;
}

.main-navigation .main-nav > ul > li > a {
    color: #374151;
    font-size: 15px;
    font-weight: 500;
    padding: 18px 16px;
    border-radius: 0;
    transition: color 0.15s ease, background 0.15s ease;
    position: relative;
    background: none;
    height: 60px;
    display: flex;
    align-items: center;
}

.main-navigation .main-nav > ul > li > a::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #1a73e8;
    transform: scaleX(0);
    transition: transform 0.2s ease;
}

.main-navigation .main-nav > ul > li > a:hover {
    color: #1a73e8;
    background: none;
}

.main-navigation .main-nav > ul > li > a:hover::after {
    transform: scaleX(1);
}

.main-navigation .main-nav > ul > li.current-menu-item > a,
.main-navigation .main-nav > ul > li.current_page_item > a {
    color: #1a73e8;
    background: none;
    font-weight: 600;
}

.main-navigation .main-nav > ul > li.current-menu-item > a::after,
.main-navigation .main-nav > ul > li.current_page_item > a::after {
    transform: scaleX(1);
}

/* === Header Search === */
.flavor-header-search {
    margin-left: auto;
}

.flavor-header-search .search-form {
    display: flex;
    align-items: center;
}

.flavor-header-search .search-field {
    border: 2px solid #e0e6ed;
    border-radius: 0;
    padding: 7px 14px;
    font-size: 13px;
    width: 180px;
    height: 36px;
    outline: none;
    background: #f9fafb;
    font-family: 'Roboto', sans-serif;
    transition: border-color 0.2s ease, width 0.2s ease;
}

.flavor-header-search .search-field:focus {
    border-color: #1a73e8;
    background: #fff;
    width: 220px;
}

.flavor-header-search .search-submit {
    background: #1a73e8;
    color: #fff;
    border: none;
    padding: 7px 16px;
    margin-left: -2px;
    border-radius: 0;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    height: 36px;
    transition: background 0.15s;
}

.flavor-header-search .search-submit:hover {
    background: #1558b0;
}

/* === Layout === */
.flavor-site {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}


.flavor-layout {
    display: flex;
    gap: 32px;
    padding-top: 0;
}

.flavor-main {
    flex: 1;
    min-width: 0;
}

.flavor-sidebar {
    width: 300px;
    flex-shrink: 0;
}

/* === Page Heading === */
.flavor-main__heading {
    font-family: 'Newsreader', Georgia, serif;
    font-size: 22px;
    font-weight: 700;
    color: #1f2937;
    padding-bottom: 12px;
    border-bottom: 3px solid #1a73e8;
    margin-top: 28px;
    margin-bottom: 24px;
}

/* === Article List === */
.flavor-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.flavor-item {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: #fff;
    border: none;
    border-bottom: 1px solid #e0e6ed;
    border-radius: 0;
    margin-bottom: 0;
    transition: background 0.15s ease;
}

.flavor-item:first-child {
    border-top: 1px solid #e0e6ed;
}

.flavor-item:hover {
    background: #f0f6ff;
}

.flavor-item__thumb {
    flex-shrink: 0;
    width: 200px;
    height: 134px;
    display: block;
    border-radius: 0;
    overflow: hidden;
}

.flavor-item__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.2s ease;
}

.flavor-item:hover .flavor-item__thumb img {
    transform: scale(1.03);
}

.flavor-item__placeholder {
    width: 100%;
    height: 100%;
    background: #d6e4f7;
}

.flavor-item__content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.flavor-item__title {
    font-family: 'Newsreader', Georgia, serif;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px;
    line-height: 1.4;
}

.flavor-item__title a {
    color: #1f2937;
}

.flavor-item__title a:hover {
    color: #1a73e8;
}

.flavor-item__excerpt {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 12px;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.flavor-item__meta {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 13px;
    color: #9ca3af;
}

.flavor-item__cat {
    background: #1a73e8;
    color: #fff;
    padding: 2px 10px;
    border-radius: 0;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.flavor-item__tags {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
}

.flavor-item__tag {
    display: inline-block;
    background: #eef3fb;
    color: #1a73e8;
    padding: 2px 10px;
    border-radius: 0;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

a.flavor-item__tag:hover {
    background: #1a73e8;
    color: #fff;
}

.flavor-item__date {
    color: #9ca3af;
}

/* === Pagination === */
.flavor-pagination {
    margin: 28px 0;
    text-align: center;
}

.flavor-pagination .page-numbers {
    display: inline-block;
    padding: 8px 14px;
    margin: 0 2px;
    border: 2px solid #e0e6ed;
    color: #374151;
    text-decoration: none;
    border-radius: 0;
    font-size: 14px;
    font-weight: 500;
    background: #fff;
    transition: all 0.15s ease;
}

.flavor-pagination .page-numbers.current {
    background: #1a73e8;
    color: #fff;
    border-color: #1a73e8;
}

.flavor-pagination .page-numbers:hover:not(.current) {
    background: #f0f6ff;
    border-color: #1a73e8;
    color: #1a73e8;
}

/* === Sidebar Widgets === */
.flavor-widget {
    margin-bottom: 24px;
    background: #fff;
    border: none;
    border-top: 3px solid #1a73e8;
    border-radius: 0;
    padding: 20px;
}

.flavor-widget__title {
    font-family: 'Newsreader', Georgia, serif;
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e6ed;
}

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

.flavor-widget__list li {
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
}

.flavor-widget__list li:last-child {
    border-bottom: none;
}

.flavor-widget__list li a {
    color: #374151;
    font-size: 14px;
    transition: color 0.15s;
}

.flavor-widget__list li a:hover {
    color: #1a73e8;
}

.flavor-widget__text {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.7;
    margin: 0;
}

.flavor-widget__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.flavor-widget__tag {
    display: inline-block;
    background: #f0f6ff;
    color: #1a73e8;
    font-size: 12px;
    font-weight: 500;
    padding: 5px 12px;
    border: 1px solid #d6e4f7;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
}

.flavor-widget__tag:hover {
    background: #1a73e8;
    color: #fff;
    border-color: #1a73e8;
}

/* === Related Posts === */
.flavor-related {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 2px solid #e0e6ed;
}

.flavor-related__title {
    font-family: 'Newsreader', Georgia, serif;
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 18px;
}

.flavor-related__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.flavor-related__card {
    display: block;
    text-decoration: none;
    border-radius: 0;
    overflow: hidden;
    background: #fff;
    border: none;
    border-bottom: 3px solid transparent;
    transition: border-color 0.2s ease;
}

.flavor-related__card:hover {
    border-bottom-color: #1a73e8;
}

.flavor-related__img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
}

.flavor-related__placeholder {
    width: 100%;
    height: 140px;
    background: #d6e4f7;
}

.flavor-related__name {
    display: block;
    padding: 12px 14px;
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* === Footer === */
.site-footer {
    background: #1f2937;
    border-top: none;
    color: #d1d5db;
    margin-top: 0;
    padding: 24px 0;
}

.site-footer .site-info {
    background: transparent;
    color: #d1d5db;
    border-top: none;
    padding: 0;
    margin: 0;
}

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

.site-footer a:hover {
    color: #93c5fd;
}
/* === GeneratePress content area === */
.separate-containers .inside-article {
    background: #fff;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

/* === Featured Grid === */
.flavor-featured {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 4px;
    margin-bottom: 28px;
    height: 380px;
}

.flavor-featured__card {
    position: relative;
    display: block;
    border-radius: 0;
    overflow: hidden;
    text-decoration: none;
}

.flavor-featured__card--large {
    grid-row: 1 / 3;
}

.flavor-featured__card--small {
    grid-row: auto;
}

.flavor-featured__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.flavor-featured__card:hover .flavor-featured__img {
    transform: scale(1.03);
}

.flavor-featured__placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #d6e4f7 0%, #b8d4f0 100%);
}

.flavor-featured__overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 18px 20px;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: #fff;
}

.flavor-featured__cat {
    display: inline-block;
    background: #1a73e8;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 0;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.flavor-featured__title {
    font-family: 'Newsreader', Georgia, serif;
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    line-height: 1.4;
    color: #fff;
}

.flavor-featured__card--large .flavor-featured__title {
    font-size: 22px;
}

.flavor-featured__date {
    font-size: 12px;
    color: rgba(255,255,255,0.75);
    margin-top: 4px;
    display: block;
}

/* === Single Article === */
.flavor-single {
    background: #fff;
    border: none;
    border-radius: 0;
    padding: 36px 40px;
}

.flavor-single__title {
    font-family: 'Newsreader', Georgia, serif;
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 14px;
    line-height: 1.35;
}

.flavor-single__meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: #9ca3af;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e0e6ed;
}

.flavor-single__cat {
    background: #1a73e8;
    color: #fff;
    padding: 2px 10px;
    border-radius: 0;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.flavor-single__content {
    font-size: 16px;
    line-height: 1.85;
    color: #374151;
}

.flavor-single__content h2 {
    font-family: 'Newsreader', Georgia, serif;
    font-size: 22px;
    font-weight: 700;
    color: #1f2937;
    margin: 32px 0 14px;
}

.flavor-single__content h3 {
    font-family: 'Newsreader', Georgia, serif;
    font-size: 19px;
    font-weight: 600;
    color: #1f2937;
    margin: 26px 0 10px;
}

.flavor-single__content p {
    margin: 0 0 18px;
}

.flavor-single__content img {
    max-width: 100%;
    height: auto;
    border-radius: 0;
    margin: 20px 0;
}

.flavor-single__content blockquote {
    border-left: 4px solid #1a73e8;
    margin: 24px 0;
    padding: 16px 24px;
    background: #f0f6ff;
    border-radius: 0;
    color: #4b5563;
    font-style: italic;
}

.flavor-single__content ul,
.flavor-single__content ol {
    padding-left: 24px;
    margin: 0 0 18px;
}

.flavor-single__content li {
    margin-bottom: 8px;
}

.flavor-single__content a {
    color: #1a73e8;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.flavor-single__content a:hover {
    color: #1558b0;
}

.flavor-single__content pre {
    background: #1f2937;
    color: #e5e7eb;
    border: none;
    border-radius: 0;
    padding: 20px;
    overflow-x: auto;
    font-size: 14px;
    margin: 20px 0;
}

/* === Hide GP defaults === */
body.single .site-content .inside-article,
body.single #right-sidebar,
body.page .site-content .inside-article,
body.page #right-sidebar {
    display: none;
}

body.home #right-sidebar,
body.archive #right-sidebar,
body.search #right-sidebar {
    display: none;
}

/* === Responsive === */
@media (max-width: 768px) {
    .inside-header {
        height: 52px;
    }

    .main-title a,
    .site-title a {
        font-size: 22px;
    }

    .main-navigation {
        margin-left: 20px;
    }

    .main-navigation .main-nav > ul > li > a {
        padding: 16px 10px;
        font-size: 14px;
    }

    .flavor-main__heading {
    margin-top: 28px;
}

.flavor-layout {
        flex-direction: column;
        padding-top: 20px;
    }

    .flavor-sidebar {
        width: 100%;
    }

    .flavor-item {
        flex-direction: column;
        gap: 12px;
    }

    .flavor-item__thumb {
        width: 100%;
        height: 180px;
    }

    .flavor-header-search .search-field {
        height: 36px;
        width: 140px;
    }

    .flavor-related__grid {
        grid-template-columns: 1fr;
    }

    .flavor-related__img,
    .flavor-related__placeholder {
        height: 180px;
    }

    .flavor-featured {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        height: auto;
        gap: 2px;
    }

    .flavor-featured__card--large {
        grid-row: auto;
        height: 220px;
    }

    .flavor-featured__card--small {
        height: 160px;
    }

    .flavor-hero__card {
        flex-direction: column;
    }

    .flavor-hero__image {
        width: 100%;
        min-height: 180px;
        height: 180px;
    }

    .flavor-hero__body {
        padding: 20px;
    }

    .flavor-hero__title {
        font-size: 20px;
    }

    .flavor-single {
        padding: 20px;
    }

    .flavor-single__title {
        font-size: 22px;
    }
}

/* === Hero Card (few posts) === */
.flavor-hero {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 28px;
}

.flavor-hero__card {
    display: flex;
    background: #fff;
    border: none;
    border-bottom: 3px solid transparent;
    text-decoration: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
}

.flavor-hero__card:hover {
    border-bottom-color: #1a73e8;
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.08);
}

.flavor-hero__image {
    flex-shrink: 0;
    width: 340px;
    min-height: 220px;
    overflow: hidden;
}

.flavor-hero__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.flavor-hero__card:hover .flavor-hero__img {
    transform: scale(1.03);
}

.flavor-hero__placeholder {
    width: 100%;
    height: 100%;
    min-height: 220px;
    background: linear-gradient(135deg, #e8f0fe 0%, #d6e4f7 50%, #c3d9f2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.flavor-hero__body {
    flex: 1;
    padding: 28px 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.flavor-hero__cat {
    display: inline-block;
    background: #1a73e8;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    align-self: flex-start;
}

.flavor-hero__title {
    font-family: 'Newsreader', Georgia, serif;
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 12px;
    line-height: 1.35;
}

.flavor-hero__excerpt {
    font-size: 15px;
    color: #6b7280;
    line-height: 1.7;
    margin: 0 0 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.flavor-hero__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: #9ca3af;
}

.flavor-hero__readmore {
    color: #1a73e8;
    font-weight: 500;
    font-size: 14px;
}

.flavor-hero__card:hover .flavor-hero__readmore {
    text-decoration: underline;
}

/* === Empty State === */
.flavor-empty {
    text-align: center;
    padding: 80px 20px;
    background: #fff;
    border: none;
    border-top: 3px solid #1a73e8;
}

.flavor-empty p {
    font-size: 16px;
    color: #6b7280;
    margin: 0;
}

/* === Page Loading Bar === */
#page-loading-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
    z-index: 99999;
    transition: none;
    pointer-events: none;
}

#page-loading-bar.loading {
    width: 70%;
    transition: width 2s cubic-bezier(0.1, 0.5, 0.3, 1);
}
