/* Общие стили */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
    /* Плавная прокрутка */
    padding-top: 80px;
    /* Отступ для фиксированной навигации */
}

/* Стили для header */
header {
    background: linear-gradient(90deg, #444, #333);
    /* Градиент для более стильного фона */
    padding: 10px 20px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    /* Лёгкая тень для объёма */
}

/* Стили для navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding-right: 30px;
}

/* Стили для логотипа и названия */
.nav-logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-logo-text {
    font-size: 28px;
    /* Увеличенный размер для выделения */
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Стили для меню */
.nav-menu {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

.nav-item {
    margin-left: 30px;
}

.nav-link {
    color: #fff;
    text-decoration: none;
    font-size: 18px;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.nav-link:hover {
    background-color: #007BFF;
    /* Фон при наведении */
    color: #fff;
}

/* Стили для гамбургер-меню */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    z-index: 1100;
    background-color: #333; /* Цвет, совпадающий с хедером */
}

.bar {
    width: 30px;
    height: 4px;
    background-color: #fff;
    margin: 4px 0;
    border-radius: 2px;
    transition: all 0.3s ease;
}
.hero-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 50px 20px;
    background-color: #f4f4f4;
    flex-wrap: wrap;
}

.hero-content {
    max-width: 100%;
    flex: 1 1 300px;
    padding: 0 20px;
}

.hero-content h1 {
    font-size: 36px;
    margin-bottom: 20px;
    word-wrap: break-word;
}

.hero-content p {
    font-size: 18px;
    margin-bottom: 20px;
    word-wrap: break-word;
}

.cta-button {
    background-color: #007BFF;
    color: #fff;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.cta-button:active {
    background-color: #005bb5;
}

.hero-image {
    flex: 1 1 300px;
    max-width: 100%;
    text-align: center;
    padding: 0 20px;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

.services-section {
    padding: 50px 20px;
    text-align: center;
}

.catalog {
    opacity: 0;
    transform: translateY(20px);
    /* Немного сдвигаем элемент вниз для плавного появления */
    transition: opacity 0.5s ease, transform 0.5s ease;
    background: linear-gradient(to bottom, rgba(40, 167, 69, 0.1), rgba(255, 255, 255, 1));
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Когда элемент видим */
.catalog.visible {
    opacity: 1;
    transform: translateY(0);
    /* Элемент возвращается в нормальное положение */
}

.catalog-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 20px;
    flex-wrap: wrap;
}

.image-gallery {
    position: relative;
    width: 100%;
    /* Задаем необходимые размеры контейнера */
    max-width: 600px;
    /* или любой другой размер */
    height: 400px;
    /* или auto, если требуется адаптивность */
    margin: 2rem auto;
    overflow: hidden;
    border-radius: 10px;
    background: #f8f9fa;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Стили для изображений */
.image-gallery img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* можно заменить на contain, если важно сохранить пропорции */
    opacity: 0;
    transition: opacity 0.5s ease;
    /* плавное появление/затухание */
}

/* Класс для видимого изображения */
.image-gallery img.visible {
    opacity: 1;
    pointer-events: auto;
}

/* (Опционально) Если тебе нужен класс hidden для явного скрытия, можно его оставить, 
   но он здесь не обязателен, т.к. по умолчанию opacity: 0 */
.image-gallery img.hidden {
    opacity: 0;
}


.image-gallery::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: inherit;
    pointer-events: none;
}

/* Кнопки управления галереей */
.gallery-controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 1rem;
    z-index: 3;
}

.gallery-controls button {
    background: rgba(40, 167, 69, 0.9);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.gallery-controls button:hover {
    background: #28a745;
    transform: scale(1.05);
}

/* Блок с информацией */
.catalog-info {
    max-width: 100%;
    flex: 1 1 300px;
    text-align: center;
    /* Центрируем информацию */
    padding: 0 20px;
    background-color: #f8f9fa;
    /* Светлый фон для контраста */
    border-radius: 10px;
    /* Закругленные углы */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    /* Легкая тень */
    margin-top: 20px;
    /* Отступ сверху */
    padding-bottom: 10px;
    /* Дополнительный отступ снизу */
}

/* Заголовок */
.catalog-info h3 {
    font-size: 28px;
    margin-bottom: 10px;
    font-weight: bold;
    color: #28a745;
    /* Зеленый цвет для выделения */
    text-align: center;
}

/* Описание */
.catalog-info p {
    font-size: 18px;
    color: #555;
    /* Темный серый для текста */
    margin-bottom: 15px;
    line-height: 1.5;
    /* Межстрочный интервал */
    text-align: center;
}

/* Если блок с описанием содержит дополнительные элементы */
.catalog-info .price-section {
    margin-top: 20px;
    /* Дополнительный отступ для раздела с ценой */
}

/* Плавные переходы для кнопок и других элементов внутри */
.catalog-info * {
    transition: all 0.3s ease;
}

/* Эффекты при наведении на текст */
.catalog-info h3:hover,
.catalog-info p:hover {
    color: #007bff;
    /* Синий цвет при наведении */
    transform: translateY(-2px);
    /* Легкий эффект подъема */
}

/* Цена */
.price-section {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
    font-size: 24px;
    font-weight: bold;
    color: #333;
    /* Темно-серый для хорошей читаемости */
}

.price-section span {
    font-size: 32px;
    /* Увеличиваем размер для выделения цены */
    color: #28a745;
    /* Мягкий зеленый для выделения цены */
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    /* Легкая тень для акцента */
}

/* Кнопка заказать */
.order-button {
    background-color: #28a745;
    color: #fff;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 1.2rem;
}

/* Эффекты при наведении и активном состоянии */
.order-button:hover {
    background-color: #0056b3;
    /* Более темный оттенок при наведении */
    transform: scale(1.05);
    /* Немного увеличиваем кнопку */
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.5);
    /* Усиливаем тень */
}

.order-button:active {
    background-color: #218838;
}

/* Эффект при наведении на заголовок и описание */
.catalog-info h3:hover,
.catalog-info p:hover {
    color: #007bff;
    /* Синий цвет при наведении */
    transform: translateY(-2px);
    /* Легкий эффект подъема */
}

.map-section {
    padding: 50px 20px;
    text-align: center;
}

.contact-section {
    padding: 50px 20px;
    background-color: #f4f4f4;
}

.contact-list {
    list-style: none;
    padding: 0;
}

.contact-list li {
    margin-bottom: 20px;
}

.contact-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-actions a {
    color: #007BFF;
    text-decoration: none;
}

.contact-actions button {
    background: none;
    border: none;
    cursor: pointer;
    color: #007BFF;
    transition: color 0.3s ease;
}

.contact-actions button:active {
    color: #005bb5;
}



/* Адаптивные стили */
@media (max-aspect-ratio: 1/1) {
    .image-gallery {
        aspect-ratio: 4/3;
        /* Более квадратное соотношение для мобильных */
    }
}

/* Адаптация для разных экранов */
@media (max-width: 1200px) {
    .image-gallery {
        max-width: 70vw;
        max-height: 60vh;
    }
}

@media (max-width: 992px) {
    .image-gallery {
        height: 350px;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none; /* Скрыто по умолчанию */
        position: fixed;
        top: 90px;
        right: -250px; /* Меню скрыто за пределами */
        width: 220px;
        background-color: #333;
        padding: 20px;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); /* Тень сверху и снизу */
        border-bottom: 2px solid rgba(0, 0, 0, 0.1); /* Легкая граница снизу */
        border-radius: 8px;
        transition: right 0.3s ease; /* Плавное выезжание */
    }

    .nav-menu.active {
        right: 0; /* Когда класс .active, меню выезжает */
        display: block; /* Показываем меню */
    }

    .nav-item {
        margin: 15px 0;
    }

    .hamburger {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        cursor: pointer;
        z-index: 1100;
    }

    .bar {
        width: 30px;
        height: 4px;
        background-color: #fff;
        margin: 4px 0;
        border-radius: 2px;
        transition: all 0.3s ease;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }


    .nav-link {
        padding: 10px 20px;
        display: block;
    }

    .hero-section {
        flex-direction: column;
        text-align: center;
    }

    .hero-content {
        max-width: 100%;
        padding-bottom:30px;
    }

    .catalog-item {
        flex-direction: column;
    }

    .image-gallery {
        max-width: 90vw;
        max-height: 70vh;
        margin: 1rem auto;
    }

    .gallery-controls button {
        padding: 0.6rem 1rem;
        font-size: 1rem;
    }

    .catalog-info {
        /* max-width: 100%; */
        text-align: center;
    }

    .price-section {
        align-items: center;
    }
}

@media (max-width: 576px) {
    .image-gallery {
        height: 250px;
    }
}

@media (max-width: 480px) {
    .image-gallery {
        max-width: 95vw;
        max-height: 50vh;
    }

    .gallery-controls button {
        padding: 0.5rem 0.8rem;
        border-radius: 1.5rem;
    }
}