.abtg,
.abtg * { box-sizing: border-box; }

.abtg {
    --abtg-bg: #f5f7fa;
    --abtg-card: #fff;
    --abtg-text: #111820;
    --abtg-muted: #6f7b8c;
    --abtg-border: #e2e7ee;
    --abtg-blue: #229ed9;
    --abtg-shadow: 0 18px 55px rgba(17, 24, 32, .08);
    width: min(1400px, calc(100% - 32px));
    margin: 72px auto;
    padding: clamp(24px, 3vw, 46px);
    overflow: hidden;
    border: 1px solid var(--abtg-border);
    border-radius: 30px;
    background: var(--abtg-bg);
    box-shadow: var(--abtg-shadow);
    color: var(--abtg-text);
    font-family: Arial, Helvetica, sans-serif;
}

.abtg--dark {
    --abtg-bg: #0c1118;
    --abtg-card: #131a23;
    --abtg-text: #fff;
    --abtg-muted: #9aa7b7;
    --abtg-border: rgba(255,255,255,.1);
    --abtg-shadow: 0 24px 70px rgba(0,0,0,.28);
}

.abtg__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 30px;
}

.abtg__brand {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.abtg__telegram {
    width: 54px;
    height: 54px;
    min-width: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    color: #fff;
    background: linear-gradient(145deg, #31b5ed, #168aca);
    box-shadow: 0 12px 28px rgba(34,158,217,.28);
}

.abtg__telegram svg { width: 28px; height: 28px; fill: currentColor; }
.abtg__title { margin: 0 0 5px !important; font-size: clamp(28px, 3vw, 44px) !important; line-height: 1.05 !important; color: var(--abtg-text) !important; }
.abtg__subtitle { margin: 0 !important; color: var(--abtg-muted) !important; font-size: 15px !important; line-height: 1.45 !important; }

.abtg__arrows { display: flex; gap: 10px; }
.abtg__arrow {
    width: 48px;
    height: 48px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--abtg-border);
    border-radius: 50%;
    color: var(--abtg-text);
    background: var(--abtg-card);
    font-size: 31px;
    line-height: 1;
    cursor: pointer;
    transition: .2s ease;
}
.abtg__arrow:hover { color: #fff; border-color: var(--abtg-blue); background: var(--abtg-blue); transform: translateY(-2px); }
.abtg__arrow:disabled { opacity: .35; cursor: default; transform: none; }

.abtg__viewport { overflow: hidden; }
.abtg__track {
    display: flex;
    gap: 22px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    overscroll-behavior-inline: contain;
    touch-action: pan-x pan-y;
}
.abtg__track::-webkit-scrollbar { display: none; }

.abtg__card {
    position: relative;
    flex: 0 0 calc((100% - 44px) / 3);
    min-width: 0;
    overflow: hidden;
    scroll-snap-align: start;
    border: 1px solid var(--abtg-border);
    border-radius: 22px;
    background: var(--abtg-card);
    box-shadow: 0 12px 32px rgba(17,24,32,.06);
    transition: transform .22s ease, box-shadow .22s ease;
}
.abtg__card:hover { transform: translateY(-5px); box-shadow: 0 22px 42px rgba(17,24,32,.12); }
.abtg__card-link { position: absolute; inset: 0; z-index: 4; }

.abtg__media {
    position: relative;
    height: 260px;
    overflow: hidden;
    background: linear-gradient(145deg, #dfe6ee, #f8fafc);
}
.abtg--dark .abtg__media { background: linear-gradient(145deg, #1b2633, #0d131b); }
.abtg__media img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .35s ease; }
.abtg__card:hover .abtg__media img { transform: scale(1.035); }
.abtg__media--empty { display: flex; align-items: center; justify-content: center; }
.abtg__media-placeholder {
    width: 74px;
    height: 74px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 24px;
    color: #fff;
    background: var(--abtg-blue);
}
.abtg__media-placeholder svg { width: 38px; height: 38px; fill: currentColor; }
.abtg__play {
    position: absolute;
    top: 50%; left: 50%;
    width: 58px; height: 58px;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid rgba(255,255,255,.8);
    border-radius: 50%;
    color: #fff;
    background: rgba(0,0,0,.5);
    backdrop-filter: blur(8px);
    transform: translate(-50%,-50%);
    padding-left: 4px;
}

.abtg__body { min-height: 220px; padding: 22px 22px 24px; display: flex; flex-direction: column; }
.abtg__meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 13px; color: var(--abtg-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.abtg__text { margin: 0 0 20px !important; display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 5; color: var(--abtg-text) !important; font-size: 16px !important; line-height: 1.55 !important; }
.abtg__read { margin-top: auto; color: var(--abtg-blue); font-size: 14px; font-weight: 700; }

.abtg__dots { display: flex; justify-content: center; gap: 7px; margin-top: 22px; }
.abtg__dot { width: 7px; height: 7px; border: 0; border-radius: 20px; background: #c8d0da; transition: .2s ease; }
.abtg__dot.is-active { width: 28px; background: var(--abtg-blue); }

.abtg__footer { margin-top: 28px; display: flex; justify-content: center; }
.abtg__button {
    min-height: 54px;
    padding: 0 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: 14px;
    color: #fff !important;
    background: var(--abtg-blue);
    box-shadow: 0 12px 28px rgba(34,158,217,.24);
    text-decoration: none !important;
    font-size: 15px;
    font-weight: 700;
    transition: .2s ease;
}
.abtg__button:hover { color: #fff !important; transform: translateY(-2px); box-shadow: 0 16px 35px rgba(34,158,217,.34); }
.abtg__button svg { width: 20px; height: 20px; fill: currentColor; }
.abtg__empty { padding: 46px 20px; display: flex; flex-direction: column; align-items: center; gap: 8px; border: 1px dashed var(--abtg-border); border-radius: 20px; text-align: center; color: var(--abtg-muted); background: var(--abtg-card); }
.abtg__empty strong { color: var(--abtg-text); font-size: 20px; }

@media (max-width: 980px) {
    .abtg__card { flex-basis: calc((100% - 20px) / 2); }
    .abtg__track { gap: 20px; }
}

@media (max-width: 640px) {
    .abtg { width: calc(100% - 20px); margin: 42px auto; padding: 20px; border-radius: 22px; }
    .abtg__head { align-items: flex-start; margin-bottom: 22px; }
    .abtg__telegram { width: 46px; height: 46px; min-width: 46px; border-radius: 15px; }
    .abtg__telegram svg { width: 24px; height: 24px; }
    .abtg__subtitle { font-size: 13px !important; }
    .abtg__arrows { display: none; }
    .abtg__card { flex-basis: 88%; }
    .abtg__media { height: 225px; }
    .abtg__body { min-height: 205px; padding: 19px; }
    .abtg__text { font-size: 15px !important; }
    .abtg__button { width: 100%; }
}
