/*
Theme Name: 期刊媒体展示主题
Theme URI: https://wyqq.top
Description: 专门用于展示期刊、报纸和媒体机构的WordPress主题，支持自定义文章类型和分类管理
Author: WYQQ
Version: 1.1.0
Requires at least: 5.0
Tested up to: 6.3
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: publication-theme
Domain Path: /languages
Tags: publications, media, journals, newspapers, custom-post-types
*/

/* ==========================================================================
   基础样式重置
   ========================================================================== */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

/* ==========================================================================
   布局结构
   ========================================================================== */

.site-header {
    background: #2c3e50;
    color: white;
    padding: 1rem 0;
}

.site-title {
    font-size: 2rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 0.5rem;
}

.site-description {
    text-align: center;
    opacity: 0.8;
}

.main-navigation {
    background: #34495e;
    padding: 0.5rem 0;
}

.nav-menu {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.nav-menu li {
    margin: 0 1rem;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    display: block;
    transition: background-color 0.3s;
}

.nav-menu a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.site-main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.site-footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

/* ==========================================================================
   期刊/媒体展示样式
   ========================================================================== */

.publications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.publication-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.publication-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.publication-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.publication-content {
    padding: 1.5rem;
}

.publication-title {
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.publication-meta {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
}

.publication-excerpt {
    line-height: 1.6;
    margin-bottom: 1rem;
}

.publication-categories {
    margin-bottom: 1rem;
}

.publication-category {
    display: inline-block;
    background: #3498db;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-right: 0.5rem;
    text-decoration: none;
}

.publication-category:hover {
    background: #2980b9;
}

.read-more {
    display: inline-block;
    background: #e74c3c;
    color: white;
    padding: 0.5rem 1rem;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.read-more:hover {
    background: #c0392b;
}

/* ==========================================================================
   响应式设计
   ========================================================================== */

@media (max-width: 768px) {
    .nav-menu {
        flex-direction: column;
        align-items: center;
    }
    
    .nav-menu li {
        margin: 0.25rem 0;
    }
    
    .publications-grid {
        grid-template-columns: 1fr;
    }
    
    .site-main {
        padding: 0 0.5rem;
    }
}

/* ==========================================================================
   工具类
   ========================================================================== */

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

.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }

.hidden {
    display: none;
}

.screen-reader-text {
    position: absolute !important;
    clip: rect(1px, 1px, 1px, 1px);
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ==========================================================================
   字母头像（随机纯色 + 首字）
   ========================================================================== */
.initial-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  font-weight: 700;
  user-select: none;
}
/* 适配导航栏容器尺寸 */
.user-avatar .initial-avatar { width: 32px; height: 32px; font-size: 16px; }
.user-avatar-large .initial-avatar { width: 48px; height: 48px; font-size: 22px; }