/* static/css/components/section-banner.css */
/* Отдельный раздел каталога (МФО): баннер на главной, блок в поиске, ссылка назад на странице раздела. */

/* Баннер: карточка-ссылка; иллюстрация прижата к правому нижнему углу (кошелёк обрезан краем) */
.section-banner {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    box-sizing: border-box;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto 48px;
    background: linear-gradient(135deg, #ffffff 0%, #f3f8fd 100%);
    border: 2px solid #e0e0e0;
    border-radius: 16px;
    color: inherit;
    text-decoration: none;
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

@media (hover: hover) and (pointer: fine) {
    .section-banner:hover {
        border-color: #5B9BD5;
        transform: translateY(-2px);
        box-shadow: 0 8px 24px rgba(91, 155, 213, 0.2);
    }

    .section-banner:hover .section-banner-cta svg {
        transform: translateX(3px);
    }
}

.section-banner:focus-visible {
    outline: none;
    border-color: #5B9BD5;
    box-shadow: 0 0 0 4px rgba(91, 155, 213, 0.25);
}

.section-banner-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 12px;
    flex: 1 1 auto;
    min-width: 0;
    padding: 24px 8px 24px 32px;
}

.section-banner-title {
    margin: 0;
    font-size: 26px;
    font-weight: 700;
    color: #2c3e50;
    letter-spacing: -0.4px;
    line-height: 1.2;
}

.section-banner-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #3a7fc1;
    font-size: 15px;
    font-weight: 600;
}

.section-banner-cta svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    transition: transform 0.2s ease;
}

.section-banner-image {
    display: block;
    flex: 0 0 auto;
    align-self: flex-end;
    width: 160px;
    height: auto;
    user-select: none;
}

/* Ссылка назад на странице раздела: раздел вне общего каталога, чипов в нём нет */
.section-back-link {
    display: inline-flex;
    align-items: center;
    margin-bottom: 16px;
    color: #3a7fc1;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
}

.section-back-link:hover,
.section-back-link:focus-visible {
    text-decoration: underline;
    outline: none;
}

/* Без чипов под поиском сетка карточек иначе прилипает к строке поиска */
.search-container--section {
    margin-bottom: 40px;
}

/* Блок раздела под основной выдачей поиска */
.section-search {
    width: 100%;
    margin: 8px 0 48px;
}

.section-search-header {
    margin-bottom: 24px;
}

.section-search-title {
    margin: 0;
    font-size: 32px;
    font-weight: 700;
    color: #2c3e50;
    letter-spacing: -0.5px;
}

.section-search-note {
    margin: 8px 0 0;
    font-size: 16px;
    color: #666;
    line-height: 1.4;
}

.section-search-grid {
    margin-bottom: 0;
}

.section-search-footer {
    display: flex;
    justify-content: center;
    margin-top: 28px;
}

.section-search-all {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 22px;
    border: 2px solid #5B9BD5;
    border-radius: 12px;
    background: #5B9BD5;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease;
}

.section-search-all:hover,
.section-search-all:focus-visible {
    background: #ffffff;
    color: #5B9BD5;
    outline: none;
}

@media (max-width: 768px) {
    .section-banner {
        margin: 0 0 32px;
        border-radius: 12px;
    }

    .section-banner-body {
        gap: 8px;
        padding: 16px 4px 16px 16px;
    }

    .section-banner-title {
        font-size: 19px;
        letter-spacing: -0.2px;
    }

    .section-banner-cta {
        font-size: 14px;
    }

    .section-banner-image {
        width: 104px;
    }

    .search-container--section {
        margin-bottom: 24px;
    }

    .section-search {
        margin: 4px 0 32px;
    }

    .section-search-header {
        margin-bottom: 16px;
    }

    .section-search-title {
        font-size: 24px;
    }

    .section-search-note {
        font-size: 14px;
    }

    .section-search-all {
        width: 100%;
        padding: 12px 16px;
        font-size: 15px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .section-banner,
    .section-banner-cta svg {
        transition: none;
    }

    .section-banner:hover,
    .section-banner:hover .section-banner-cta svg {
        transform: none;
    }
}
