/* Hero: app/themes/proxymo/views/page/investtur/templates/parts/_hero.html.erb */

.visually_hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.hero_section {
    display: flex;
    position: relative;
    z-index: 1;
    width: 100%;
    height: calc(100vh - 104px - 150px);
    min-height: 664px;
    max-height: 690px;
    margin-bottom: 80px;
    overflow: hidden;
}

.hero_section_inner {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero_section_photo {
    width: 50vw;
    height: 100%;
    min-height: 664px;
    position: absolute;
    left: 0;
    top: 0;
    z-index: 0;
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    border-bottom-right-radius: 100px;
}

.hero_section_photo.invisible {
    visibility: hidden;
}

.hero_section_photo.hero_photo_slide_in {
    visibility: visible;
    animation-name: hero_photo_slide_in;
    animation-duration: 1.5s;
    animation-fill-mode: both;
}

@keyframes hero_photo_slide_in {
    0% {
        left: -50vw;
        opacity: 0;
    }

    80% {
        opacity: 0.7;
    }

    100% {
        left: 0;
        opacity: 1;
    }
}

.hero_section_info {
    width: calc(50% - 100px);
    height: 100%;
    min-height: 664px;
    margin-left: calc(50% + 100px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-bottom: 145px;
    box-sizing: border-box;
}

.hero_section_title {
    max-width: 560px;
    font-size: 56px;
    font-weight: 700;
    line-height: 1.29;
    letter-spacing: 0.5px;
    color: #474f55;
    margin: 50px 0;
}

.hero_section_title > span.hero_color_title {
    color: var(--primary-color);
}

.hero_section_title.invisible {
    visibility: hidden;
}

.hero_section_title.animate__fade_in {
    visibility: visible;
    animation-duration: 1s;
    animation-fill-mode: both;
    animation-name: hero_fade_in;
}

@keyframes hero_fade_in {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

.hero_section_stats {
    width: 100%;
    max-width: 620px;
}

.hero_section_stats_item {
    width: calc(50% - 16px);
    display: inline-block;
    vertical-align: middle;
    padding-left: 52px;
    margin-bottom: 40px;
    font-family: var(--site-font-family);
    font-size: 14px;
    line-height: 1.35;
    position: relative;
    color: #474f55;
    box-sizing: border-box;
}

.hero_section_stats_item:nth-child(2n+1) {
    margin-right: 26px;
}

.hero_section_stats_item.invisible {
    visibility: hidden;
}

.hero_section_stats_item.animate__fade_in {
    visibility: visible;
    animation-duration: 1s;
    animation-fill-mode: both;
    animation-name: hero_fade_in;
}

.hero_section_stats_icon {
    width: 40px;
    height: 40px;
    position: absolute;
    left: 0;
    top: calc(50% - 20px);
    border-radius: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    box-shadow: 0 8px 24px color-mix(in srgb, var(--primary-color) 22%, transparent);
}

.hero_section_stats_icon img {
    display: block;
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.content.top_form {
    margin: 0 auto 90px!important;
}

/* ── CTA button block ────────────────────────────────────────── */

/*
 * Без кнопки: .hero_section_info — flex-column + justify-content: center
 *   → title и stats центрируются вместе как единый блок.
 *
 * С кнопкой (.has_cta):
 *   Компенсируем высоту кнопки за счёт уменьшения margins у тайтла.
 *   Суммарная высота блока над stats остаётся ~172px, flex-центрирование
 *   не двигает stats. Тайтл смещается вверх внутри блока.
 *
 *   Без кнопки: 50(margin-top) + 72(title) + 50(margin-bottom) = 172px
 *   С кнопкой:   6(margin-top) + 72(title) +  6(margin-bottom) + 88(cta) = 172px ✓
 */

.hero_section_info.has_cta .hero_section_title {
    margin-top: 6px;
    margin-bottom: 6px;
}

.hero_section_cta {
    width: 100%;
    max-width: 560px;
    margin-top: 16px;
    margin-bottom: 24px;
}

.hero_section_cta_btn {
    display: inline-block;
    padding: 14px 32px;
    font-family: var(--site-font-family);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.25;
    text-decoration: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 8px 24px color-mix(in srgb, var(--primary-color) 30%, transparent);
    transition: opacity 0.2s;
}

.hero_section_cta_btn:hover {
    opacity: 0.85;
}

.hero_section_cta.invisible {
    visibility: hidden;
}

.hero_section_cta.animate__fade_in {
    visibility: visible;
    animation-duration: 1s;
    animation-fill-mode: both;
    animation-name: hero_fade_in;
}
/* ─────────────────────────────────────────────────────────────── */

@media all and (max-width: 1200px) {
    .hero_section_info {
        width: calc(50% - 40px);
        margin-left: calc(50% + 40px);
    }

    .hero_section_title {
        font-size: 43px;
    }
}

@media all and (min-width: 769px) {
    .hero_section {
        background: transparent;
    }
}

@media all and (max-width: 768px) {
    .hero_section_stats,
    .hero_section_photo {
        display: none;
    }

    .hero_section {
        min-width: 0;
        height: unset;
        min-height: 100px;
        margin-bottom: 32px;
        background: linear-gradient(to bottom, rgba(247, 247, 247, 0.9), rgba(216, 216, 216, 0)),
            url("../images/hero/hero_bg.webp") no-repeat center center / cover;
    }

    .hero_section_info {
        width: 100%;
        height: auto;
        min-height: 0;
        margin-left: 0;
        padding: 48px 20px 100px;
        justify-content: flex-start;
    }

    .hero_section_title {
        font-size: 28px;
        margin: 0;
    }

    .hero_section_cta {
        margin-top: 12px;
        margin-bottom: 16px;
    }

    .hero_section_info.has_cta .hero_section_title {
        margin-top: 4px;
        margin-bottom: 4px;
    }

    .content.top_form {
        margin: 0 auto!important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero_section_photo.hero_photo_slide_in,
    .hero_section_title.animate__fade_in,
    .hero_section_cta.animate__fade_in,
    .hero_section_stats_item.animate__fade_in {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }

    .hero_section_photo.invisible,
    .hero_section_title.invisible,
    .hero_section_cta.invisible,
    .hero_section_stats_item.invisible {
        visibility: visible;
    }
}