/* Сброс стилей и базовые настройки */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #1a252f;
    --text-color: #1a252f;
    --text-light: #7f8c8d;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 10px 25px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
    --border-radius: 8px;
    --max-width: 1400px;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f9f9f9;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-color);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-family: 'Montserrat', sans-serif;
    text-align: center;
    font-size: 1rem;
    outline: none;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background-color: transparent;
    color: var(--secondary-color);
    border: 2px solid var(--secondary-color);
}

.btn-secondary:hover {
    background-color: var(--secondary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 0 1rem;
}

.section-title {
    position: relative;
    display: inline-block;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--secondary-color);
    border-radius: 2px;
}

.section-subtitle {
    color: var(--text-light);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.image-placeholder {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-weight: 500;
    overflow: hidden;
    text-align: center;
    padding: 2rem;
}

.image-placeholder i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

/* ==================== ПЕРЕКЛЮЧАТЕЛЬ ЯЗЫКОВ - ИСПРАВЛЕНО ==================== */
/* Языковой переключатель теперь в правом верхнем углу, меню ниже */
.language-switcher {
    position: fixed;
    top: 10px; /* Опускаем ниже, чтобы не перекрывало меню */
    right: 20px;
    z-index: 1001;
    display: flex;
    gap: 5px;
    background: white;
    border-radius: 30px;
    padding: 5px;
    box-shadow: var(--shadow);
}

/* Делаем языковой переключатель компактнее */
.lang-btn {
    padding: 0.4rem 0.8rem;
    border: none;
    background: transparent;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 0.8rem;
}

.lang-btn.active {
    background-color: var(--secondary-color);
    color: white;
}

.lang-btn:hover:not(.active) {
    background-color: var(--light-color);
}

/* ==================== ПЛАВАЮЩИЕ КНОПКИ ==================== */
.floating-controls {
    position: fixed;
    bottom: 30px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.messenger-btn, .scroll-to-top {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.whatsapp {
    background-color: #25D366;
}

.telegram {
    background-color: #0088cc;
}

.scroll-to-top {
    background-color: var(--primary-color);
    opacity: 0;
    visibility: hidden;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.messenger-btn:hover, .scroll-to-top:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

/* ==================== ШАПКА САЙТА - ИСПРАВЛЕНО ==================== */
/* Делаем шапку выше, чтобы меню было ниже языкового переключателя */
.header {
    background-color: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 999;
    padding: 50px 0 1rem; /* Увеличиваем верхний отступ, чтобы меню было ниже */
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px; /* Добавляем отступ сверху */
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-icon {
    width: 60px;
    height: 60px;
    background-color: ;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
    flex-shrink: 0;
}

.logo-text h1 {
    font-size: 1.8rem;
    margin-bottom: 0.2rem;
    color: var(--primary-color);
}

.tagline {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0;
}

/* ==================== НАВИГАЦИОННОЕ МЕНЮ - ИСПРАВЛЕНО ==================== */
/* Меню теперь находится ниже языкового переключателя */
.nav-menu {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-weight: 600;
    color: var(--text-color);
    transition: var(--transition);
    position: relative;
    padding: 0.5rem 0;
}

.nav-link:hover, .nav-link.active {
    color: var(--secondary-color);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--secondary-color);
    border-radius: 1.5px;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
    padding: 0.5rem;
}

/* ==================== ГЕРОЙ СЕКЦИЯ ==================== */
.hero-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    position: relative;
    overflow: hidden;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-text {
    padding-right: 1rem;
}

.hero-title {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-image .image-placeholder {
    height: 400px;
    width: 100%;
}

/* ==================== СЕКЦИЯ "О КОМПАНИИ" ==================== */
.about-section {
    padding: 5rem 0;
    background-color: white;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.7;
}

.features-list {
    margin-top: 2rem;
}

.features-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    margin-bottom: 0.8rem;
}

.features-list i {
    color: var(--secondary-color);
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.about-image .image-placeholder {
    height: 400px;
    width: 100%;
}

/* ==================== ГАЛЕРЕЯ ==================== */
.gallery-section {
    padding: 5rem 0;
    background-color: #f9f9f9;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.gallery-item {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.gallery-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.gallery-img {
    height: 250px;
    width: 100%;
}

.gallery-info {
    padding: 1.5rem;
}

.gallery-info h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.gallery-info p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* ==================== УСЛУГИ ==================== */
.services-section {
    padding: 5rem 0;
    background-color: white;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
    border: 1px solid #eee;
    box-shadow: var(--shadow);
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
    border-color: var(--secondary-color);
}

.service-icon {
    width: 80px;
    height: 80px;
    background-color: var(--light-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--secondary-color);
    font-size: 2rem;
    transition: var(--transition);
}

.service-card:hover .service-icon {
    background-color: var(--secondary-color);
    color: white;
}

.service-card h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-size: 1.3rem;
}

.service-card p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.5;
    flex-grow: 1;
}

/* ==================== КОНТАКТЫ ==================== */
.contact-section {
    padding: 5rem 0;
    background-color: #f9f9f9;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.contact-icon {
    width: 60px;
    height: 60px;
    background-color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary-color);
    font-size: 1.5rem;
    flex-shrink: 0;
    box-shadow: var(--shadow);
}

.contact-text h3 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.contact-text p {
    color: var(--text-light);
    line-height: 1.5;
}

.contact-form {
    background-color: white;
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-family: 'Open Sans', sans-serif;
    font-size: 1rem;
    transition: var(--transition);
    background-color: #f9f9f9;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
    background-color: white;
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

/* ==================== ПОДВАЛ ==================== */
.footer {
    background-color: var(--primary-color);
    color: white;
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-logo .logo {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
}

.footer-logo .logo-text h2 {
    color: white;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.footer-logo .tagline {
    color: #bdc3c7;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.footer-column h3 {
    color: white;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.footer-column ul li {
    margin-bottom: 0.8rem;
}

.footer-column a {
    color: #bdc3c7;
    transition: var(--transition);
    font-size: 0.95rem;
}

.footer-column a:hover {
    color: var(--secondary-color);
    padding-left: 5px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
    color: #ffffff;
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* ==================== МОДАЛЬНОЕ ОКНО ==================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1100;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: white;
    width: 100%;
    max-width: 500px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: modalAppear 0.3s ease;
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background-color: var(--primary-color);
    color: white;
}

.close-modal {
    background: none;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-body {
    padding: 2rem;
    text-align: center;
}

.success-icon {
    font-size: 4rem;
    color: #2ecc71;
    margin-bottom: 1.5rem;
}

.modal-footer {
    padding: 1.5rem;
    text-align: center;
    border-top: 1px solid #eee;
}

/* ==================== АДАПТИВНОСТЬ ==================== */
@media (max-width: 1200px) {
    .hero-title {
        font-size: 2.4rem;
    }
    
    .contact-content {
        gap: 3rem;
    }
}

@media (max-width: 992px) {
    h1 {
        font-size: 2.2rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    .hero-content,
    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-links {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==================== ТАБЛЕТКИ И МОБИЛЬНЫЕ ==================== */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    /* Языковой переключатель на мобильных - компактнее и ниже */
    .language-switcher {
        top: 5px;
        right: 10px;
        padding: 3px;
    }
    
    .lang-btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.7rem;
    }
    
    /* Шапка с меньшим отступом на мобильных */
    .header {
        padding: 40px 0 1rem;
    }
    
    .menu-toggle {
        display: block;
    }
    
    /* Мобильное меню */
    .nav-list {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        height: 100vh;
        background-color: white;
        flex-direction: column;
        align-items: flex-start;
        padding: 5rem 2rem 2rem;
        box-shadow: var(--shadow);
        transition: var(--transition);
        z-index: 998;
    }
    
    .nav-list.active {
        left: 0;
    }
    
    .nav-link {
        padding: 0.8rem 0;
        font-size: 1.1rem;
        width: 100%;
        border-bottom: 1px solid #eee;
    }
    
    .nav-link.active::after {
        display: none;
    }
    
    .nav-link.active {
        color: var(--secondary-color);
        font-weight: 700;
    }
    
    /* Герой секция на мобильных */
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .section-header {
        margin-bottom: 2rem;
    }
    
    /* Футер на мобильных */
    .footer-links {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    /* Плавающие кнопки на мобильных */
    .floating-controls {
        bottom: 20px;
        right: 15px;
    }
    
    .messenger-btn, .scroll-to-top {
        width: 55px;
        height: 55px;
        font-size: 1.3rem;
    }
}

/* ==================== МАЛЕНЬКИЕ СМАРТФОНЫ ==================== */
@media (max-width: 480px) {
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.3rem;
    }
    
    /* Отступы секций на мобильных */
    .hero-section,
    .about-section,
    .gallery-section,
    .services-section,
    .contact-section {
        padding: 3rem 0;
    }
    
    .section-title::after {
        width: 60px;
        height: 3px;
    }
    
    /* Форма на мобильных */
    .contact-form {
        padding: 1.5rem;
    }
    
    /* Модальное окно на мобильных */
    .modal-content {
        margin: 1rem;
    }
    
    /* Футер на мобильных */
    .footer {
        padding: 3rem 0 1.5rem;
    }
    
    .footer-bottom {
        font-size: 0.8rem;
    }
    
    /* Языковой переключатель на маленьких экранах */
    .language-switcher {
        top: 5px;
        right: 5px;
    }
    
    .lang-btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.65rem;
    }
}

/* ==================== 4K ЭКРАНЫ ==================== */
@media (min-width: 2000px) {
    :root {
        --max-width: 1800px;
        font-size: 18px;
    }
    
    .container {
        padding: 0 3rem;
    }
    
    .services-grid,
    .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    /* Языковой переключатель на больших экранах */
    .language-switcher {
        top: 20px;
        right: 30px;
    }
    
    .lang-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    /* Шапка на больших экранах */
    .header {
        padding: 60px 0 1.5rem;
    }
    
    /* Плавающие кнопки на больших экранах */
    .floating-controls {
        bottom: 40px;
        right: 30px;
    }
    
    .messenger-btn, .scroll-to-top {
        width: 70px;
        height: 70px;
        font-size: 1.8rem;
    }
}

/* ==================== ДОПОЛНИТЕЛЬНЫЕ ИСПРАВЛЕНИЯ ==================== */
/* Убедимся, что меню не перекрывается языковым переключателем */
@media (min-width: 769px) {
    .nav-list {
        position: relative;
        z-index: 1;
    }
    
    /* При наведении на пункты меню они должны быть выше */
    .nav-link:hover {
        z-index: 2;
    }
}

/* Анимация появления элементов при прокрутке */
.service-card, .gallery-item, .contact-item {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.service-card.animate, .gallery-item.animate, .contact-item.animate {
    opacity: 1;
    transform: translateY(0);
}