/* Общий фон для всего сайта */
body {
    font-family: 'Segoe UI', sans-serif;
    background-color: #A9C4D1; /* Серо-голубой фон */
    margin: 0;
    padding: 0;
}

/* Шрифт для заголовка на главной странице */
h1.display-5 {
    font-family: 'Roboto Slab', serif; /* Подключенный шрифт */
    font-weight: 800; /* Жирность */
    letter-spacing: -0.5px; /* Небольшое сближение букв для плотности */
    line-height: 1.2; /* Высота строки */
}

/* Убираем белый фон у навигации */
.navbar {
    background-color: #A9C4D1 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2); /* Легкая граница для разделения */
}

/* Убираем белый фон у футера */
.footer {
    background-color: #A9C4D1 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.2); /* Легкая граница для разделения */
    color: #333; /* Цвет текста в футере */
}

/* Убираем белый фон у контейнера (если он есть) */
.container {
    background-color: transparent; /* Прозрачный фон */
}

/* Стили для кнопок навигации - ОБНОВЛЕНО */
.nav-btn {
    color: #000000 !important; /* Черный цвет текста */
    font-weight: 700 !important; /* Жирный шрифт */
    background-color: #A9D1CA !important; /* Новый цвет фона кнопок */
    border: 1px solid #6B968F !important; /* Цвет границы */
    transition: all 0.2s ease-in-out; /* Плавный переход для hover и active */
}

.nav-btn:hover {
    color: #000000 !important; /* Черный цвет текста при наведении */
    background-color: #97BAB4 !important; /* Темнее фон при наведении */
    border-color: #5B7D77 !important; /* Темнее граница при наведении */
    transform: translateY(-2px); /* Легкий подъем */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); /* Тень при наведении */
}

.nav-btn:active {
    background-color: #85ABA5 !important; /* Еще темнее при нажатии */
    transform: translateY(0); /* Возвращаем на место */
}

/* Стили для логотипа */
.navbar-brand {
    background-color: #A9C4D1 !important; /* Фон логотипа */
    padding: 5px 10px; /* Отступы */
    border-radius: 5px; /* Скругление */
}

.navbar-brand img {
    max-height: 80px; /* Увеличили в два раза */
    width: auto;
    margin-top: -5px;
    border: none;
    outline: none;
}

/* Стили для изображений на странице Электроснабжение */
.electricity-images img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Увеличиваем отступы между изображениями */
.electricity-images img:not(:last-child) {
    margin-bottom: 15px;
}

/* Стили для изображений на странице Теплоснабжение */
.heating-images img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Увеличиваем отступы между изображениями */
.heating-images img:not(:last-child) {
    margin-bottom: 15px;
}

/* Стили для изображений на странице Водоснабжение */
.water-images img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Увеличиваем отступы между изображениями */
.water-images img:not(:last-child) {
    margin-bottom: 15px;
}

/* Стили для кнопки */
.btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
}
.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0b5ed7;
}

/* Цвет текста в основном контенте */
.text-muted {
    color: #333 !important;
}

/* Если ты хочешь, чтобы текст выходил за пределы колонки (без обрезки), используй этот вариант вместо предыдущего */
.no-wrap-list li {
    white-space: nowrap;
    overflow: visible; /* Позволяет тексту выходить за пределы */
}

/* Стили для страницы поиска */
.search-result-card {
    background-color: transparent !important;
    border: 1px solid #6B968F !important;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.search-result-card:hover {
    background-color: rgba(169, 209, 202, 0.3) !important;
    border-color: #5B7D77 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.category-badge {
    background-color: #A9D1CA !important;
    color: #000000 !important;
    font-size: 0.75em;
    border: 1px solid #6B968F !important;
}

/* Убедимся, что весь текст на странице поиска темный */
.search-results .card-title a {
    color: #000000 !important;
}

.search-results .card-text {
    color: #000000 !important;
}

/* Убедимся, что контейнер не имеет белого фона */
.container .text-muted {
    color: #000000 !important;
}

/* Специфичные стили для бейджей категорий */
.badge {
    background-color: #A9D1CA !important;
    color: #000000 !important;
}

/* Добавим в style.css Для карточек в блоге (blog.html) */
.blog-card {
    background-color: transparent !important;
    border: 1px solid #6B968F !important;
}

.blog-card .card-body {
    background-color: transparent !important;
}

.blog-card .card-title {
    color: #000000 !important;
}

.blog-card .card-text {
    color: #000000 !important;
}

/* Обновим стили модальных окон */
.modal-content {
    background-color: #A9C4D1 !important;
    border: 1px solid #6B968F;
}

.modal-header {
    background-color: #A9D1CA !important;
    border-bottom: 1px solid #6B968F;
}

.modal-body {
    background-color: #A9C4D1 !important;
}

/* Стили для статей блога */
.blog-article {
    line-height: 1.7;
    color: #000000;
}

.blog-article h2 {
    color: #000000;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.blog-article h3 {
    color: #000000;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.blog-article ul, .blog-article ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.blog-article li {
    margin-bottom: 0.5rem;
}

.blog-article strong {
    color: #000000;
    font-weight: 700;
}

.blog-article a {
    color: #003366;
    text-decoration: underline;
}

.blog-article a:hover {
    color: #001a33;
}

/* Стили для баннера согласия на использование cookie */
.cookie-consent-banner {
    position: fixed;
    bottom: 20px;
    right: 20px;
    max-width: 400px;
    background-color: rgba(107, 150, 143, 0.95); /* #6B968F с прозрачностью */
    color: #000000;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    font-size: 0.9rem;
    line-height: 1.4;
}

.cookie-consent-banner.hidden {
    display: none !important;
}

.cookie-consent-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.cookie-consent-text {
    margin: 0;
    color: #000000;
}

.cookie-consent-text a {
    color: #000000;
    text-decoration: underline;
    font-weight: 600;
}

.cookie-consent-text a:hover {
    color: #003366;
}

.cookie-consent-button {
    background-color: #A9D1CA;
    color: #000000;
    border: 1px solid #5B7D77;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    align-self: flex-end;
}

.cookie-consent-button:hover {
    background-color: #97BAB4;
    border-color: #5B7D77;
    transform: translateY(-1px);
}

/* Адаптация баннера для мобильных устройств */
@media (max-width: 768px) {
    .cookie-consent-banner {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        max-width: 100%;
        border-radius: 0;
        margin: 0;
        padding: 15px;
    }

    .cookie-consent-content {
        flex-direction: column;
        gap: 10px;
    }

    .cookie-consent-text {
        font-size: 0.8rem;
        text-align: center;
    }

    .cookie-consent-button {
        align-self: center;
        width: 100%;
        max-width: 200px;
    }
}

/* Дополнительные стили для очень маленьких экранов */
@media (max-width: 480px) {
    .cookie-consent-banner {
        padding: 12px;
    }

    .cookie-consent-text {
        font-size: 0.75rem;
        line-height: 1.3;
    }

    .cookie-consent-button {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
}

/* Обновленные стили для блоков преимуществ - ФУЛЛ ШИРИНА */
.benefits-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-top: 30px;
    margin-bottom: 40px;
    align-items: stretch;
}

.benefit-window {
    background-color: #A9D1CA !important;
    border: 2px solid #6B968F !important;
    border-radius: 12px;
    padding: 25px; /* Оставляем отступы со всех сторон */
    transition: background-color 0.3s ease-in-out;
    min-height: 200px;
    display: flex;
    align-items: flex-start; /* Меняем с center на flex-start */
    cursor: default;
    position: relative;
    overflow: hidden;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    box-sizing: border-box;
}

.benefit-content {
    position: relative;
    z-index: 2;
    width: 100%;
}

/* СТАБИЛЬНЫЙ ТЕКСТ - не меняет размеры при наведении */
.benefit-content p {
    color: #000000;
    font-size: 1.1rem;
    line-height: 1.5;
    margin: 0;
    /* Делаем текст заранее жирным, чтобы не менялся размер при наведении */
    font-weight: 600 !important; /* Делаем жирным по умолчанию */
    /* Убираем transition для текста */
    transition: color 0.3s ease !important;
}

/* Изменение текста при наведении - ТОЛЬКО ЦВЕТ */
.benefit-window:hover .benefit-content p {
    color: #FFFFFF !important;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

/* Фоны для каждого окна при наведении */
#reliability-window:hover {
    background:
            radial-gradient(circle at center, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.4) 100%),
            url('../images/reliability-hover.png') !important;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
}

#economy-window:hover {
    background:
            radial-gradient(circle at center, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.4) 100%),
            url('../images/economy-hover.png') !important;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
}

#cost-reduction-window:hover {
    background:
            radial-gradient(circle at center, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.4) 100%),
            url('../images/cost-reduction-hover.png') !important;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
}

#control-window:hover {
    background:
            radial-gradient(circle at center, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.4) 100%),
            url('../images/control-hover.png') !important;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
}

#roi-window:hover {
    background:
            radial-gradient(circle at center, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.4) 100%),
            url('../images/roi-hover.png') !important;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
}

/* Анимации для плавного появления */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-image {
    animation: fadeIn 0.8s ease-out 0.3s both;
}

.fade-in-text {
    animation: fadeIn 0.8s ease-out 0.5s both;
}

/* Центрирование только заголовков и описаний */
.container .lead,
.container > .row > .col-12 > p {
    text-align: center;
}

/* Адаптация для планшетов */
@media (max-width: 1200px) {
    .benefits-container {
        grid-template-columns: repeat(3, 1fr);
        gap: 18px;
    }

    .benefit-window {
        min-height: 180px;
        padding: 22px;
    }

    .benefit-content p {
        font-size: 1rem;
    }
}

/* Адаптация для средних мобильных */
@media (max-width: 768px) {
    .benefits-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .benefit-window {
        min-height: 160px;
        padding: 18px;
    }

    .benefit-content p {
        font-size: 0.95rem;
    }
}

/* Адаптация для маленьких мобильных */
@media (max-width: 576px) {
    .benefits-container {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .benefit-window {
        min-height: 140px;
        padding: 16px;
    }

    .benefit-content p {
        font-size: 0.9rem;
    }
}

/* Для очень больших экранов */
@media (min-width: 1400px) {
    .benefit-window {
        min-height: 220px;
        padding: 30px;
    }

    .benefit-content p {
        font-size: 1.2rem;
        line-height: 1.6;
    }
}

/* Для Full HD и больше */
@media (min-width: 1920px) {
    .benefit-window {
        min-height: 250px;
        padding: 35px;
    }

    .benefit-content p {
        font-size: 1.3rem;
        line-height: 1.7;
    }
}

/* Стили для фонового изображения главной страницы */
body.home-page {
    position: relative;
    min-height: 100vh;
}

body.home-page::before {
    content: "";
    position: fixed; /* Фиксируем фон при прокрутке */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/background-home.png'); /* Путь к вашей картинке */
    background-size: cover; /* Картинка заполняет всю область */
    background-position: center center; /* Центрируем картинку */
    background-repeat: no-repeat; /* Не повторяем */
    background-attachment: fixed; /* Фиксируем для параллакс-эффекта */

    opacity: 0.4; /* Регулируйте прозрачность здесь (от 0 до 1) */
    z-index: -1; /* Помещаем под контент */
}

/* Для мобильных устройств ОТКЛЮЧАЕМ фиксацию фона полностью */
@media (max-width: 768px) {
    body.home-page::before {
        position: absolute;
        background-attachment: scroll;
        /* Убираем transform и другие свойства, которые могут вызывать пересчёт */
        transform: none;
        /* Обеспечиваем стабильность фона */
        will-change: auto;
        /* Отключаем возможные анимации */
        animation: none;
        transition: none;
        /* Фиксируем размеры */
        width: 100%;
        height: 100%;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        /* Явно задаём box-sizing */
        box-sizing: border-box;
    }

    /* Также фиксируем body для стабильности */
    body.home-page {
        overflow-x: hidden;
        position: relative;
    }
}

/* Обеспечиваем читаемость контента поверх фона */
body.home-page .container {
    position: relative;
    z-index: 1;
}

/* Улучшаем читаемость текста на фоне изображения */
body.home-page .text-center,
body.home-page .benefit-content p {
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5);
}

/* Стили для раздела "Этапы реализации" */
.implementation-stages {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    position: relative;
    margin: 40px 0 60px;
    flex-wrap: wrap;
}

.stage-container {
    flex: 0 0 32%;
    max-width: 32%;
    display: flex;
    flex-direction: column;
}

.stage-card {
    background-color: transparent;
    border: 2px solid #6B968F;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.stage-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    border-color: #5B7D77;
}

.stage-image {
    position: relative;
    height: 220px;
    overflow: hidden;
    border-bottom: 2px solid #6B968F;
}

.stage-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.stage-card:hover .stage-image img {
    transform: scale(1.05);
}

.stage-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background-color: #A9D1CA;
}

.stage-title {
    font-weight: 800;
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #000000;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stage-description {
    color: #000000;
    line-height: 1.6;
    font-size: 1.1rem;
    margin: 0;
    text-align: center;
    flex-grow: 1;
}

/* Адаптация для планшетов */
@media (max-width: 1200px) {
    .stage-image {
        height: 200px;
    }

    .stage-content {
        padding: 20px;
    }

    .stage-title {
        font-size: 1.3rem;
    }

    .stage-description {
        font-size: 1rem;
    }
}

/* Адаптация для средних устройств */
@media (max-width: 992px) {
    .stage-container {
        flex: 0 0 48%;
        max-width: 48%;
        margin-bottom: 30px;
    }

    .implementation-stages {
        justify-content: space-around;
    }
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    .stage-container {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 30px;
    }

    .stage-image {
        height: 220px;
    }

    .stage-title {
        font-size: 1.4rem;
        margin-bottom: 10px;
    }

    .stage-content {
        padding: 25px 20px;
    }

    .implementation-stages {
        justify-content: center;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 480px) {
    .stage-image {
        height: 180px;
    }

    .stage-title {
        font-size: 1.2rem;
    }

    .stage-description {
        font-size: 0.95rem;
        line-height: 1.5;
    }
}

/* Для больших экранов */
@media (min-width: 1400px) {
    .stage-image {
        height: 250px;
    }

    .stage-content {
        padding: 30px;
    }

    .stage-title {
        font-size: 1.6rem;
    }

    .stage-description {
        font-size: 1.2rem;
        line-height: 1.7;
    }
}

/* Для очень больших экранов */
@media (min-width: 1920px) {
    .stage-image {
        height: 280px;
    }

    .stage-title {
        font-size: 1.8rem;
    }

    .stage-description {
        font-size: 1.3rem;
    }
}

/* Дополнительные улучшения для этапов */
.stage-card:hover .stage-image {
    transition: transform 0.5s ease;
}

/* Стили для изображений в статьях блога */
.blog-article img {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.blog-article img:hover {
    transform: translateY(-2px);
}

/* Для очень широких экранов ограничиваем максимальную ширину изображений в статьях */
@media (min-width: 1400px) {
    .blog-article img {
        max-width: 90%;
    }
}

/* Дополнительный класс для изображений в блоге для более точного контроля */
.blog-image {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Для мобильных устройств делаем отступы меньше */
@media (max-width: 768px) {
    .blog-article img {
        border-radius: 6px;
        box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    }

    /* На мобильных убираем ограничение максимальной ширины */
    .blog-article img {
        max-width: 100% !important;
    }
}

/* СТИЛИ ДЛЯ КАРУСЕЛИ (оптимизирована для 16:9) */
.solutions-carousel-container {
    margin: 40px 0 60px;
    padding: 0 15px;
}

.solutions-carousel {
    border: 2px solid #6B968F;
    border-radius: 12px;
    overflow: hidden;
    background-color: #A9D1CA;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

/* Контейнер для изображения с сохранением пропорций 16:9 */
.carousel-image-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio (9/16 = 0.5625 * 100) */
    overflow: hidden;
    background-color: #A9D1CA;
    border-bottom: 2px solid #6B968F;
}

.carousel-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain; /* Показываем всё изображение без обрезки */
    object-position: center;
    background-color: #A9D1CA;
}

.carousel-caption-custom {
    padding: 25px 30px;
    background-color: #A9D1CA;
    color: #000000;
    text-align: center;
    border-top: 2px solid #6B968F;
}

.carousel-caption-custom h5 {
    font-weight: 800;
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #000000;
}

.carousel-caption-custom p {
    font-size: 1.1rem;
    line-height: 1.5;
    margin: 0;
    color: #000000;
}

/* Стили для индикаторов карусели */
.carousel-indicators [data-bs-target] {
    background-color: #6B968F;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #5B7D77;
    margin: 0 6px;
}

.carousel-indicators .active {
    background-color: #5B7D77;
}

/* Стили для кнопок управления каруселью */
.carousel-control-prev,
.carousel-control-next {
    width: 50px;
    height: 50px;
    background-color: rgba(169, 209, 202, 0.9);
    border: 2px solid #6B968F;
    border-radius: 50%;
    top: calc(28.125% + 10px); /* Центрируем по изображению (56.25%/2) */
    transform: translateY(-50%);
    opacity: 0.8;
    transition: all 0.3s ease;
    margin: 0 15px;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    background-color: #97BAB4;
    border-color: #5B7D77;
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    filter: invert(0%) sepia(100%) saturate(0%) hue-rotate(0deg);
    width: 25px;
    height: 25px;
}

/* Адаптация карусели для планшетов */
@media (max-width: 992px) {
    .carousel-caption-custom {
        padding: 20px 25px;
    }

    .carousel-caption-custom h5 {
        font-size: 1.3rem;
    }

    .carousel-caption-custom p {
        font-size: 1rem;
    }

    .carousel-control-prev,
    .carousel-control-next {
        width: 45px;
        height: 45px;
        margin: 0 10px;
    }
}

/* Адаптация для мобильных устройств */
@media (max-width: 768px) {
    .solutions-carousel-container {
        margin: 30px 0 50px;
        padding: 0 10px;
    }

    .carousel-caption-custom {
        padding: 15px 20px;
    }

    .carousel-caption-custom h5 {
        font-size: 1.2rem;
    }

    .carousel-caption-custom p {
        font-size: 0.95rem;
        line-height: 1.4;
    }

    .carousel-control-prev,
    .carousel-control-next {
        width: 40px;
        height: 40px;
        margin: 0 8px;
    }

    .carousel-control-prev-icon,
    .carousel-control-next-icon {
        width: 20px;
        height: 20px;
    }
}

/* Для больших экранов (свыше 1200px) */
@media (min-width: 1200px) {
    .solutions-carousel {
        max-width: 1200px;
        margin: 0 auto;
    }

    .carousel-caption-custom {
        padding: 30px 40px;
    }

    .carousel-caption-custom h5 {
        font-size: 1.6rem;
    }

    .carousel-caption-custom p {
        font-size: 1.2rem;
    }
}

/* Для очень больших экранов */
@media (min-width: 1400px) {
    .carousel-caption-custom h5 {
        font-size: 1.7rem;
    }

    .carousel-caption-custom p {
        font-size: 1.25rem;
        line-height: 1.6;
    }
}

/* Для экранов с высокой плотностью пикселей */
@media (min-width: 1920px) {
    .solutions-carousel {
        max-width: 1400px;
    }

    .carousel-caption-custom {
        padding: 35px 50px;
    }
}