/* КАТАЛОГ: страница → боковой фильтр → сетка → обложка → название и кнопка.
   Названия, категории и ссылки карточек меняйте в kursy/index.html.
   Фильтрация выполняется в catalog-filter.js. */
.catalog-page .page-hero { padding: 34px 0 26px; }
.catalog-page .page-hero h1 { margin: 0; font-size: clamp(38px, 4.8vw, 58px); }
.catalog-section { padding: 32px 0 48px; }
.catalog-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 30px; align-items: start; }

/* 01. Боковое меню → кнопки направлений. */
.catalog-sidebar { position: sticky; top: 98px; min-width: 0; padding: 18px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.catalog-sidebar-label { margin: 0 10px 12px; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.catalog-filters { display: grid; gap: 5px; }
.catalog-filter { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 10px 12px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font: inherit; font-size: 13px; line-height: 1.5; text-align: left; cursor: pointer; }
.catalog-filter svg { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.catalog-filter:hover { background: var(--pale); }
.catalog-filter[aria-pressed="true"] { background: linear-gradient(115deg, var(--g2), var(--g3)); color: #fff; }
.catalog-filter:focus-visible, .catalog-action:focus-visible { outline: 3px solid var(--g5); outline-offset: 3px; }

/* 02. Результаты фильтра → заголовок и сетка. */
.catalog-results { min-width: 0; }
.catalog-results-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.catalog-results-head h2 { margin: 0; font-size: 30px; }
.catalog-count { font-size: 12px; color: var(--muted); white-space: nowrap; }
.catalog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }

/* 03. Карточка → единый стиль обложек. */
.catalog-card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.catalog-card[hidden] { display: none; }
.catalog-cover { position: relative; display: flex; align-items: center; min-height: 140px; padding: 18px; overflow: hidden; background: linear-gradient(135deg, #031a2a, #1e597a); color: #fff; }
.catalog-cover::after { content: ''; position: absolute; width: 220px; height: 150px; right: -70px; bottom: -105px; border: 1px solid #ffffff30; border-radius: 50%; box-shadow: 0 0 0 24px #ffffff08, 0 0 0 48px #ffffff05; transform: rotate(-18deg); }
.catalog-cover strong { position: relative; z-index: 1; font-family: var(--serif); font-size: 26px; font-weight: 500; line-height: 1.14; text-wrap: balance; }
.catalog-cover--long strong { font-size: 19px; }
.catalog-card-body { display: flex; flex: 1; flex-direction: column; padding: 15px; }
.catalog-card-body h3 { margin: 0 0 12px; color: var(--ink); font-family: var(--sans); font-size: 15px; font-weight: 700; line-height: 1.4; }

/* 04. Карточка → только необходимые отметки и действие. */
.catalog-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.catalog-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 99px; background: var(--pale); color: var(--sky); font-size: 10px; font-weight: 600; line-height: 1.5; }
.catalog-badge--live { background: #e6f3e9; color: #276340; }
.catalog-badge--live::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: #3a9257; }
.catalog-action { display: inline-flex; justify-content: center; align-items: center; min-height: 40px; width: 100%; margin-top: auto; padding: 9px 8px; border: 1px solid var(--g3); border-radius: 7px; background: var(--g3); color: #fff; font-family: var(--sans); font-size: 12px; font-weight: 600; line-height: 1.4; text-align: center; cursor: pointer; }
.catalog-action:hover { background: var(--g2); border-color: var(--g2); }
.catalog-action:disabled { opacity: .5; cursor: default; background: var(--g3); border-color: var(--g3); }

/* 05. Планшеты и телефоны → меню над карточками. */
@media (max-width: 1000px) { .catalog-layout { grid-template-columns: 190px minmax(0, 1fr); gap: 20px; } .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .catalog-layout { grid-template-columns: 1fr; gap: 24px; } .catalog-sidebar { position: static; padding: 12px; } .catalog-sidebar-label { margin-left: 4px; } .catalog-filters { display: flex; overflow-x: auto; gap: 6px; padding: 3px 3px 8px; } .catalog-filter { width: auto; flex: 0 0 auto; padding: 9px 12px; } }
@media (max-width: 480px) { .catalog-section { padding: 24px 0 34px; } .catalog-grid { gap: 12px; } .catalog-results-head h2 { font-size: 25px; } .catalog-cover { padding: 14px; min-height: 132px; } .catalog-cover strong { font-size: 22px; } .catalog-cover--long strong { font-size: 16px; } .catalog-card-body { padding: 12px; } .catalog-card-body h3 { font-size: 13px; } .catalog-action { font-size: 11px; } }
@media (max-width: 370px) { .catalog-grid { grid-template-columns: 1fr; } .catalog-cover { min-height: 130px; } .catalog-cover strong { font-size: 27px; } .catalog-cover--long strong { font-size: 22px; } .catalog-card-body h3 { font-size: 15px; } .catalog-action { font-size: 12px; } }
