@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700;900&display=swap');

/* Общий сброс стилей */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Основные стили для body */
body {
    font-family: 'Montserrat', sans-serif;
    background-color: #f4f4f4;
    color: #121212;
    overflow-x: hidden; /* Предотвращаем горизонтальную прокрутку */
}

/* Адаптированная шапка сайта */
header {
    background-color: #E8E8E8;
    background-image: url('logo1.png');
    background-size: cover;
    background-position: center;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 20px;
    position: relative;
}

header nav ul {
    list-style-type: none;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

header nav a {
    color: #000;
    text-decoration: none;
    font-size: 15px;
    position: relative;
}

.nav-button {
    display: inline-block;
    padding: 10px 10px;
    background-color: rgb(253, 178, 37);
    border-radius: 25px;
    font-weight: bold;
    transition: background-color 0.3s;
    text-align: center;
    width: 140px;
}

.nav-button:hover {
    background-color: rgb(255, 200, 100);
}

.logo img {
    width: 30px;
    height: auto;
    vertical-align: middle;
    margin-top: -12px;
}

/* Эффект выделения вкладок при наведении */
header nav a:hover {
    color: #ffffff;
    transition: color 0.3s ease;
}

/* Адаптивность ТОЛЬКО для шапки на мобильных устройствах */
@media (max-width: 768px) {
    /* Фиксируем body чтобы не было горизонтальной прокрутки */
    body {
        overflow-x: hidden;
        max-width: 100vw;
    }
    
    /* Адаптация шапки */
    header {
        padding: 8px 5px;
        min-height: auto;
        background-image: url('logo.jpeg');
        background-size: cover;
        background-position: center;
        min-height: 80px;
        position: relative;
    }
    
    /* Полупрозрачный оверлей для лучшей читаемости */
    header::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(255, 255, 255, 0.85);
        z-index: 0;
    }
    
    /* Навигационное меню */
    header nav ul {
        position: relative;
        z-index: 1;
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px;
        padding: 0;
        width: 100%;
    }
    
    /* Стили для кнопок */
    .nav-button {
        font-size: 9.5px;
        padding: 6px 4px;
        min-height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        line-height: 1.1;
        width: calc(50% - 8px);
        max-width: 175px;
        min-width: 175px;
        box-sizing: border-box;
        white-space: normal;
        text-align: center;
        background-color: rgba(253, 178, 37, 0.95);
    }
    
    /* Специальные стили для длинных текстов */
    .nav-button.long-text {
        font-size: 9px;
        padding: 5px 3px;
        line-height: 1.0;
        letter-spacing: -0.1px;
        min-height: 36px;
    }
    
    /* Позиционирование логотипа */
    .logo {
        order: 1;
        flex: 0 0 100%;
        text-align: center;
        margin: 5px 0;
        position: relative;
        z-index: 1;
    }
    
    .logo img {
        width: 25px;
        margin: 0;
    }
}

/* Для очень маленьких экранов (только шапка) */
@media (max-width: 480px) {
    .nav-button {
        font-size: 9px;
        min-width: 110px;
        width: calc(50% - 6px);
    }
    
    .nav-button.long-text {
        font-size: 8.5px;
        min-height: 36px;
    }
    
    .logo img {
        width: 22px;
    }
}

/* Фикс для экранов меньше 400px (только шапка) */
@media (max-width: 400px) {
    .nav-button {
        font-size: 8.5px;
        min-width: 105px;
    }
    
    .nav-button.long-text {
        font-size: 8px;
        padding: 4px 2px;
    }
}

/* ОСТАЛЬНЫЕ СТИЛИ ОСТАЮТСЯ БЕЗ ИЗМЕНЕНИЙ */

/* Основные услуги */
.services {
    padding: 40px;
    background-color: #fff;
    text-align: center;
}

.services h2 {
    font-size: 40px;
    margin-bottom: 40px;
    font-weight: 700;
}

.service-boxes {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

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

/* FIXED: Исправленное позиционирование для reverse блока */
.service-item.reverse {
    display: grid;
    grid-template-columns: 62% 38%;
    position: relative;
    gap: 0;
    overflow: hidden;
}

.service-item.reverse .service-description {
    background-color: #121212;
    color: white;
    padding: 30px;
    position: relative;
    z-index: 2;
}

.service-item.reverse .service-image {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

/* Оверлей для второго блока */
.service-item.reverse .service-image .overlay {
    position: absolute;
    top: 0;
    right: -5%;
    width: 70%;
    height: 50%;
    background: rgba(245, 166, 35, 0.7);
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 30px;
    box-sizing: border-box;
    text-align: left;
    margin-top: 350px;
}

/* Оверлей для первого и третьего блоков */
.service-item:not(.reverse) .service-image .overlay {
    position: absolute;
    top: 0;
    left: -5%;
    width: 50%;
    height: 50%;
    background: rgba(245, 166, 35, 0.7);
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-end;
    padding: 30px;
    box-sizing: border-box;
    text-align: right;
    margin-top: 170px;
}

/* Стили для текста в оверлее первого и третьего блоков */
.service-item:not(.reverse) .overlay-text {
    align-items: flex-end;
    text-align: right;
}

.service-item:not(.reverse) .overlay-subtitle::before,
.service-item:not(.reverse) .overlay-subtitle::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 15px;
    height: 2px;
    background: white;
    transform: translateY(-50%);
}

.service-item:not(.reverse) .overlay-subtitle::before {
    left: 0;
}

/* Общие стили для оверлея */
.service-image {
    position: relative;
}

.service-image .overlay1 {
    position: absolute;
    top: 0;
    left: -30%;
    width: 100%;
    height: 70%;
    background: rgba(245, 166, 35, 0.7);
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 20px;
    box-sizing: border-box;
    text-align: right;
    margin-top: 170px;
}

/* Стили для текста на оверлее */
.overlay-text {
    position: relative;
    z-index: 2;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    max-width: 80%;
}

.overlay-subtitle {
    position: relative;
    display: inline-block;
    padding: 0 30px;
    margin-bottom: 15px;
    font-family: 'Montserrat', sans-serif;
    font-style: italic;
    font-size: 8px;
    letter-spacing: 1px;
}

.overlay-subtitle::before,
.overlay-subtitle::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 25px;
    height: 2px;
    background: white;
    transform: translateY(-50%);
}

.overlay-subtitle::before {
    left: 0;
}

.overlay-subtitle::after {
    right: 0;
}

.overlay-title {
    font-weight: 900;
    font-size: 10px;
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-right: 30px;
    display: block;
    text-align: left;
    white-space: normal;
    word-wrap: break-word;
}

/* Стили для текста на оверлее */
.overlay-text1 {
    position: relative;
    z-index: 2;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    max-width: 80%;
}

.overlay-subtitle1 {
    position: relative;
    display: inline-block;
    padding: 0 30px;
    margin-bottom: 15px;
    font-family: 'Montserrat', sans-serif;
    font-style: italic;
    font-size: 8px;
    letter-spacing: 1px;
}

.overlay-subtitle1::before,
.overlay-subtitle1::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 25px;
    height: 2px;
    background: white;
    transform: translateY(-50%);
}

.overlay-subtitle1::before {
    left: 0;
}

.overlay-subtitle1::after {
    right: 0;
}

.overlay-title1 {
    font-weight: 900;
    font-size: 18px;
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-right: 30px;
    display: block;
    text-align: right;
    white-space: normal;
    word-wrap: break-word;
}

.service-item.reverse .service-image img {
    width: 100%;
    height: auto;
    display: block;
    position: relative;
    z-index: 0;
}

/* Общие стили для описания услуг */
.service-item .service-description {
    flex: 2;
    text-align: left;
    position: relative;
    z-index: 2;
}

.service-item .service-description h3 {
    font-size: 28px;
    margin-bottom: 5px;
    font-weight: 700;
}

.service-item .service-description p {
    font-size: 18px;
    margin-bottom: 10px;
}

.service-icon {
    width: 520px;
    border-radius: 5px;
    margin-bottom: 20px;
    max-width: 100%;
}

/* Кнопка призыва к действию */
.cta-button {
    padding: 10px 20px;
    background-color: rgb(253, 178, 37);
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    margin-top: 20px;
    display: inline-block;
    font-family: 'Montserrat', sans-serif;
}

/* Стили для раздела "Готовые проекты" */
.project-section {
    background-color: #121212;
    color: #fff;
    padding: 60px 20px;
}

.project-section h2 {
    text-align: center;
    font-size: 40px;
    margin-bottom: 40px;
    font-weight: 700;
    color: #FDB225;
}

.project-carousel {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
}

.project-slide {
    display: flex;
    justify-content: space-between;
    padding: 20px;
    transition: transform 0.5s ease-in-out;
}

.project-slide:not(.active) {
    display: none;
}

.project-image-main {
    flex: 0 0 40%;
    display: flex;
    align-items: center;
    cursor: pointer; /* Добавлен курсор для клика */
}

/* Изменения для центрального изображения */
.project-main-img {
    width: 100%;
    max-height: 400px; /* Убрано aspect-ratio */
    object-fit: contain; /* Изменено с cover на contain */
    border-radius: 5px;
    cursor: pointer; /* Добавлен курсор для клика */
    transition: transform 0.3s; /* Анимация при наведении */
}

.project-main-img:hover {
    transform: scale(1.03); /* Увеличение при наведении */
}

.project-info {
    flex: 0 0 35%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 20px;
}

.project-info h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #FDB225;
}

.project-info p {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.project-order-btn {
    padding: 12px 25px;
    background-color: #FDB225;
    color: #000;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    width: 100%;
    max-width: 300px;
}

.project-order-btn:hover {
    background-color: #ffcc66;
}

.project-gallery {
    flex: 0 0 30%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.project-gallery-img {
    width: 100%;
    max-height: 180px; /* Ограничение высоты */
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.3s;
    margin-bottom: 10px;
}

.project-gallery-img:hover {
    transform: scale(1.03);
}

.project-divider {
    width: 100%;
    height: 1px;
    background-color: #444;
    margin: 10px 0;
}

.project-carousel-nav {
    position: flex;
    bottom: 20px;
    right: 50px;
    z-index: 10;
    display: flex;
    gap: 10px;
}

.project-prev, .project-next {
    background-color: rgba(253, 178, 37, 0.7);
    color: #000;
    border: none;
    font-size: 20px;
    padding: 8px 15px;
    cursor: pointer;
    transition: background-color 0.3s;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.project-prev:hover, .project-next:hover {
    background-color: #FDB225;
}

/* Модальное окно */
.project-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
}

.project-modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
}

.project-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.project-close:hover,
.project-close:focus {
    color: #FDB225;
    text-decoration: none;
}

/* Адаптивность */
/* Адаптивность */
@media (max-width: 992px) {
    .project-slide {
        flex-direction: column;
        align-items: center;
    }
    
    .project-image-main,
    .project-info,
    .project-gallery {
        flex: 0 0 100%;
        max-width: 80%;
        margin-bottom: 30px;
    }
    
    .project-carousel-nav {
        position: static;
        text-align: center;
        margin-top: 20px;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .project-section h2 {
        font-size: 32px;
    }
    
    .project-info h3 {
        font-size: 20px;
    }
    
    .project-info p {
        font-size: 14px;
    }
    
    .project-image-main,
    .project-info,
    .project-gallery {
        max-width: 100%;
    }
    
    .project-main-img {
        max-height: 300px;
    }
}
/* Карусель */
.carousel {
    padding: 40px;
    background-color: #e8e8e8;
    text-align: center;
}

.carousel h2 {
    margin-bottom: 50px;
    font-weight: 700;
}

.carousel-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    height: 450px;
    margin: 40px auto 0;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.carousel-images {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

.carousel-images img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    flex-shrink: 0;
}

/* Карусель кнопки */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 24px;
    padding: 12px 15px;
    cursor: pointer;
    z-index: 10;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
    font-family: 'Montserrat', sans-serif;
}

.carousel-btn:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.carousel-btn.prev {
    left: 20px;
}

.carousel-btn.next {
    right: 20px;
}

/* Индикаторы карусели */
.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 10px;
    z-index: 10;
}

.carousel-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background-color 0.3s;
}

.carousel-indicator.active {
    background-color: rgb(253, 178, 37);
}

/* Подвал */
footer {
    background-color: #121212;
    color: #fff;
    padding: 30px 0;
    text-align: center;
}

footer p {
    margin-bottom: 10px;
}

/* Адаптивность ТОЛЬКО для мобильных устройств */
@media (max-width: 768px) {
    body {
        overflow-x: hidden;
        max-width: 100vw;
    }
    
    /* УДАЛЕНЫ СТИЛИ ШАПКИ ИЗ ЭТОГО МЕДИАЗАПРОСА */
    
    .services {
        padding: 20px 10px;
    }
    
    .services h2 {
        font-size: 26px;
        margin-bottom: 20px;
    }
    
    .service-item {
        flex-direction: column;
        gap: 15px;
        margin-bottom: 20px;
    }
    
    .service-item.reverse {
        display: flex;
        grid-template-columns: none;
        flex-direction: column;
    }
    
    .service-item.reverse .service-description {
        padding: 20px;
        order: 2;
    }
    
    .service-item.reverse .service-image {
        order: 1;
    }
    
    .service-icon {
        width: 100%;
        max-width: 100%;
    }
    
    .service-description h3 {
        font-size: 20px;
        text-align: center;
    }
    
    .service-description p {
        font-size: 14px;
        text-align: center;
    }
    
    /* Адаптация оверлеев для мобильных */
    .service-item.reverse .service-image .overlay,
    .service-item:not(.reverse) .service-image .overlay,
    .service-image .overlay1 {
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        width: 100%;
        height: auto;
        margin-top: 0;
        padding: 15px;
        text-align: center;
        background: rgba(245, 166, 35, 0.9);
        margin-bottom: 20px;
    }
    
    .overlay-text, .overlay-text1 {
        max-width: 100%;
        text-align: center;
    }
    
    .overlay-title, .overlay-title1 {
        text-align: center;
        margin-right: 0;
        font-size: 16px;
    }
    
    .overlay-subtitle, .overlay-subtitle1 {
        font-size: 12px;
        padding: 0 20px;
    }
    
    .overlay-subtitle::before, 
    .overlay-subtitle::after,
    .overlay-subtitle1::before,
    .overlay-subtitle1::after {
        width: 15px;
    }
    
    .carousel {
        padding: 20px 5px;
    }
    
    .carousel h2 {
        margin-bottom: 30px;
        font-size: 26px;
    }
    
    .carousel-container {
        max-width: 100%;
        height: 300px;
        margin-top: 20px;
        padding: 0 10px;
    }
    
    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
        padding: 8px;
    }
    
    .carousel-btn.prev {
        left: 5px;
    }
    
    .carousel-btn.next {
        right: 5px;
    }
    
    footer {
        padding: 15px;
        position: relative;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 480px) {
    /* УДАЛЕНЫ СТИЛИ ШАПКИ ИЗ ЭТОГО МЕДИАЗАПРОСА */
    
    .overlay-title, .overlay-title1 {
        font-size: 14px;
    }
    
    .overlay-subtitle, .overlay-subtitle1 {
        font-size: 10px;
    }
    
    .carousel-container {
        height: 250px;
    }
}

/* Фикс для экранов меньше 400px */
@media (max-width: 400px) {
    /* УДАЛЕНЫ СТИЛИ ШАПКИ ИЗ ЭТОГО МЕДИАЗАПРОСА */
    
    .carousel-container {
        height: 200px;
    }
}