/* ==========================================================
   HAPPY CHILD
   GROUPS PAGE
   Mobile First
   ========================================================== */

/* 1. ОСНОВА */

.hc2-groups {
    --hc2-navy: #14294c;
    --hc2-text: #4d6686;
    --hc2-orange: #ff570f;
    --hc2-blue: #20a8ee;
    --hc2-background: #eff9ff;
    --hc2-border: #e3eef7;

    width: 100%;
    min-width: 0;
    padding: 56px 0 76px;
    background: var(--hc2-background);
    font-family: "Montserrat", sans-serif;
    color: var(--hc2-navy);
}

.hc2-groups,
.hc2-groups *,
.hc2-groups *::before,
.hc2-groups *::after {
    box-sizing: border-box;
}

.hc2-groups__container {
    width: 100%;
    max-width: 1540px;
    margin: 0 auto;
    padding: 0 16px;
}

.hc2-groups h1,
.hc2-groups h2,
.hc2-groups h3,
.hc2-groups p {
    margin: 0;
}

.hc2-groups a {
    text-decoration: none;
}

.hc2-groups img {
    display: block;
    max-width: 100%;
}


/* 2. ЗАГОЛОВОК СТРАНИЦЫ */

.hc2-groups__header {
    max-width: 850px;
    margin: 0 auto 36px;
    text-align: center;
}

.hc2-groups__eyebrow {
    display: block;
    margin-bottom: 12px;
    color: var(--hc2-blue);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.5;
    letter-spacing: 1.8px;
    text-transform: uppercase;
}

.hc2-groups__header h1 {
    color: var(--hc2-navy);
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.7px;
}

.hc2-groups__header h1::after {
    content: "";
    display: block;
    width: 48px;
    height: 3px;
    margin: 16px auto 0;
    background: var(--hc2-orange);
    border-radius: 3px;
}

.hc2-groups__header > p {
    margin-top: 20px;
    color: var(--hc2-text);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.8;
}


/* 3. СЕТКА КАРТОЧЕК */

.hc2-groups__cards {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    margin-bottom: 42px;
}

.hc2-groups__card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 12px 35px rgba(27, 69, 110, 0.045);
    transition: box-shadow 0.25s ease;
}

.hc2-groups__card:hover {
    box-shadow: 0 16px 42px rgba(27, 69, 110, 0.09);
}


/* 4. ВЕРХНЯЯ ЧАСТЬ КАРТОЧЕК */

.hc2-groups__card-content {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.hc2-groups__card--pink .hc2-groups__card-content {
    background: #fff0f4;
}

.hc2-groups__card--blue .hc2-groups__card-content {
    background: #e7f6ff;
}

/* Текстовая область */

.hc2-groups__card-text {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: none;
    padding: 26px 24px 22px;
}

.hc2-groups__card-text h2 {
    color: var(--hc2-navy);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.4px;
}

.hc2-groups__card-text h2::after {
    content: "";
    display: block;
    width: 38px;
    height: 2px;
    margin-top: 12px;
    background: var(--hc2-orange);
    border-radius: 2px;
}

.hc2-groups__age {
    margin-top: 12px !important;
    color: var(--hc2-orange);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.4;
}

.hc2-groups__card-description {
    max-width: 420px;
    margin-top: 14px !important;
    color: var(--hc2-text);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.7;
}

/* Фотография без обрезки на мобильных */

.hc2-groups__card-photo {
    position: relative;
    z-index: 1;
    top: auto;
    right: auto;
    width: 100%;
    height: auto;
    max-width: none;
    aspect-ratio: auto;
    object-fit: contain;
    object-position: center;
    border-radius: 0;
}


/* 5. ПРЕИМУЩЕСТВА ГРУПП */

.hc2-groups__card-features {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 12px;
    padding: 28px 20px 22px;
    background: #ffffff;
}

.hc2-groups__feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
    gap: 10px;
    text-align: center;
    color: var(--hc2-navy);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
}

.hc2-groups__feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    border-radius: 15px;
}

.hc2-groups__card--pink .hc2-groups__feature-icon {
    background: #fff0ec;
}

.hc2-groups__card--blue .hc2-groups__feature-icon {
    background: #edf8ff;
}

.hc2-groups__feature-icon img {
    display: block;
    width: 29px;
    height: 29px;
    object-fit: contain;
}

/* Цвет SVG-иконок */

.hc2-groups__card--pink .hc2-groups__feature-icon img {
    filter: brightness(0) saturate(100%)
        invert(41%) sepia(94%) saturate(3478%)
        hue-rotate(355deg) brightness(103%) contrast(103%);
}

.hc2-groups__card--blue .hc2-groups__feature-icon img {
    filter: brightness(0) saturate(100%)
        invert(56%) sepia(76%) saturate(2191%)
        hue-rotate(159deg) brightness(100%) contrast(100%);
}


/* 6. КНОПКИ */

.hc2-groups__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    width: 100%;
    min-height: 48px;
    padding: 12px 22px;
    border: 0;
    border-radius: 11px;
    background: var(--hc2-orange);
    color: #ffffff;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.hc2-groups__button:hover {
    background: #e94b09;
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-2px);
}

.hc2-groups__button:focus-visible {
    outline: 3px solid var(--hc2-navy);
    outline-offset: 4px;
}

.hc2-groups__button span {
    font-size: 19px;
    font-weight: 500;
    line-height: 1;
}

.hc2-groups__card > .hc2-groups__button {
    margin: auto 20px 26px;
    width: calc(100% - 40px);
}


/* 7. БЛОК РАСПИСАНИЯ */

.hc2-groups__schedule {
    padding: 36px 16px 40px;
    background: #ffffff;
    border-radius: 24px;
}

.hc2-groups__schedule-header {
    max-width: 760px;
    margin: 0 auto 32px;
    text-align: center;
}

.hc2-groups__schedule-header h2 {
    color: var(--hc2-navy);
    font-size: 28px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.5px;
}

.hc2-groups__schedule-header h2::after {
    content: "";
    display: block;
    width: 45px;
    height: 3px;
    margin: 15px auto 0;
    background: var(--hc2-orange);
    border-radius: 3px;
}

.hc2-groups__schedule-header p {
    margin-top: 18px;
    color: var(--hc2-text);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.8;
}


/* 8. СТРОКИ РАСПИСАНИЯ */

.hc2-groups__schedule-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hc2-groups__schedule-item {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    column-gap: 14px;
    row-gap: 12px;
    align-items: center;
    padding: 20px 16px;
    background: #ffffff;
    border: 1px solid var(--hc2-border);
    border-radius: 15px;
    box-shadow: 0 5px 18px rgba(22, 60, 99, 0.025);
}

.hc2-groups__time {
    grid-column: 1 / -1;
    display: block;
    color: var(--hc2-navy);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
    white-space: nowrap;
}

.hc2-groups__schedule-icon {
    grid-column: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
}

.hc2-groups__schedule-icon img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.hc2-groups__schedule-item h3 {
    grid-column: 2;
    min-width: 0;
    color: var(--hc2-navy);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.5;
}

.hc2-groups__schedule-item ul {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
    margin: 0;
    padding: 0 0 0 19px;
    list-style: disc;
}

.hc2-groups__schedule-item li {
    padding-left: 2px;
    color: var(--hc2-text);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.6;
}

.hc2-groups__schedule-item li::marker {
    color: var(--hc2-orange);
}


/* 9. НИЖНИЙ CTA */

.hc2-groups__cta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    margin-top: 32px;
    padding: 30px 24px;
    background: #ffffff;
    border: 1px solid var(--hc2-border);
    border-radius: 22px;
}

.hc2-groups__cta-content {
    min-width: 0;
}

.hc2-groups__cta-content h2 {
    color: var(--hc2-navy);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.35;
}

.hc2-groups__cta-content p {
    max-width: 640px;
    margin-top: 12px;
    color: var(--hc2-text);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.75;
}


/* 10. ОТ 600px
   Четыре преимущества в ряд */

@media (min-width: 600px) {

    .hc2-groups__card-features {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 12px;
        padding: 28px 20px 22px;
    }

    .hc2-groups__feature {
        font-size: 11px;
    }
}


/* 11. ПЛАНШЕТЫ ОТ 768px */

@media (min-width: 768px) {

    .hc2-groups {
        padding: 70px 0 90px;
    }

    .hc2-groups__container {
        padding: 0 28px;
    }

    .hc2-groups__header {
        margin-bottom: 46px;
    }

    .hc2-groups__header h1 {
        font-size: 42px;
    }

    .hc2-groups__header > p {
        font-size: 15px;
    }

    .hc2-groups__cards {
        gap: 28px;
        margin-bottom: 50px;
    }

    /* Текст и фото рядом */

    .hc2-groups__card-content {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 42%;
        min-height: 245px;
    }

    .hc2-groups__card-text {
        align-self: center;
        width: 100%;
        max-width: none;
        padding: 30px;
    }

    .hc2-groups__card-photo {
        position: relative;
        width: 100%;
        height: 100%;
        min-height: 245px;
        object-fit: cover;
        object-position: center 30%;
    }

    .hc2-groups__card-features {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 16px;
        padding: 28px 26px 24px;
    }

    .hc2-groups__card > .hc2-groups__button {
        width: fit-content;
        margin: auto 26px 28px;
    }

    .hc2-groups__schedule {
        padding: 46px 30px 50px;
    }

    .hc2-groups__schedule-header h2 {
        font-size: 34px;
    }

    .hc2-groups__schedule-item {
        grid-template-columns:
            112px
            48px
            minmax(150px, 0.85fr)
            minmax(0, 1.4fr);
        gap: 18px;
        padding: 22px 24px;
    }

    .hc2-groups__time {
        grid-column: 1;
    }

    .hc2-groups__schedule-icon {
        grid-column: 2;
    }

    .hc2-groups__schedule-item h3 {
        grid-column: 3;
    }

    .hc2-groups__schedule-item ul {
        grid-column: 4;
    }

    .hc2-groups__cta {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 30px;
        padding: 36px;
    }

    .hc2-groups__cta .hc2-groups__button {
        width: fit-content;
        flex-shrink: 0;
    }
}


/* 12. ДЕСКТОПЫ ОТ 1200px */

@media (min-width: 1200px) {

    .hc2-groups {
        padding: 85px 0 110px;
    }

    .hc2-groups__container {
        padding: 0 32px;
    }

    .hc2-groups__header {
        margin-bottom: 54px;
    }

    .hc2-groups__header h1 {
        font-size: 48px;
    }

    .hc2-groups__header > p {
        font-size: 16px;
    }

    .hc2-groups__cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 28px;
        align-items: stretch;
        margin-bottom: 54px;
    }

    .hc2-groups__card {
        border-radius: 26px;
    }

    .hc2-groups__card-content {
        grid-template-columns: minmax(0, 1fr) 40%;
        min-height: 270px;
    }

    .hc2-groups__card-text {
        padding: 28px 22px 28px 30px;
    }

    .hc2-groups__card-text h2 {
        font-size: 23px;
    }

    .hc2-groups__age {
        font-size: 18px;
    }

    .hc2-groups__card-description {
        font-size: 12px;
        line-height: 1.7;
    }

    .hc2-groups__card-photo {
        min-height: 270px;
        object-position: center 30%;
    }

    .hc2-groups__card-features {
        gap: 10px;
        padding: 28px 18px 24px;
    }

    .hc2-groups__feature {
        font-size: 11px;
    }

    .hc2-groups__feature-icon {
        width: 48px;
        height: 48px;
    }

    .hc2-groups__feature-icon img {
        width: 27px;
        height: 27px;
    }

    .hc2-groups__card > .hc2-groups__button {
        margin: auto 30px 30px;
    }

    .hc2-groups__schedule {
        padding: 54px 46px 60px;
        border-radius: 30px;
    }

    .hc2-groups__schedule-header {
        margin-bottom: 38px;
    }

    .hc2-groups__schedule-list {
        gap: 10px;
    }

    .hc2-groups__schedule-item {
        grid-template-columns:
            130px
            54px
            minmax(200px, 0.85fr)
            minmax(0, 1.4fr);
        gap: 22px;
        padding: 22px 30px;
        border-radius: 14px;
    }

    .hc2-groups__time {
        font-size: 14px;
    }

    .hc2-groups__schedule-icon {
        width: 54px;
        height: 54px;
    }

    .hc2-groups__schedule-icon img {
        width: 44px;
        height: 44px;
    }

    .hc2-groups__schedule-item h3 {
        font-size: 16px;
    }

    .hc2-groups__schedule-item li {
        font-size: 13px;
    }

    .hc2-groups__cta {
        margin-top: 40px;
        padding: 42px 48px;
    }

    .hc2-groups__cta-content h2 {
        font-size: 25px;
    }

    .hc2-groups__cta-content p {
        font-size: 14px;
    }
}


/* 13. БОЛЬШИЕ МОНИТОРЫ ОТ 1400px */

@media (min-width: 1400px) {

    .hc2-groups__header h1 {
        font-size: 52px;
    }

    .hc2-groups__cards {
        gap: 30px;
    }

    .hc2-groups__card-content {
        grid-template-columns: minmax(0, 1fr) 43%;
        min-height: 285px;
    }

    .hc2-groups__card-text {
        padding: 34px 24px 34px 36px;
    }

    .hc2-groups__card-text h2 {
        font-size: 25px;
    }

    .hc2-groups__age {
        font-size: 20px;
    }

    .hc2-groups__card-description {
        font-size: 13px;
        line-height: 1.75;
    }

    .hc2-groups__card-photo {
        min-height: 285px;
    }

    .hc2-groups__card-features {
        gap: 14px;
        padding: 30px 24px 26px;
    }

    .hc2-groups__feature {
        font-size: 12px;
    }

    .hc2-groups__feature-icon {
        width: 54px;
        height: 54px;
    }

    .hc2-groups__feature-icon img {
        width: 31px;
        height: 31px;
    }

    .hc2-groups__card > .hc2-groups__button {
        margin: auto 34px 32px;
    }

    .hc2-groups__schedule {
        padding: 60px 54px 66px;
    }

    .hc2-groups__schedule-header h2 {
        font-size: 38px;
    }

    .hc2-groups__schedule-header p {
        font-size: 15px;
    }

    .hc2-groups__schedule-item {
        grid-template-columns:
            145px
            60px
            minmax(220px, 0.85fr)
            minmax(0, 1.4fr);
        gap: 26px;
        padding: 24px 34px;
    }

    .hc2-groups__time {
        font-size: 15px;
    }

    .hc2-groups__schedule-item h3 {
        font-size: 17px;
    }

    .hc2-groups__schedule-item li {
        font-size: 14px;
        line-height: 1.65;
    }

    .hc2-groups__cta-content h2 {
        font-size: 28px;
    }
}


/* 14. ОЧЕНЬ БОЛЬШИЕ МОНИТОРЫ ОТ 1600px */

@media (min-width: 1600px) {

    .hc2-groups__card-content {
        grid-template-columns: minmax(0, 1fr) 44%;
        min-height: 305px;
    }

    .hc2-groups__card-text {
        padding: 40px;
    }

    .hc2-groups__card-text h2 {
        font-size: 27px;
    }

    .hc2-groups__card-description {
        font-size: 14px;
    }

    .hc2-groups__card-photo {
        min-height: 305px;
    }

    .hc2-groups__feature {
        font-size: 13px;
    }

    .hc2-groups__schedule-item li {
        font-size: 15px;
    }
}


/* 15. УМЕНЬШЕНИЕ АНИМАЦИЙ */

@media (prefers-reduced-motion: reduce) {

    .hc2-groups__card,
    .hc2-groups__button {
        transition: none;
    }

    .hc2-groups__button:hover {
        transform: none;
    }
}


/* Фотографии групп: мобильные устройства 360–767px */

@media (max-width: 767px) {

    .hc2-groups__card-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding-bottom: 24px;
    }

    .hc2-groups__card-text {
        align-self: stretch;
    }

    .hc2-groups__card-photo {
        display: block;
        position: relative;
        width: min(300px, calc(100% - 32px));
        max-width: 300px;
        height: auto;
        margin: 0 auto;
        object-fit: contain;
        object-position: center;
    }
}
    .hc2-groups__card-photo {
        border-radius: 20px;
    }

@media (min-width: 1200px) {
    .hc2-groups__card-description {
        font-size: 16px;
        line-height: 1.5;
    }
	.hc2-groups__feature {
        font-size: 14px;
    }
	
	.hc2-groups__eyebrow {
		display: none;
	}
	.hc2-groups__schedule-header p {
		font-size: 16px;
	}
	.hc2-groups__card > .hc2-groups__button {
        margin: 20px;
        width: 400px;
        font-size: 18px;
    }
	
	.hc2-groups__card .hc2-groups__button {
		margin: 10px auto 20px;
	}
	
	.hc2-groups img {
		height: 300px;
	}
}

@media (min-width: 1400px) {
	.hc2-groups__button {
		width: 400px;
		font-size: 18px;
	}
}
