/* ========================================
   前台样式
   ======================================== */

/* 重置 */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--bg-page);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* ========================================
   轮播器
   ======================================== */
.carousel-section { margin-bottom: 40px; }
.carousel {
    position: relative;
    overflow: hidden;
    background: var(--bg-card);
    height: 380px;
}
.carousel__track {
    display: flex;
    transition: transform 0.5s ease;
    height: 100%;
}
.carousel__slide {
    min-width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: flex-end;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    background-size: cover;
    background-position: center;
    overflow: hidden;
}
.carousel__slide:nth-child(2) { background: linear-gradient(135deg, var(--secondary), #e85d3a); }
.carousel__slide:nth-child(3) { background: linear-gradient(135deg, #e85d3a, var(--primary)); }
.carousel__slide:nth-child(4) { background: linear-gradient(135deg, #3b82f6, var(--secondary)); }
.carousel__slide:nth-child(5) { background: linear-gradient(135deg, var(--primary), #059669); }

.carousel__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 50%);
}
.carousel__content {
    position: relative;
    z-index: 1;
    padding: 40px;
    max-width: 700px;
}
.carousel__tag {
    display: inline-block;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    background: rgba(255,255,255,0.2);
    border-radius: 4px;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.carousel__title {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
    margin-bottom: 8px;
}
.carousel__summary {
    font-size: 15px;
    color: rgba(255,255,255,0.85);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.carousel__btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.carousel__btn:hover { background: rgba(255,255,255,0.4); }
.carousel__btn--prev { left: 16px; }
.carousel__btn--next { right: 16px; }
.carousel__dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 2;
}
.carousel__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: all 0.2s;
}
.carousel__dot--active {
    background: #fff;
    transform: scale(1.3);
}

/* ========================================
   通用区块
   ======================================== */
.section { padding: 40px 0; }
.section--alt { background: var(--bg-card); }
.section__title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
}
.section__empty {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

/* ========================================
   卡片网格
   ======================================== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
}
.card:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    transform: translateY(-2px);
    border-color: var(--primary-light);
}
.card__image {
    width: 100%;
    height: 180px;
    overflow: hidden;
}
.card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.card:hover .card__image img {
    transform: scale(1.05);
}
.card__body {
    flex: 1;
    padding: 20px;
}
.card__title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.card__summary {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.card__footer {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    border-top: 1px solid var(--border);
    font-size: 12px;
    color: var(--text-secondary);
}
.card__source {
    padding: 2px 6px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 4px;
}

/* ========================================
   条目列表
   ======================================== */
.entry-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--border);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
}
.entry {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: var(--bg-card);
    transition: background 0.15s;
    gap: 16px;
}
.entry:hover { background: var(--primary-light); }
.entry__body {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}
.entry__tag {
    flex-shrink: 0;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    color: var(--primary);
    background: var(--primary-light);
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.entry__title {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.entry__meta {
    flex-shrink: 0;
    font-size: 12px;
    color: var(--text-secondary);
}

/* ========================================
   文章详情
   ======================================== */
.article-detail {
    padding: 40px 0;
}
.article-detail__header {
    margin-bottom: 32px;
}
.article-detail__meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--text-secondary);
}
.article-detail__source {
    padding: 2px 8px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 4px;
}
.article-detail__title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 12px;
}
.article-detail__summary {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.7;
}
.article-detail__body {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-primary);
}
.article-detail__body p {
    margin-bottom: 1em;
}
.article-detail__body h2,
.article-detail__body h3 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    font-weight: 600;
    color: var(--text-primary);
}
.article-detail__body h2 { font-size: 22px; }
.article-detail__body h3 { font-size: 18px; }
.article-detail__body ul, .article-detail__body ol {
    margin: 0 0 1em 1.5em;
}
.article-detail__body blockquote {
    margin: 1em 0;
    padding: 12px 16px;
    border-left: 3px solid var(--primary);
    background: var(--primary-light);
    color: var(--text-secondary);
    border-radius: 4px;
}
.article-detail__body img {
    border-radius: 8px;
    margin: 1em 0;
}
.article-detail__footer {
    margin-top: 32px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}
.article-detail__source-link {
    font-size: 13px;
    color: var(--text-secondary);
}
.article-detail__source-link a {
    color: var(--primary);
    text-decoration: underline;
    word-break: break-all;
}
.article-detail__back {
    margin-top: 24px;
}
.article-detail .status-tag--featured,
.article-detail .status-tag--card,
.article-detail .status-tag--brief {
    font-size: 11px;
}
.btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: filter 0.15s;
    background: var(--bg-card);
    color: var(--text-primary);
}
.btn:hover { filter: brightness(0.95); }
.btn-outline { border: 1px solid var(--border); }

/* 高考志愿填报入口 */
.gaokao-cta {
    display: flex;
    align-items: center;
    gap: 16px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--text-on-primary);
    border-radius: 12px;
    padding: 20px 24px;
    text-decoration: none;
    transition: transform .2s, box-shadow .2s;
}
.gaokao-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--primary-glow);
}
.gaokao-cta__icon { font-size: 36px; flex-shrink: 0; }
.gaokao-cta__text { flex: 1; }
.gaokao-cta__text strong {
    display: block;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 2px;
}
.gaokao-cta__text span {
    display: block;
    font-size: 13px;
    opacity: .85;
}
.gaokao-cta__arrow {
    font-size: 24px;
    flex-shrink: 0;
    transition: transform .2s;
}
.gaokao-cta:hover .gaokao-cta__arrow { transform: translateX(4px); }
