/* Home page: featured psychological tests section. */

.mp-ds-home-tests {
    background: #f3faf8;
    padding: 3.5rem 0 4rem;
}

.mp-ds-home-tests__header {
    max-width: 720px;
    margin: 0 auto 2rem;
    text-align: center;
}

.mp-ds-home-tests__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.75rem;
    margin-bottom: 0.85rem;
    border-radius: 999px;
    background: rgba(15, 107, 95, 0.08);
    border: 1px solid rgba(15, 107, 95, 0.12);
    color: #0f6b5f;
    font-size: 0.78rem;
    font-weight: 800;
}

.mp-ds-home-tests__title {
    margin: 0 0 0.55rem;
    color: #181c32;
    font-weight: 800;
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.mp-ds-home-tests__lead {
    margin: 0;
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.55;
}

.mp-ds-home-tests__track {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.15rem;
}

.mp-ds-home-tests__card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 16px;
    border: 1px solid #e8edf2;
    background: #fff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.05);
    color: inherit;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.mp-ds-home-tests__card:hover,
.mp-ds-home-tests__card:focus-visible {
    transform: translateY(-3px);
    border-color: rgba(15, 107, 95, 0.18);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.1);
    color: inherit;
}

.mp-ds-home-tests__media {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 150px;
    padding: 14px;
    background: #f5f7f9;
}

.mp-ds-home-tests__media--yellow {
    background: #fff4e8;
}

.mp-ds-home-tests__media--blue {
    background: #e3f2ff;
}

.mp-ds-home-tests__media img {
    display: block;
    width: auto;
    max-width: 100%;
    height: 122px;
    object-fit: contain;
}

.mp-ds-home-tests__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 16px 16px 18px;
}

.mp-ds-home-tests__card-title {
    margin: 0 0 6px;
    color: #181c32;
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.3;
}

.mp-ds-home-tests__desc {
    display: -webkit-box;
    margin-bottom: 14px;
    overflow: hidden;
    color: #64748b;
    font-size: 0.88rem;
    line-height: 1.5;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
}

.mp-ds-home-tests__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: auto;
    color: #0f6b5f;
    font-size: 0.88rem;
    font-weight: 800;
}

.mp-ds-home-tests__card:hover .mp-ds-home-tests__cta i {
    transform: translateX(2px);
}

.mp-ds-home-tests__cta i {
    transition: transform 0.18s ease;
}

.mp-ds-home-tests__footer {
    display: flex;
    justify-content: center;
    padding-top: 1.35rem;
}

.mp-ds-home-tests__all {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.65rem 1.1rem;
    border-radius: 999px;
    background: #fff;
    border: 1px solid rgba(15, 107, 95, 0.18);
    color: #0f6b5f;
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.mp-ds-home-tests__all:hover {
    background: #f0fdf9;
    color: #0c5f55;
    transform: translateY(-1px);
}

@media (max-width: 991.98px) {
    .mp-ds-home-tests__track {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Mobile: one horizontally scrolling row with snap points. */
@media (max-width: 767.98px) {
    .mp-ds-home-tests {
        padding: 2.5rem 0 3rem;
    }

    .mp-ds-home-tests__track {
        display: flex;
        gap: 0.85rem;
        margin: 0 calc(var(--bs-gutter-x, 1.5rem) * -0.5);
        padding: 4px calc(var(--bs-gutter-x, 1.5rem) * 0.5) 12px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-padding-inline: calc(var(--bs-gutter-x, 1.5rem) * 0.5);
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .mp-ds-home-tests__track::-webkit-scrollbar {
        display: none;
    }

    .mp-ds-home-tests__card {
        flex: 0 0 78%;
        scroll-snap-align: start;
    }

    .mp-ds-home-tests__card:hover,
    .mp-ds-home-tests__card:focus-visible {
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mp-ds-home-tests__card,
    .mp-ds-home-tests__all,
    .mp-ds-home-tests__cta i {
        transition: none;
    }
}
