/* /about/wards/ — Наши подопечные */

@import url("../fonts/google-sans/font.css");
@import url("../fonts/life/fontslife3.css?v=4.005_lifefull");

:root {
    --about-wards-white: #FFFFFF;
    --about-wards-black: #343333;
    --about-wards-gray: #5F5E5E;
    --about-wards-bg: #FFFFFF;
    --about-wards-green: #3EA74F;
    --about-wards-green-soft: #97CA94;
    --about-wards-orange: #EE7B2D;
    --about-wards-orange-hover: #FF8F41;
    --about-wards-font-main: "Google Sans", Arial, sans-serif;
    --about-wards-font-life: "life4", "Life4", "life", "Life", "Google Sans", Arial, sans-serif;
}

body .wrapper > .breadcrumbs,
body .wrapper > .breadcrumbs__wrapper,
body.about-wards-page .wrapper .breadcrumbs:not(.about-wards-hero__breadcrumbs),
body.about-wards-page .wrapper .breadcrumbs__wrapper,
.about-wards-page.wrapper > .breadcrumbs,
.about-wards-page.wrapper > .breadcrumbs__wrapper {
    display: none !important;
}

.about-wards-page,
.about-wards-page *,
.about-wards-page input,
.about-wards-page button,
.about-wards-page textarea,
.about-wards-page select {
    box-sizing: border-box;
    font-family: var(--about-wards-font-main);
}

.about-wards-page {
    overflow-x: hidden;
    background: var(--about-wards-bg);
    color: var(--about-wards-black);
}

.about-wards-page .wrapper,
.about-wards-page .section--second.about-wards-section {
    background: var(--about-wards-bg) !important;
}

.about-wards-page a,
.about-wards-page button {
    transition: color .2s ease, background-color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.about-wards-page button {
    cursor: pointer;
}

.about-wards-page img,
.about-wards-page svg {
    display: block;
    max-width: 100%;
}

/* ========================================================================
   Hero
   ======================================================================== */

.about-wards-hero {
    position: relative;
    overflow: hidden;
    background: var(--about-wards-green);
    color: var(--about-wards-white);
}

.about-wards-hero__inner {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 auto;
    box-sizing: border-box;
}

/* Локальные крошки скрыты — остаются глобальные .mv-bc--hero из header */
.about-wards-hero__breadcrumbs,
nav.about-wards-hero__breadcrumbs.mv-bc-x {
    display: none !important;
}

.about-wards-hero__breadcrumbs a,
.about-wards-hero__breadcrumbs span {
    color: rgba(255, 255, 255, .6);
    font-size: 13px;
    line-height: 110%;
    font-weight: 400;
    text-decoration: none;
}

.about-wards-hero__breadcrumbs a:hover,
.about-wards-hero__breadcrumbs a:focus-visible {
    color: var(--about-wards-white);
    outline: none;
}

.about-wards-hero__breadcrumbs span:last-child {
    color: var(--about-wards-white);
    opacity: 1;
}

.about-wards-hero__title {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 100%;
    margin: 40px 0 0;
    padding: 0;
    box-sizing: border-box;
    display: flex;
    align-items: flex-start;
    justify-content: center;

    --about-wards-title-font-size: 72px;
}

.about-wards-hero__title-text {
    position: relative;
    width: 100%;
    margin: 0;
    padding: 0;
    display: block;
    white-space: normal;
    text-align: center;
    overflow: visible;

    font-family: var(--about-wards-font-life);
    font-weight: 400;
    font-size: var(--about-wards-title-font-size);
    line-height: 0.9;
    letter-spacing: -0.1375em;
    text-transform: uppercase;
    color: var(--about-wards-white);
}

.about-wards-hero__subtitle {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 100%;
    margin: 36px 0 0;
    color: var(--about-wards-white);
    font-weight: 400;
    text-align: center;
}

.about-wards-hero__decor {
    position: absolute;
    z-index: 1;
    display: block;
    height: auto;
    pointer-events: none;
}

.about-wards-section {
    position: relative;
    z-index: 2;
    border-radius: 10px 10px 0 0;
}

.about-wards-section__inner {
    margin: 0 auto;
}

/* ========================================================================
   Cards — как на /help/im-nuzhna-pomosch/, без полоски сбора
   ======================================================================== */

.about-wards-cards {
    width: 100%;
}

.about-wards-cards__grid {
    display: grid;
}

.ward-card {
    position: relative;
    display: block;
    overflow: visible;
    border-radius: 16px;
    background: #e5e5e5;
    color: var(--about-wards-white);
    text-decoration: none;
    box-shadow: none;
}

.ward-card:hover,
.ward-card:focus-visible {
    z-index: 5;
    color: var(--about-wards-white);
    text-decoration: none;
    outline: none;
}

.ward-card__photo-wrap {
    position: absolute;
    inset: 0;
    display: block;
    overflow: hidden;
    border-radius: inherit;
}

.ward-card__photo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ward-card__info {
    position: absolute;
    z-index: 3;
    left: 14px;
    right: 14px;
    bottom: 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 148px;
    min-height: 148px;
    padding: 19px 19px 15px;
    border-radius: 12px;
    background: #3EA74F;
    overflow: visible;
    transition:
        left .7s ease-in-out,
        right .7s ease-in-out,
        bottom .7s ease-in-out,
        padding .7s ease-in-out,
        border-radius .7s ease-in-out;
}

.ward-card__badge {
    position: absolute;
    top: -10px;
    right: 8px;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 29px;
    min-height: 29px;
    max-width: none;
    margin: 0;
    padding: 0 10px;
    border-radius: 15px;
    background: #fff;
    color: #535353;
    font-size: 16px;
    line-height: 1.1;
    font-weight: 600;
    text-transform: none;
    white-space: nowrap;
    transition:
        top .7s ease-in-out,
        right .7s ease-in-out,
        height .7s ease-in-out,
        min-height .7s ease-in-out,
        padding .7s ease-in-out,
        border-radius .7s ease-in-out,
        font-size .7s ease-in-out;
}

.ward-card__badge svg {
    display: none;
}

.ward-card__head {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
}

.ward-card__name {
    display: block;
    max-width: none;
    overflow: hidden;
    margin: 0;
    color: #fff;
    font-size: 24px;
    line-height: 0.9;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: uppercase;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.ward-card__region {
    display: none;
}

.ward-card__text {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    height: auto;
    min-height: 0;
    margin: 10px 0 0;
    color: #fff;
    font-size: 18px;
    line-height: 1.1;
    font-weight: 400;
    white-space: normal;
    text-overflow: ellipsis;
}

.ward-card__button {
    display: inline-flex;
    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-size: 16px;
    font-weight: 600;
    line-height: 1.1;
    text-transform: none;
    letter-spacing: 0;
    white-space: nowrap;
}

.ward-card:hover .ward-card__button,
.ward-card:focus-visible .ward-card__button {
    background: transparent;
    color: #fff;
}

.about-wards-more {
    display: flex;
    justify-content: center;
    margin-top: 44px;
}

.about-wards-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-size: 14px;
    line-height: 1;
    font-weight: 700;
    color: #ffffff;
    background: #f47b20;
    cursor: pointer;
    transition: background .2s ease, opacity .2s ease;
}

.about-wards-more__btn:hover {
    background: #e56f18;
}

.about-wards-more__btn:disabled,
.about-wards-more__btn.is-loading {
    opacity: .65;
    cursor: default;
}

.about-wards-cards__mobile-nav {
    display: none;
}

.about-wards-page .pagination,
.about-wards-page .pager,
.about-wards-page .nav-pages {
    margin: 0 auto;
    text-align: center;
}

/* ========================================================================
   Desktop ≥1200
   ======================================================================== */

@media (min-width: 992px) {
    /* Hero: top 24 / bottom 30 (×0.5 от 48/60); subtitle 2 строки */
    .about-wards-hero {
        height: 506px;
        min-height: 506px;
        max-height: 506px;
        margin-bottom: 0;
    }

    .about-wards-hero__inner {
        max-width: 1440px;
        height: 506px;
        min-height: 506px;
        padding: 0;
        container-type: inline-size;
    }

    .about-wards-hero__breadcrumbs,
    nav.about-wards-hero__breadcrumbs.mv-bc-x {
        position: absolute;
        left: 30px;
        top: 78px;
        padding: 8px 0;
    }

    .about-wards-hero__title {
        position: absolute;
        left: 50%;
        top: 24px;
        width: calc(1400 / 1440 * 100%);
        max-width: calc(100% - 40px);
        margin-top: 0;
        height: auto;
        transform: translateX(-50%);
        --about-wards-title-font-size: clamp(72px, calc(160 / 1440 * 100cqi), 160px);
    }

    .about-wards-hero__title-text {
        line-height: 1.05;
        letter-spacing: -0.04em;
    }

    .about-wards-hero__subtitle {
        position: absolute;
        left: 50%;
        top: 436px;
        width: 690px;
        max-width: calc(100% - 80px);
        min-height: 0;
        margin-top: 0;
        font-size: 20px;
        line-height: 100%;
        transform: translateX(-50%);
    }

    .about-wards-hero__decor--house {
        left: calc(80 / 1440 * 100%);
        right: auto;
        top: auto;
        bottom: 12px;
        width: calc(220 / 1440 * 100%);
        height: auto;
    }

    .about-wards-hero__decor--train {
        left: auto;
        right: calc(80 / 1440 * 100%);
        top: auto;
        bottom: 12px;
        width: calc(240 / 1440 * 100%);
        height: auto;
    }

    .about-wards-section {
        margin-top: 0 !important;
        padding: 40px 0 120px !important;
    }

    .about-wards-section__inner {
        width: calc(100% - 40px);
        max-width: 1400px;
    }

    .about-wards-cards__grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 20px;
        width: 100%;
        max-width: 1400px;
        margin: 0 auto;
        padding: 24px 0;
        overflow: visible;
        justify-content: stretch;
    }

    .ward-card {
        width: 100%;
        height: auto;
        min-height: 0;
        aspect-ratio: 344 / 401;
        border-radius: 14px;
    }

    .ward-card__info {
        left: 12px;
        right: 12px;
        bottom: 12px;
        height: 38%;
        min-height: 0;
        padding: 16px 16px 12px;
        gap: 0;
        border-radius: 10px;
    }

    /* Hover: отъезд вниз + расширение по ширине */
    .ward-card:hover .ward-card__info,
    .ward-card:focus-visible .ward-card__info {
        left: 4px;
        right: 4px;
        bottom: -8px;
    }

    .ward-card:hover .ward-card__badge,
    .ward-card:focus-visible .ward-card__badge {
        top: -12px;
        right: 10px;
    }

    .ward-card__badge {
        top: -8px;
        right: 6px;
        height: 26px;
        min-height: 26px;
        padding: 0 9px;
        font-size: 14px;
    }

    .ward-card__name {
        font-size: 20px;
        line-height: 0.9;
    }

    .ward-card__text {
        font-size: 15px;
        line-height: 1.1;
        height: auto;
        min-height: 0;
    }

    .ward-card__button {
        min-width: 100px;
        height: 26px;
        padding: 0 14px;
        font-size: 14px;
    }

    .about-wards-more {
        margin-top: 36px;
    }
}

/* ========================================================================
   Desktop 1024
   ======================================================================== */

@media (min-width: 1024px) and (max-width: 991px) /* was 1024-1199; desktop now from 992 */ {
    .about-wards-hero {
        height: 480px;
        min-height: 480px;
        max-height: 480px;
    }

    .about-wards-hero__inner {
        max-width: 1024px;
        height: 480px;
        min-height: 480px;
        padding: 22px 16px 0;
    }

    .about-wards-hero__title {
        width: 564px;
        max-width: calc(100% - 40px);
        margin-top: 40px;
        --about-wards-title-font-size: 125px;
    }

    .about-wards-hero__subtitle {
        width: 498px;
        max-width: calc(100% - 40px);
        min-height: 64px;
        margin-top: 36px;
        font-size: 16px;
        line-height: 100%;
    }

    .about-wards-hero__decor--house {
        left: 20px;
        bottom: 0;
        width: 180px;
    }

    .about-wards-hero__decor--train {
        right: 20px;
        bottom: 0;
        width: 200px;
    }

    .about-wards-section {
        margin-top: 0 !important;
        padding: 56px 0 96px !important;
    }

    .about-wards-section__inner {
        width: calc(100% - 20px);
        max-width: 1004px;
    }

    .about-wards-cards__grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 325px));
        gap: 14px;
        max-width: 1004px;
        margin: 0 auto;
        justify-content: center;
    }

    .ward-card {
        height: 360px;
        min-height: 360px;
        border-radius: 12px;
    }

    .ward-card:hover,
    .ward-card:focus-visible {
        transform: none;
        box-shadow: none;
    }

    .ward-card__info {
        left: 10px;
        right: 10px;
        bottom: 10px;
        height: 140px;
        min-height: 140px;
        padding: 14px 14px 12px;
    }

    .ward-card__badge {
        top: -8px;
        right: 6px;
        height: 24px;
        min-height: 24px;
        font-size: 13px;
    }

    .ward-card__name {
        font-size: 18px;
        line-height: 0.9;
    }

    .ward-card__text {
        font-size: 14px;
        line-height: 1.1;
        height: auto;
        min-height: 0;
    }

    .ward-card__button {
        min-width: 100px;
        height: 26px;
        padding: 0 12px;
        font-size: 13px;
    }

    .about-wards-more {
        margin-top: 32px;
    }
}

/* ========================================================================
   <992: тот же светлый hero, что на десктопе (page-hero-2026)
   ======================================================================== */

@media (max-width: 991px) {
    .about-wards-hero {
        position: relative;
        overflow: visible !important;
        height: auto;
        min-height: 0;
        max-height: none;
        margin-bottom: 0;
        background: transparent !important;
        color: #343333;
        isolation: isolate;
    }

    .about-wards-hero::before {
        content: "";
        position: absolute;
        left: 50%;
        top: -160px;
        z-index: 0;
        width: 100vw;
        height: calc(100% + 160px);
        transform: translateX(-50%);
        background: linear-gradient(180deg, #E2FFE7 0%, #FFFFFF 100%);
        pointer-events: none;
    }

    .about-wards-hero > * {
        position: relative;
        z-index: 1;
    }

    .about-wards-hero__title,
    .about-wards-hero__title-text {
        color: #3EA74F !important;
        text-transform: none !important;
        font-family: "life-full", "LifeFull", "life4", "Life4", "life", "Life", "Google Sans", Arial, sans-serif !important;
        font-weight: 400;
        letter-spacing: -0.04em;
    }

    .about-wards-hero__title-text {
        line-height: 1.05;
    }

    .about-wards-hero__subtitle {
        color: #4D4D4D !important;
    }

    .about-wards-hero__decor {
        display: none !important;
    }

    .about-wards-cards__mobile-nav {
        display: none !important;
    }
}

/* ========================================================================
   Tablet 768
   ======================================================================== */

@media (min-width: 768px) and (max-width: 991px) {
    .about-wards-hero__inner {
        max-width: 768px;
        height: auto;
        min-height: 0;
        /* absolute .mv-bc--hero под шапкой */
        padding: 56px 24px 56px;
        align-items: center;
    }

    .about-wards-hero__title {
        width: 100%;
        max-width: 640px;
        margin-top: 0;
        justify-content: center;
        --about-wards-title-font-size: clamp(64px, 11vw, 96px);
    }

    .about-wards-hero__title-text {
        text-align: center;
    }

    .about-wards-hero__subtitle {
        width: 100%;
        max-width: 520px;
        min-height: 0;
        margin-top: 24px;
        font-size: 18px;
        line-height: 1.2;
        text-align: center;
    }

    .about-wards-section {
        margin-top: 0 !important;
        padding: 24px 0 80px !important;
    }

    .about-wards-section__inner {
        width: calc(100% - 48px);
        max-width: 736px;
    }

    .about-wards-cards__grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
        width: 100%;
        max-width: 736px;
        margin: 0 auto;
        padding: 0;
        overflow: visible;
    }

    .ward-card {
        width: 100%;
        height: auto;
        min-height: 0;
        aspect-ratio: 344 / 401;
        border-radius: 14px;
    }

    .ward-card:hover,
    .ward-card:focus-visible {
        transform: none;
        box-shadow: none;
    }

    .ward-card__info {
        left: 10px;
        right: 10px;
        bottom: 10px;
        height: 38%;
        min-height: 0;
        padding: 14px 14px 12px;
        border-radius: 10px;
    }

    .ward-card__badge {
        top: -8px;
        right: 6px;
        height: 24px;
        min-height: 24px;
        font-size: 13px;
    }

    .ward-card__name {
        font-size: 18px;
        line-height: 0.9;
    }

    .ward-card__text {
        font-size: 14px;
        line-height: 1.1;
        height: auto;
        min-height: 0;
    }

    .ward-card__button {
        min-width: 100px;
        height: 26px;
        padding: 0 12px;
        font-size: 13px;
    }

    .about-wards-more {
        margin-top: 28px;
    }
}

/* ========================================================================
   Mobile — сетка как на десктопе, одна колонка
   ======================================================================== */

@media (max-width: 767px) {
    .about-wards-hero__inner {
        width: 100%;
        max-width: 100%;
        height: auto;
        min-height: 0;
        /* absolute .mv-bc--hero ~22–30px под шапкой — не наезжать на title */
        padding: 52px 16px 28px;
        align-items: center;
    }

    .about-wards-hero__title {
        width: 100%;
        max-width: 100%;
        margin-top: 0;
        justify-content: center;
        --about-wards-title-font-size: clamp(52px, 15vw, 64px);
    }

    .about-wards-hero__title-text {
        text-align: center;
    }

    .about-wards-hero__subtitle {
        width: 100%;
        max-width: 100%;
        min-height: 0;
        margin-top: 14px;
        font-size: 15px;
        line-height: 1.25;
        text-align: center;
    }

    .about-wards-section {
        margin-top: 0 !important;
        padding: 4px 0 72px !important;
        border-radius: 0;
    }

    .about-wards-section__inner {
        width: calc(100% - 32px);
        max-width: 100%;
        margin: 0 auto;
    }

    .about-wards-cards {
        position: relative;
        width: 100%;
        overflow: visible;
    }

    .about-wards-cards__grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 16px;
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 0;
        overflow: visible;
        scroll-snap-type: none;
        touch-action: auto;
    }

    .ward-card {
        flex: none;
        width: 100%;
        min-width: 0;
        max-width: none;
        height: auto;
        min-height: 0;
        aspect-ratio: 344 / 401;
        border-radius: 14px;
        scroll-snap-align: none;
    }

    .ward-card:hover,
    .ward-card:focus-visible {
        transform: none;
        box-shadow: none;
    }

    .ward-card__info {
        left: 12px;
        right: 12px;
        bottom: 12px;
        height: 38%;
        min-height: 0;
        padding: 14px 14px 12px;
        border-radius: 10px;
    }

    .ward-card__badge {
        top: -8px;
        right: 8px;
        height: 24px;
        min-height: 24px;
        font-size: 13px;
    }

    .ward-card__name {
        font-size: 20px;
        line-height: 0.9;
    }

    .ward-card__text {
        font-size: 15px;
        line-height: 1.1;
        height: auto;
        min-height: 0;
    }

    .ward-card__button {
        min-width: 100px;
        height: 26px;
        padding: 0 14px;
        font-size: 14px;
    }

    .about-wards-more {
        margin-top: 28px;
    }
}
