@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: #000000;
    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;
}

/* Основной баннер */
.main-banner {
    display: flex;
    justify-content: flex-start;
    padding: 60px 20px;
    background-color: #333;
    color: white;
    align-items: center;
    position: relative;
}

.main-banner .banner-content h1 {
    margin-bottom: 20px;
    margin-top: -40px;
    position: relative;
    font-size: 3rem;
    z-index: 2;
}

.main-banner .banner-content p {
    font-size: 1rem;
    line-height: 1.6;
    margin-top: 20px;
}

/* Фон светлый для блока */
.main-banner.light-bg {
    background-color: #f9f9f9;
    color: #333;
}

.main-banner .banner-content {
    max-width: 50%;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    z-index: 1;
}

.main-banner .cta-button {
    padding: 10px 20px;
    background-color: rgb(253, 178, 37);
    color: rgb(0, 0, 0);
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    margin-top: 30px;
    display: inline-block;
}

/* Основная картинка */
.main-banner .banner-image {
    width: 70%;
    margin-left: auto;
    z-index: 0;
}

.main-banner .banner-image img {
    width: 100%;
    border-radius: 10px;
    z-index: 0;
}

/* Секция с услугами */
.services {
    padding: 30px;
    background-color: #fff;
    text-align: center;
}

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

.services .service-boxes {
    display: flex;
    justify-content: space-between;
    gap: 30px;
}

.services .service-item {
    width: 30%;
    background-color: #f1f1f1;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

.services .service-item img {
    width: 80px;
    margin-bottom: 10px;
}

.services .service-item h3 {
    font-size: 22px;
    margin-bottom: 10px;
}

/* Портфолио */
.projects {
    padding: 40px;
    background-color: #e8e8e8;
}

.projects h2 {
    text-align: center;
    font-size: 32px;
    margin-bottom: 40px;
}

.projects .project-gallery {
    display: flex;
    gap: 20px;
    justify-content: space-around;
}

.projects .project-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 200px;
}

.projects .project-item img {
    height: 70px;
    width: auto;
    max-width: 100%;
    margin-bottom: 10px;
}

/* Название проекта */
.projects .project-item h3.project-title {
    text-align: center;
    font-size: 20px;
    font-family: 'Montserrat', sans-serif;
    margin-top: 10px;
    color: #333;
    font-weight: normal;
}

/* Контакты */
.contacts {
    padding: 20px;
    background-color: #fff;
    text-align: center;
    padding-bottom: 50px;
}

.contacts form {
    margin-top: 50px;
}

.contacts form textarea {
    width: 100%;
    padding: 10px;
    border-radius: 5px;
    font-size: 16px;
}

.contacts form button {
    padding: 10px 20px;
    background-color: #ff6600;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    margin-top: 10px;
}

/* Подвал */
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;
    }
    
    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;
    }
    
    /* Основной баннер - мобильная адаптация */
    .main-banner {
        flex-direction: column;
        padding: 30px 15px;
    }
    
    .main-banner .banner-content {
        max-width: 100%;
        order: 1;
        text-align: center;
        margin-bottom: 20px;
    }
    
    .main-banner .banner-content h1 {
        font-size: 2rem;
        margin-top: 0;
    }
    
    .main-banner .banner-image {
        width: 100%;
        margin-left: 0;
        order: 2;
    }
    
    .main-banner .cta-button {
        margin-top: 20px;
    }
    
    /* Секция услуг - мобильная адаптация */
    .services {
        padding: 20px 10px;
    }
    
    .services h2 {
        font-size: 26px;
        margin-bottom: 20px;
    }
    
    .services .service-boxes {
        flex-direction: column;
        gap: 20px;
    }
    
    .services .service-item {
        width: 100%;
        padding: 15px;
    }
    
    /* Портфолио - мобильная адаптация */
    .projects {
        padding: 20px 10px;
    }
    
    .projects h2 {
        font-size: 26px;
        margin-bottom: 20px;
    }
    
    .projects .project-gallery {
        flex-wrap: wrap;
        gap: 15px;
        justify-content: center;
    }
    
    .projects .project-item {
        width: calc(50% - 15px);
        margin-bottom: 15px;
    }
    
    /* Контакты - мобильная адаптация */
    .contacts {
        padding: 20px 10px;
        padding-bottom: 30px;
    }
    
    .contacts form {
        margin-top: 20px;
    }
    
    /* Подвал - мобильная адаптация */
    footer {
        position: relative;
        padding: 10px;
    }
}

/* Для очень маленьких экранов */
@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;
    }
    
    .main-banner .banner-content h1 {
        font-size: 1.8rem;
    }
    
    .projects .project-item {
        width: 100%;
    }
}

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