/* Блок «Присмотритесь…» / карточки детей. Кадр 2116:1595.
   Desktop ≥1401: сетка 4×N, карточка 344×401 r20, плашка 316×149 r12 inset 14.
   Фильтры временно скрыты; пагинация на desktop скрыта. */

body.page-looking .looking-children {
    z-index: 3;
    margin-top: 0;
    padding: 90px 0 80px;
    overflow: visible;
    border-radius: 0;
    background: #ffffff;
}

body.page-looking .looking-children .looking-container {
    max-width: 1440px;
    padding: 0 0;
}

body.page-looking .looking-children__title {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 1377px;
    margin: 0 auto 56px;
    padding: 0 20px;
    color: #4d4d4d;
    font-size: clamp(28px, 4.2vw, 66px);
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.02em;
    text-align: center;
}

body.page-looking .looking-children__title span {
    color: #3ea74f;
}

/* Фильтры временно скрыты (макет без фильтров) */
body.page-looking .looking-kids__filters,
body.page-looking .looking-filter-toggle {
    display: none !important;
}

body.page-looking .looking-kids__grid {
    display: grid;
    grid-template-columns: repeat(4, 344px);
    gap: 27px 21px;
    justify-content: center;
    width: 1440px;
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    overflow: visible;
}

/* Swiper-обёртка не ломает CSS-grid */
body.page-looking .looking-kids__grid > .swiper-wrapper {
    display: contents;
}

body.page-looking .looking-kids__grid > .swiper-wrapper > .swiper-slide {
    width: auto;
    height: auto;
    margin: 0;
}

/* Карточка 344×401, radius 20 (2116:1835) */
body.page-looking .looking-child-card {
    width: 344px;
    height: 401px;
    overflow: hidden;
    border-radius: 20px;
    background: #d9d9d9;
}

body.page-looking .looking-child-card:hover,
body.page-looking .looking-child-card:focus-visible {
    transform: translateY(-4px);
    box-shadow: 0 16px 34px rgba(52, 51, 51, 0.14);
}

body.page-looking .looking-child-card__image {
    border-radius: 20px;
    overflow: hidden;
}

body.page-looking .looking-child-card__image img {
    border-radius: 20px;
}

/* Зелёная плашка 316×149, radius 12, inset 14 (2116:1837–1838) */
body.page-looking .looking-child-card__body {
    left: 14px;
    right: 14px;
    bottom: 14px;
    width: auto;
    min-height: 0;
    height: 149px;
    padding: 22px 23px 20px;
    border-radius: 12px;
    background: #3ea74f;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 15px;
    justify-content: flex-start;
    overflow: visible;
}

body.page-looking .looking-child-card__head {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

body.page-looking .looking-page .looking-child-card__name,
body.page-looking.looking-page-section .looking-child-card__name {
    margin: 0 !important;
    font-family: "Google Sans", Helvetica, sans-serif !important;
    font-size: 24px !important;
    font-weight: 500 !important;
    line-height: 0.9 !important;
    letter-spacing: 0;
    text-transform: uppercase;
    color: #ffffff !important;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

body.page-looking .looking-child-card__meta {
    display: none;
}

body.page-looking .looking-page .looking-child-card__text,
body.page-looking.looking-page-section .looking-child-card__text {
    margin: 0 !important;
    font-family: "Google Sans", Helvetica, sans-serif !important;
    font-size: 18px !important;
    font-weight: 400 !important;
    line-height: 1.1 !important;
    color: #ffffff !important;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}

/* «Подробнее» — как на /about/wards/, на desktop скрыта (макет без кнопки) */
body.page-looking .looking-child-card__button {
    display: none;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    flex-shrink: 0;
    width: auto;
    min-width: 120px;
    height: 29px;
    margin-top: 0;
    padding: 0 16px;
    border: 2px solid #fff;
    border-radius: 40px;
    background: transparent;
    color: #fff;
    font-family: "Google Sans", Helvetica, sans-serif;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: 0;
    text-transform: none;
    white-space: nowrap;
}

body.page-looking .looking-pagination-wrapper,
body.page-looking .looking-pagination {
    display: none;
}

/* Скрытые карточки «Показать ещё» (без AJAX) */
body.page-looking .looking-kids__grid .swiper-slide.is-hidden {
    display: none !important;
}

body.page-looking .looking-kids-more {
    display: flex;
    justify-content: center;
    margin-top: 44px;
}

body.page-looking .looking-kids-more__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 190px;
    min-height: 48px;
    padding: 14px 30px;
    border: 0;
    border-radius: 999px;
    font-family: "Google Sans", Helvetica, sans-serif;
    font-size: 14px;
    line-height: 1;
    font-weight: 700;
    color: #ffffff;
    background: #f47b20;
    cursor: pointer;
    transition: background 0.2s ease;
}

body.page-looking .looking-kids-more__btn:hover,
body.page-looking .looking-kids-more__btn:focus-visible {
    background: #e56f18;
    outline: none;
}

@media (max-width: 767px) {
    body.page-looking .looking-kids-more {
        margin-top: 28px;
    }
}

/* ——— ≤991: сетка/карточки как /about/wards/ ——— */
@media (max-width: 991px) {
    body.page-looking .looking-children {
        padding: 48px 0 56px;
    }

    body.page-looking .looking-children__title {
        margin-bottom: 32px;
        font-size: clamp(28px, 5.5vw, 44px);
        letter-spacing: -0.02em;
        white-space: normal;
    }

    /* Не даём компонентному Swiper увести в горизонтальный слайдер */
    body.page-looking .looking-kids__grid.swiper {
        overflow: visible !important;
    }

    body.page-looking .looking-kids__grid .swiper-wrapper {
        display: contents !important;
        transform: none !important;
    }

    body.page-looking .looking-kids__grid .swiper-slide {
        width: auto !important;
        height: auto !important;
        margin: 0 !important;
    }

    body.page-looking .looking-kids__grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
        width: calc(100% - 48px);
        max-width: 736px;
        margin: 0 auto;
        padding: 0;
        box-sizing: border-box;
    }

    body.page-looking .looking-child-card {
        width: 100%;
        max-width: none;
        height: auto;
        min-height: 0;
        aspect-ratio: 344 / 401;
        border-radius: 14px;
    }

    body.page-looking .looking-child-card:hover,
    body.page-looking .looking-child-card:focus-visible {
        transform: none;
        box-shadow: none;
    }

    body.page-looking .looking-child-card__image,
    body.page-looking .looking-child-card__image img {
        border-radius: 14px;
    }

    body.page-looking .looking-child-card__body {
        left: 10px;
        right: 10px;
        bottom: 10px;
        height: 38%;
        min-height: 0;
        padding: 14px 14px 12px;
        border-radius: 10px;
        gap: 0;
        justify-content: space-between;
    }

    body.page-looking .looking-child-card__head {
        gap: 0;
    }

    body.page-looking .looking-page .looking-child-card__name,
    body.page-looking.looking-page-section .looking-child-card__name {
        font-size: 18px !important;
        line-height: 0.9 !important;
        -webkit-line-clamp: 1;
        white-space: nowrap;
        text-overflow: ellipsis;
        display: block;
    }

    body.page-looking .looking-page .looking-child-card__text,
    body.page-looking.looking-page-section .looking-child-card__text {
        margin: 10px 0 0 !important;
        font-size: 14px !important;
        line-height: 1.1 !important;
        -webkit-line-clamp: 2;
    }

    body.page-looking .looking-child-card__button {
        display: inline-flex;
        min-width: 100px;
        height: 26px;
        padding: 0 12px;
        font-size: 13px;
    }
}

/* Mobile ≤767: одна колонка, как /about/wards/ */
@media (max-width: 767px) {
    body.page-looking .looking-kids__grid {
        grid-template-columns: 1fr;
        gap: 16px;
        width: calc(100% - 32px);
        max-width: 100%;
        margin: 0 auto;
        padding: 0;
    }

    body.page-looking .looking-child-card {
        border-radius: 14px;
    }

    body.page-looking .looking-child-card__body {
        left: 12px;
        right: 12px;
        bottom: 12px;
        height: 38%;
        padding: 14px 14px 12px;
        border-radius: 10px;
    }

    body.page-looking .looking-page .looking-child-card__name,
    body.page-looking.looking-page-section .looking-child-card__name {
        font-size: 20px !important;
    }

    body.page-looking .looking-page .looking-child-card__text,
    body.page-looking.looking-page-section .looking-child-card__text {
        font-size: 15px !important;
    }

    body.page-looking .looking-child-card__button {
        min-width: 100px;
        height: 26px;
        padding: 0 14px;
        font-size: 14px;
    }
}

@media (min-width: 992px) {
    body.page-looking .looking-children__title {
        font-size: 66px;
        letter-spacing: -1.32px;
        white-space: nowrap;
        padding: 0;
        margin-bottom: 57px; /* 1549 − (1426 + 66) в макете */
    }

    /* Внешний контейнер — блок; 4 колонки на .swiper-wrapper (компонент бьёт display:contents). */
    body.page-looking .looking-kids__grid {
        display: block;
        width: 1440px;
        max-width: 100%;
        margin: 0 auto;
        padding: 0;
        box-sizing: border-box;
    }

    body.page-looking .looking-kids__grid .swiper-wrapper {
        display: grid !important;
        grid-template-columns: repeat(4, 344px) !important;
        gap: 27px 21px !important;
        justify-content: center;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        position: static !important;
        transform: none !important;
        box-sizing: border-box;
    }

    body.page-looking .looking-kids__grid .swiper-slide {
        width: 344px !important;
        height: auto !important;
        margin-right: 0 !important;
    }
}
