/* ============================================================
   Карточки категорий на главной — фирменный стиль KazKredit
   Сдержанная сине-жёлтая палитра бренда (как логотип и кнопки).
   Подключается только на главной (IndexController). Свои классы
   svc__*, чтобы не конфликтовать с .services__* из бандла.
   ============================================================ */

:root {
    --svc-blue: #2b6fd6;        /* фирменный синий */
    --svc-blue-dark: #234e9e;
    --svc-tint: #eef3fc;        /* светлый фон бейджа иконки */
    --svc-yellow: #f0d000;      /* фирменный жёлтый (как кнопка) */
    --svc-border: #e4e8f0;
    --svc-title: #1f2d4d;
    --svc-muted: #8a96a8;
}

.svc {
    margin: 22px 0 10px;
}

.svc__grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 14px;
}

.svc__card {
    position: relative;
    background: #fff;
    border: 1px solid var(--svc-border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(27, 42, 77, .04);
    transition: transform .22s ease,
                box-shadow .22s ease,
                border-color .22s ease;
    animation: svcIn .45s ease both;
}

/* Фирменная жёлтая полоса слева — раскрывается на hover */
.svc__card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--svc-yellow);
    transform: scaleY(0);
    transform-origin: bottom center;
    transition: transform .25s ease;
}

.svc__link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px 16px;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.svc__icon {
    flex: 0 0 auto;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: var(--svc-tint);
    color: var(--svc-blue);
    transition: background .22s ease, color .22s ease;
}

.svc__icon svg {
    width: 25px;
    height: 25px;
    display: block;
}

.svc__body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.svc__title {
    font-family: var(--fontBold), "Open Sans", Arial, sans-serif;
    font-weight: 700;
    font-size: 15.5px;
    line-height: 1.25;
    color: var(--svc-title);
    transition: color .22s ease;
}

.svc__count {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--svc-muted);
}

.svc__arrow {
    margin-left: auto;
    flex: 0 0 auto;
    display: flex;
    color: #c4cedb;
    opacity: 0;
    transform: translateX(-6px);
    transition: transform .22s ease, opacity .22s ease, color .22s ease;
}

.svc__arrow svg {
    width: 19px;
    height: 19px;
    display: block;
}

/* --- Hover / focus --- */
.svc__card:hover,
.svc__card:focus-within {
    transform: translateY(-3px);
    border-color: #cdd9f0;
    box-shadow: 0 12px 24px -16px rgba(35, 78, 158, .35),
                0 4px 10px -8px rgba(27, 42, 77, .2);
}

.svc__card:hover::before,
.svc__card:focus-within::before {
    transform: scaleY(1);
}

.svc__card:hover .svc__icon,
.svc__card:focus-within .svc__icon {
    background: var(--svc-blue);
    color: #fff;
}

.svc__card:hover .svc__title,
.svc__card:focus-within .svc__title {
    color: var(--svc-blue);
}

.svc__card:hover .svc__arrow,
.svc__card:focus-within .svc__arrow {
    opacity: 1;
    transform: translateX(0);
    color: var(--svc-blue);
}

.svc__link:focus-visible {
    outline: 2px solid var(--svc-blue);
    outline-offset: 2px;
    border-radius: 12px;
}

/* --- Сдержанное появление --- */
@keyframes svcIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.svc__card:nth-child(1) { animation-delay: .03s; }
.svc__card:nth-child(2) { animation-delay: .07s; }
.svc__card:nth-child(3) { animation-delay: .11s; }
.svc__card:nth-child(4) { animation-delay: .15s; }
.svc__card:nth-child(5) { animation-delay: .19s; }
.svc__card:nth-child(6) { animation-delay: .23s; }

/* --- Адаптив --- */
@media screen and (max-width: 520px) {
    .svc__grid { grid-template-columns: 1fr; gap: 10px; }
    .svc__link { padding: 15px 13px; gap: 12px; }
    .svc__icon { width: 46px; height: 46px; border-radius: 10px; }
    .svc__icon svg { width: 22px; height: 22px; }
    .svc__title { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
    .svc__card,
    .svc__icon,
    .svc__arrow,
    .svc__title,
    .svc__card::before {
        animation: none !important;
        transition: none !important;
    }
}
