/* 共享样式文件 - 减少代码冗余 */

/* 通用容器样式 */
.shared-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* 通用卡片样式 */
.shared-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.shared-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.12);
}

/* 通用按钮样式 */
.shared-btn {
    background: #C7B198;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.shared-btn:hover {
    background: #a89985;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(199, 177, 152, 0.3);
}

/* 通用搜索样式 */
.shared-search-container {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 25px;
    padding: 8px 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s ease;
}

.shared-search-container:focus-within {
    box-shadow: 0 6px 20px rgba(199, 177, 152, 0.2);
}

.shared-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1rem;
    color: #546d63;
    background: transparent;
}

.shared-search-btn {
    background: #C7B198;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.shared-search-btn:hover {
    background: #a89985;
    transform: scale(1.05);
}

/* 通用文章卡片样式 */
.shared-article-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.shared-article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.12);
}

.shared-article-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.shared-article-card:hover .shared-article-image {
    transform: scale(1.05);
}

.shared-article-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.shared-article-title {
    color: #2c3e50;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.4;
}

.shared-article-excerpt {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 15px;
    flex: 1;
}

.shared-category-tag {
    background: rgba(199, 177, 152, 0.15);
    color: #C7B198;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 10px;
}

/* 通用加载动画 */
.shared-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(199, 177, 152, 0.3);
    border-radius: 50%;
    border-top-color: #C7B198;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 通用淡入动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.shared-fade-in {
    animation: fadeIn 0.3s ease;
}

/* 响应式网格系统 */
.shared-grid {
    display: grid;
    gap: 30px;
}

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

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

.shared-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* 响应式断点 */
@media (max-width: 1024px) {
    .shared-container {
        padding: 0 15px;
    }
    
    .shared-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .shared-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .shared-container {
        padding: 0 10px;
    }
    
    .shared-card {
        padding: 25px;
    }
    
    .shared-grid-4,
    .shared-grid-3,
    .shared-grid-2 {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .shared-article-content {
        padding: 20px;
    }
    
    .shared-article-title {
        font-size: 1.1rem;
    }
    
    .shared-article-excerpt {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .shared-container {
        padding: 0 8px;
    }
    
    .shared-card {
        padding: 20px;
    }
    
    .shared-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .shared-search-container {
        padding: 6px 15px;
    }
    
    .shared-search-btn {
        width: 35px;
        height: 35px;
    }
}