/* 常见问题页动画 */

:root {
    --problem-anim-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --problem-anim-duration: 0.75s;
}

.problem-top-bg img {
    transform: scale(1.05);
    transition: transform 1.2s var(--problem-anim-ease);
}

.problem-top.is-loaded .problem-top-bg img {
    transform: scale(1);
}

.problem-card {
    opacity: 0;
    transform: translateY(calc(24px * var(--layout-scale)));
    transition:
        opacity 0.6s var(--problem-anim-ease),
        transform 0.6s var(--problem-anim-ease),
        box-shadow 0.35s ease;
}

.problem-list-section.problem-anim-in .problem-card {
    opacity: 1;
    transform: translateY(0);
}

.problem-list-section.problem-anim-in .problem-card:nth-child(1) { transition-delay: 0.04s; }
.problem-list-section.problem-anim-in .problem-card:nth-child(2) { transition-delay: 0.1s; }
.problem-list-section.problem-anim-in .problem-card:nth-child(3) { transition-delay: 0.16s; }
.problem-list-section.problem-anim-in .problem-card:nth-child(4) { transition-delay: 0.22s; }
.problem-list-section.problem-anim-in .problem-card:nth-child(5) { transition-delay: 0.28s; }
.problem-list-section.problem-anim-in .problem-card:nth-child(6) { transition-delay: 0.34s; }
.problem-list-section.problem-anim-in .problem-card:nth-child(7) { transition-delay: 0.4s; }
.problem-list-section.problem-anim-in .problem-card:nth-child(8) { transition-delay: 0.46s; }
.problem-list-section.problem-anim-in .problem-card:nth-child(9) { transition-delay: 0.52s; }
.problem-list-section.problem-anim-in .problem-card:nth-child(10) { transition-delay: 0.58s; }

.problem-card:hover {
    box-shadow: 0 calc(10px * var(--layout-scale)) calc(28px * var(--layout-scale)) rgba(22, 84, 255, 0.08);
    transform: translateY(calc(-4px * var(--layout-scale)));
}

.problem-list-section.problem-anim-in .problem-card:hover {
    transform: translateY(calc(-4px * var(--layout-scale)));
}

.problem-card-divider {
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.5s var(--problem-anim-ease);
}

.problem-list-section.problem-anim-in .problem-card .problem-card-divider {
    transform: scaleX(1);
    transition-delay: 0.25s;
}

.problem-card-icon {
    transition: transform 0.35s var(--problem-anim-ease);
}

.problem-card:hover .problem-card-icon {
    transform: scale(1.08) rotate(-4deg);
}

.problem-card-body {
    opacity: 0;
    transform: translateY(calc(8px * var(--layout-scale)));
    transition:
        opacity 0.45s var(--problem-anim-ease),
        transform 0.45s var(--problem-anim-ease);
}

.problem-list-section.problem-anim-in .problem-card .problem-card-body {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.18s;
}

.problem-page .news-pagination {
    opacity: 0;
    transform: translateY(calc(16px * var(--layout-scale)));
    transition:
        opacity 0.6s var(--problem-anim-ease),
        transform 0.6s var(--problem-anim-ease);
}

.problem-list-section.problem-anim-in .news-pagination {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.62s;
}

.problem-page ~ .side-float {
    opacity: 0;
    transform: translateX(calc(20px * var(--layout-scale)));
    transition:
        opacity 0.6s var(--problem-anim-ease) 0.6s,
        transform 0.6s var(--problem-anim-ease) 0.6s;
}

body.problem-anim-ready .side-float {
    opacity: 1;
    transform: translateX(0);
}

body.problem-anim-ready .side-float-item {
    transition: transform 0.25s ease;
}

body.problem-anim-ready .side-float-item:hover {
    transform: translateX(calc(-3px * var(--layout-scale)));
}

@media (prefers-reduced-motion: reduce) {
    .problem-top-bg img,
    .problem-card,
    .problem-card-divider,
    .problem-card-body,
    .problem-page .news-pagination,
    .problem-page ~ .side-float,
    body.problem-anim-ready .side-float {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}
