/*
 * Стили страницы «Каталог онлайн-школ» (.gk-schools / .gk-school-card).
 * Вынесены из style.css на этапе E; подключаются после него в том же порядке.
 */

/* ── Страница школ: шапка-карточка и сетка школ ────────────────────────── */
.gk-schools__hero {
    margin: 0 0 20px;
}

.gk-schools__title {
    margin: 0 0 8px;
    color: #023849;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.15;
}

/* заголовок и кнопка подбора в одной строке */
.gk-schools__title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 20px;
    margin: 0 0 8px;
}

.gk-schools__title-row .gk-schools__title {
    margin: 0;
}

.gk-schools__cta,
.gk-schools a.gk-schools__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 18px;
    border-radius: 14px;
    background: #0e4f5f;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 12px 24px -16px rgba(2, 56, 73, .55);
    transition: background-color 140ms ease;
}

.gk-schools__cta:hover,
.gk-schools__cta:focus-visible,
.gk-schools a.gk-schools__cta:hover,
.gk-schools a.gk-schools__cta:focus-visible {
    background: #0b4351;
    color: #ffffff;
    text-decoration: none;
    box-shadow: 0 12px 24px -16px rgba(2, 56, 73, .55);
}

.gk-schools__lead {
    margin: 0;
    max-width: 80ch;
    color: #5f7570;
    font-size: 15px;
    line-height: 1.6;
}

.gk-schools__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.gk-schools__stat {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    padding: 7px 12px;
    border: 1px solid #d7e0dc;
    border-radius: 999px;
    background: #fafcfa;
    color: #5f7570;
    font-size: 12.5px;
    line-height: 1.2;
}

.gk-schools__stat strong {
    color: #023849;
    font-size: 14px;
    font-weight: 700;
}

.gk-schools__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin: 0 0 26px;
}

/* поиск и сортировка */
.gk-schools__tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 0 0 16px;
}

.gk-schools__search {
    display: flex;
    flex: 1 1 300px;
    max-width: 420px;
    min-width: 0;
    align-items: center;
    gap: 8px;
    height: 44px;
    padding: 0 14px;
    border: 1px solid #d7e0dc;
    border-radius: 12px;
    background: #ffffff;
}

.gk-schools__search input {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #0b2d38;
    font: inherit;
    font-size: 14px;
}

/* убираем оранжевое системное кольцо, рисуем своё серо-голубое на обёртке */
.gk-schools__search input:hover,
.gk-schools__search input:focus,
.gk-schools__search input:focus-visible,
.gk-schools__search input:active {
    border: 0;
    outline: 0 !important;
    box-shadow: none !important;
}

.gk-schools__search:hover {
    border-color: #c8e2ea;
}

.gk-schools__search:focus-within {
    border-color: #9fc9d6;
    box-shadow: 0 0 0 3px rgba(159, 201, 214, .35);
}

.gk-schools__sort {
    display: inline-flex;
    gap: 2px;
    padding: 3px;
    border: 1px solid #d7e0dc;
    border-radius: 12px;
    background: #eef4f7;
}

.gk-schools__sort-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 12px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #0e4f5f;
    font: inherit;
    font-size: 12.5px;
    font-weight: 600;
    /* сбрасываем глобальное «все заглавные + разрядка» у button */
    letter-spacing: normal;
    text-transform: none;
    cursor: pointer;
    white-space: nowrap;
}

.gk-schools__sort-btn:hover {
    background: rgba(255, 255, 255, .65);
}

.gk-schools__sort-btn.is-on {
    background: #ffffff;
    color: #023849;
    box-shadow: 0 2px 8px -5px rgba(2, 56, 73, .5);
}

.gk-schools__sort-btn i {
    font-style: normal;
    font-size: 11px;
    opacity: .75;
}

.gk-schools__empty {
    margin: 0 0 14px;
    color: #5f7570;
    font-size: 13px;
}

.gk-school-card[hidden] {
    display: none !important;
}

.gk-school-card {
    display: flex;
    flex-direction: column;
    padding: 16px;
    border: 1px solid #d7e0dc;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 14px 36px rgba(7, 30, 24, .05);
    min-width: 0;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.gk-school-card:hover {
    border-color: #c4d0ca;
    box-shadow: 0 18px 34px -24px rgba(2, 56, 73, .5);
    transform: translateY(-2px);
}

.gk-school-card__head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

/* Логотипы школ — как в блоке «Школы в каталоге» на главной: без рамки и фона */
.gk-school-card__logo {
    flex: none;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: transparent;
    object-fit: contain;
}

.gk-school-card__logo--mark {
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: #eef4f7;
    color: #0e4f5f;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
}

.gk-school-card__title,
.gk-schools .gk-school-card__title {
    margin: 0;
    color: #023849;
    font-size: 20px;
    letter-spacing: -0.01em;
    line-height: 1.2;
    min-width: 0;
}

.gk-school-card__title a {
    color: inherit;
    text-decoration: none;
}

.gk-school-card__title a:hover,
.gk-school-card__title a:focus-visible {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.gk-school-card__count {
    margin: 0 0 10px;
    color: #5f7570;
    font-size: 12.5px;
}

.gk-school-card__topics {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: auto;
}

.gk-school-card__topics span {
    padding: 3px 8px;
    border-radius: 8px;
    background: #f2f6f8;
    color: #26424a;
    font-size: 12px;
    line-height: 1.2;
}

.gk-school-card__topics .gk-school-card__more {
    padding: 2px 0;
    background: transparent;
    color: #5f7570;
}

@media (max-width: 1100px) {
    .gk-schools__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .gk-schools__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .gk-schools__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .gk-schools__hero {
        padding: 18px 18px 20px;
        border-radius: 18px;
    }

    .gk-schools__title-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .gk-schools__cta {
        width: 100%;
    }

    .gk-schools__search {
        flex-basis: 100%;
        max-width: none;
    }

    .gk-schools__sort {
        display: flex;
        width: 100%;
        justify-content: stretch;
        gap: 4px;
    }

    .gk-schools__sort-btn {
        flex: 1 1 0;
        min-width: 0;
        height: auto;
        min-height: 38px;
        padding: 8px 10px;
        white-space: normal;
        text-align: left;
        line-height: 1.3;
        font-size: 12px;
    }
}

