/*--------------------------------------------------------------
# 响应式优化（保留主要断点）
# 断点与原 Dameiti 主题对齐：≤959px / ≤600px / ≤480px
--------------------------------------------------------------*/

@media (max-width: 959px) {
    .container { padding: 0 12px; }
    .site-header { height: 60px; }
    .site-branding .site-title { font-size: 18px; }
    .site-branding .custom-logo { max-height: 45px; }
    .main-navigation,
    .header-search-toggle { display: none; }
    .header-mobile-toggle { display: block; }

    .main-navigation.mobile-open {
        display: block;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: #fff;
        margin: 0;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        max-height: 80vh;
        overflow-y: auto;
    }
    .main-navigation.mobile-open ul.menu {
        flex-direction: column;
    }
    .main-navigation.mobile-open ul.menu > li {
        margin: 0;
        border-bottom: 1px solid var(--c-border);
    }
    .main-navigation.mobile-open ul.menu > li > a {
        height: 44px;
        line-height: 44px;
        padding: 0 15px;
    }
    .main-navigation.mobile-open ul.menu > li > a:hover::after,
    .main-navigation.mobile-open ul.menu > li.current-menu-item > a::after {
        display: none;
    }
    .main-navigation.mobile-open .sub-menu {
        position: static;
        box-shadow: none;
        padding: 0 0 0 15px;
        background: #fafafa;
    }
    .main-navigation.mobile-open .sub-menu li a {
        padding: 8px 15px;
        font-size: 13px;
    }

    .header-search {
        width: 100%;
        top: 60px;
        border-radius: 0;
    }

    .content-area, .sidebar-area {
        width: 100%;
        float: none;
    }
    .sidebar-area {
        margin-top: 30px;
        position: static;
    }

    .hero-grid {
        grid-template-columns: 1fr;
    }
    .hero-grid .hero-main .post-card .thumbnail img {
        height: 200px;
    }
    .hero-grid .hero-main .post-card .entry-title {
        font-size: 18px;
    }

    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .site-footer .footer-widgets {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .top-bar {
        display: none;
    }
    .site-header {
        height: 54px;
    }
    .site-branding .site-title { font-size: 16px; }
    .site-branding .custom-logo { max-height: 40px; }

    .entry-header {
        padding: 16px;
    }
    .entry-header .entry-title {
        font-size: 20px;
    }
    .entry-header .entry-meta {
        font-size: 12px;
    }
    .entry-header .entry-meta span {
        margin-right: 10px;
    }

    .entry-content {
        padding: 18px;
        font-size: 15px;
    }
    .entry-content h2 {
        font-size: 18px;
    }
    .entry-content h3 {
        font-size: 16px;
    }

    .post-card {
        padding: 12px;
        gap: 10px;
    }
    .post-card .thumbnail {
        flex: 0 0 120px;
    }
    .post-card .thumbnail img {
        height: 90px;
    }
    .post-card .entry-title {
        font-size: 15px;
    }
    .post-card .entry-summary {
        font-size: 12px;
        -webkit-line-clamp: 2;
    }

    .grid-3 {
        grid-template-columns: 1fr;
    }

    .post-navigation {
        flex-direction: column;
    }
    .post-navigation .next {
        text-align: left;
    }

    .block-header {
        padding: 10px 14px;
    }
    .block-header h2 {
        font-size: 14px;
    }
    .block-body {
        padding: 14px;
    }

    .site-footer {
        padding: 20px 0 15px;
    }
    .site-footer .footer-widgets {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .pagination .page-numbers {
        padding: 5px 10px;
        margin: 0 1px;
        font-size: 12px;
    }

    .breadcrumbs {
        padding: 8px 12px;
        font-size: 12px;
    }

    .error-404 {
        padding: 40px 15px;
    }
    .error-404 h1 {
        font-size: 60px;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 14px;
    }
    .container {
        padding: 0 10px;
    }
}

/*--------------------------------------------------------------
# 打印样式
--------------------------------------------------------------*/
@media print {
    .site-header, .site-footer, .sidebar-area, .post-navigation, .pagination, .entry-footer, .header-mobile-toggle, .header-search-toggle {
        display: none !important;
    }
    .content-area {
        width: 100% !important;
    }
    body {
        background: #fff;
        color: #000;
    }
}
