﻿.sc-home-ads {
    --sc-home-ads-primary: #1081df;
    --sc-home-ads-white: #ffffff;
    --sc-home-ads-frame: #25272d;
    --sc-home-ads-font: 'Vazir', 'Vazir', 'Tahoma', sans-serif;
    width: min(1640px, calc(100% - 32px));
    margin: 64px auto 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 16px;
    direction: ltr;
    font-family: var(--sc-home-ads-font);
}

.sc-home-ads__header {
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
}

.sc-home-ads__title-wrap {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.sc-home-ads__title {
    margin: 0;
    color: var(--sc-home-ads-white);
    font-family: var(--sc-home-ads-font);
    font-size: 20px;
    font-weight: 500;
    line-height: 1.5;
    white-space: nowrap;
}

.sc-home-ads__title-icon {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 32px;
    color: var(--sc-home-ads-primary);
}

.sc-home-ads__title-icon svg {
    width: 32px;
    height: 32px;
    display: block;
}

.sc-home-ads__items {
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 16px;
    direction: ltr;
    flex-wrap: wrap;
}

.sc-home-ads__item {
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 12px;
    border: 0;
    border-radius: 4px;
    background: var(--sc-home-ads-frame);
    color: var(--sc-home-ads-white);
    font-family: var(--sc-home-ads-font);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    box-sizing: border-box;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.sc-home-ads__item:hover,
.sc-home-ads__item:focus-visible {
    background: #30343b;
    color: var(--sc-home-ads-white);
    text-decoration: none;
}

.sc-home-ads__item:focus-visible {
    outline: 2px solid var(--sc-home-ads-primary);
    outline-offset: 2px;
}

.sc-home-ads__item--primary {
    background: var(--sc-home-ads-primary);
    border: 2px solid rgba(16, 129, 223, 0.34);
}

.sc-home-ads__item--primary:hover,
.sc-home-ads__item--primary:focus-visible {
    background: #0f74c8;
}

.sc-home-ads__item svg {
    width: 20px;
    height: 20px;
    display: block;
    flex: 0 0 20px;
}

@media (max-width: 640px) {
    .sc-home-ads {
        width: min(100% - 24px, 392px);
        margin-top: 48px;
    }

    .sc-home-ads__items {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 2px;
        scrollbar-width: none;
    }

    .sc-home-ads__items::-webkit-scrollbar {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sc-home-ads__item {
        transition: none !important;
    }
}
