/* 佳誉客内容聚合系统 - 前台样式 */
:root {
    --primary: #007bff;
    --secondary: #6c757d;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #17a2b8;
    --dark: #343a40;
    --light: #f8f9fa;
    --border: #dee2e6;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 15px; }

/* Header */
.site-header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--border);
}

.logo a {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary);
    text-decoration: none;
}

.header-search {
    display: flex;
}

.header-search input {
    padding: 8px 15px;
    border: 1px solid var(--border);
    border-radius: 4px 0 0 4px;
    width: 250px;
}

.header-search button {
    padding: 8px 20px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

.main-nav { padding: 10px 0; }

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

.main-nav a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.main-nav a:hover { color: var(--primary); }

/* Main Content */
.main-content { padding: 30px 0; }

/* Featured Section */
.featured-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.featured-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}

.featured-card.large img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.featured-card.small {
    display: flex;
    margin-bottom: 15px;
}

.featured-card.small img {
    width: 120px;
    height: 80px;
    object-fit: cover;
}

.featured-card.small .featured-info { padding: 10px; flex: 1; }
.featured-card.small h3 { font-size: 14px; margin: 0; }

.featured-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: #fff;
}

.featured-info h2 { font-size: 24px; margin-bottom: 10px; }

.category-tag {
    display: inline-block;
    padding: 3px 10px;
    background: var(--primary);
    color: #fff;
    border-radius: 3px;
    font-size: 12px;
    margin-bottom: 8px;
}

/* Content Layout */
.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.article-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.article-card a { text-decoration: none; color: inherit; }

.article-image img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.article-content { padding: 15px; }

.article-content h3 {
    font-size: 16px;
    margin: 10px 0;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-content p {
    color: #666;
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 12px;
    color: #999;
}

/* Sidebar */
.sidebar { position: sticky; top: 120px; height: fit-content; }

.hot-articles, .categories-widget {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.widget-title {
    font-size: 18px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
}

.hot-list { list-style: none; }

.hot-list li {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.hot-list .rank {
    width: 24px;
    height: 24px;
    background: #eee;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    margin-right: 10px;
}

.hot-list .rank.top { background: var(--danger); color: #fff; }

.hot-list a { color: #333; text-decoration: none; font-size: 14px; }

.category-tags { display: flex; flex-wrap: wrap; gap: 8px; }

.category-tag-btn {
    padding: 6px 15px;
    background: var(--light);
    color: #333;
    border-radius: 20px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
}

.category-tag-btn:hover { background: var(--primary); color: #fff; }

/* Article Detail */
.article-detail { background: #fff; padding: 30px; border-radius: 8px; }

.breadcrumb { font-size: 14px; color: #999; margin-bottom: 15px; }
.breadcrumb a { color: var(--primary); text-decoration: none; }

.article-header h1 { font-size: 28px; margin-bottom: 15px; }

.article-meta {
    display: flex;
    gap: 20px;
    color: #999;
    font-size: 14px;
    margin-bottom: 20px;
}

.article-cover img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
    margin: 20px 0;
}

.article-body {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}

.article-body p { margin-bottom: 15px; }
.article-body img { max-width: 100%; height: auto; margin: 15px 0; }

.ad-in-article { margin: 20px 0; text-align: center; }

.article-source {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    color: #666;
    font-size: 14px;
}

.share-buttons {
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.share-buttons button {
    padding: 8px 15px;
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
}

/* Related Articles */
.related-articles { margin-top: 30px; }

.related-articles h3 {
    font-size: 18px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
}

.related-item {
    display: flex;
    flex-direction: column;
    text-decoration: none;
}

.related-item img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
}

.related-item span {
    margin-top: 8px;
    font-size: 14px;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Ad placeholder */
.ad-placeholder {
    background: var(--light);
    border: 1px dashed var(--border);
    border-radius: 4px;
    padding: 20px;
    text-align: center;
    margin: 15px 0;
}

/* Footer */
.site-footer {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 40px 0 20px;
    margin-top: 50px;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}

.footer-col h4 { margin-bottom: 15px; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: #bdc3c7; text-decoration: none; }
.footer-col a:hover { color: #fff; }

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #34495e;
    font-size: 14px;
    color: #95a5a6;
}

.footer-bottom a { color: #95a5a6; }

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 30px;
}

.pagination a {
    padding: 8px 15px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 4px;
    text-decoration: none;
    color: #333;
}

.pagination a.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Responsive */
@media (max-width: 768px) {
    .featured-section { grid-template-columns: 1fr; }
    .featured-card.large img { height: 250px; }
    .content-wrapper { grid-template-columns: 1fr; }
    .article-grid { grid-template-columns: 1fr; }
    .related-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-links { grid-template-columns: 1fr; }
    .header-search { display: none; }
    .main-nav ul { gap: 15px; overflow-x: auto; }
}
