/* 周刊页面样式 */
.weekly-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.weekly-title {
    text-align: center;
    margin-bottom: 30px;
    color: var(--heading-color);
    font-size: 2em;
}

.weekly-grid {
    display: grid;
    margin: 20px 0 30px;
}

.weekly-card {
    background: var(--card-background);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.weekly-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.weekly-card-link {
    text-decoration: none !important;
    color: inherit;
    display: block;
}

.weekly-card a {
    text-decoration: none !important;
    border-bottom: none !important;
}

.weekly-card a:hover {
    border-bottom: none !important;
}

.weekly-card-image {
    width: 100%;
    height: 160px;
    overflow: hidden;
    position: relative;
}

.weekly-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.weekly-card:hover .weekly-card-image img {
    transform: scale(1.05);
}

.weekly-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--card-border), var(--background-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--card-text);
    font-size: 1.2em;
    font-weight: bold;
}

.weekly-card-content {
    padding: 8px;
}

.weekly-card-title {
    margin: 0;
    font-size: 0.95em;
    color: var(--heading-color);
    line-height: 1.2;
}

.weekly-card-meta {
    display: none;
}

.weekly-date {
    color: var(--card-time);
}

.weekly-empty {
    text-align: center;
    padding: 50px;
    color: var(--gray-color);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .weekly-grid.columns-2 {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px;
    }
    
    .weekly-grid.columns-3 {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px;
    }
    
    .weekly-card-image {
        height: 160px;
    }
    
    .weekly-title {
        font-size: 1.7em;
        margin-bottom: 25px;
    }
}

@media (max-width: 640px) {
    .weekly-page {
        padding: 10px;
    }

    /* 强制在移动端使用两栏网格布局 */
    .weekly-grid,
    .weekly-grid.columns-2,
    .weekly-grid.columns-3 {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }

    .weekly-title {
        font-size: 1.5em;
        margin-bottom: 20px;
    }
    
    .weekly-card-image {
        height: 100px !important; /* 手机上减小图片高度 */
    }
    
    .weekly-card-title {
        font-size: 0.85em !important; /* 稍微减小字体 */
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2; /* 限制标题最多显示两行 */
        -webkit-box-orient: vertical;
    }
}

/* 亮色主题适配 */
body.light-theme .weekly-card {
    background: var(--card-background-light);
    border-color: var(--card-border-light);
}

body.light-theme .weekly-placeholder {
    background: linear-gradient(135deg, #f0f0f0, #e0e0e0);
    color: #666;
}

/* 周刊页面动态样式 - 仅在非移动端生效 */
@media (min-width: 641px) {
    /* 两栏布局 */
    .weekly-grid.columns-2 {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* 三栏布局 */
    .weekly-grid.columns-3 {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}


