/* Стили для фиксированного хедера */
.custom-navbar {
    backdrop-filter: blur(15px);
    background: rgba(255, 255, 255, 0.9);
    width: 85%;
    max-width: 1400px;
    border-radius: 100px;
    z-index: 1000;
    position: absolute;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 1rem 3rem;
}

/* Стили для основного контейнера контента */
.main-content {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
    padding-top: var(--header-height, 140px);
    background-color: #f8f9fa;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.05);
}

/* Убираем padding-top для главной страницы */
.main-content.home-page {
    padding-top: 0;
}

/* Адаптивность для мобильных */
@media (max-width: 576px) {
    .main-content {
        padding: 1rem 0;
        padding-top: var(--header-height, 120px);
    }

    .main-content.home-page {
        padding-top: 0;
    }

    .custom-navbar {
        width: 95%;
        padding: 0.5rem 1rem;
    }

    /* Уменьшение кнопок в #hero для мобильных */
    #hero .btn-xl, #hero .btn-lg {
        font-size: 1rem; /* Меньший шрифт */
        padding: 0.5rem 1.25rem; /* Меньшие отступы */
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); /* Меньшая тень */
    }

    #hero .btn-xl {
        font-size: 1.1rem; /* Чуть крупнее для заметности */
    }
}

/* Стили для секций внутри main-content */
.main-content section {
    margin-bottom: 2rem;
}

/* Плавная прокрутка */
body {
    scroll-behavior: smooth;
}

/* Логотип */
.logo-wrapper {
    height: 60px;
    width: auto;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.logo-img {
    height: 225px;
    width: auto;
    object-fit: cover;
    object-position: center;
}

/* Видео / фон hero */
.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.hero-video-wrapper iframe {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.2);
    pointer-events: none;
    position: absolute;
    top: 0;
    left: 0;
}

/* Кнопка Kontakt */
.kontakt-btn {
    background: #124d87;
    color: #ecb74a;
    font-size: 1.1rem;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    padding: 0.5rem 1.5rem;
}

.kontakt-btn:hover {
    background: #0f3e6e;
    color: #ffcc5c;
}

/* Цвет акцента */
.text-orange {
    color: #ff6b00;
}

/* Заголовок в hero */
.display-hero {
    font-size: 4rem;
    font-weight: 700;
}

/* Бегущая строка */
.marquee-wrapper {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
}

.marquee {
    animation: scrollMarquee linear infinite;
    will-change: transform;
    animation-duration: 15s;
}

/* Стилизация калькулятора */
.baufi-passt-flex {
    width: 100%;
    max-width: 100%;
    min-height: 400px;
}

@keyframes scrollMarquee {
    from {
        transform: translateX(0%);
    }
    to {
        transform: translateX(-100%);
    }
}

/* Галерея 2 ряда */
.gallery-row {
    overflow: hidden;
    white-space: nowrap;
    position: relative;
}

.gallery-img {
    flex: 0 0 auto;
    width: 33.3333vw;
    height: 220px;
    object-fit: cover;
    margin-right: 1rem;
    border-radius: 16px;
}

/* Соц. сети */
.social-icon-link {
    font-size: 2rem;
    color: #0d6efd;
    transition: all 0.3s ease;
}

.social-icon-link:hover {
    color: #0a58ca;
    transform: scale(1.15);
}

/* Адаптация под планшеты */
@media (max-width: 991.98px) {
    .custom-navbar {
        border-radius: 0 !important;
        padding: 0.5rem 1rem !important;
        width: 100% !important;
        top: 0 !important;
        left: 0 !important;
        transform: none !important;
    }

    .custom-navbar .navbar-brand img {
        height: 180px !important;
    }

    .custom-navbar .btn.kontakt-btn {
        font-size: 1rem;
        padding: 0.4rem 1.2rem;
    }
}

/* Адаптация под мобильные */
@media (max-width: 767.98px) {
    .hero-video-wrapper {
        display: none !important;
    }

    .hero-bg,
    #hero {
        background-image: url('img/mob.png');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
    }

    #hero {
        height: auto;
        padding: 4rem 1.5rem 3rem;
    }

    #hero .container {
        padding: 0 !important;
        justify-content: center !important;
        text-align: center;
    }

    #hero h1 {
        font-size: 1.75rem;
        line-height: 1.4;
    }

    #hero p.lead {
        font-size: 1rem;
    }

    #hero .d-flex.flex-column.flex-sm-row {
        flex-direction: column !important;
        align-items: center;
    }

    #hero .btn {
        width: 100%;
        max-width: 280px;
    }

    #hero p.small {
        margin-top: 1rem;
    }
}

/* Кастомный размер кнопки btn-xl */
.btn-xl {
    font-size: 1.5rem;
    padding: 0.75rem 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Анимация пульсации для кнопки */
@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.7);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(255, 193, 7, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0);
    }
}



.kalkulator-container {

}

.loading-message {
    display: block;
    font-size: 1.2rem;
    font-weight: 500;
}

.kalkulator-container.loaded .loading-message {
    display: none; /* Скрываем сообщение после загрузки */
}

.kalkulator-container.loaded baufi-passt-flex {
    display: block; /* Показываем калькулятор */
    width: 100%;
    height: 100%;
}

baufi-passt-flex {
    display: none; /* Скрыт до загрузки */
}

/* Отключаем автофокус */
.kalkulator-container input[autofocus],
.kalkulator-container *:focus {
    outline: none;
}

/* Стили для всплывающей CTA-кнопки */
.cta-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    font-size: 1.2rem;
    padding: 0.6rem 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    animation: pulse 2s infinite; /* Постоянная пульсация */
}

/* Кастомная анимация появления */
.cta-button.show {
    animation: cta-bounce 0.8s ease-out, pulse 2s infinite; /* Появление + пульсация */
}

/* Анимация выпрыгивания */
@keyframes cta-bounce {
    0% {
        transform: translateY(100px);
        opacity: 0;
    }
    60% {
        transform: translateY(-10px);
        opacity: 1;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Адаптивность для мобильных */
@media (max-width: 576px) {
    .cta-button {
        font-size: 1rem;
        padding: 0.5rem 1rem;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    }
}