/* ============================================================
   pledge 组件 · 从 case_new.css 抽出，index/course 共用
   ============================================================ */

.pledge-sh-head {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 14px 24px 16px;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: 1px solid transparent;
    transition: background .25s ease, border-color .25s ease,
                box-shadow .25s ease, padding .25s ease,
                backdrop-filter .25s ease;
}

.pledge-sh-pill {
    display: block;
    width: 40px;
    height: 4px;
    background: rgba(0,0,0,.18);
    border-radius: 999px;
    margin: 0 auto;
    max-height: 4px;
    overflow: hidden;
    opacity: 1;
    margin-bottom: 14px;
    transition: max-height .3s ease, margin-bottom .3s ease, opacity .2s ease;
}

.pledge-sh-head.scrolled .pledge-sh-pill {
    max-height: 0;
    margin-bottom: 0;
    opacity: 0;
}

.pledge-sh-heading-row {
    display: flex;
    align-items: flex-start;
    padding-right: 48px;
}

.pledge-sh-heading-row > div {
    flex: 1;
    min-width: 0;
}

.pledge-sh-head h2 {
    margin: 0;
    font-size: var(--font-size-18);
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.3;
}

.pledge-sh-head p {
    margin: 0;
    max-height: 360px;
    overflow: hidden;
    opacity: 1;
    font-size: var(--font-size-14);
    line-height: 1.65;
    color: #999;
    margin-top: 6px;
    transition: max-height .35s ease, opacity .25s ease, margin-top .3s ease;
}

.pledge-sh-head.scrolled p {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
}

.pledge-sh-head .modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    margin: 0;
    z-index: 3;
    background: rgba(20,20,20,.10);
    border-color: rgba(0,0,0,.12);
    color: rgba(0,0,0,.6);
}

.pledge-sh-head .modal-close:hover {
    background: rgba(20,20,20,.20);
    color: #1a1a1a;
}

.pledge-sh-section {
    padding: 24px 28px 20px;
    border-bottom: 1px solid #f0ede8;
}

.pledge-sh-section:last-child {
    border-bottom: none;
    padding-bottom: 32px;
}

.pledge-sh-label {
    margin: 0 0 6px;
    font-size: var(--font-size-16);
    font-weight: 600;
    color: #1a1a1a;
}

.pledge-sh-desc {
    margin: 0 0 16px;
    font-size: var(--font-size-14);
    color: #999;
}

.pledge-videos-row {
    scrollbar-width: thin;
    scrollbar-color: #ddd transparent;
}

.pledge-videos-row::-webkit-scrollbar {
    height: 4px;
}

.pledge-videos-row::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 2px;
}

.pledge-vc {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.pledge-vc-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #111;
    overflow: hidden;
    border-radius: 8px;
}

.pledge-vc-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s ease;
}

.pledge-vc:hover .pledge-vc-thumb img {
    transform: scale(1.05);
}

.pledge-vc-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.22);
    transition: background .2s;
}

.pledge-vc:hover .pledge-vc-play {
    background: rgba(0,0,0,.4);
}

.pledge-vc-play::before {
    content: '';
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255,255,255,.9);
    box-shadow: 0 2px 12px rgba(0,0,0,.28);
    transition: transform .2s, background .2s;
}

.pledge-vc:hover .pledge-vc-play::before {
    transform: scale(1.12);
    background: #fff;
}

.pledge-vc-play::after {
    content: '';
    position: absolute;
    border-style: solid;
    border-width: 8px 0 8px 15px;
    border-color: transparent transparent transparent #1a1a1a;
    margin-left: 3px;
}

.pledge-vc-year {
    font-size: var(--font-size-14);
    color: #999;
    font-weight: 500;
    letter-spacing: .03em;
}

.pledge-photo-grid {
    display: grid;
    gap: 5px;
}

.pledge-grid-img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    display: block;
    transition: opacity .18s;
}

.pledge-grid-img:hover {
    opacity: .84;
}

.pledge-sh-head {
    padding-left: 16px;
    padding-right: 16px;
}

.pledge-sh-section {
    padding-left: 16px;
    padding-right: 16px;
}

.pledge-vc {
    width: 72vw;
}

.pledge-videos-row {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    padding-bottom: 10px;
}

.pledge-vc {
    flex: 0 0 min(78vw, 320px);
    scroll-snap-align: start;
}

.pledge-photo-grid {
    grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 1025px) {
    .pledge-sh-head {
        position: sticky;
        top: 0;
        z-index: 2;
        padding: 14px 24px 16px;
        background: transparent;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        border-bottom: 1px solid transparent;
        transition: background .25s ease, border-color .25s ease,
                    box-shadow .25s ease, padding .25s ease,
                    backdrop-filter .25s ease;
    }

    .pledge-sh-pill {
        display: block;
        width: 40px;
        height: 4px;
        background: rgba(0,0,0,.18);
        border-radius: 999px;
        margin: 0 auto;
        max-height: 4px;
        overflow: hidden;
        opacity: 1;
        margin-bottom: 14px;
        transition: max-height .3s ease, margin-bottom .3s ease, opacity .2s ease;
    }

    .pledge-sh-head.scrolled .pledge-sh-pill {
        max-height: 0;
        margin-bottom: 0;
        opacity: 0;
    }

    .pledge-sh-heading-row {
        display: flex;
        align-items: flex-start;
        padding-right: 48px;
    }

    .pledge-sh-heading-row > div {
        flex: 1;
        min-width: 0;
    }

    .pledge-sh-head h2 {
        margin: 0;
        font-size: var(--font-size-18);
        font-weight: 700;
        color: #1a1a1a;
        line-height: 1.3;
    }

    .pledge-sh-head p {
        margin: 0;
        max-height: 360px;
        overflow: hidden;
        opacity: 1;
        font-size: var(--font-size-14);
        line-height: 1.65;
        color: #999;
        margin-top: 6px;
        transition: max-height .35s ease, opacity .25s ease, margin-top .3s ease;
    }

    .pledge-sh-head.scrolled p {
        max-height: 0;
        opacity: 0;
        margin-top: 0;
    }

    .pledge-sh-head .modal-close {
        position: absolute;
        top: 10px;
        right: 12px;
        margin: 0;
        z-index: 3;
        background: rgba(20,20,20,.10);
        border-color: rgba(0,0,0,.12);
        color: rgba(0,0,0,.6);
    }

    .pledge-sh-head .modal-close:hover {
        background: rgba(20,20,20,.20);
        color: #1a1a1a;
    }

    .pledge-sh-section {
        padding: 24px 28px 20px;
        border-bottom: 1px solid #f0ede8;
    }

    .pledge-sh-section:last-child {
        border-bottom: none;
        padding-bottom: 32px;
    }

    .pledge-sh-label {
        margin: 0 0 6px;
        font-size: var(--font-size-16);
        font-weight: 600;
        color: #1a1a1a;
    }

    .pledge-sh-desc {
        margin: 0 0 16px;
        font-size: var(--font-size-14);
        color: #999;
    }

    .pledge-videos-row {
        display: flex;
        gap: 12px;
        overflow-x: auto;
        padding-bottom: 6px;
        scrollbar-width: thin;
        scrollbar-color: #ddd transparent;
    }

    .pledge-videos-row::-webkit-scrollbar {
        height: 4px;
    }

    .pledge-videos-row::-webkit-scrollbar-thumb {
        background: #ddd;
        border-radius: 2px;
    }

    .pledge-vc {
        flex: 0 0 auto;
        width: 220px;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        cursor: pointer;
    }

    .pledge-vc-thumb {
        position: relative;
        width: 100%;
        aspect-ratio: 16 / 9;
        background: #111;
        overflow: hidden;
        border-radius: 8px;
    }

    .pledge-vc-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        transition: transform .3s ease;
    }

    .pledge-vc:hover .pledge-vc-thumb img {
        transform: scale(1.05);
    }

    .pledge-vc-play {
        position: absolute;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(0,0,0,.22);
        transition: background .2s;
    }

    .pledge-vc:hover .pledge-vc-play {
        background: rgba(0,0,0,.4);
    }

    .pledge-vc-play::before {
        content: '';
        width: 42px;
        height: 42px;
        border-radius: 50%;
        background: rgba(255,255,255,.9);
        box-shadow: 0 2px 12px rgba(0,0,0,.28);
        transition: transform .2s, background .2s;
    }

    .pledge-vc:hover .pledge-vc-play::before {
        transform: scale(1.12);
        background: #fff;
    }

    .pledge-vc-play::after {
        content: '';
        position: absolute;
        border-style: solid;
        border-width: 8px 0 8px 15px;
        border-color: transparent transparent transparent #1a1a1a;
        margin-left: 3px;
    }

    .pledge-vc-year {
        font-size: var(--font-size-14);
        color: #999;
        font-weight: 500;
        letter-spacing: .03em;
    }

    .pledge-photo-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 5px;
    }

    .pledge-grid-img {
        width: 100%;
        aspect-ratio: 4 / 3;
        object-fit: cover;
        border-radius: 4px;
        cursor: pointer;
        display: block;
        transition: opacity .18s;
    }

    .pledge-grid-img:hover {
        opacity: .84;
    }

}

