/* =========================================================================
   school-archive.css — архивные страницы школы ставок:
   «Стратегии ставок» (/strategii-stavok) и «Виды ставок» (/vidy-stavok).
   Оформление в духе match2.css / betting-school.css.
   Все правила ограничены .bt-sa, чтобы не задевать остальные страницы.
   ========================================================================= */

.bt-sa {
    --sa-card: #ffffff;
    --sa-ink: #1c2b42;
    --sa-ink-soft: #5d6b81;
    --sa-muted: #8a94a3;
    --sa-line: #e6eaf0;
    --sa-line-soft: #f0f3f8;
    --sa-bg: #f8f9fc;
    --sa-brand: #cc1d14;
    --sa-accent: #ffda33;
    --sa-green: #2f9a4d;
    --sa-blue: #2a5a9f;
    --sa-danger: #b33a24;
    --sa-radius: 18px;
    --sa-radius-sm: 12px;
    --sa-shadow: 0 6px 24px rgba(19, 31, 53, .07);
    --sa-shadow-sm: 0 3px 12px rgba(19, 31, 53, .05);
    width: 100%;
    max-width: 1180px;
    padding-left: 14px;
    padding-right: 14px;
    color: var(--sa-ink);
}

.bt-sa *,
.bt-sa *::before,
.bt-sa *::after {
    box-sizing: border-box;
}

.bt-sa p {
    margin: 0 0 12px;
    color: #33415a;
    line-height: 1.65;
}

.bt-sa p:last-child {
    margin-bottom: 0;
}

.bt-sa .breadcrumb {
    margin: 6px 0 10px !important;
    padding-left: 0 !important;
}

/* ---------- Общие элементы ---------- */
.bt-sa__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    padding: 5px 12px;
    border-radius: 999px;
    background: #fff3c4;
    color: #6f5500;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.bt-sa__eyebrow::before {
    content: "";
    flex: 0 0 auto;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--sa-green);
    box-shadow: 0 0 0 3px rgba(47, 154, 77, .18);
}

.bt-sa__section {
    margin-top: 16px;
    padding: 24px;
    border: 1px solid var(--sa-line);
    border-radius: var(--sa-radius);
    background: var(--sa-card);
    box-shadow: var(--sa-shadow);
}

.bt-sa__section-head {
    max-width: 760px;
    margin-bottom: 18px;
}

.bt-sa__title {
    position: relative;
    margin: 0 0 8px;
    padding-left: 14px;
    color: var(--sa-ink);
    font-size: 22px;
    line-height: 1.25;
    font-weight: 800;
    text-align: left;
}

.bt-sa__title::before {
    content: "";
    position: absolute;
    left: 0;
    top: .18em;
    bottom: .18em;
    width: 4px;
    border-radius: 3px;
    background: linear-gradient(180deg, var(--sa-brand), var(--sa-accent));
}

.bt-sa__subtitle {
    margin: 0 !important;
    color: var(--sa-ink-soft);
    font-size: 13.5px;
    line-height: 1.55;
}

/* ---------- Первый экран ---------- */
.bt-sa__hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 360px);
    align-items: center;
    gap: 28px;
    padding: 30px 32px;
    border: 1px solid var(--sa-line);
    border-radius: var(--sa-radius);
    background: linear-gradient(135deg, #ffffff 0%, #f7f9fc 58%, #fff8e1 100%);
    box-shadow: var(--sa-shadow);
}

.bt-sa__hero::before,
.bt-sa__hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.bt-sa__hero::before {
    width: 240px;
    height: 240px;
    right: -80px;
    top: -110px;
    background: rgba(255, 218, 51, .22);
}

.bt-sa__hero::after {
    width: 180px;
    height: 180px;
    left: -70px;
    bottom: -110px;
    background: rgba(42, 90, 159, .07);
}

.bt-sa__hero-body,
.bt-sa__hero-art {
    position: relative;
    z-index: 1;
}

.bt-sa__hero h1 {
    margin: 0 0 10px;
    color: var(--sa-ink);
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.1;
    font-weight: 850;
    letter-spacing: -.015em;
    text-align: left;
}

.bt-sa__lead {
    max-width: 62ch;
    margin: 0 0 18px !important;
    color: var(--sa-ink-soft);
    font-size: 15px;
    line-height: 1.6;
}

.bt-sa__hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.bt-sa__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    margin: 0;
    padding: 10px 16px;
    border: 1px solid #d7e1f0;
    border-radius: 10px;
    background: #fff;
    color: var(--sa-ink) !important;
    font-size: 13px;
    font-weight: 750;
    line-height: 1.2;
    text-align: center;
    text-decoration: none !important;
    cursor: pointer;
    box-shadow: var(--sa-shadow-sm);
    transition: transform .12s ease, border-color .15s ease, box-shadow .15s ease;
}

.bt-sa__btn:hover {
    transform: translateY(-1px);
    border-color: #c6d4e8;
    box-shadow: 0 6px 16px rgba(19, 31, 53, .1);
}

.bt-sa__btn--primary {
    border-color: var(--sa-brand);
    background: var(--sa-brand);
    color: #fff !important;
    box-shadow: 0 6px 16px rgba(204, 29, 20, .24);
}

.bt-sa__btn--primary:hover {
    border-color: #a9160f;
    background: #b71a12;
}

.bt-sa__btn--ghost {
    background: transparent;
    box-shadow: none;
}

.bt-sa__hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.bt-sa__meta-pill {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 11px;
    border: 1px solid var(--sa-line);
    border-radius: 999px;
    background: #fff;
    color: var(--sa-ink-soft);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
}

.bt-sa__hero-art {
    display: flex;
    align-items: center;
    justify-content: center;
}

.bt-sa__hero-art img {
    display: block;
    width: 100%;
    max-width: 360px;
    height: auto;
    margin: 0;
    object-fit: contain;
    filter: drop-shadow(0 12px 24px rgba(19, 31, 53, .12));
}

/* ---------- Фильтр и карточки ---------- */
.bt-sa__archive-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.bt-sa__archive-head .bt-sa__section-head {
    margin-bottom: 0;
}

.bt-sa__filter {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 230px;
    margin: 0;
}

.bt-sa__filter > span {
    color: var(--sa-muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.bt-sa__filter select {
    width: 100%;
    min-height: 42px;
    margin: 0;
    padding: 9px 34px 9px 12px;
    border: 1px solid #dbe2ec;
    border-radius: 10px;
    background-color: #fff;
    color: var(--sa-ink);
    font-family: inherit;
    font-size: 14px;
    font-weight: 650;
    line-height: 1.2;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.bt-sa__filter select:focus {
    outline: 0;
    border-color: var(--sa-blue);
    box-shadow: 0 0 0 3px rgba(42, 90, 159, .13);
}

.bt-sa__filter select:focus-visible,
.bt-sa__btn:focus-visible {
    outline: 3px solid rgba(42, 90, 159, .35);
    outline-offset: 2px;
}

.bt-sa__status {
    margin: 0 0 12px;
    color: var(--sa-muted);
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.4;
}

.bt-sa__status[hidden] {
    display: none;
}

.bt-sa__status.is-error {
    color: var(--sa-danger);
}

.bt-sa__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    transition: opacity .15s ease;
}

.bt-sa__grid.is-loading {
    opacity: .55;
    pointer-events: none;
}

.bt-sa__card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--sa-line);
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--sa-shadow-sm);
    transition: transform .14s ease, border-color .15s ease, box-shadow .15s ease;
}

.bt-sa__card:hover {
    transform: translateY(-2px);
    border-color: #d7e1f0;
    box-shadow: 0 10px 26px rgba(19, 31, 53, .1);
}

.bt-sa__card-media {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 325 / 180;
    background: #eef1f6;
    text-decoration: none;
}

.bt-sa__card-media img {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    object-fit: cover;
    object-position: top;
    transition: transform .25s ease;
}

.bt-sa__card:hover .bt-sa__card-media img {
    transform: scale(1.03);
}

.bt-sa__card-media-empty {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #eef1f6, #f8f9fc);
}

.bt-sa__card-body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 8px;
    padding: 14px 16px 16px;
}

.bt-sa__card-kicker {
    color: var(--sa-muted);
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: .05em;
    line-height: 1.3;
    text-transform: uppercase;
}

.bt-sa__card-title {
    display: block;
    color: var(--sa-ink) !important;
    font-size: 14.5px;
    font-weight: 750;
    line-height: 1.4;
    text-decoration: none !important;
    transition: color .15s ease;
}

.bt-sa__card-title:hover {
    color: var(--sa-brand) !important;
}

.bt-sa__card-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    padding-top: 4px;
    color: var(--sa-blue);
    font-size: 12.5px;
    font-weight: 750;
    line-height: 1.3;
    text-decoration: none !important;
}

.bt-sa__card-arrow {
    transition: transform .15s ease;
}

.bt-sa__card:hover .bt-sa__card-arrow {
    transform: translateX(3px);
}

.bt-sa__empty {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 32px 20px;
    border: 1px dashed #d7e1f0;
    border-radius: 14px;
    background: #fbfcfe;
    text-align: center;
}

.bt-sa__empty strong {
    color: var(--sa-ink);
    font-size: 15px;
    font-weight: 800;
}

.bt-sa__empty span {
    color: var(--sa-ink-soft);
    font-size: 13px;
    line-height: 1.5;
}

/* ---------- Статья ---------- */
.bt-sa__article {
    margin-top: 16px;
    padding: 28px 32px;
    border: 1px solid var(--sa-line);
    border-radius: var(--sa-radius);
    background: var(--sa-card);
    box-shadow: var(--sa-shadow);
}

.bt-sa__prose {
    color: #33415a;
    font-size: 15px;
    line-height: 1.75;
}

.bt-sa__prose > :first-child {
    margin-top: 0;
}

.bt-sa__prose > :last-child {
    margin-bottom: 0;
}

.bt-sa__prose h2 {
    position: relative;
    margin: 30px 0 12px;
    padding-left: 14px;
    color: var(--sa-ink);
    font-size: 24px;
    line-height: 1.3;
    font-weight: 800;
    text-align: left;
}

.bt-sa__prose h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: .2em;
    bottom: .2em;
    width: 4px;
    border-radius: 3px;
    background: linear-gradient(180deg, var(--sa-brand), var(--sa-accent));
}

.bt-sa__prose h3 {
    margin: 24px 0 10px;
    color: var(--sa-ink);
    font-size: 19px;
    line-height: 1.35;
    font-weight: 800;
    text-align: left;
}

.bt-sa__prose h4 {
    margin: 20px 0 8px;
    color: var(--sa-ink);
    font-size: 16px;
    line-height: 1.4;
    font-weight: 800;
    text-align: left;
}

.bt-sa__prose p {
    margin: 0 0 14px;
    color: #33415a;
    font-size: 15px;
    line-height: 1.75;
}

.bt-sa__prose ul,
.bt-sa__prose ol {
    margin: 0 0 16px;
    padding-left: 24px;
}

.bt-sa__prose li {
    margin: 0 0 8px;
    color: #33415a;
    font-size: 15px;
    line-height: 1.7;
}

.bt-sa__prose li:last-child {
    margin-bottom: 0;
}

.bt-sa__prose b,
.bt-sa__prose strong {
    color: var(--sa-ink);
    font-weight: 800;
}

.bt-sa__prose blockquote {
    margin: 18px 0;
    padding: 14px 18px;
    border-left: 4px solid var(--sa-accent);
    border-radius: 0 12px 12px 0;
    background: #fffdf3;
}

.bt-sa__prose blockquote p {
    margin: 0;
    color: var(--sa-ink-soft);
    font-style: italic;
}

.bt-sa__prose img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 18px auto;
    border-radius: 12px;
}

.bt-sa__prose table {
    width: 100%;
    margin: 16px 0;
    border-collapse: collapse;
    border: 1px solid var(--sa-line);
    border-radius: 10px;
    overflow: hidden;
    font-size: 14px;
}

.bt-sa__prose table th,
.bt-sa__prose table td {
    padding: 9px 12px;
    border: 1px solid var(--sa-line);
    color: #33415a;
    text-align: left;
    vertical-align: top;
}

.bt-sa__prose table th {
    background: #f6f8fc;
    color: var(--sa-ink);
    font-weight: 800;
}

.bt-sa__prose hr {
    margin: 24px 0;
    border: 0;
    border-top: 1px solid var(--sa-line);
}

.bt-sa__article-meta {
    margin: 18px 0 0;
    color: var(--sa-muted);
    font-size: 12px;
    line-height: 1.5;
}

.bt-sa__author {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--sa-line-soft);
}

.bt-sa__author .author-text {
    margin: 0 !important;
}

/* ---------- Рейтинг ---------- */
.bt-sa__rating .rating_block {
    margin-top: 0 !important;
}

/* ---------- Адаптив ---------- */
@media screen and (max-width: 900px) {
    .bt-sa__hero {
        grid-template-columns: minmax(0, 1fr);
    }

    .bt-sa__hero-art {
        justify-content: flex-start;
    }

    .bt-sa__hero-art img {
        max-width: 260px;
    }

    .bt-sa__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media screen and (max-width: 640px) {
    .bt-sa {
        padding-left: 10px;
        padding-right: 10px;
    }

    .bt-sa__hero {
        gap: 14px;
        padding: 20px 18px;
        border-radius: 14px;
    }

    .bt-sa__hero h1 {
        font-size: clamp(26px, 8vw, 34px);
    }

    .bt-sa__lead {
        font-size: 14px;
    }

    .bt-sa__hero-art img {
        max-width: 220px;
    }

    .bt-sa__section,
    .bt-sa__article {
        padding: 18px 15px;
        border-radius: 14px;
    }

    .bt-sa__title {
        font-size: 19px;
    }

    .bt-sa__archive-head {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
    }

    .bt-sa__filter {
        min-width: 0;
    }

    .bt-sa__grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    .bt-sa__card-media {
        aspect-ratio: 16 / 9;
    }

    .bt-sa__prose {
        font-size: 14px;
    }

    .bt-sa__prose h2 {
        font-size: 21px;
    }

    .bt-sa__prose h3 {
        font-size: 17px;
    }

    .bt-sa__prose p,
    .bt-sa__prose li {
        font-size: 14px;
    }

    .bt-sa__prose table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bt-sa__btn,
    .bt-sa__card,
    .bt-sa__card-media img,
    .bt-sa__card-arrow,
    .bt-sa__filter select,
    .bt-sa__grid {
        transition: none !important;
    }
}
