/*
Theme Name: TeaVoices
Theme URI: https://teavoices.com/
Description: 茶知识分享资讯站点主题
Author: TeaVoices Team
Author URI: https://teavoices.com/
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: teavoices
Tags: tea, knowledge, blog, responsive, clean
*/

:root {
    --primary-color: #5D4E37;
    --secondary-color: #8B7355;
    --accent-color: #D4A574;
    --bg-color: #F9F6F0;
    --text-color: #333333;
    --light-text: #666666;
    --white: #FFFFFF;
    --border-color: #E8E0D5;
    --shadow: 0 2px 10px rgba(93, 78, 55, 0.1);
    --shadow-lg: 0 4px 20px rgba(93, 78, 55, 0.15);
}

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

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 20px 0;
    box-shadow: var(--shadow);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 50px;
    width: auto;
    margin-right: 15px;
}

.logo-text {
    color: var(--white);
}

.logo-text h1 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 2px;
}

.logo-text p {
    font-size: 14px;
    opacity: 0.9;
    letter-spacing: 1px;
}

.nav {
    display: flex;
    list-style: none;
}

.nav li {
    margin-left: 30px;
}

.nav li a {
    color: var(--white);
    font-size: 16px;
    font-weight: 500;
    padding: 10px 15px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.nav li a:hover,
.nav li a.active {
    background-color: rgba(255, 255, 255, 0.2);
}

.banner {
    position: relative;
    height: 450px;
    overflow: hidden;
    margin-bottom: 40px;
    border-radius: 10px;
}

.banner-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.banner-slide.active {
    opacity: 1;
}

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

.banner-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    padding: 40px;
}

.banner-title {
    color: var(--white);
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
}

.banner-excerpt {
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    margin-bottom: 15px;
}

.banner-btn {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--white);
    padding: 10px 25px;
    border-radius: 5px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.banner-btn:hover {
    background-color: #C49464;
}

.banner-indicators {
    position: absolute;
    bottom: 20px;
    right: 40px;
    display: flex;
}

.banner-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    margin-left: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.banner-indicator.active {
    background-color: var(--accent-color);
    transform: scale(1.2);
}

.main-content {
    display: grid;
    grid-template-columns: 70% 30%;
    gap: 40px;
    margin-bottom: 40px;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--accent-color);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
}

.post-card {
    background-color: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.post-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.post-card-content {
    padding: 20px;
}

.post-category {
    display: inline-block;
    background-color: rgba(93, 78, 55, 0.1);
    color: var(--primary-color);
    padding: 5px 12px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 10px;
}

.post-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
}

.post-excerpt {
    color: var(--light-text);
    font-size: 14px;
    margin-bottom: 15px;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--light-text);
}

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

.post-meta span i {
    margin-right: 5px;
}

.sidebar {
    position: sticky;
    top: 20px;
}

.widget {
    background-color: var(--white);
    border-radius: 10px;
    padding: 25px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.widget-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.category-list {
    list-style: none;
}

.category-list li {
    margin-bottom: 12px;
}

.category-list li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.category-list li a:hover {
    background-color: rgba(93, 78, 55, 0.05);
}

.category-count {
    background-color: var(--accent-color);
    color: var(--white);
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 12px;
}

.tag-cloud a {
    display: inline-block;
    background-color: rgba(93, 78, 55, 0.1);
    color: var(--primary-color);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 13px;
    margin: 5px;
    transition: all 0.3s ease;
}

.tag-cloud a:hover {
    background-color: var(--accent-color);
    color: var(--white);
}

.hot-posts {
    list-style: none;
}

.hot-posts li {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.hot-posts li:last-child {
    border-bottom: none;
}

.hot-posts li img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
    margin-right: 15px;
}

.hot-posts li a {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
}

.footer {
    background-color: var(--primary-color);
    padding: 50px 0 30px;
    color: var(--white);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.footer-section p {
    font-size: 14px;
    line-height: 1.8;
    opacity: 0.9;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links li a {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-links li a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 13px;
    opacity: 0.8;
}

.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 40px 0;
    margin-bottom: 40px;
}

.page-header h1 {
    color: var(--white);
    font-size: 36px;
    font-weight: 700;
    text-align: center;
}

.page-header p {
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    margin-top: 10px;
}

.archive-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.single-post {
    background-color: var(--white);
    border-radius: 10px;
    padding: 40px;
    box-shadow: var(--shadow);
}

.single-post-header {
    margin-bottom: 30px;
}

.single-post-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.4;
    margin-bottom: 20px;
}

.single-post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 14px;
    color: var(--light-text);
}

.single-post-content {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-color);
}

.single-post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin: 20px 0;
}

.single-post-content h2 {
    font-size: 24px;
    color: var(--primary-color);
    margin: 30px 0 15px;
}

.single-post-content h3 {
    font-size: 20px;
    color: var(--secondary-color);
    margin: 25px 0 12px;
}

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

.single-post-content ul,
.single-post-content ol {
    margin-left: 20px;
    margin-bottom: 15px;
}

.post-tags {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.post-tags span {
    font-size: 14px;
    color: var(--light-text);
    margin-right: 10px;
}

.post-tags a {
    display: inline-block;
    background-color: rgba(93, 78, 55, 0.1);
    color: var(--primary-color);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    margin-right: 8px;
}

.post-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding: 20px;
    background-color: var(--bg-color);
    border-radius: 10px;
}

.post-nav a {
    display: flex;
    align-items: center;
    font-size: 14px;
}

.post-nav a:hover {
    color: var(--accent-color);
}

.post-nav .prev {
    flex: 1;
    justify-content: flex-start;
}

.post-nav .next {
    flex: 1;
    justify-content: flex-end;
}

.comments-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.comments-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 25px;
}

.comment-list {
    list-style: none;
}

.comment-item {
    display: flex;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
}

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

.comment-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--border-color);
    margin-right: 20px;
    flex-shrink: 0;
}

.comment-content {
    flex: 1;
}

.comment-author {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.comment-date {
    font-size: 13px;
    color: var(--light-text);
    margin-bottom: 10px;
}

.comment-text {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-color);
}

.comment-reply {
    display: inline-block;
    margin-top: 10px;
    font-size: 13px;
    color: var(--accent-color);
}

.comment-form {
    margin-top: 30px;
    background-color: var(--bg-color);
    padding: 30px;
    border-radius: 10px;
}

.comment-form h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 15px;
    margin-bottom: 15px;
    transition: border-color 0.3s ease;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

.comment-form textarea {
    height: 150px;
    resize: vertical;
}

.comment-form button {
    background-color: var(--accent-color);
    color: var(--white);
    border: none;
    padding: 12px 30px;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.comment-form button:hover {
    background-color: #C49464;
}

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 10px 20px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    margin: 0 5px;
    font-size: 15px;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background-color: var(--accent-color);
    color: var(--white);
    border-color: var(--accent-color);
}

.pagination span.current {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

/* ========================================
   响应式设计 - 增强版
   ======================================== */

/* 平板设备 - 768px 到 1024px */
@media (max-width: 1024px) {
    .container {
        padding: 0 15px;
    }

    .header-content {
        padding: 0 15px;
    }

    .nav li {
        margin-left: 20px;
    }

    .nav li a {
        padding: 8px 12px;
        font-size: 15px;
    }

    .banner {
        height: 400px;
        margin-bottom: 30px;
    }

    .main-content {
        gap: 30px;
    }

    .post-card img {
        height: 180px;
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

/* 移动端设备 - 768px 以下 */
@media (max-width: 768px) {
    /* 头部优化 */
    .header {
        padding: 15px 0;
    }

    .header-content {
        flex-direction: column;
        text-align: center;
    }

    .logo {
        margin-bottom: 15px;
    }

    .logo img {
        height: 40px;
    }

    .logo-text h1 {
        font-size: 22px;
    }

    .logo-text p {
        font-size: 12px;
    }

    /* 导航优化 - 移动端 */
    .nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        padding: 10px 0;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .nav::-webkit-scrollbar {
        display: none;
    }

    .nav li {
        margin: 0 5px;
        flex-shrink: 0;
    }

    .nav li a {
        padding: 8px 12px;
        font-size: 14px;
        white-space: nowrap;
    }

    /* 轮播图优化 */
    .banner {
        height: 280px;
        margin-bottom: 25px;
        border-radius: 0;
    }

    .banner-overlay {
        padding: 25px 20px;
    }

    .banner-title {
        font-size: 20px;
        margin-bottom: 8px;
    }

    .banner-excerpt {
        font-size: 14px;
        margin-bottom: 12px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .banner-btn {
        padding: 8px 18px;
        font-size: 14px;
    }

    .banner-indicators {
        bottom: 15px;
        right: 20px;
    }

    .banner-indicator {
        width: 10px;
        height: 10px;
        margin-left: 8px;
    }

    /* 页面标题 */
    .page-header {
        padding: 30px 0;
    }

    .page-header h1 {
        font-size: 28px;
    }

    .page-header p {
        font-size: 14px;
    }

    /* 内容区域 */
    .main-content {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    /* 文章卡片 */
    .post-card {
        margin-bottom: 20px;
    }

    .post-card img {
        height: 160px;
    }

    .post-card-content {
        padding: 15px;
    }

    .post-category {
        font-size: 11px;
        padding: 4px 10px;
    }

    .post-title {
        font-size: 17px;
        line-height: 1.4;
    }

    .post-excerpt {
        font-size: 13px;
        margin-bottom: 12px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .post-meta {
        font-size: 12px;
        flex-wrap: wrap;
        gap: 10px;
    }

    /* 侧边栏 */
    .sidebar {
        position: static;
        margin-top: 30px;
    }

    .widget {
        padding: 20px;
        margin-bottom: 20px;
    }

    .widget-title {
        font-size: 16px;
    }

    /* 归档页面网格 */
    .archive-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* 单篇文章 */
    .single-post {
        padding: 20px;
    }

    .single-post-title {
        font-size: 22px;
        margin-bottom: 15px;
    }

    .single-post-meta {
        font-size: 13px;
        gap: 15px;
    }

    .single-post-content {
        font-size: 15px;
        line-height: 1.8;
    }

    .single-post-content h2 {
        font-size: 20px;
    }

    .single-post-content h3 {
        font-size: 18px;
    }

    /* 标签 */
    .post-tags a {
        padding: 5px 10px;
        font-size: 12px;
        margin: 4px;
    }

    /* 上一篇/下一篇导航 */
    .post-nav {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }

    .post-nav a {
        font-size: 13px;
        padding: 10px;
        background-color: var(--white);
        border-radius: 5px;
    }

    .post-nav .prev,
    .post-nav .next {
        justify-content: center;
        flex: auto;
    }

    /* 评论区 */
    .comment-item {
        flex-direction: column;
        margin-bottom: 20px;
        padding-bottom: 20px;
    }

    .comment-avatar {
        width: 45px;
        height: 45px;
        margin-right: 0;
        margin-bottom: 15px;
    }

    .comment-author {
        font-size: 14px;
    }

    .comment-date {
        font-size: 12px;
    }

    .comment-text {
        font-size: 14px;
    }

    .comment-form {
        padding: 20px;
    }

    .comment-form input,
    .comment-form textarea {
        padding: 12px;
        font-size: 14px;
    }

    .comment-form button {
        width: 100%;
        padding: 12px;
    }

    /* 页脚优化 */
    .footer {
        padding: 40px 0 25px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 25px;
        text-align: center;
    }

    .footer-section h3 {
        font-size: 16px;
        margin-bottom: 15px;
    }

    .footer-section p,
    .footer-links li a {
        font-size: 13px;
    }

    .footer-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }

    .footer-links li {
        margin-bottom: 0;
    }

    .footer-bottom {
        font-size: 12px;
        padding: 15px 10px;
    }

    /* 分页 */
    .pagination {
        margin-top: 30px;
    }

    .pagination a,
    .pagination span {
        padding: 8px 15px;
        font-size: 14px;
        margin: 0 3px;
    }

    .section-title {
        font-size: 20px;
        margin-bottom: 20px;
    }
}

/* 超小屏幕设备 - 480px 以下 */
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

    .header {
        padding: 12px 0;
    }

    .logo img {
        height: 35px;
        margin-right: 10px;
    }

    .logo-text h1 {
        font-size: 20px;
    }

    .logo-text p {
        font-size: 11px;
    }

    .nav li {
        margin: 0 3px;
    }

    .nav li a {
        padding: 6px 10px;
        font-size: 13px;
    }

    .banner {
        height: 220px;
    }

    .banner-title {
        font-size: 18px;
    }

    .banner-excerpt {
        font-size: 13px;
    }

    .banner-btn {
        padding: 6px 14px;
        font-size: 13px;
    }

    .page-header {
        padding: 25px 0;
    }

    .page-header h1 {
        font-size: 24px;
    }

    .post-card img {
        height: 140px;
    }

    .post-card-content {
        padding: 12px;
    }

    .post-title {
        font-size: 16px;
    }

    .single-post {
        padding: 15px;
    }

    .single-post-title {
        font-size: 20px;
    }

    .comment-avatar {
        width: 40px;
        height: 40px;
    }

    .footer {
        padding: 30px 0 20px;
    }

    .section-title {
        font-size: 18px;
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .post-card:hover {
        transform: none;
        box-shadow: var(--shadow);
    }

    .post-card:active {
        transform: scale(0.98);
        box-shadow: var(--shadow-lg);
    }

    .nav li a:hover {
        background-color: transparent;
    }

    .nav li a:active {
        background-color: rgba(255, 255, 255, 0.3);
    }

    .banner-btn:hover {
        background-color: var(--accent-color);
    }

    .banner-btn:active {
        background-color: #C49464;
    }

    .tag-cloud a:hover {
        background-color: rgba(93, 78, 55, 0.1);
        color: var(--primary-color);
    }

    .tag-cloud a:active {
        background-color: var(--accent-color);
        color: var(--white);
    }

    .category-list li a:hover {
        background-color: transparent;
    }

    .category-list li a:active {
        background-color: rgba(93, 78, 55, 0.05);
    }
}