/* Общие стили */
:root {
    --orange: #FF7A45;
    --orange-dark: #e06a3a;
    --gray-dark: #333333;
    --gray-medium: #666666;
    --gray-light: #f5f5f5;
    --white: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: 'Open Sans', sans-serif;
    color: var(--gray-dark);
    line-height: 1.6;
    background-color: var(--white);
    width: 100%;
    overflow-x: hidden; /* Предотвращаем горизонтальный скролл */
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

h1, h2, h3, h4 {
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--gray-dark);
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

h2::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background: var(--orange);
    margin: 15px auto 0;
}

p {
    margin-bottom: 15px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Кнопки */
.btn {
    display: inline-block;
    padding: 12px 25px;
    background: var(--orange);
    color: var(--white);
    border-radius: 4px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

.btn:hover {
    background: var(--orange-dark);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-small {
    padding: 8px 15px;
    font-size: 0.9rem;
}

.btn-orange {
    background: var(--orange);
    color: var(--white);
}

.btn-orange:hover {
    background: var(--orange-dark);
}

/* Шапка - изменена на белую */
.header {
    background: var(--white);
    color: var(--gray-dark);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo img {
    height: 50px;
    width: auto;
    max-width: 100%;
}

.nav ul {
    display: flex;
    gap: 30px;
}

.nav a {
    color: var(--gray-dark);
    font-weight: 600;
    position: relative;
    white-space: nowrap;
}

.nav a:hover {
    color: var(--orange);
}

.nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: var(--orange);
    bottom: -5px;
    left: 0;
    transition: width 0.3s;
}

.nav a:hover::after {
    width: 100%;
}

.header-contacts {
    display: flex;
    align-items: center;
}

.header-contacts .btn {
    color: var(--white);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--gray-dark);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Основные секции */
section {
    padding: 80px 0;
    width: 100%;
}

.section-about {
    background: var(--gray-light);
    padding-top: 120px;
}

.section-about h1 {
    text-align: center;
    margin-bottom: 20px;
}

.subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: var(--gray-medium);
    margin-bottom: 50px;
}

.about-content {
    display: flex;
    gap: 50px;
    align-items: center;
    width: 100%;
}

.about-text {
    flex: 1;
}

.about-image {
    flex: 1;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Секция услуг */
.section-services {
    background: var(--white);
    padding: 80px 0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    width: 100%;
}

.service-card {
    background: var(--white);
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.service-icon {
    width: 70px;
    height: 70px;
    background: var(--orange);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--white);
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.service-card:hover .service-icon {
    transform: scale(1.2);
}

.service-card h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
    color: var(--gray-dark);
}

.service-card p {
    color: var(--gray-medium);
    line-height: 1.6;
}

/* Стили для галереи */
.works-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    width: 100%;
}

.work-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    height: 250px;
    cursor: pointer;
    transition: transform 0.3s ease;
    width: 100%;
}

.work-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.work-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Стили для секции отзывов */
.section-reviews {
    padding: 80px 0;
}

.reviews-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    width: 100%;
}

/* Отступ между отзывами Avito и Яндекс Картами */
.review-widget {
    width: 100%;
    overflow: hidden;
}

.review-widget:first-child {
    margin-bottom: 30px;
}

/* Адаптивность для отзывов */
@media (max-width: 768px) {
    .reviews-wrapper {
        grid-template-columns: 1fr;
    }
}

/* Стили для модального окна */
.white-popup-block {
    background: #fff;
    padding: 40px;
    max-width: 800px;
    margin: 40px auto;
    position: relative;
    width: 90%;
}

.additional-works-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 30px;
    width: 100%;
}

.additional-works-gallery a {
    display: block;
    height: 200px;
    border-radius: 8px;
    overflow: hidden;
    width: 100%;
}

.additional-works-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.text-center {
    text-align: center;
}

/* Стили для лупы */
.mfp-with-zoom .mfp-container,
.mfp-with-zoom.mfp-bg {
    opacity: 0;
    transition: all 0.3s ease-out;
}

.mfp-with-zoom.mfp-ready .mfp-container {
    opacity: 1;
}

.mfp-with-zoom.mfp-ready.mfp-bg {
    opacity: 0.8;
}

.mfp-with-zoom.mfp-removing .mfp-container,
.mfp-with-zoom.mfp-removing.mfp-bg {
    opacity: 0;
}

.mfp-zoom-in {
    transform: scale(0.8);
    opacity: 0;
    transition: all 0.3s;
}

.mfp-zoom-in.mfp-ready {
    transform: scale(1);
    opacity: 1;
}

.mfp-zoom-in.mfp-removing {
    transform: scale(0.8);
    opacity: 0;
}

/* Секция контактов */
.section-contacts {
    background: var(--white);
}

.contacts-wrapper {
    display: flex;
    gap: 50px;
    width: 100%;
}

.contacts-info {
    flex: 1;
}

.contacts-form {
    flex: 1;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
    width: 100%;
}

.contact-item i {
    color: var(--orange);
    font-size: 1.2rem;
    margin-right: 15px;
    margin-top: 3px;
    flex-shrink: 0;
}

.contact-item p {
    margin: 0;
    word-break: break-word;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--gray-dark);
    color: var(--white);
    border-radius: 50%;
    transition: all 0.3s;
}

.social-links a:hover {
    background: var(--orange);
    transform: translateY(-3px);
}

/* Форма */
form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.form-group {
    display: flex;
    flex-direction: column;
    width: 100%;
}

input, select, textarea {
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    transition: border 0.3s;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--orange);
}

/* Подвал - изменен на белый */
.footer {
    background: var(--white);
    color: var(--gray-dark);
    padding: 50px 0 20px;
    border-top: 1px solid #eee;
    width: 100%;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
    width: 100%;
}

.footer-logo img {
    margin-bottom: 15px;
    max-width: 100%;
}

.footer-menu h4, .footer-contacts h4 {
    color: var(--gray-dark);
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-menu ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-menu a:hover {
    color: var(--orange);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    width: 100%;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 992px) {
    .about-content {
        flex-direction: column;
    }
    
    .contacts-wrapper {
        flex-direction: column;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .additional-works-gallery {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--white);
        padding: 20px;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        width: 100%;
    }
    
    .nav.active {
        display: block;
    }
    
    .nav ul {
        flex-direction: column;
        gap: 15px;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    section {
        padding: 60px 0;
    }
    
    .section-about {
        padding-top: 100px;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .section-services {
        padding: 50px 0;
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
        font-size: 1.3rem;
    }

    .works-gallery {
        grid-template-columns: 1fr;
    }
    
    .header .container {
        flex-wrap: wrap;
    }
    
    .header-contacts {
        margin-top: 15px;
        width: 100%;
        justify-content: center;
    }
    
    .contacts-wrapper {
        gap: 30px;
    }
    
    .contact-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .contact-item i {
        margin-right: 0;
        margin-bottom: 10px;
    }
}

@media (max-width: 576px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    .header .container {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .logo {
        order: 1;
    }
    
    .mobile-menu-btn {
        order: 2;
    }
    
    .header-contacts {
        order: 3;
        width: 100%;
        justify-content: center;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-menu ul {
        align-items: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .contact-item {
        justify-content: center;
        text-align: center;
    }
    
    .contact-item i {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .works-gallery {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .work-item {
        height: 200px;
    }
}

/* Стили для плавающей кнопки телефона */
.floating-phone {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: var(--orange);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 999;
    transition: all 0.3s ease;
    cursor: pointer;
}

.floating-phone:hover {
    background: var(--orange-dark);
    transform: translateY(-5px) scale(1.1);
}

/* Стили для модального окна успешной отправки */
.success-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.success-popup-content {
    background: white;
    padding: 40px;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    position: relative;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.success-popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-medium);
}

.success-popup-close:hover {
    color: var(--orange);
}

/* Дополнительные стили для предотвращения горизонтального скролла */
body.fixed-position {
    position: fixed;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Исправление для iframe в отзывах */
.review-widget iframe {
    max-width: 100%;
    width: 100% !important;
}

/* Исправление для виджетов отзывов */
.sw-app, .review-widget > div {
    max-width: 100%;
    overflow: hidden;
}