/* 响应式设计 */

/* 大屏幕 (1200px以上) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

/* 笔记本/小型台式机 (992px-1199px) */
@media (max-width: 1199px) {
    .container {
        max-width: 960px;
    }
    
    .featured-post .post-image {
        height: 340px;
    }
    
    .sidebar-post .post-image {
        height: 158px;
    }
    
    .post-card .post-image {
        height: 160px;
    }
    
    .trending-post .post-image {
        height: 200px;
    }
    
    .video-image {
        height: 160px;
    }
    
    .subscribe-form input {
        width: 240px;
    }
}

/* 平板电脑 (768px-991px) */
@media (max-width: 991px) {
    .container {
        max-width: 720px;
    }
    
    .header-wrapper {
        height: 60px;
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .main-nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .hero-wrapper {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .featured-post .post-image {
        height: 320px;
    }
    
    .featured-post h2 {
        font-size: 1.5rem;
    }
    
    .hero-sidebar {
        flex-direction: row;
    }
    
    .sidebar-post {
        width: calc(50% - 8px);
        height: 200px;
    }
    
    .sidebar-post .post-image {
        height: 200px;
    }
    
    .post-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .trending-wrapper {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .subscribe-wrapper {
        flex-direction: column;
        text-align: center;
        gap: 24px;
    }
    
    .footer-top {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .footer-nav {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 手机 (576px-767px) */
@media (max-width: 767px) {
    .container {
        max-width: 540px;
    }
    
    section {
        padding: 32px 0;
    }
    
    .header-wrapper {
        height: 56px;
    }
    
    .search-box {
        display: none;
    }
    
    .featured-post .post-image {
        height: 240px;
    }
    
    .featured-post .post-content {
        padding: 16px;
    }
    
    .featured-post h2 {
        font-size: 1.25rem;
    }
    
    .hero-sidebar {
        flex-direction: column;
    }
    
    .sidebar-post {
        width: 100%;
        height: auto;
    }
    
    .category-list {
        overflow-x: auto;
        padding-bottom: 8px;
        flex-wrap: nowrap;
    }
    
    .category-list li {
        flex: 0 0 auto;
    }
    
    .post-grid {
        gap: 16px;
    }
    
    .post-card .post-image {
        height: 140px;
    }
    
    .trending-post .post-image {
        height: 180px;
    }
    
    .video-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .video-image {
        height: 180px;
    }
    
    .subscribe-form form {
        width: 100%;
        flex-direction: column;
    }
    
    .subscribe-form input {
        width: 100%;
    }
    
    .footer-nav {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

/* 小屏幕手机 (575px以下) */
@media (max-width: 575px) {
    .container {
        padding: 0 16px;
    }
    
    .logo h1 {
        font-size: 1.25rem;
    }
    
    .featured-post .post-image {
        height: 200px;
    }
    
    .post-grid {
        grid-template-columns: 1fr;
    }
    
    .post-card .post-image {
        height: 180px;
    }
    
    .post-card h3 {
        font-size: 1rem;
    }
    
    .section-header h2 {
        font-size: 1.25rem;
    }
    
    .trending-post h3 {
        font-size: 1.1rem;
    }
}

/* 移动菜单样式 */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--background-color);
    z-index: 1001;
    padding: 24px;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.mobile-menu.active {
    transform: translateX(0);
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.mobile-menu-close {
    font-size: 1.5rem;
    color: var(--secondary-color);
    background: none;
    border: none;
}

.mobile-search {
    margin-bottom: 24px;
}

.mobile-search form {
    display: flex;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.mobile-search input {
    flex: 1;
    padding: 12px 16px;
    border: none;
    outline: none;
}

.mobile-search button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0 16px;
}

.mobile-nav ul {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mobile-nav a {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--secondary-color);
    font-weight: 500;
}