/* ==================== HOMES PAGE SPECIFIC STYLES ==================== */

/* Hero Section - Homes Page */
.hero-homes {
    width: 100%;
    height: 100vh;
    min-height: 67.7rem;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}


@media screen and (max-width: 600px) {
    .moodmoon-page-content > section {
        margin-bottom: 60px;
    }

    .moodmoon-page-content > section:last-child {
        margin-bottom: 0;
    }
}

.hero-homes__bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.hero-homes__bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-homes__container {
    max-width: 117rem;
    margin: 0 auto;
    padding: 4rem 0 6rem;
    position: relative;
    z-index: 1;
}

.hero-homes__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.hero-homes__title {
    font-size: 6rem;
    font-weight: 600;
    line-height: 1.15em;
    color: var(--color-white);
    text-align: center;
    white-space: pre-line;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.hero-homes__title_tablet,
.hero-homes__title_mobile {
    display: none;
    font-weight: 600;
    line-height: 1.15em;
    color: var(--color-white);
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    white-space: pre-line;
}

/* About Section - Homes Page */
.about-homes {
    width: 100%;
    background-color: var(--color-white);
}

.about-homes__container {
    max-width: 117rem;
    margin: 0 auto;
    padding: clamp(5.5rem, 7.64vw, 11rem) 0 clamp(3rem, 3.82vw, 5.5rem);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.about-homes__content {
    width: 100%;
    max-width: 90.2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-16);
}

.about-homes__text {
    text-align: center;
    white-space: pre-line;
}

.about-homes__text--main,
.about-homes__text--main_mobile,
.about-homes__text--tablet {
    font-size: clamp(2rem, 2.22vw, 3.2rem);
    font-weight: 500;
    line-height: var(--line-height-normal);
    text-transform: uppercase;
    color: var(--color-text-primary);
    white-space: pre-line;
}

.about-homes__text--secondary,
.about-homes__text--secondary_mobile {
    font-size: clamp(1.4rem, 1.39vw, 2rem);
    font-weight: 500;
    line-height: var(--line-height-normal);
    color: var(--color-text-secondary);
    max-width: 62.4rem;
    width: 100%;
}

.about-homes__text--main_mobile,
.about-homes__text--secondary_mobile,
.about-homes__text--tablet {
    display: none;
}

.about-homes__gallery {
    width: 100%;
    max-width: 117rem;
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: flex-start;
    gap: 8.8rem;
    padding: 0;
    box-sizing: border-box;
}

.about-homes__gallery-image {
    object-fit: cover;
    border-radius: var(--radius-10);
    flex-shrink: 1;
    min-width: 0;
    transition: width 0.3s ease;
}

.about-homes__gallery-image--large {
    width: 68.2rem;
    max-width: 100%;
    aspect-ratio: 682 / 471;
}

.about-homes__gallery-image--small {
    width: 40rem;
    max-width: 100%;
    aspect-ratio: 1 / 1;
}

/* Know How Section */
.knowhow {
    width: 100%;
    background-color: var(--color-white);
    overflow: hidden;
}

/* Скрытие контента ниже knowhow до пролистывания всех слайдов */
/* Исключаем модальное окно, чтобы кнопка "Оставить заявку" работала всегда */
@media screen and (min-width: 600px) {
    body.knowhow-lock .knowhow ~ *:not(.modal) {
        pointer-events: none;
        opacity: 0;
        transition: opacity 0.4s ease;
    }

    .knowhow ~ *:not(.modal) {
        transition: opacity 0.4s ease;
    }
}

body.knowhow-lock .knowhow {
    position: relative;
    z-index: 10;
}

.knowhow__header {
    max-width: 117rem;
    margin: 0 auto;
    padding: clamp(3rem, 3.82vw, 5.5rem) 0 2.4rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-10);
}

.knowhow__title,
.knowhow__title_mobile {
    font-size: clamp(3.2rem, 4.44vw, 6.4rem);
    font-weight: 500;
    line-height: 1.03em;
    text-transform: uppercase;
    color: var(--color-text-primary);
    white-space: pre-line;
    max-width: 84.4rem;
    width: 100%;
}

.knowhow__title_mobile {
    display: none;
}

.knowhow__description,
.knowhow__description_mobile {
    font-size: var(--font-size-20);
    font-weight: 500;
    line-height: var(--line-height-normal);
    color: var(--color-text-primary);
    max-width: 43rem;
    width: 100%;
    text-align: left;
    align-self: flex-start;
    margin-left: calc((84.4rem - 43rem) / 2);
    white-space: pre-line;
}

.knowhow__description_mobile {
    display: none;
}

.knowhow__gallery {
    max-width: 117rem;
    margin: 0 auto;
    padding: 0 0 clamp(3rem, 3.82vw, 5.5rem);
    position: relative;
    overflow: visible;
}

.knowhow__gallery-track {
    display: flex;
    gap: 2rem;
    transition: transform 0.5s ease-out;
    touch-action: pan-y pinch-zoom;
    will-change: transform;
}

.knowhow__gallery-image {
    flex: 0 0 100%;
    width: 100%;
    height: 65.7rem;
    object-fit: cover;
    border-radius: var(--radius-10);
    user-select: none;
    -webkit-user-drag: none;
}

.knowhow__dots {
    display: none;
}

.knowhow__dot {
    width: 0.8rem;
    height: 0.8rem;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
}

.knowhow__dot--active {
    width: 2.4rem;
    border-radius: 0.4rem;
    background-color: #535353;
}

/* Equipment Section - Homes Page */
.equipment-homes {
    width: 100%;
    background-color: var(--color-white);
}

.equipment-homes__container {
    max-width: 117rem;
    margin: 0 auto;
    padding: clamp(3rem, 3.82vw, 5.5rem) 0 clamp(2rem, 2.22vw, 3.2rem);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(2rem, 2.22vw, 3.2rem);
}

.equipment-homes__content {
    width: 100%;
    max-width: 67.8rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-16);
}

.equipment-homes__title {
    font-size: clamp(2rem, 2.22vw, 3.2rem);
    font-weight: 700;
    line-height: var(--line-height-normal);
    text-transform: uppercase;
    color: var(--color-text-primary);
    text-align: center;
    white-space: pre-line;
}

.equipment-homes__description,
.equipment-homes__description_mobile {
    font-size: clamp(1.4rem, 1.39vw, 2rem);
    font-weight: 500;
    line-height: var(--line-height-normal);
    color: var(--color-text-secondary);
    text-align: center;
    white-space: pre-line;
}

.equipment-homes__description_mobile {
    display: none;
}

.equipment-homes__gallery {
    width: 100%;
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: clamp(1rem, 1.5vw, 2rem);
}

.equipment-homes__gallery-image {
    flex: 0 0 calc(25% - clamp(0.75rem, 1.125vw, 1.5rem));
    width: calc(25% - clamp(0.75rem, 1.125vw, 1.5rem));
    height: auto;
    object-fit: contain;
}

/* Equipment Logos Strip inside equipment-homes */
.equipment-homes__logos {
    width: 100%;
    overflow: hidden;
    margin-top: clamp(2rem, 3vw, 4rem);
    position: relative;
}

.equipment-homes__logos-strip {
    display: flex;
    align-items: center;
    gap: 3.6rem;
    flex-wrap: nowrap;
    animation: scrollLogos 40s linear infinite;
    will-change: transform;
    height: clamp(2rem, 3vw, 5rem);
}

@keyframes scrollLogos {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.equipment-homes__logos-logo {
    height: 100%;
    max-height: clamp(2rem, 3vw, 5rem);
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
    display: block;
}

.equipment-homes__logos-logo--small {
    max-height: clamp(1.4rem, 2.1vw, 3.5rem);
}

/* Equipment Logos Strip (old section - hidden) */
.equipment-logos {
    display: none;
}

/* Scenarios Section - Homes Page */
.scenarios-homes {
    width: 100%;
    background-color: var(--color-white);
}

.scenarios-homes__container {
    max-width: 117rem;
    margin: 0 auto;
    padding: clamp(5.5rem, 7.64vw, 11rem) 0 clamp(3rem, 3.82vw, 5.5rem);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(2rem, 2.22vw, 3.2rem);
}

.scenarios-homes__header {
    width: 100%;
    max-width: 72.2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-16);
}

.scenarios-homes__title {
    font-size: clamp(2.4rem, 2.78vw, 4rem);
    font-weight: 700;
    line-height: var(--line-height-normal);
    text-transform: uppercase;
    color: var(--color-text-primary);
    text-align: center;
}

.scenarios-homes__description,
.scenarios-homes__description_mobile {
    font-size: clamp(1.4rem, 1.39vw, 2rem);
    font-weight: 500;
    line-height: var(--line-height-normal);
    color: var(--color-text-secondary);
    text-align: center;
    white-space: pre-line;
}

.scenarios-homes__description_mobile {
    display: none;
}

.scenarios-homes__gallery {
    display: flex;
    justify-content: center;
    gap: clamp(2rem, 2.22vw, 3.2rem);
    width: 100%;
    max-width: 117rem;
}

.scenarios-homes__item {
    flex: 1 1 28rem;
    min-width: 25rem;
    max-width: 36.8rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-16);
}

.scenarios-homes__image {
    width: 100%;
    aspect-ratio: 368 / 421;
    object-fit: cover;
    border-radius: var(--radius-10);
}

.scenarios-homes__label {
    display: flex;
    align-items: center;
    gap: var(--spacing-8);
}

.scenarios-homes__label-text {
    font-size: var(--font-size-20);
    font-weight: 600;
    line-height: var(--line-height-normal);
    color: var(--color-black);
}

/* ==================== RESPONSIVE - DESKTOP (больше 1200px) ==================== */
@media screen and (min-width: 1201px) {
    .about-homes__gallery {
        padding: 0;
    }
}

/* ==================== RESPONSIVE - TABLET ==================== */
@media screen and (max-width: 1200px) {
    /* Только padding меняется, размеры контента остаются фиксированными */
    /* Боковые отступы для контейнеров */
    .hero-homes__container,
    .about-homes__container,
    .knowhow__container,
    .knowhow__header,
    .knowhow__gallery,
    .knowhow__gallery-container,
    .equipment-homes__container,
    .scenarios-homes__container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

/* Плавное уменьшение картинок от 1200px до 600px */
@media screen and (max-width: 1200px) and (min-width: 601px) {
    .about-homes__gallery {
        flex-wrap: nowrap;
        gap: calc(2rem + (8.8rem - 2rem) * ((100vw - 600px) / 600));
        padding: 0;
    }

    .about-homes__gallery-image--large {
        width: calc(34.1rem + (68.2rem - 34.1rem) * ((100vw - 600px) / 600));
    }

    .about-homes__gallery-image--small {
        width: calc(20rem + (40rem - 20rem) * ((100vw - 600px) / 600));
    }
}

/* Tablet версия текста от 600px до 1025px */
@media screen and (min-width: 601px) and (max-width: 1025px) {
    .about-homes__text--main {
        display: none !important;
    }

    .about-homes__text--tablet {
        display: block !important;
    }
}

/* Tablet версия title от 600px до 1200px */
@media screen and (min-width: 601px) and (max-width: 1200px) {
    .hero-homes__title {
        display: none;
    }

    .hero-homes__title_tablet {
        display: block;
        font-size: clamp(3.6rem, 4.44vw, 6rem);
        text-align: center;
    }
}

/* ==================== RESPONSIVE - MOBILE ==================== */
@media screen and (max-width: 600px) {
    .hero-homes {
        height: 100vh;
        height: 100dvh; /* dynamic viewport height для мобильных */
        min-height: 50rem;
    }

    .hero-homes__title,
    .hero-homes__title_tablet {
        display: none;
    }

    .hero-homes__title_mobile {
        display: block;
        font-size: 2.4rem;
        text-align: left;
    }

    .hero-homes__content {
        align-items: flex-start;
        width: 100%;
    }

    .hero-homes__content .button {
        align-self: flex-start;
    }

    .hero-homes__container {
        padding: 4rem 1.5rem 4rem 0;
        margin-left: 0;
        margin-right: auto;
        max-width: 100%;
    }

    .hero-homes__container,
    .about-homes__container,
    .knowhow__container,
    .equipment-homes__container,
    .scenarios-homes__container,
    .stages__container,
    .benefits__container {
        padding: 1.5rem 1.5rem 3rem 1.5rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 3rem;
    }

    .about-homes__text--main,
    .about-homes__text--secondary {
        display: none !important;
    }

    .about-homes__text--main_mobile,
    .about-homes__text--secondary_mobile {
        display: block !important;
    }

    .about-homes__text,
    .about-homes__text--main_mobile,
    .about-homes__text--secondary_mobile {
        text-align: left;
    }

    .about-homes__content {
        align-items: flex-start;
    }

    .about-homes__gallery {
        flex-wrap: wrap;
        flex-direction: column;
        gap: 2rem;
        align-items: center;
        padding: 0;
    }

    .about-homes__gallery-image--large,
    .about-homes__gallery-image--small {
        width: 100%;
        max-width: none;
        aspect-ratio: 1 / 1;
    }

    .knowhow__header {
        padding: 1.5rem 1.5rem 2rem;
    }

    .knowhow__title {
        display: none !important;
    }

    .knowhow__title_mobile {
        display: block !important;
        font-size: 2.4rem;
    }

    .knowhow__description {
        display: none !important;
    }

    .knowhow__description_mobile {
        display: block !important;
        font-size: 1.8rem;
        margin-left: 0;
        text-align: left;
    }

    .knowhow__gallery {
        padding: 0 1.5rem 3rem;
        overflow: visible;
    }

    .knowhow__gallery-track {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }

    .knowhow__gallery-image {
        width: 100%;
        aspect-ratio: 330 / 185;
        height: auto;
        flex: none;
    }

    .knowhow__dots {
        display: none;
    }

    .equipment-homes__description {
        display: none !important;
    }

    .equipment-homes__description_mobile {
        display: block !important;
    }

    .equipment-homes__content {
        align-items: flex-start;
    }

    .equipment-homes__title,
    .equipment-homes__description_mobile {
        text-align: left;
    }

    .equipment-homes__gallery {
        overflow: hidden;
        position: relative;
    }

    .equipment-homes__gallery-slider {
        width: 100%;
        overflow: hidden;
        position: relative;
    }

    .equipment-homes__gallery-slider-wrapper {
        display: flex;
        align-items: center;
        transition: transform 0.5s ease-in-out;
        width: 400%;
    }

    .equipment-homes__gallery-slide {
        width: 25%;
        flex-shrink: 0;
        height: auto;
    }

    .equipment-homes__gallery-slide img {
        width: 100%;
        height: auto;
        object-fit: contain;
        display: block;
    }

    .equipment-homes__gallery-image {
        display: none;
    }

    .equipment-homes__logos {
        margin-top: 2rem;
    }

    .equipment-homes__logos-strip {
        gap: 2.4rem;
    }

    .equipment-homes__logos-logo {
        height: 100%;
        max-height: 2rem;
    }

    .equipment-homes__logos-logo--small {
        max-height: 1.4rem;
    }

    .scenarios-homes__description {
        display: none !important;
    }

    .scenarios-homes__description_mobile {
        display: block !important;
    }

    .scenarios-homes__header {
        align-items: flex-start;
    }

    .scenarios-homes__title,
    .scenarios-homes__description_mobile {
        text-align: left;
    }

    .scenarios-homes__gallery {
        flex-direction: column;
        align-items: center;
        gap: 3rem;
    }

    .scenarios-homes__item {
        max-width: none;
        width: 100%;
    }

    .scenarios-homes__label {
        justify-content: flex-start;
        width: 100%;
        padding-left: var(--spacing-16);
    }

    .pricing__title {
        font-size: clamp(2rem, 2.22vw, 3.2rem);
    }

    .pricing__text_mobile {
        font-size: 1.8rem;
    }
    
    .benefits__gallery {
        margin-left: 0;
        width: 100%;
        order: 2;
        gap: 2rem;
    }

    .benefits__gallery-item {
        width: 100%;
        display: flex;
        align-items: center;
        gap: 1.2rem;
    }

    .benefits__gallery-image {
        flex: 0 0 50%;
        width: 50%;
        height: auto;
        aspect-ratio: 1;
        object-fit: cover;
    }

    .benefits__gallery-text {
        flex: 0 0 50%;
        width: 50%;
        text-align: left;
        font-size: 1.6rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .pricing__price {
        font-size: 1.8rem;
    }

    .scenarios__title,
    .equipment__description_mobile,
    .scenarios__description_mobile,
    .equipment__description,
    .stages__title_mobile {
        text-align: left !important;
    }

    .about__content,
    .stages__header {
        align-items: baseline;
    }

    .modal__subtitle_mobile,
    .modal__privacy_mobile {
        white-space: pre-line;
    }
}


