/* ==========================================================================
   djgz（组织科（宣传科））子站首页专属样式（djgz-index.css）
   第一行：大轮播（左）+ 党员教育（右）
   第二行：组织工作 / 党风廉政 / 先锋人物（三列）
   主题色：#993333（党建红）
   加载顺序：bootstrap → common.css → djgz.css → djgz-index.css
   ========================================================================== */

/* ==================== 容器 ==================== */
.djgz-main {
    width: 100%;
    max-width: 1100px;
    margin: 15px auto 30px;
}

/* ==================== 第一行：轮播 + 党员教育 ==================== */
.djgz-top-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    align-items: stretch;
}

#djgzSlide {
    flex: 1;
    min-width: 0;
}

#djgzCarousel {
    border: 1px solid #ddd;
    overflow: hidden;
    height: 100%;
}

#djgzCarousel .carousel-inner {
    height: 100%;
}

#djgzCarousel .carousel-item {
    height: 100%;
}

#djgzCarousel .carousel-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
}

#djgzCarousel .carousel-caption {
    right: 0;
    left: 0;
    bottom: 0;
    padding: 10px 20px 28px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.65));
    text-align: center;
    text-shadow: none;
}

#djgzCarousel .carousel-caption p {
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
}

#djgzCarousel .carousel-caption a {
    color: #fff;
    font-size: 16px;
}

#djgzCarousel .carousel-caption a:hover {
    color: #f0c0c0;
}

#djgzCarousel .carousel-indicators {
    margin-bottom: 6px;
}

/* 第一行右侧党员教育卡片 */
.djgz-top-row .djgz-card {
    flex: 1;
    min-width: 0;
    margin: 0;
}

/* ==================== 第二行：三列 ==================== */
.djgz-bottom-row {
    display: flex;
    gap: 20px;
}

.djgz-bottom-row .djgz-card {
    flex: 1;
    min-width: 0;
}

/* ==================== 卡片通用 ==================== */
.djgz-card {
    background: #fff;
    border: 1px solid #e6e6e6;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
}

/* ==================== 卡片标题栏 ==================== */
.djgz-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
}

.djgz-card-head h2 {
    margin: 0;
    font-size: 18px;
    font-weight: bold;
    padding-left: 10px;
    border-left: 4px solid #993333;
    line-height: 20px;
}

.djgz-card-head h2 a {
    text-decoration: none;
    color: #993333;
}

.djgz-card-head h2 a:hover {
    color: #b3453b;
}

.djgz-more {
    font-size: 13px;
    color: #999;
    text-decoration: none;
}

/* 四色主题 */
.color-1 .djgz-card-head h2 { border-left-color: #993333; }
.color-1 .djgz-card-head h2 a { color: #993333; }
.color-1 .djgz-card-head h2 a:hover,
.color-1 .djgz-more:hover { color: #b3453b; }

.color-2 .djgz-card-head h2 { border-left-color: #c0392b; }
.color-2 .djgz-card-head h2 a { color: #c0392b; }
.color-2 .djgz-card-head h2 a:hover,
.color-2 .djgz-more:hover { color: #a1301f; }

.color-3 .djgz-card-head h2 { border-left-color: #b7791f; }
.color-3 .djgz-card-head h2 a { color: #b7791f; }
.color-3 .djgz-card-head h2 a:hover,
.color-3 .djgz-more:hover { color: #96620f; }

.color-4 .djgz-card-head h2 { border-left-color: #7d4b1e; }
.color-4 .djgz-card-head h2 a { color: #7d4b1e; }
.color-4 .djgz-card-head h2 a:hover,
.color-4 .djgz-more:hover { color: #63400f; }

/* ==================== 卡片列表 ==================== */
.djgz-card-list {
    list-style: none;
    margin: 0;
    padding: 8px 16px 12px;
    flex: 1;
}

.djgz-card-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed #eee;
    font-size: 14px;
}

.djgz-card-list li:last-child {
    border-bottom: none;
}

.djgz-card-list li a {
    flex: 1;
    min-width: 0;
    color: #444;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-left: 14px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='6' viewBox='0 0 6 6'%3E%3Crect width='6' height='6' fill='%23993333'/%3E%3C/svg%3E") left center no-repeat;
}

.djgz-card-list li a:hover {
    color: #993333;
}

.djgz-date {
    flex-shrink: 0;
    margin-left: 12px;
    color: #999;
    font-size: 13px;
    font-family: Arial, Helvetica, sans-serif;
}

.djgz-empty {
    justify-content: center;
    color: #999;
    padding: 24px 0;
    background: none;
}

/* ==================== 移动端适配 ==================== */
@media (max-width: 767px) {
    .djgz-main {
        margin: 10px auto 20px;
        padding: 0 10px;
    }

    .djgz-top-row {
        flex-direction: column;
        gap: 12px;
        margin-bottom: 12px;
    }

    #djgzCarousel .carousel-item img {
        min-height: 200px;
        height: 200px;
    }

    #djgzCarousel .carousel-caption p,
    #djgzCarousel .carousel-caption a {
        font-size: 13px;
    }

    .djgz-bottom-row {
        flex-direction: column;
        gap: 12px;
    }

    .djgz-card-head h2 {
        font-size: 16px;
    }

    .djgz-card-list li {
        font-size: 13px;
    }
}
