/*
Theme Name: Phoenix News Theme
Theme URI: https://example.com
Author: Your Name
Author URI: https://example.com
Description: 凤凰新闻风格移动端主题 - 新闻资讯类WordPress主题
Version: 1.0
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: phoenix-news
Tags: news, mobile, responsive, clean
*/

/* ========== 基础样式重置 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

/* ========== 顶部Logo区域 ========== */
.top-header {
    background: #fff;
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 22px;
    font-weight: bold;
    color: #d32f2f;
    display: flex;
    align-items: center;
}

.logo a {
    color: #d32f2f;
}

.logo img {
    height: 30px;
    margin-right: 8px;
}

/* ========== 导航菜单 ========== */
.nav-menu-wrapper {
    background: #fff;
    border-bottom: 1px solid #eee;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.nav-menu {
    display: flex;
    flex-wrap: nowrap;
    gap: 0;
    padding: 0;
    list-style: none;
    white-space: nowrap;
}

.nav-menu li {
    flex-shrink: 0;
}

.nav-menu a {
    display: block;
    padding: 12px 15px;
    font-size: 15px;
    color: #333;
    position: relative;
}

.nav-menu a:hover,
.nav-menu .current-menu-item a {
    color: #d32f2f;
}

.nav-menu .current-menu-item a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: #d32f2f;
}

/* ========== 焦点图/轮播 ========== */
.hero-banner {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    margin-bottom: 12px;
    background: #fff;
}

.hero-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 15px 15px;
    background: linear-gradient(transparent, rgba(0,0,0,0.75));
    color: #fff;
}

.banner-title {
    font-size: 18px;
    font-weight: bold;
    line-height: 1.4;
    margin-bottom: 5px;
}

.banner-meta {
    font-size: 13px;
    color: rgba(255,255,255,0.8);
}

/* ========== 内容容器 ========== */
.content-wrapper {
    max-width: 100%;
    background: #fff;
    margin-bottom: 12px;
}

/* ========== 栏目头部 ========== */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    background: #fff;
}

.section-title {
    font-size: 18px;
    font-weight: bold;
    color: #222;
    position: relative;
    padding-left: 12px;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 16px;
    background: #d32f2f;
    border-radius: 2px;
}

.section-more {
    font-size: 14px;
    color: #2196F3;
}

.section-more:hover {
    color: #1976D2;
}

/* ========== 新闻列表 ========== */
.news-list {
    background: #fff;
}

.news-item {
    display: flex;
    padding: 15px;
    border-bottom: 1px solid #f5f5f5;
    transition: background-color 0.2s ease;
}

.news-item:hover {
    background: #fafafa;
}

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

.news-content {
    flex: 1;
    margin-right: 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.news-title {
    font-size: 17px;
    font-weight: 500;
    line-height: 1.5;
    color: #222;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-item:hover .news-title {
    color: #d32f2f;
}

.news-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #999;
    flex-wrap: wrap;
}

.news-source {
    color: #666;
}

.news-comments::before {
    content: '💬';
    margin-right: 3px;
}

.news-thumbnail {
    width: 110px;
    height: 75px;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
    background: #f0f0f0;
}

.news-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-item:hover .news-thumbnail img {
    transform: scale(1.05);
}

/* 无缩略图的新闻样式 */
.news-item.no-image .news-content {
    margin-right: 0;
}

/* ========== 广告位 ========== */
.ad-space {
    /* padding: 12px 0; */
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
}

.ad-container {
    width: auto;
    height: auto;
    min-height: auto;
    display: block;
}

.ad-content {
    width: 100%;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.ad-content img {
    width: 100%;
    height: auto;
}

.ad-label {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
    text-align: right;
}

/* ========== 加载更多 ========== */
.load-more {
    text-align: center;
    padding: 20px;
    background: #fff;
}

.load-more button {
    background: #fff;
    border: 1px solid #ddd;
    padding: 10px 30px;
    border-radius: 20px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
}

.load-more button:hover {
    border-color: #d32f2f;
    color: #d32f2f;
}

/* ========== 页脚 ========== */
.site-footer {
    background: #f5f5f5;
    padding: 20px 15px;
    text-align: center;
    font-size: 13px;
    color: #999;
    border-top: 1px solid #eee;
    margin-top: 20px;
}

.site-footer a {
    color: #666;
    margin: 0 8px;
}

.site-footer a:hover {
    color: #d32f2f;
}

/* ========== 文章详情页 ========== */
.single-content {
    background: #fff;
    padding: 20px 15px;
    margin-bottom: 12px;
}

.single-title {
    font-size: 22px;
    font-weight: bold;
    line-height: 1.4;
    color: #222;
    margin-bottom: 15px;
}

.single-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 13px;
    color: #999;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.single-body {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}

.single-body p {
    margin-bottom: 15px;
}

.single-body img {
    margin: 15px 0;
    border-radius: 4px;
}

/* ========== 响应式设计 ========== */
@media (min-width: 768px) {
    .content-wrapper,
    .single-content {
        max-width: 750px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .news-item {
        padding: 18px 20px;
    }
    
    .news-title {
        font-size: 18px;
    }
    
    .hero-banner {
        height: 280px;
    }
}

@media (min-width: 1024px) {
    .content-wrapper,
    .single-content {
        max-width: 1200px;
    }
}

/* ========== 加载动画 ========== */
.loading {
    text-align: center;
    padding: 30px;
    color: #999;
    font-size: 14px;
}

.loading::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* ========== WordPress 默认样式覆盖 ========== */
.wp-caption {
    max-width: 100%;
}

.aligncenter {
    display: block;
    margin: 0 auto;
}

.gallery {
    margin: 20px 0;
}

/* ========== 工具类 ========== */
.text-center {
    text-align: center;
}

.mt-10 {
    margin-top: 10px;
}

.mb-10 {
    margin-bottom: 10px;
}

.hidden {
    display: none;
}
