/* ============================================
   118kr.cn - 韩式简约风格美化
   配色：深蓝 + 红 + 金色点缀
   ============================================ */

/* 导入Noto Sans SC字体 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700&family=Noto+Serif+KR:wght@400;700&display=swap');

/* ========== 基础颜色变量 ========== */
:root {
    --primary-blue: #1B3053;      /* 深蓝主色 */
    --accent-red: #C73E3A;        /* 中国红点缀 */
    --gold: #D4AF37;             /* 金色点缀 */
    --light-bg: #F8F9FA;         /* 浅灰背景 */
    --text-dark: #2D2D2D;        /* 深灰文字 */
    --text-light: #6B7280;        /* 浅灰文字 */
    --white: #FFFFFF;
}

/* ========== 字体设置 ========== */
body, body .entry-content, body .site-content {
    font-family: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif !important;
    color: var(--text-dark);
    line-height: 1.8;
}

h1, h2, h3, h4, h5, h6, .entry-title, .site-title {
    font-family: 'Noto Sans SC', 'Noto Serif KR', 'PingFang SC', 'Microsoft YaHei', serif !important;
    font-weight: 700;
    color: var(--primary-blue);
}

/* ========== 头部和导航 ========== */
.site-header {
    background: var(--white) !important;
    border-bottom: 1px solid rgba(27, 48, 83, 0.1);
    box-shadow: 0 2px 20px rgba(27, 48, 83, 0.05);
}

.site-title a {
    color: var(--primary-blue) !important;
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 0.05em;
}

.main-navigation a {
    color: var(--text-dark) !important;
    font-weight: 500;
    transition: color 0.3s ease;
}

.main-navigation a:hover {
    color: var(--accent-red) !important;
}

/* ========== 首页横幅 ========== */
.hero-section {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #2A4A6D 100%);
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="0.5"/></svg>');
    opacity: 0.5;
}

.hero-section h1, .hero-section h2 {
    color: var(--white) !important;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

/* ========== 文章卡片 ========== */
.archive .entry,
.blog .entry,
.site-main .entry {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(27, 48, 83, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(27, 48, 83, 0.05);
}

.archive .entry:hover,
.blog .entry:hover,
.site-main .entry:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(27, 48, 83, 0.15);
}

.entry-header {
    padding: 20px 24px 0;
}

.entry-title a {
    color: var(--primary-blue) !important;
    font-weight: 700;
    transition: color 0.3s ease;
}

.entry-title a:hover {
    color: var(--accent-red) !important;
}

.entry-content {
    padding: 16px 24px 24px;
    color: var(--text-dark);
}

/* ========== 分类标签 ========== */
.cat-links a,
.tags-links a {
    background: var(--light-bg);
    color: var(--primary-blue);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.cat-links a:hover,
.tags-links a:hover {
    background: var(--primary-blue);
    color: var(--white);
}

/* ========== 侧边栏 ========== */
.widget {
    background: var(--white);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(27, 48, 83, 0.08);
    border: 1px solid rgba(27, 48, 83, 0.05);
}

.widget-title {
    color: var(--primary-blue);
    font-weight: 700;
    border-bottom: 2px solid var(--gold);
    padding-bottom: 12px;
    margin-bottom: 16px;
}

/* ========== 按钮样式 ========== */
button, .button, input[type="submit"] {
    background: var(--primary-blue);
    color: var(--white);
    border: none;
    border-radius: 8px;
    padding: 12px 28px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

button:hover, .button:hover, input[type="submit"]:hover {
    background: var(--accent-red);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(199, 62, 58, 0.3);
}

/* ========== 链接颜色 ========== */
a {
    color: var(--primary-blue);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-red);
}

/* ========== 页面标题 ========== */
.page-header {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #2A4A6D 100%);
    padding: 40px 0;
    margin-bottom: 40px;
}

.page-title {
    color: var(--white) !important;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

/* ========== 分页样式 ========== */
.pagination .nav-links,
.post-navigation {
    background: var(--white);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(27, 48, 83, 0.08);
}

.pagination a, .post-navigation a {
    color: var(--primary-blue);
}

.pagination a:hover, .post-navigation a:hover {
    color: var(--accent-red);
}

/* ========== 底部 ========== */
.site-footer {
    background: var(--primary-blue);
    color: var(--white);
    padding: 40px 0;
}

.site-footer a {
    color: rgba(255,255,255,0.7);
}

.site-footer a:hover {
    color: var(--gold);
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
    .hero-section {
        padding: 50px 0;
    }
    
    .archive .entry,
    .blog .entry {
        margin-bottom: 24px;
    }
    
    .entry-header,
    .entry-content {
        padding: 16px;
    }
}

/* ========== 装饰元素 ========== */
.entry-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 1em;
    background: var(--gold);
    margin-right: 12px;
    vertical-align: middle;
}

.widget-title::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 2px;
    background: var(--gold);
    margin-right: 8px;
    vertical-align: middle;
}

/* ========== 韩国语特殊样式 ========== */
:lang(ko) {
    font-family: 'Noto Sans SC', 'Noto Serif KR', sans-serif !important;
}


/* ===== 增强门户样式 ===== */


/* ============================================
   增强版门户样式 - 118kr.cn 升级
   ============================================ */

/* ===== LOGO ===== */
.custom-logo-link {
    display: flex !important;
    align-items: center;
    text-decoration: none !important;
}

.site-logo-inline {
    height: 60px !important;
    width: auto !important;
}

/* ===== 顶部导航增强 ===== */
.main-navigation {
    background: var(--white) !important;
    border-bottom: 3px solid var(--primary-blue) !important;
}

.main-navigation ul.menu > li > a {
    padding: 16px 20px !important;
    font-size: 0.95rem !important;
    font-weight: 500 !important;
    letter-spacing: 0.03em !important;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.main-navigation ul.menu > li > a:hover {
    color: var(--accent-red) !important;
    border-bottom-color: var(--accent-red);
}

/* 当前菜单项 */
.main-navigation ul.menu > li.current-menu-item > a,
.main-navigation ul.menu > li.current_page_item > a {
    color: var(--accent-red) !important;
    border-bottom-color: var(--gold) !important;
}

/* ===== 头部区域 ===== */
.site-header {
    background: var(--white) !important;
    box-shadow: 0 2px 20px rgba(27, 48, 83, 0.08) !important;
    position: sticky;
    top: 0;
    z-index: 999;
}

.ast-header-wrap {
    max-width: 1400px !important;
    margin: 0 auto;
}

/* ===== Hero Banner ===== */
.hero-banner-wrapper {
    background: linear-gradient(135deg, #1B3053 0%, #2A4A6D 100%);
    padding: 0;
    position: relative;
    overflow: hidden;
}

.hero-banner-wrapper svg {
    display: block;
    width: 100%;
    height: auto;
    max-height: 400px;
}

/* ===== 站内搜索框 ===== */
.site-search-form {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.site-search-form .search-field {
    width: 100%;
    padding: 14px 50px 14px 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 30px;
    background: rgba(255,255,255,0.15);
    color: #fff;
    font-size: 1rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.site-search-form .search-field::placeholder {
    color: rgba(255,255,255,0.7);
}

.site-search-form .search-field:focus {
    outline: none;
    border-color: var(--gold);
    background: rgba(255,255,255,0.25);
}

.site-search-form .search-submit {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--gold);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    padding: 0;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.site-search-form .search-submit:hover {
    background: var(--accent-red);
}

/* 搜索小工具标题 */
.search-form-label {
    color: var(--white);
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 20px;
    font-weight: 700;
}

/* ===== 分类标签导航条 ===== */
.category-tab-bar {
    background: var(--primary-blue);
    padding: 12px 0;
    overflow-x: auto;
    white-space: nowrap;
}

.category-tab-bar-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    gap: 8px;
    padding: 0 20px;
}

.category-tab-bar a {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(255,255,255,0.1);
    color: var(--white);
    border-radius: 20px;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.category-tab-bar a:hover,
.category-tab-bar a.active {
    background: var(--gold);
    color: var(--primary-blue);
    font-weight: 700;
}

/* ===== 文章卡片网格 ===== */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.posts-grid .entry {
    margin-bottom: 0 !important;
}

/* ===== 侧边栏增强 ===== */
.widget-area {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.widget-area .widget {
    margin-bottom: 0 !important;
}

/* 搜索小工具 */
.widget_search .search-form {
    display: flex;
    gap: 8px;
}

.widget_search .search-field {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #E5E7EB;
    border-radius: 8px;
    font-size: 0.95rem;
}

.widget_search .search-field:focus {
    border-color: var(--primary-blue);
    outline: none;
}

.widget_search .search-submit {
    background: var(--primary-blue);
    color: var(--white);
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    cursor: pointer;
    font-weight: 500;
}

.widget_search .search-submit:hover {
    background: var(--accent-red);
}

/* 分类小工具 */
.widget_pages ul.children,
.widget_categories ul.children {
    padding-left: 20px;
    border-left: 2px solid var(--light-bg);
    margin-top: 8px;
}

.widget_archive ul,
.widget_categories ul,
.widget_pages ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget_archive ul li,
.widget_categories ul li,
.widget_pages ul li {
    padding: 10px 0;
    border-bottom: 1px solid rgba(27,48,83,0.08);
    transition: padding-left 0.3s ease;
}

.widget_archive ul li:hover,
.widget_categories ul li:hover,
.widget_pages ul li:hover {
    padding-left: 8px;
}

.widget_archive ul li a,
.widget_categories ul li a,
.widget_pages ul li a {
    color: var(--text-dark);
    text-decoration: none;
    font-size: 0.95rem;
}

.widget_archive ul li a:hover,
.widget_categories ul li a:hover,
.widget_pages ul li a:hover {
    color: var(--accent-red);
}

/* ===== 页面标题区 ===== */
.archive-header,
.page-header {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #2A4A6D 100%) !important;
    padding: 50px 0 !important;
    margin-bottom: 40px !important;
    position: relative;
    overflow: hidden;
}

.archive-header::before,
.page-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(212,175,55,0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.archive-header .archive-title,
.archive-header .page-title,
.page-header .page-title {
    color: var(--white) !important;
    font-size: 2rem !important;
    font-weight: 700 !important;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.archive-description {
    color: rgba(255,255,255,0.8);
    margin-top: 8px;
    font-size: 1rem;
}

/* ===== 语言切换 ===== */
.lang-switch-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--light-bg);
    border-radius: 20px;
    font-size: 0.85rem;
}

.lang-switch-wrapper a {
    color: var(--text-dark);
    text-decoration: none;
    padding: 4px 12px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.lang-switch-wrapper a:hover,
.lang-switch-wrapper a.active {
    background: var(--primary-blue);
    color: var(--white);
}

/* ===== 底部增强 ===== */
.site-footer {
    background: var(--primary-blue) !important;
    color: rgba(255,255,255,0.8);
    padding: 60px 0 30px;
}

.site-footer .widget-area {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto 40px;
}

.site-footer .widget-title {
    color: var(--gold) !important;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(212,175,55,0.3);
    padding-bottom: 10px;
}

.site-footer a {
    color: rgba(255,255,255,0.7) !important;
    text-decoration: none;
    transition: color 0.3s ease;
}

.site-footer a:hover {
    color: var(--gold) !important;
}

.site-info {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
}

/* ===== CTA Section ===== */
.cta-section {
    background: linear-gradient(135deg, var(--gold) 0%, #E5C76A 100%);
    padding: 60px 0;
    text-align: center;
}

.cta-section h2 {
    color: var(--primary-blue) !important;
    font-size: 2rem;
    margin-bottom: 16px;
}

.cta-section p {
    color: var(--primary-blue);
    opacity: 0.8;
    margin-bottom: 24px;
}

/* ===== 响应式优化 ===== */
@media (max-width: 1024px) {
    .posts-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .main-navigation ul.menu > li > a {
        padding: 12px 14px !important;
        font-size: 0.85rem !important;
    }
    
    .hero-banner-wrapper {
        padding: 30px 0;
    }
    
    .archive-header,
    .page-header {
        padding: 30px 0 !important;
    }
    
    .archive-header .archive-title,
    .page-header .page-title {
        font-size: 1.5rem !important;
    }
    
    .site-footer .widget-area {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .category-tab-bar {
        padding: 8px 0;
    }
    
    .category-tab-bar a {
        padding: 6px 14px;
        font-size: 0.8rem;
    }
}

/* ===== Polylang 语言切换器 ===== */
.menu-item-lang {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
}

.menu-item-lang img {
    width: 20px;
    height: auto;
}
