/* ============================================================
   #index5 「家委会喜报」板块
   移动优先：手机端改为横向喜报卡片流，避免 6 张宽图纵向堆叠。
   ============================================================ */


#index5 {
    margin-left: auto;
    margin-right: auto;
    padding-bottom: 50px;
}

#index5 .index5_tit p {
    padding-left: 100px;
}

#index5 > * {
    box-sizing: border-box;
    padding-left: var(--container-pad);
    padding-right: var(--container-pad);
}

@media (max-width: 768px) {


}

@media (min-width: 769px) {

}

#index5 {
    --i5-mobile-pad: 16px;
    --i5-shadow-pad: 8px;
    margin: 0 auto;
    padding: 34px 0 38px;
    overflow: hidden;
    background: #fffaf7;
    text-align: left;
}

#index5 .index5_tit h2 {
    margin: 0;
    position: relative;
    z-index: 2;
    color: #1a1a1a;
    font-family: 'Noto Serif SC', 'Source Han Serif', 'PingFang SC', serif;
    font-size: 30px;
    font-weight: 900;
    line-height: 1.16;
    letter-spacing: 0;
}

#index5 .index5_tit h2::before {
    content: "成功案例 · 家委会喜报";
    display: flex;
    width: max-content;
    max-width: 100%;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    margin-bottom: 12px;
    padding: 0 10px;
    border: 1px solid rgba(var(--clr-primary-rgb), .14);
    border-radius: 999px;
    background: rgba(var(--clr-primary-rgb), .07);
    color: var(--clr-primary);
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    font-size: var(--font-size-14);
    font-weight: 900;
    line-height: 1;
}

#index5 .index5_tit h2::after {
    display: none;
}

#index5 .index5_tit p {
    max-width: 720px;
    margin: 12px 0 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #5f5650;
    font-size: var(--font-size-14);
    font-weight: 600;
    line-height: 1.75;
    text-align: left;
}

#index5 .i5-wrap {
    max-width: none;
    margin: 0 auto;
}

#index5 .cases-grid {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(286px, 86vw);
    grid-template-rows: repeat(2, minmax(0, auto));
    grid-template-columns: none;
    column-gap: 12px;
    row-gap: 14px;
    margin: 0 0 8px calc(var(--i5-shadow-pad) * -1);
    padding-top: 12px;
    padding-right: var(--i5-mobile-pad);
    padding-left: var(--i5-mobile-pad);
    padding-bottom: 26px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-padding-left: var(--i5-mobile-pad);
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

#index5 .cases-grid::-webkit-scrollbar {
    display: none;
}

#index5 .case-card {
    display: flex;
    min-width: 0;
    overflow: hidden;
    scroll-snap-align: start;
    flex-direction: column;
    border: 1px solid rgba(232, 51, 10, .08);
    border-radius: 12px;
    background: #fff;
    color: inherit;
    text-decoration: none;
    box-shadow: 0 10px 26px rgba(75, 40, 24, .08);
    transition: box-shadow .22s ease, transform .22s ease;
    cursor: pointer;
    margin-left: 0;
}

#index5 .case-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, .13);
}

#index5 .case-card:focus-visible {
    outline: 2px solid rgba(232, 51, 10, .45);
    outline-offset: 3px;
}

#index5 .card-img {
    position: relative;
    flex-shrink: 0;
    overflow: hidden;
    aspect-ratio: 1920 / 616;
    background: #fff;
}

#index5 .card-img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform .3s ease;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    -webkit-user-drag: none;
    pointer-events: none;
}

#index5 .card-img-shield {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: transparent;
    -webkit-tap-highlight-color: transparent;
}

#index5 .case-card:hover .card-img img { transform: scale(1.03); }

#index5 .card-info {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    padding: 10px 12px 11px;
    text-align: left;
}

#index5 .card-name {
    display: block;
    min-width: 3.2em;
    margin: 0;
    color: #333;
    font-size: var(--font-size-14);
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: 0;
}

#index5 .card-school {
    display: block;
    min-width: 0;
    margin: 0;
    font-size: var(--font-size-14);
    font-weight: 700;
    line-height: 1.3;
    color: var(--clr-primary);
    letter-spacing: 0;
}

@keyframes i5FadeUpCard {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: none; }
}

#index5 .case-card {
    animation: i5FadeUpCard .32s ease both;
}

#index5 .case-card:nth-child(1) { animation-delay:   0ms; }
#index5 .case-card:nth-child(2) { animation-delay:  60ms; }
#index5 .case-card:nth-child(3) { animation-delay: 120ms; }
#index5 .case-card:nth-child(4) { animation-delay: 180ms; }
#index5 .case-card:nth-child(5) { animation-delay: 240ms; }
#index5 .case-card:nth-child(6) { animation-delay: 300ms; }

#index5 .i5-scroll-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: -8px 0 14px;
    padding: 0 var(--i5-mobile-pad);
    color: #9a6a54;
    font-size: var(--font-size-14);
    font-weight: 800;
    line-height: 1.3;
}

#index5 .i5-scroll-hint::before,
#index5 .i5-scroll-hint::after {
    display: block;
    width: 18px;
    height: 1px;
    background: rgba(var(--clr-primary-rgb), .26);
    content: "";
}

#index5 .i5-more {
    text-align: center;
    padding: 2px var(--i5-mobile-pad) 0;
}

#index5 .i5-more [data-action-button] {
    width: min(100%, 210px);
    min-height: 46px;
    padding: 0 24px;
    font-size: var(--font-size-14);
    font-weight: 700;
}

@media (min-width: 640px) {
    #index5 {
        padding: 48px 24px 54px;
    }

    #index5 .index5_tit h2 {
        max-width: 760px;
        font-size: 44px;
    }

    #index5 .index5_tit p {
        margin-right: 0;
        margin-left: 0;
        font-size: var(--font-size-16);
    }

    #index5 .i5-wrap {
        max-width: 1200px;
    }

    #index5 .cases-grid {
        grid-auto-flow: row;
        grid-auto-columns: auto;
        grid-template-rows: none;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
        padding: 8px 0 0;
        margin-bottom: 34px;
        overflow: visible;
        scroll-snap-type: none;
    }

    #index5 .i5-scroll-hint {
        display: none;
    }

    #index5 .card-info {
        grid-template-columns: 1fr;
        gap: 3px;
        text-align: center;
    }

    #index5 .card-name {
        min-width: 0;
    }
}

@media (min-width: 1025px) {
    #index5 {
        padding: 64px 24px;
        background: #fffbf7;
    }

    #index5 .index5_tit h2 {
        margin-right: auto;
        margin-left: auto;
        font-size: 48px;
    }

    #index5 .index5_tit h2::before {
        margin-right: auto;
        margin-left: auto;
    }

    #index5 .index5_tit p {
        margin: 12px auto 0;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        text-align: center;
        font-size: var(--font-size-16);
        line-height: 1.75;
    }

    #index5 .i5-wrap {
        max-width: 1200px;
    }

    #index5 .cases-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 24px;
        padding-top: 8px;
        margin-bottom: 40px;
    }

    #index5 .case-card {
        border: 0;
        border-radius: 12px;
        box-shadow: 0 2px 12px rgba(0, 0, 0, .07);
    }

    #index5 .card-img {
        aspect-ratio: auto;
        background: #e8e8e5;
    }

    #index5 .card-img img {
        height: auto;
        object-fit: initial;
    }

    #index5 .card-info {
        display: block;
        padding: 10px 14px 12px;
        text-align: center;
    }

    #index5 .card-name {
        display: block;
        margin: 0 0 3px;
        font-weight: 600;
        letter-spacing: .04em;
    }

    #index5 .card-school {
        margin: 1px 0 0;
        letter-spacing: .04em;
    }

    #index5 .i5-more [data-action-button] {
        width: auto;
        min-height: 0;
        padding: 14px 36px;
        font-size: var(--font-size-16);
    }
}
