@charset "UTF-8";
/* ============================================================
   style_index.css - 橙子CMS 前台首页专用样式
   仅首页加载，不与 style.css 冲突
   ============================================================ */

/* ============================================================
   首页通用容器
   ============================================================ */
.index-section {
    padding: 16px 18px 20px 18px;
}
.index-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f0f2f5;
}
.index-section .section-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0;
}
.index-section .more-link {
    font-size: 14px;
    color: #1a73e8;
}

/* ============================================================
   通知区域
   ============================================================ */
.index-notification {
    background: #e8f0fe;
    border-left: 4px solid #1a73e8;
    padding: 10px 16px;
    border-radius: 6px;
    color: #1a73e8;
}

/* ============================================================
   C区域：热门推荐
   ============================================================ */
.hot-layout {
    display: flex;
    gap: 20px;
    align-items: stretch;
}

/* ===== 左侧：相册轮播 ===== */
.hot-carousel {
    flex: 0 0 50%;
    height: 370px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e9ecef;
    position: relative;
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.carousel-slide {
    display: none;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}
.carousel-slide.active {
    display: block;
}
.carousel-slide a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    position: relative;
}

/* 轮播背景图 */
.carousel-slide-bg {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.3s ease;
    position: absolute;
    top: 0;
    left: 0;
}
.carousel-slide a:hover .carousel-slide-bg {
    transform: scale(1.02);
}

.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 18px 16px 14px 16px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: white;
    font-size: 16px;
    font-weight: 600;
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    z-index: 2;
}

/* 轮播按钮 */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.45);
    color: white;
    border: none;
    font-size: 18px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s, transform 0.2s;
}
.carousel-btn:hover {
    background: rgba(0, 0, 0, 0.75);
    transform: translateY(-50%) scale(1.08);
}
.carousel-prev {
    left: 12px;
}
.carousel-next {
    right: 12px;
}

/* 轮播指示点 */
.carousel-dots {
    position: absolute;
    bottom: 52px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}
.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.35);
    cursor: pointer;
    transition: background 0.3s;
}
.carousel-dot.active {
    background: white;
}
.carousel-dot:hover {
    background: rgba(255,255,255,0.7);
}

/* ===== 右侧：文章列表（与轮播等高） ===== */
.hot-right {
    flex: 1;
    height: 370px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    overflow: hidden;
}

/* 推荐文章：根据内容自适应 */
.hot-articles-block.recommended {
    flex: 0 0 auto;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 10px 16px;
    border: 1px solid #e9ecef;
    overflow: hidden;
}

/* 热门文章：填充剩余空间 */
.hot-articles-block.popular {
    flex: 1;
    min-height: 0;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 10px 16px;
    border: 1px solid #e9ecef;
    overflow: hidden;
}

.hot-articles-block .hot-sub-title {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    padding-bottom: 5px;
    border-bottom: 1px solid #e9ecef;
    flex-shrink: 0;
}
.hot-articles-block .hot-sub-title span {
    font-size: 14px;
    font-weight: 600;
    color: #1a73e8;
}
.hot-articles-block.recommended .hot-sub-title span {
    color: #1a73e8;
}
.hot-articles-block.popular .hot-sub-title span {
    color: #e65100;
}

.hot-articles-block .hot-article-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 5px 0;
    border-bottom: 1px dashed #f0f0f0;
    line-height: 1.5;
}
.hot-articles-block .hot-article-item:last-child {
    border-bottom: none;
}
.hot-articles-block .hot-article-item a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    width: 100%;
    color: #333;
    font-size: 14px;
    transition: color 0.3s;
    text-decoration: none;
}
.hot-articles-block .hot-article-item a:hover {
    color: #1a73e8;
    text-decoration: none;
}
.hot-article-title {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 14px;
}
.hot-article-date {
    flex-shrink: 0;
    font-size: 12px;
    color: #bbb;
    white-space: nowrap;
}

.hot-articles-block .hot-empty {
    color: #bbb;
    font-size: 13px;
    padding: 6px 0;
    text-align: center;
}

/* ============================================================
   D区域：最新文章
   ============================================================ */
.index-article-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}
.index-article-card {
    flex: 1 1 calc(25% - 14px);
    min-width: 200px;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px 14px;
    border: 1px solid #e9ecef;
    transition: background 0.3s, transform 0.3s;
}
.index-article-card:hover {
    background: #f0f4ff;
    transform: translateY(-2px);
}
.index-article-card a {
    color: #333;
    display: block;
    text-decoration: none;
}
.index-article-card h3 {
    font-size: 15px;
    margin: 0 0 4px 0;
    line-height: 1.4;
}
.index-article-card p {
    max-height: 3em;
    overflow: hidden;
    font-size: 13px;
    color: #888;
    margin: 4px 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.index-article-meta {
    font-size: 12px;
    color: #bbb;
}

/* Grid 渐进增强 */
@supports (display: grid) {
    .index-article-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 14px;
    }
    .index-article-card {
        flex: none;
        min-width: auto;
    }
}

/* ============================================================
   E区域：最新相册
   ============================================================ */
.index-album-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}
.index-album-card {
    flex: 1 1 calc(25% - 14px);
    min-width: 180px;
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e9ecef;
    transition: transform 0.3s, box-shadow 0.3s;
}
.index-album-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
.index-album-card a {
    display: block;
    color: #333;
    text-decoration: none;
}
.index-album-cover {
    height: 140px;
    background-size: cover;
    background-position: center;
    background-color: #e9ecef;
    position: relative;
}
.index-album-cover .cover-lock {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 26px;
    color: rgba(255,255,255,0.9);
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.index-album-name {
    padding: 8px 10px;
    font-size: 13px;
    text-align: center;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Grid 渐进增强 */
@supports (display: grid) {
    .index-album-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 14px;
    }
    .index-album-card {
        flex: none;
        min-width: auto;
    }
}

/* ============================================================
   F区域：友情链接（首页）
   ============================================================ */
.index-links-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
}
.index-links-grid .link-item a {
    color: #1a73e8;
    font-size: 14px;
}

/* ============================================================
   响应式 - 平板 (1024px 以下)
   ============================================================ */
@media (max-width: 1024px) {
    .index-article-card {
        flex: 1 1 calc(33.33% - 14px);
        min-width: 170px;
    }
    .index-album-card {
        flex: 1 1 calc(33.33% - 14px);
        min-width: 160px;
    }
    @supports (display: grid) {
        .index-article-grid {
            grid-template-columns: repeat(3, 1fr);
        }
        .index-album-grid {
            grid-template-columns: repeat(3, 1fr);
        }
    }
}

/* ============================================================
   响应式 - 手机 (768px 以下)
   ============================================================ */
@media (max-width: 768px) {
    .index-section {
        padding: 12px 12px 16px 12px;
    }
    .index-section .section-title {
        font-size: 16px;
    }

    /* C区域：上下排列 */
    .hot-layout {
        flex-direction: column;
        gap: 12px;
    }
    .hot-carousel {
        flex: none;
        width: 100%;
        height: 220px;
    }
    .hot-right {
        height: auto;
        min-height: auto;
        gap: 8px;
    }
    .hot-articles-block {
        padding: 8px 12px;
    }
    .hot-articles-block .hot-article-item a {
        font-size: 12px;
    }
    .hot-article-date {
        font-size: 10px;
    }
    .carousel-caption {
        font-size: 13px;
        padding: 12px 12px 10px 12px;
    }
    .carousel-btn {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    .carousel-prev {
        left: 8px;
    }
    .carousel-next {
        right: 8px;
    }
    .carousel-dots {
        bottom: 38px;
    }
    .carousel-dot {
        width: 8px;
        height: 8px;
    }

    /* D/E区域 */
    .index-article-card {
        flex: 1 1 calc(50% - 10px);
        min-width: 140px;
        padding: 10px 12px;
    }
    .index-article-card h3 {
        font-size: 14px;
    }
    .index-article-card p {
        font-size: 12px;
        max-height: 2.4em;
    }
    .index-album-card {
        flex: 1 1 calc(50% - 10px);
        min-width: 130px;
    }
    .index-album-cover {
        height: 120px;
    }

    @supports (display: grid) {
        .index-article-grid {
            grid-template-columns: repeat(2, 1fr);
            gap: 10px;
        }
        .index-album-grid {
            grid-template-columns: repeat(2, 1fr);
            gap: 10px;
        }
    }

    .index-links-grid {
        gap: 8px 14px;
    }
    .index-links-grid .link-item a {
        font-size: 13px;
    }
}

/* ============================================================
   响应式 - 小屏手机 (480px 以下)
   ============================================================ */
@media (max-width: 480px) {
    .hot-carousel {
        height: 180px;
    }
    .hot-right {
        min-height: auto;
    }
    .carousel-btn {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    .carousel-prev {
        left: 6px;
    }
    .carousel-next {
        right: 6px;
    }
    .carousel-caption {
        font-size: 12px;
        padding: 10px 10px 8px 10px;
    }
    .carousel-dots {
        bottom: 32px;
        gap: 6px;
    }
    .carousel-dot {
        width: 6px;
        height: 6px;
    }

    .hot-articles-block .hot-article-item a {
        font-size: 12px;
        flex-wrap: wrap;
        gap: 2px;
    }
    .hot-article-title {
        flex: 1 1 100%;
        white-space: normal;
    }
    .hot-article-date {
        font-size: 10px;
    }

    .index-article-card {
        flex: 1 1 100%;
        min-width: auto;
        padding: 8px 10px;
    }
    .index-article-card p {
        max-height: 2.4em;
    }
    .index-album-card {
        flex: 1 1 calc(50% - 8px);
        min-width: 110px;
    }
    .index-album-cover {
        height: 100px;
    }
    .index-album-name {
        font-size: 12px;
        padding: 6px 8px;
    }

    @supports (display: grid) {
        .index-article-grid {
            grid-template-columns: 1fr;
            gap: 8px;
        }
        .index-album-grid {
            grid-template-columns: 1fr 1fr;
            gap: 8px;
        }
    }

    .index-section {
        padding: 8px 8px 12px 8px;
    }
    .index-section .section-title {
        font-size: 15px;
    }
}