/* Подключение шрифтов */
body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.8;
    color: #333;
}

/* Контейнер */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Хедер */
.header {
    background-color: rgba(0, 0, 0, 0.9);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 5px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Стили для логотипа */
.logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.8em;
    margin: 0;
    transition: font-size 0.3s ease;
}

/* Убираем подчеркивание и задаем цвет для ссылки */
.logo a {
    text-decoration: none; /* Убираем подчеркивание */
    color: white; /* Устанавливаем белый цвет */
}

/* Бургер-меню - теперь расположено в правом углу */
.burger-menu {
    display: none; /* Показываем бургер-меню */
    font-size: 2em;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    position: absolute;
    top: 0;
    right: 15px;
    z-index: 1200; /* Бургер выше меню */
    transition: transform 0.3s ease; /* Плавное изменение */
}

/* Добавляем вращение при активном состоянии */
.burger-menu.active {
    transform: rotate(-90deg); /* Вращение на 90 градусов */
}

/* Навигация */
.nav {
    display: flex;
    align-items: center;
}

.nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 20px;
}

.nav a {
    color: #fff;
    text-decoration: none;
    font-size: 1.2em;
    padding: 5px 10px;
    transition: color 0.3s;
}

.nav a:hover {
    color: #f39c12;
}

/* Показываем бургер-меню и делаем его адаптивным */
.nav.active {
    height: 250px; /* Высота развернутого меню */
}

/* Герой-секция */
.hero {
    background: url('/static/jpg/hero-bg2.jpg') no-repeat center center/cover;
    color: #fff;
    text-align: center;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -70px;
    padding-left: 10px; /* Добавлен отступ */
    padding-right: 10px; /* Добавлен отступ */
}

.hero-text {
    background-color: rgba(0, 0, 0, 0.7);
    padding: 30px 50px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5em;
    margin-bottom: 5px;
    text-align: center;
}

.hero p {
    font-size: 1.5em;
    margin-bottom: 20px;
}

.btn-hero {
    display: inline-block;
    padding: 12px 25px;
    background-color: #f39c12; /* Основной цвет кнопки */
    color: #fff; /* Цвет текста */
    text-transform: uppercase; /* Преобразование текста в верхний регистр */
    font-size: 1em; /* Размер шрифта */
    border: none; /* Убираем рамку */
    border-radius: 5px; /* Скругление углов */
    cursor: pointer; /* Изменяем курсор на указатель */
    transition: background-color 0.3s ease, transform 0.2s ease; /* Плавные переходы */
    text-decoration: none;
}

.btn-hero:hover {
    background-color: #e67e22; /* Цвет при наведении */
    transform: scale(1.05); /* Увеличение кнопки при наведении */
}

.btn-hero:active {
    background-color: #d35400; /* Цвет при клике */
    transform: scale(0.95); /* Уменьшение при нажатии */
}

.about {
    padding: 20px 20px; /* Отступы сверху и снизу */
    background-color: #f9f9f9; /* Светлый фон для секции */
}

.container {
    max-width: 1200px; /* Максимальная ширина контейнера */
    margin: 0 auto; /* Центрирование контейнера */
}

.about-section {
    display: flex; /* Используем flexbox для расположения элементов */
    justify-content: space-around; /* Распределяем карточки по горизонтали */
    flex-wrap: wrap; /* Позволяем карточкам переноситься на новую строку */
    margin-bottom: 50px;
}

.about-item {
    background-color: #fff; /* Белый фон для карточек */
    border: 1px solid #ddd; /* Легкая рамка */
    border-radius: 8px; /* Закругленные углы */
    padding: 20px; /* Внутренние отступы */
    margin: 10px; /* Внешние отступы */
    width: 200px; /* Ширина карточки */
    text-align: center; /* Центрируем текст внутри карточки */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Тень для глубины */
    transition: transform 0.3s; /* Плавный переход для эффекта наведения */
}

.about-item:hover {
    transform: translateY(-5px); /* Поднимаем карточку при наведении */
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.about-img {
    width: 60px; /* Ширина иконки */
    height: 60px; /* Высота иконки */
    margin-bottom: 10px; /* Отступ снизу */
}

/* Блок услуг на главной странице */
.services-block {
    background-color: #fff;
    padding: 20px 0;
}

.services-block h2 {
    text-align: center;
    font-size: 2.5em;
    font-family: 'Playfair Display', serif;
    margin-bottom: 30px;
    color: #333;
}

.services-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 колонки */
    grid-template-rows: repeat(2, auto); /* 2 строки */
    gap: 30px; /* Промежутки между элементами */
    justify-items: center; /* Центрируем элементы по горизонтали */
}

.service-item {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.service-item img {
    max-width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 20px;
}

.scroll-indicator {
    display: none;
}

.service-item h3 {
    font-size: 1.8em;
    margin-bottom: 10px;
    color: #333;
}

.service-item p {
    font-size: 1em;
    color: #666;
}

.service-item a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.service-item a:hover {
    color: #f39c12;
}

/* Контейнер контактов */
.contact {
    padding: 0;
    background-color: #cfcfa9;
    overflow: hidden;
}

.contact-wrapper {
    display: flex; /* Выстраиваем в строку */
    align-items: flex-start; /* Выровнять элементы по верху */
}


/* Десктопная версия */
#map {
    width: 800px !important;
    height: 500px !important;
}

.contact-item {
    display: flex; /* Включаем flexbox */
    align-items: center; /* Выравниваем по вертикали */
    gap: 8px; /* Отступ между текстом и иконкой */
}

.telegram-img {
    height: 40px !important;
    width: 40px !important; /* Теперь иконка будет всегда 40x40 пикселей */
    max-width: 40px !important;
    max-height: 40px !important;
    display: inline-block; /* Избегаем растяжения */
    object-fit: contain; /* Корректное отображение */
}

.contact-right {
    flex: 1; /* Контактная информация занимает меньше места */
    color: #555;
    text-align: left; /* Текст выравнен влево */
    font-size: 1.2em;
    padding-right: 450px;
    padding-left: 40px;
    font-weight: bolder;
}

.phone-link, .telegram-link, .email {
    text-decoration: underline;
    color: #555555;
    white-space: nowrap;
}

.email-link {
    text-decoration: underline;
    color: #555;
    transition: color 0.3s ease;
}


.contact-right p {
    margin: 10px 0;
}

.contact-right h2 {
    font-size: 2em;
    text-align: left;
}

/* Для мобильных устройств */
@media (max-width: 768px) {
    .contact-wrapper {
        flex-direction: column; /* Располагаем элементы в колонку */
        align-items: center; /* Центрируем содержимое */
    }


    .map {
        width: 100% !important;
        height: 300px !important;

        #map {
            width: 100% !important;
            height: 300px !important;
        }
    }


    .contact-right {
        width: 100%; /* Контактная информация на всю ширину экрана */
        text-align: center; /* Центрируем текст */
        padding: 0;
        padding-bottom: 50px;
    }

    .contact-right h2 {
        font-size: 1.5em; /* Уменьшаем размер заголовка */
        text-align: center; /* Центрируем заголовок */
        margin-bottom: 15px; /* Отступ снизу для заголовка */
    }

    .contact-right p {
        font-size: 1em; /* Уменьшаем размер шрифта для текста */
        margin: 5px 0; /* Уменьшаем отступы между абзацами */
    }

    .contact-item {
        justify-content: center; /* Центрируем элементы в строке */
    }
}


/* Подвал */
.footer {
    background-color: rgba(0, 0, 0, 0.9);
    color: #fff;
    text-align: center;
    padding: 5px 0;
}

/* Адаптивность */
@media (max-width: 768px) {
    .footer {
        font-size: 0.7em;
    }

    .header-container {
        flex-direction: column; /* Логотип и меню будут в столбик */
        text-align: center;
    }

    .logo {
        font-size: 1.3em;
    }


    .burger-menu {
        display: block;
    }

    .nav {
        flex-direction: column;
        justify-content: center;
        position: absolute;
        top: 0;
        left: 0;
        width: 100%; /* Занимает всю ширину шапки */
        height: 0; /* Изначально скрыта (высота 0) */
        overflow: hidden; /* Скрываем содержимое */
        background-color: rgba(0, 0, 0, 0.95); /* Цвет фона */
        transition: height 0.3s ease; /* Анимация развертывания */
        z-index: 1000; /* Размещаем над шапкой */
    }

    .nav a {
        font-size: 1em; /* Уменьшаем размер шрифта */
        padding: 8px 0;
    }

    .nav ul {
        flex-direction: column; /* Меню в столбик */
        align-items: center;
    }

    /* Контейнер */
    .container {
        width: 95%;
    }

    /* Хедер */
    .header-container {
        flex-direction: column;
        text-align: center;
    }


    .nav a {
        font-size: 1em; /* Уменьшаем размер шрифта */
        padding: 8px 0;
    }

    /* Герой-секция */
    .hero {
        height: auto;
        padding: 0px 0px;
        padding-top: 50px;
        border-radius: 0px;
    }

    h2 {
        font-size: 2.1em;
        text-align: center;
    }

    .hero-text {
        padding: 20px;
    }

    .hero-text h2 {
        display: none;
    }


    .hero p {
        font-size: 1.2em;
    }

    .btn-hero {
        font-size: 0.9em;
        padding: 10px 20px;
    }


    .about-section {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 20px; /* Промежуток между карточками */
        padding: 10px;
    }


    .about-item {
        flex: 0 0 200px; /* Фиксируем ширину в 200px */
        height: auto; /* Карточки подстраиваются по высоте */
    }

    .about-section.reverse {
        flex-direction: column;
    }

    .about-img {
        max-width: 100%;
        margin-bottom: 20px;
    }

    .about-content {
        padding: 10px;
    }

    .scroll-indicator {
        display: flex;
        justify-content: right;
        padding-right: 40px;
        align-items: center;
        margin-top: 10px;
        height: 50px; /* Размер контейнера индикатора */
    }

    .scroll-icon-hand {
        animation: scroll-indicator-hand 2s infinite ease-in-out;
    }

    .scroll-icon-card {
        animation: scroll-indicator-card 2s infinite ease-in-out;
    }

    /* Анимация руки */
    @keyframes scroll-indicator-hand {
        0% {
            transform: translateX(80px) scale(1);
            opacity: 0;
        }
        10% {
            transform: translateX(80px) scale(1);
            opacity: 1;
        }
        20%, 60% {
            transform: translateX(175px) scale(0.6);
            opacity: 1;
        }
        80% {
            transform: translateX(5px) scale(0.6);
            opacity: 1;
        }
        100% {
            transform: translateX(5px) scale(0.6);
            opacity: 0;
        }
    }

    /* Анимация карточек */
    @keyframes scroll-indicator-card {
        0%, 60% {
            transform: translateX(0);
        }
        80%, 100% {
            transform: translateX(-240px);
        }
    }

    /* Блок "О городе" */
    .about-city {
        padding: 50px 20px;
    }

    .city-info {
        width: 100%;
        padding: 20px;
    }

    .city-info h2 {
        font-size: 2em;
    }

    .city-info p {
        font-size: 1em;
    }

    /* Блок услуг */
    .services-list {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .service-item img {
        height: auto;
    }

    .service-item h3 {
        font-size: 1.5em;
    }

    .service-item p {
        font-size: 0.9em;
    }


    .contact h2 {
        font-size: 2em;
    }

    .contact p {
        font-size: 1em;
    }
}

/* Дополнительные стили для очень маленьких экранов */
@media (max-width: 480px) {
    /* Хедер */
    .logo {
        font-size: 1.2em;
    }

    .nav a {
        font-size: 0.9em;
    }

    /* Герой-секция */
    .hero p {
        font-size: 1em;
    }

    .btn-hero {
        font-size: 0.8em;
        padding: 8px 15px;
    }

    /* Блок услуг */
    .service-item h3 {
        font-size: 1.2em;
    }

    .service-item p {
        font-size: 0.8em;
    }
}

@media (max-width: 1000px) {
    .header {
        background-color: rgb(0, 0, 0);
        position: sticky;
    }

    .logo {
        font-size: 1.2em;
    }


    .burger-menu {
        display: block;
    }


    .nav ul {
        flex-direction: column;
        gap: 10px;
        background: rgba(0, 0, 0, 0.9);
        padding: 10px;
    }

    /* Контейнер */
    .container {
        width: 95%;
    }

    /* Хедер */
    .header-container {
        flex-direction: column;
        text-align: center;
    }

    .nav ul {
        flex-direction: column;
        gap: 10px;
    }

    .nav a {
        font-size: 1em;
    }
}

/* Спецпредложение с ипотекой - Чистая мобильная версия */
.mortgage-hero {
    padding: 80px 0 60px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%);
    position: relative;
    overflow: hidden;
}

.mortgage-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(243, 156, 18, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulse 4s ease-in-out infinite;
}

.mortgage-hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(243, 156, 18, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.05);
        opacity: 1;
    }
}

.mortgage-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    position: relative;
    z-index: 2;
}

/* Текстовый блок */
.mortgage-content {
    color: white;
}

.mortgage-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.8em;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.1;
}

.title-gradient {
    background: linear-gradient(135deg, #f39c12, #ffb054);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mortgage-description {
    font-size: 1.2em;
    line-height: 1.5;
    margin-bottom: 25px;
    color: #e0e0e0;
}

/* Списки преимуществ */
.benefits-desktop {
    display: block;
}

.benefits-list {
    list-style: none;
    padding: 0;
    margin-bottom: 35px;
}

.benefit-item {
    padding: 10px 0;
    font-size: 1.1em;
    display: flex;
    align-items: center;
    gap: 12px;
}

.benefit-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #f39c12;
    color: #1a1a1a;
    border-radius: 50%;
    font-weight: bold;
    font-size: 0.8em;
    flex-shrink: 0;
}

/* Кнопки */
.cta-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.desktop-buttons {
    display: flex;
}

.mobile-buttons {
    display: none;
}

.btn-primary {
    display: inline-block;
    padding: 16px 32px;
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1em;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-align: center;
    flex: 1;
    min-width: 200px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(243, 156, 18, 0.3);
}

.btn-secondary {
    display: inline-block;
    padding: 16px 32px;
    background: transparent;
    color: #f39c12;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1em;
    transition: all 0.3s ease;
    border: 2px solid #f39c12;
    cursor: pointer;
    text-align: center;
    flex: 1;
    min-width: 200px;
}

.btn-secondary:hover {
    background: rgba(243, 156, 18, 0.1);
    transform: translateY(-2px);
}

/* Интерактивный блок */
.mortgage-interactive {
    position: relative;
}

.mortgage-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.rate-badge {
    text-align: center;
    margin-bottom: 30px;
}

.rate-percent {
    display: block;
    font-size: 3.5em;
    font-weight: 800;
    background: linear-gradient(135deg, #f39c12, #e67e22);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 8px;
}

.rate-label {
    font-size: 1.1em;
    color: #666;
    font-weight: 600;
}

.card-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.stat-item {
    text-align: center;
    padding: 20px 15px;
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border-radius: 12px;
    border: 1px solid #f0f0f0;
}

.stat-value {
    display: block;
    font-size: 1.8em;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9em;
    color: #666;
    font-weight: 500;
    line-height: 1.3;
}

/* Доверительные элементы */
.trust-indicators {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-top: 25px;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.trust-icon {
    font-size: 2em;
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(243, 156, 18, 0.2);
    border-radius: 50%;
    border: 2px solid rgba(243, 156, 18, 0.5);
}

.trust-text {
    font-size: 1em;
    color: white;
    font-weight: 600;
    line-height: 1.3;
}

/* Адаптивность для планшетов */
@media (max-width: 1024px) {
    .mortgage-grid {
        gap: 50px;
    }

    .mortgage-title {
        font-size: 2.3em;
    }

    .mortgage-card {
        padding: 25px;
    }
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .mortgage-hero {
        padding: 50px 0 40px;
    }

    .mortgage-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .mortgage-title {
        font-size: 2em;
        margin-bottom: 15px;
        padding: 0 10px; /* Добавляем отступы по бокам */
    }

    .mortgage-description {
        font-size: 1.1em;
        margin-bottom: 20px;
        padding: 0 15px; /* Добавляем отступы по бокам */
    }

    /* Скрываем десктопные элементы */
    .benefits-desktop {
        display: none;
    }

    .desktop-buttons {
        display: none;
    }

    /* Показываем мобильные кнопки */
    .mobile-buttons {
        display: flex;
        margin-top: 25px;
        padding: 0 15px; /* Важно: добавляем отступы по бокам */
        box-sizing: border-box; /* Учитываем padding в ширине */
    }

    /* Карточка ипотеки для мобильных */
    .mortgage-card {
        padding: 20px;
        margin: 0 auto;
        max-width: 300px;
        width: calc(100% - 30px); /* Учитываем отступы по бокам */
    }

    .rate-percent {
        font-size: 2.8em;
    }

    .card-stats {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .stat-item {
        padding: 15px 10px;
    }

    .stat-value {
        font-size: 1.5em;
    }

    /* Доверительные элементы для мобильных */
    .trust-indicators {
        gap: 12px;
        margin-top: 20px;
        padding: 0 15px; /* Добавляем отступы по бокам */
    }

    .trust-item {
        flex-direction: column;
        text-align: center;
        gap: 12px;
        padding: 15px;
    }

    .trust-icon {
        width: 45px;
        height: 45px;
        font-size: 1.8em;
    }

    .trust-text {
        font-size: 0.9em;
    }

    /* Кнопки для мобильных - исправляем проблему с шириной */
    .cta-buttons {
        flex-direction: column;
        gap: 12px;
        width: 100%;
        max-width: 100%; /* Ограничиваем максимальную ширину */
        box-sizing: border-box; /* Учитываем padding в ширине */
    }

    .btn-primary,
    .btn-secondary {
        min-width: auto;
        width: 100%;
        max-width: 100%; /* Ограничиваем максимальную ширину */
        padding: 14px 20px;
        font-size: 1em;
        margin: 0;
        box-sizing: border-box; /* Учитываем padding в ширине */
    }
}

/* Адаптивность для маленьких мобильных */
@media (max-width: 480px) {
    .mortgage-hero {
        padding: 40px 0 30px;
    }

    .mortgage-title {
        font-size: 1.7em;
        padding: 0 15px; /* Увеличиваем отступы на маленьких экранах */
    }

    .mortgage-description {
        font-size: 1em;
        line-height: 1.4;
        padding: 0 15px;
    }

    .mortgage-card {
        padding: 15px;
        max-width: 280px;
        width: calc(100% - 30px);
    }

    .rate-percent {
        font-size: 2.5em;
    }

    .stat-value {
        font-size: 1.3em;
    }

    .trust-item {
        padding: 12px;
    }

    .trust-text {
        font-size: 0.85em;
    }

    .btn-primary,
    .btn-secondary {
        padding: 12px 16px;
        font-size: 0.9em;
    }

    /* Увеличиваем отступы для кнопок на очень маленьких экранах */
    .mobile-buttons {
        padding: 0 20px;
    }

    .trust-indicators {
        padding: 0 20px;
    }
}

/* Очень маленькие экраны */
@media (max-width: 360px) {
    .mortgage-title {
        font-size: 1.5em;
        padding: 0 10px;
    }

    .mortgage-card {
        max-width: 260px;
        width: calc(100% - 20px);
    }

    .btn-primary,
    .btn-secondary {
        padding: 12px 12px; /* Уменьшаем padding на очень маленьких экранах */
        font-size: 0.9em;
    }

    .mobile-buttons {
        padding: 0 10px;
    }

    .trust-indicators {
        padding: 0 10px;
    }
}

/* Дополнительная защита для контейнера */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px; /* Добавляем отступы для контейнера */
    box-sizing: border-box;
}

/* Убедимся, что все элементы учитывают box-sizing */
.mortgage-hero * {
    box-sizing: border-box;
}
