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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #000;
    background-color: #fff;
}

.container {
    max-width: 900px;
    /* 缩小宽度 */
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== 导航栏样式 ===== */
.header {
    background: #fff !important;
    backdrop-filter: none !important;
    color: #000;
    padding: 1rem 0;
    border-bottom: 3px solid #000;
}

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

.nav-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.logo h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
    color: #000;
}

.logo .tagline {
    font-size: 0.9rem;
    color: #666;
    font-weight: 300;
}

.logo a {
    color: #000;
    text-decoration: none;
}

.nav-menu .menu {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.menu-item {
    font-weight: 500;
    padding: 0.5rem 1rem;
    border: 2px solid transparent;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.menu-item a {
    color: #000;
    text-decoration: none;
}

.menu-item:hover,
.menu-item.current-menu-item {
    background: transparent;
    border-color: #000;
    transform: none;
}

/* ===== 面包屑导航 ===== */
.breadcrumb {
    background: transparent;
    padding: 1rem 0;
    border-bottom: 2px solid #000;
}

.breadcrumb a {
    color: #000;
    text-decoration: none;
}

.breadcrumb .separator {
    margin: 0 0.5rem;
    color: #000;
}

.breadcrumb .current {
    color: #000;
}

/* ===== 主要内容区域 ===== */
.main-content {
    padding: 1.5rem 0;
    min-height: calc(100vh - 200px);
}

/* ===== 搜索按钮样式 ===== */
.search-toggle-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: #fff;
    color: #000;
    border: 2px solid #000;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.search-toggle-btn:hover {
    background: #f5f5f5;
    border-color: #000;
    transform: none;
}

.search-toggle-btn .search-icon {
    font-size: 1rem;
}

.search-toggle-btn .search-text {
    font-size: 0.9rem;
}

/* ===== 搜索弹窗样式 ===== */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
}

.search-modal {
    background: white;
    border: 3px solid #000;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    transform: translateY(-30px);
    transition: transform 0.3s ease;
}

.search-overlay.active .search-modal {
    transform: translateY(0);
}

.search-modal-header {
    padding: 1.5rem 2rem 1rem;
    border-bottom: 2px solid #000;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.search-modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
    color: #000;
}

.search-close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-close-btn:hover {
    background: #f5f5f5;
    color: #000;
}

.search-modal-content {
    padding: 2rem;
}

.search-input-wrapper {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.search-modal #searchInput {
    flex: 1;
    padding: 1rem;
    border: 2px solid #000;
    border-radius: 12px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
    background: #fff;
}

.search-modal #searchInput:focus {
    border-color: #2563eb;
    background: white;
}

.search-submit-btn {
    padding: 1rem 1.5rem;
    background: #2563eb;
    color: white;
    border: 2px solid #2563eb;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.search-submit-btn:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
    transform: none;
}

.search-tips {
    background: transparent;
    border: 2px solid #000;
    border-radius: 8px;
    padding: 1rem;
}

.search-tips p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ===== 页脚样式 ===== */
.footer {
    background: #fff;
    color: #000;
    padding: 2rem 0;
    margin-top: 3rem;
    border-top: 3px solid #000;
    position: relative;
}

.footer-content {
    text-align: center;
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.footer-content p {
    color: #000;
    font-size: 0.9rem;
    margin: 0;
    font-weight: 500;
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
}

.footer-content p:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* 页脚装饰线条 */
.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: #000;
}

.footer::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent);
}

/* 页脚链接样式 */
.footer a {
    color: #000;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.footer a:hover {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

/* ===== 小屏幕和中等屏幕优化 ===== */
@media (max-width: 1199px) {
    .container {
        padding: 0 15px;
    }
}

/* ===== 汉堡菜单按钮 ===== */
.mobile-menu-btn {
    display: none;
    background: #fff;
    border: 2px solid #000;
    color: #000;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    border-radius: 12px;
    transition: all 0.3s ease;
    z-index: 1001;
    position: relative;
    width: 42px;
    height: 42px;
    overflow: hidden;
}

.mobile-menu-btn:hover {
    background: #f5f5f5;
    transform: none;
    border-color: #000;
}

.mobile-menu-btn:active {
    transform: none;
    background: #e5e5e5;
}

/* 使用更简单的图标切换方法 */
.mobile-menu-btn .icon {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 16px;
    font-weight: 300;
    line-height: 1;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

.mobile-menu-btn .menu-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.mobile-menu-btn .close-icon {
    opacity: 0;
    transform: rotate(90deg) scale(0.8);
}

/* 激活状态 - 平滑切换 */
.mobile-menu-btn.active {
    background: #000;
    color: #fff;
    border-color: #000;
}

.mobile-menu-btn.active .menu-icon {
    opacity: 0;
    transform: rotate(-90deg) scale(0.8);
}

.mobile-menu-btn.active .close-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

/* ===== 移动端侧边栏 ===== */
.mobile-sidebar {
    position: fixed;
    top: var(--wp-admin--admin-bar--height, 0);
    right: -100%;
    width: 280px;
    height: 100vh;
    background: #fff;
    border-left: 4px solid #000;
    z-index: 1000;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    box-shadow: -2px 0 4px rgba(0, 0, 0, 0.1);
}

.mobile-sidebar.active {
    right: 0;
}

.mobile-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(2px);
}

.mobile-sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-sidebar-header {
    padding: 2rem 1.5rem 1rem;
    border-bottom: 3px solid #000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}


.mobile-sidebar-header .logo {
    color: #000;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.mobile-sidebar-header .logo:hover {
    border-bottom-color: #2563eb;
}

.mobile-sidebar-header .logo h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.mobile-sidebar-header .logo .tagline {
    font-size: 0.8rem;
    opacity: 0.8;
    margin-top: 0.2rem;
}

.mobile-sidebar-content {
    padding: 1.5rem 0;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 120px);
}

.mobile-nav-menu {
    padding: 1.5rem 0 1rem 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.mobile-search-section {
    padding: 1.5rem;
    margin-top: auto;
    border-top: 2px solid #000;
}

.mobile-nav-menu .menu-item {
    padding: 1rem 1.5rem;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
    border-bottom: 1px solid #eee;
    border-left: 3px solid transparent;
    gap: 1rem;
    background: transparent;
    width: 100%;
    text-align: left;
    cursor: pointer;
    position: relative;
}

.mobile-nav-menu .menu-item a {
    color: #000;
    text-decoration: none;
}

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

.mobile-nav-item:hover {
    background: #f8f9fa;
    border-left-color: #2563eb;
}

.mobile-nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: #2563eb;
    transition: width 0.3s ease;
}

.mobile-nav-item:hover::before {
    width: 3px;
}

.mobile-nav-item .nav-icon {
    font-size: 1.1rem;
    width: 1.5rem;
    text-align: center;
}

.mobile-nav-item .nav-text {
    flex: 1;
}

.mobile-nav-item[href*="index"] .nav-icon::before {
    content: '🏠';
}

/* 搜索按钮样式 */
.mobile-search-trigger {
    width: 100%;
    background: #fff;
    color: #000;
    border: 2px solid #000;
    border-radius: 8px;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    position: relative;
    margin-top: 1rem;
}

.mobile-search-trigger:hover {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
    transform: none;
}

.mobile-search-trigger:active {
    transform: none;
    background: #1d4ed8;
    border-color: #1d4ed8;
}

.mobile-search-trigger .search-icon {
    font-size: 1.2rem;
}

.mobile-search-trigger .search-text {
    font-size: 1rem;
    font-weight: 500;
}

/* ===== 手机端特有样式 ===== */
@media (max-width: 768px) {
    .nav-wrapper {
        justify-content: space-between;
        align-items: center;
    }

    .nav-right {
        display: none !important;
    }

    .mobile-menu-btn {
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .mobile-menu-btn .icon {
        font-size: 18px;
        font-weight: 300;
    }

    /* 移动端按钮的微调 */
    .mobile-menu-btn {
        margin-right: 0.5rem;
        /* 给按钮一些右边距 */
    }

    /* 移动端搜索弹窗优化 */
    .search-modal {
        width: 95%;
        margin: 1rem;
    }

    .search-modal-header {
        padding: 1rem 1.5rem 0.8rem;
    }

    .search-modal-content {
        padding: 1.5rem;
    }

    .search-input-wrapper {
        flex-direction: column;
        gap: 1rem;
    }

    .search-submit-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 1.8rem;
    }

    .footer {
        padding: 1rem 0;
        margin-top: 2rem;
    }

    .footer-content p {
        font-size: 0.8rem;
    }
}

/* ===== 动画效果 ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== 无内容状态 ===== */
.no-articles {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.no-articles h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

@keyframes shimmer {

    0%,
    100% {
        background-position: -200% 0;
    }

    50% {
        background-position: 200% 0;
    }
}

.password-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.password-dialog {
    background: white;
    border: 3px solid #000;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.password-header {
    padding: 1.5rem;
    border-bottom: 2px solid #000;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.password-header h3 {
    margin: 0;
    color: #000;
    font-size: 1.2rem;
}

.password-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.password-close:hover {
    background: #f8f9fa;
    color: #dc3545;
}

.password-content {
    padding: 1.5rem;
}

.password-content p {
    margin-bottom: 1rem;
    color: #666;
    text-align: center;
}

.password-input-wrapper {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.password-input-wrapper input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    font-size: 1rem;
}

.password-input-wrapper input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.password-submit {
    background: #667eea;
    color: #000;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.password-submit:hover {
    background: #5a6fd8;
}

.password-error {
    color: #dc3545;
    font-size: 0.85rem;
    text-align: center;
    padding: 0.5rem;
    background: #f8d7da;
    border-radius: 6px;
}

/* ===== 文章列表样式 ===== */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.article-card {
    background: white;
    border: 2px solid #000;
    border-radius: 8px;
    padding: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    /* 添加垂直居中对齐 */
    gap: 0.75rem;
    min-height: 80px;
    position: relative;
    opacity: 1;
    transition: 0.3s;
}

.article-card:hover {
    transform: none;
    background: #f5f5f5;
}

.article-card.full-width {
    grid-column: 1 / -1;
}

.article-card.featured {
    border-left: 4px solid #2563eb;
    background: #fff;
}

.article-card.featured .recommend-tag {
    position: absolute;
    top: 0.5rem;
    right: 0.75rem;
    background: #2563eb;
    color: #fff;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 500;
}

.article-image-wrapper {
    flex-shrink: 0;
    width: 80px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    background: transparent;
    border: 2px solid #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.article-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.4rem;
    font-size: 0.75rem;
    color: #666;
}

.category-tag {
    text-decoration: none;
    background: #2563eb;
    color: #fff;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
}

.article-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
    line-height: 1.3;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
}

.article-card h3 a {
    color: #000;
    text-decoration: none;
}

.article-excerpt {
    color: #666;
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 0.8rem;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more {
    color: #2563eb;
    font-weight: 500;
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s ease;
    align-self: flex-start;
}

.read-more:hover {
    color: #1d4ed8;
}

.keywords-wrapper {
    margin-top: 0.3rem;
    padding-top: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.keyword-tag {
    text-decoration: none;
    background-color: transparent;
    color: #666;
    border: 1px solid #000;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.pagination .page-numbers {
    padding: 0.4rem;
    min-width: 2rem;
    border: 2px solid transparent;
    background: transparent;
    color: #666;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.pagination .page-numbers:hover {
    background: transparent;
    color: #000;
    border-color: #000;
    transform: none;
}

.pagination .page-numbers.current {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
    transform: none;
}

.pagination .page-numbers.current::after {
    display: none;
}

@media (max-width: 768px) {
    .article-card {
        flex-direction: column;
        align-items: stretch;
        /* 移动端改为拉伸对齐 */
        gap: 1rem;
    }

    .article-image-wrapper {
        width: 100%;
        height: 120px;
        align-self: center;
        /* 图片容器本身在移动端也居中 */
    }
}

@media (max-width: 480px) {
    .article-card {
        padding: 1rem;
    }
}

/* ===== 浏览量样式 ===== */
.views-loading {
    color: #666;
    font-style: normal;
    opacity: 0.8;
}