/* ===== Хедер ===== */
.header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
}

.header__nav {
    max-width: 1260px;
    margin: 0px auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 40px 20px 33px;
    box-sizing: border-box;
    border-bottom: solid 1px rgba(0, 0, 0, 0.30);
}

.header__menu {
    display: flex;
    gap: 36px;
}

.header__menu a {
    font-size: 16px;
    font-weight: 400;
    line-height: 22px;
    font-family: "Manrope", sans-serif;
    color: #000;
    transition: opacity var(--transition);
}

.header__menu a:hover {
    opacity: 0.7;
}

.header__logo {
    font-family: "Inter", sans-serif;
    font-size: 34px;
    font-weight: 400;
    letter-spacing: 5.44px;
    line-height: 25px;
    color: #000;
}

.header__phone {
    display: flex;
    align-items: center;
    gap: 9px;
}

.header__phone-icon {
    flex-shrink: 0;
}

.header__phone a {
    font-size: 18px;
    font-weight: 400;
    font-family: "Manrope", sans-serif;
    line-height: 25px;
    color: #000;
    transition: opacity var(--transition);
}

.header__phone a:hover {
    opacity: 0.7;
}

/* ===== Hero ===== */
.hero {
    position: relative;
    width: 100%;
    min-height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background-color: #E8E8EA;
}

.hero__content {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 1260px;
    flex-grow: 1;
    margin: 100px auto 0px;
    padding: 0 20px;
    box-sizing: border-box;

    background: url('../../images/hero-bg.png');
    background-position: 55% center;
    background-repeat: no-repeat;
    background-size: contain;
}

.hero__left {
    min-width: 470px;
    padding: 90px 0px 50px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hero__left-top {
    display: flex;
    flex-direction: column;
    gap: 20px;
    font-style: 0;
}

.hero__left-top1 {
    display: flex;
    flex-direction: column;
}

.hero__left-top1-text1 {
    color: #000;
    font-family: "Evolventa", sans-serif;
    font-size: 38px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
}

.hero__left-top1-text2 {
    color: #229DA4;
    font-family: "Evolventa", sans-serif;
    font-size: 38px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
}

.hero__left-top2 {
    display: flex;
    flex-direction: column;
}

.hero__left-top2-text {
    color: #000;
    font-family: "Manrope", sans-serif;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 140%;
}

.hero__left-bot {
    padding-top: 18px;
    border-top: 1px solid rgba(0, 0, 0, 0.30);
    display: flex;
    flex-direction: column;
    font-style: 0;
}

.hero__left-bot-text1 {
    color: #000;
    font-family: "Manrope", sans-serif;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 150%;
}

.hero__left-bot-text2 {
    color: #000;
    font-family: "Manrope", sans-serif;
    font-size: 24px;
    font-style: normal;
    font-weight: 400;
    line-height: 150%;
}

.hero__right {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 292px;
    padding: 90px 0px 50px;
}

.hero__comment {
    padding: 18px 18px 30px 18px;
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    border: 1px solid #DEDEDE;
    background: rgba(255, 255, 255, 0.10);
}

.hero__comment-text1 {
    margin-top: 20px;
    color: #000;
    font-family: "Evolventa", sans-serif;
    font-size: 22px;
    font-style: normal;
    font-weight: 400;
    line-height: 140%;
}

.hero__comment-text2 {
    margin-top: 9px;
    color: #000;
    font-family: "Manrope", sans-serif;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 150%;
}

.hero__button {
    width: 292px;
    height: 60px;
    color: #FFF;
    font-family: "Manrope", sans-serif;
    font-size: 16px;
    font-style: normal;
    font-weight: 600;
    line-height: 150%;
}

/* ===== Адаптив ===== */
@media (max-width: 1023px) {
    .hero__content {
        flex-direction: column;
        margin-top: 80px;
    }

    .hero__left {
        display: contents;
    }

    .hero__left-top {
        order: 1;
        padding-top: 40px;
    }

    .hero__right {
        order: 2;
        padding: 30px 0;
    }

    .hero__left-bot {
        order: 3;
        padding-bottom: 30px;
    }
}

/* ===== Hide mobile-only elements on desktop ===== */
.header__burger,
.hero__title-mobile,
.hero__image-area,
.mobile-menu {
    display: none;
}

@media (max-width: 767px) {

    /* --- Header mobile --- */
    .header {
        position: relative;
        background: #eff0f5;
    }

    .header__nav {
        padding: 14px 16px;
        border-bottom: none;
    }

    .header__menu,
    .header__phone {
        display: none;
    }

    .header__logo {
        font-size: 28px;
        letter-spacing: 4.48px;
        order: -1;
    }

    .header__burger {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        background: none;
        border: none;
        padding: 0;
        cursor: pointer;
        border-radius: 0;
    }

    .header__burger::before {
        display: none;
    }

    /* --- Hero mobile --- */
    .hero {
        min-height: calc(100vh - 72px);
        background: none;
        display: flex;
        flex-direction: column;
    }

    .hero__content {
        display: none;
    }

    .hero__title-mobile {
        background-color: #FFFFFF;
        display: block;
        padding: 15px 16px;
        font-family: "Evolventa", sans-serif;
        font-size: clamp(22px, 7.4vw, 29px);
        font-weight: 400;
        line-height: normal;
        color: #000;
    }

    .hero__title-mobile_teal {
        color: #229DA4;
    }

    .hero__image-area {
        display: block;
        position: relative;
        width: 100%;
        flex: 1;
        min-height: 0;
        overflow: hidden;

        background: url('../../images/hero-bg.png');
        background-position-x: right;
        background-position-y: bottom;
        background-repeat: no-repeat;
        background-size: 110%;
        background-color: #E8E8EA;
    }

    /* --- Rating badge --- */
    .hero__rating {
        position: absolute;
        top: 24px;
        left: 20px;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
    }

    .hero__rating-top {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .hero__rating-score {
        font-family: "Manrope", sans-serif;
        font-size: 32px;
        font-weight: 600;
        color: rgba(0, 0, 0, 0.9);
        letter-spacing: -3.52px;
        line-height: 1;
        font-feature-settings: 'lnum', 'pnum';
    }

    .hero__rating-bottom {
        display: flex;
        flex-direction: column;
        gap: 2px;
    }

    .hero__rating-count {
        font-family: "Manrope", sans-serif;
        font-size: 12px;
        font-weight: 400;
        color: rgba(0, 0, 0, 0.7);
    }

    /* --- Glass card overlay --- */
    .hero__mobile-card {
        position: absolute;
        bottom: 16px;
        left: 16px;
        right: 16px;
        background: rgba(255, 255, 255, 0.39);
        backdrop-filter: blur(10.65px);
        -webkit-backdrop-filter: blur(10.65px);
        border-radius: 20px;
        padding: 16px 12px 12px;
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .hero__mobile-card-text {
        font-family: "Manrope", sans-serif;
        font-size: 18px;
        font-weight: 400;
        line-height: 140%;
        color: #000;
    }

    .hero__mobile-button {
        width: 100%;
        height: 60px;
        background: #20C6D0;
        border-radius: 12px;
        color: #fff;
        font-family: "Manrope", sans-serif;
        font-size: 16px;
        font-weight: 600;
        line-height: 150%;
    }

    /* ===== Mobile menu ===== */
    .mobile-menu {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 200;
        pointer-events: none;
        visibility: hidden;
    }

    .mobile-menu_open {
        pointer-events: auto;
        visibility: visible;
    }

    /* Overlay */
    .mobile-menu__overlay {
        position: absolute;
        inset: 0;
        background: rgba(0, 0, 0, 0);
        transition: background 0.35s ease;
    }

    .mobile-menu_open .mobile-menu__overlay {
        background: rgba(0, 0, 0, 0.3);
    }

    /* Panel */
    .mobile-menu__panel {
        position: absolute;
        top: 0;
        right: 0;
        width: 85vw;
        height: 100%;
        padding: 16px 26px 30px;
        box-sizing: border-box;
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(7.7px);
        -webkit-backdrop-filter: blur(7.7px);
        border-radius: 30px 0 0 30px;
        box-shadow: 0px 7px 25px 0px rgba(0, 37, 125, 0.08);
        display: flex;
        flex-direction: column;
        gap: 40px;
        align-items: flex-end;
        transform: translateX(100%);
        transition: transform 0.35s ease;
    }

    .mobile-menu_open .mobile-menu__panel {
        transform: translateX(0);
    }

    /* Close button */
    .mobile-menu__close {
        width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        padding: 0;
        cursor: pointer;
    }

    .mobile-menu__close::before {
        display: none;
    }

    /* Navigation */
    .mobile-menu__nav {
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    .mobile-menu__link {
        display: flex;
        align-items: center;
        height: 80px;
        padding: 0 9px;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
        font-family: "Manrope", sans-serif;
        font-size: 20px;
        font-weight: 400;
        color: #000;
        text-decoration: none;
        font-feature-settings: 'lnum', 'pnum';
    }

    .mobile-menu__link:active {
        color: #229DA4;
        font-weight: 500;
    }

    /* Lock body scroll when menu is open */
    body.menu-open {
        overflow: hidden;
    }
}

/* ===== Hero mobile modal ===== */
.hero-modal {
    display: none;
}

@media (max-width: 767px) {
    .hero-modal {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 300;
        pointer-events: none;
        visibility: hidden;
        opacity: 0;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    .hero-modal_open {
        pointer-events: auto;
        visibility: visible;
        opacity: 1;
    }

    .hero-modal__overlay {
        position: absolute;
        inset: 0;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
    }

    .hero-modal__close {
        position: absolute;
        top: 27px;
        right: 18px;
        width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        padding: 0;
        cursor: pointer;
        z-index: 1;
    }

    .hero-modal__close::before {
        display: none;
    }

    .hero-modal__card {
        position: absolute;
        top: 50%;
        left: 15px;
        right: 15px;
        transform: translateY(-50%);
        background: #fff;
        border-radius: 20px;
        padding: 20px 16px;
        box-shadow: 0px 3px 16px 0px rgba(0, 0, 0, 0.08);
        display: flex;
        flex-direction: column;
        gap: 27px;
    }

    .hero-modal__title {
        font-family: "Evolventa", sans-serif;
        font-size: 20px;
        font-weight: 400;
        line-height: 1.5;
        color: #000;
    }

    .hero-modal__title_accent {
        color: #229DA4;
    }

    .hero-modal__fields {
        display: flex;
        flex-direction: column;
        gap: 44px;
    }

    .hero-modal__inputs {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .hero-modal__input {
        width: 100%;
        border: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.5);
        padding: 10px;
        font-family: "Manrope", sans-serif;
        font-size: 16px;
        font-weight: 400;
        line-height: 1.5;
        color: #000;
        background: transparent;
        outline: none;
        box-sizing: border-box;
    }

    .hero-modal__input::placeholder {
        color: rgba(0, 0, 0, 0.5);
    }

    .hero-modal__input-group {
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    .hero-modal__error {
        display: none;
        padding: 0 11px;
        font-family: "Manrope", sans-serif;
        font-size: 14px;
        font-weight: 400;
        line-height: 1.5;
        color: #FF2600;
    }

    .hero-modal__input-group_invalid .hero-modal__input {
        border-bottom-color: #FF2600;
        color: #FF2600;
    }

    .hero-modal__input-group_invalid .hero-modal__error {
        display: block;
    }

    .hero-modal__submit-group {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .hero-modal__button {
        width: 100%;
        height: 50px;
        background: #20C6D0;
        border: none;
        border-radius: 12px;
        font-family: "Manrope", sans-serif;
        font-size: 16px;
        font-weight: 500;
        line-height: 1.5;
        color: #fff;
        cursor: pointer;
    }

    .hero-modal__privacy {
        font-family: "Manrope", sans-serif;
        font-size: 14px;
        font-weight: 400;
        line-height: 1.5;
        color: #3B3B3B;
    }

    .hero-modal__privacy-link {
        color: #229DA4;
        text-decoration: none;
    }

    body.modal-open {
        overflow: hidden;
    }
}