/* ======================== */
/* Глобальные переменные */
/* ======================== */
:root {
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --accent-color: #e74c3c;
    --text-color: #333;
    --background-color: #f4f6f9;

    --dark-bg: #121212;
    --dark-card: #1e1e1e;
    --dark-text: #e0e0e0;

    --spacing-sm: 10px;
    --spacing-md: 20px;
    --spacing-lg: 40px;
    --border-radius: 8px;

    --color-bg: var(--background-color);
    --color-text: var(--text-color);
    --color-header: white;
    --color-footer: var(--dark-bg);
    --color-card-bg: var(--background-color);
    --color-btn-bg: var(--secondary-color);
    --color-btn-text: white;
    --color-link: var(--text-color);
    --color-link-hover: var(--primary-color);
}

/* Темная тема: переопределение */
body.dark-theme {
    --color-bg: var(--dark-bg);
    --color-text: var(--dark-text);
    --color-header: #1a1a1a;
    --color-footer: #1a1a1a;
    --color-card-bg: var(--dark-card);
    --color-btn-bg: var(--primary-color);
    --color-btn-text: white;
    --color-link: var(--dark-text);
    --color-link-hover: var(--secondary-color);
}

/* ======================== */
/* Сброс и базовые стили */
/* ======================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ======================== */
/* Контейнер и заголовки */
/* ======================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

h1, h2, h3 {
    font-weight: 700;
}

/* ======================== */
/* Шапка и навигация */
/* ======================== */
.header {
    background-color: var(--color-header);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: var(--spacing-md) 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    width: 125px;
    margin: -15px 0 -25px 0;
}

.main-nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 0;
    margin: 20px 0;
}

.main-nav ul li a {
    text-decoration: none;
    color: #004080;
    font-weight: bold;
    padding: 10px 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f0f8ff;
}

.main-nav ul li a:hover,
.main-nav ul li a.active {
    background: #3498db;
    color: #fff;
}

.main-nav i {
    font-size: 16px;
}

.dark-theme .main-nav ul li a {
    background: #1f1f1f;
    color: #ccc;
}

.dark-theme .main-nav ul li a:hover,
.dark-theme .main-nav ul li a.active {
    background: #3498db;
    color: #fff;
}

.dark-theme .main-nav i {
    color: #ccc;
}

/* ======================== */
/* Переключатели темы и языка */
/* ======================== */
.header-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.theme-toggle {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--color-text);
}

.lang-switchers {
    display: flex;
    gap: 5px;
    margin-right: var(--spacing-md);
}

.lang-switcher {
    background: none;
    border: 1px solid var(--color-text);
    padding: 5px 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.lang-switcher.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* ======================== */
/* Hero-блок */
/* ======================== */
.hero {
    background-image: url('images/background.jpg'); /* путь к фоновому изображению */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: white;
    position: relative;
    z-index: 1;
    padding: 100px 0;
text-align: center;
}

.hero::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
}

/* ======================== */
/* Статистика в Hero */
/* ======================== */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: var(--spacing-lg);
    margin: var(--spacing-lg) 0;
}

.stat-item {
    text-align: center;
}

.stat-item span {
    display: block;
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--secondary-color);
}

/* ======================== */
/* Кнопки */
/* ======================== */
.btn {
    display: inline-block;
    background-color: var(--color-btn-bg);
    color: var(--color-btn-text);
    padding: 12px 24px;
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: transform 0.3s;
    cursor: pointer;
}

.btn:hover {
    transform: scale(1.05);
}

/* ======================== */
/* Услуги и преимущества */
/* ======================== */
.services, .advantages {
    padding: var(--spacing-lg) 0;
    background-color: var(--color-bg);
}

.services h2, .advantages h2 {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.services-grid, .advantages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
}

.service-card, .advantage-card {
    background-color: var(--color-card-bg);
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
    text-align: center;
    transition: transform 0.3s;
}

.service-card:hover, .advantage-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.service-card i, .advantage-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
}

/* ======================== */
/* Быстрая заявка */
/* ======================== */
.quick-application {
    position: fixed;
    right: -10px;
    top: 50%;
    transform: rotate(-90deg) translateY(100%);
    z-index: 1000;
}

.quick-application button {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
}

/* ======================== */
/* Модальное окно */
/* ======================== */
.modal {
display: none;
    position: fixed;
    z-index: 1500;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease-in-out;
}


.modal-content {
    background-color: var(--color-card-bg);
    padding: 40px;
    border-radius: 12px;
    max-width: 400px;
    width: 90%;
margin: 100px auto;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    animation: slideUp 0.3s ease-in-out;
    text-align: center;
}

.modal .close {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 1.5rem;
    color: var(--text-color);
    cursor: pointer;
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Стили формы в модальном окне */
.modal-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.modal-form input,
.modal-form select,
.modal-form textarea {
    padding: 12px;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    background-color: #fff;
    width: 100%;
    transition: border-color 0.2s;
}

.modal-form input:focus,
.modal-form select:focus,
.modal-form textarea:focus {
    border-color: var(--primary-color);
    outline: none;
}

.modal-form button {
    padding: 12px;
    background-color: var(--accent-color);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.modal-form button:hover {
    background-color: #c0392b;
}

/* ======================== */
/* SEO блок */
/* ======================== */
.seo-section {
    padding: 60px 20px;
    background-color: #fdfdfd;
    color: #222;
    line-height: 1.8;
    font-size: 1.1rem;
}

.seo-section h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #2c3e50;
    text-align: center;
}

.seo-section h3 {
    margin-top: 40px;
    color: var(--primary-color);
    font-size: 1.5rem;
}

.seo-list {
    list-style: none;
    padding-left: 0;
    margin: 20px 0;
}

.seo-list li {
    margin-bottom: 10px;
    padding-left: 24px;
    position: relative;
}

.seo-list li::before {
    content: '✔';
    color: var(--secondary-color);
    position: absolute;
    left: 0;
}

.seo-cta {
    margin-top: 40px;
    text-align: center;
    background-color: #eaf9f1;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #c8e6c9;
}

.seo-cta p {
    margin-bottom: 10px;
    font-weight: 500;
}

.seo-cta .btn {
    display: inline-block;
    margin-top: 10px;
    background-color: var(--secondary-color);
    color: white;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.seo-cta .btn:hover {
    background-color: #27ae60;
}

/* Темная тема для SEO блока */
body.dark-theme .seo-section {
    background-color: var(--dark-card);
    color: var(--dark-text);
}

body.dark-theme .seo-section h2 {
    color: var(--secondary-color);
}

body.dark-theme .seo-section h3 {
    color: #5dade2;
}

body.dark-theme .seo-list li::before {
    color: var(--secondary-color);
}

body.dark-theme .seo-cta {
    background-color: #2b2b2b;
    border-color: #3a3a3a;
}

body.dark-theme .seo-cta p {
    color: #f1f1f1;
}

body.dark-theme .seo-cta .btn {
    background-color: var(--secondary-color);
    color: white;
}

body.dark-theme .seo-cta .btn:hover {
    background-color: #27ae60;
}

/* ======================== */
/* Галерея */
/* ======================== */
.gallery-section {
    padding: 40px 0;
    background: #f8f8f8;
}

.gallery-section h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2em;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 0 20px;
}

.gallery-grid img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    cursor: pointer;
}

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

/* Модальное окно для изображений галереи */
.img-modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0; top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.img-modal-content {
    max-width: 90%;
    max-height: 80vh;
    margin: auto;
    display: block;
}

.img-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.img-prev, .img-next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    margin-top: -22px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    padding: 16px;
    user-select: none;
    transition: 0.3s;
}

.img-prev:hover, .img-next:hover {
    color: #ccc;
}

.img-prev {
    left: 20px;
}

.img-next {
    right: 20px;
}

#imgCaption {
    margin-top: 10px;
    color: #fff;
    text-align: center;
}

/* ======================== */
/* Контакты */
/* ======================== */
.cont-section {
    padding: 40px 15px;
    background: #f9f9f9;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.cont-section .container {
    max-width: 900px;
    margin: 0 auto;
}

.cont-section h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2rem;
    color: #222;
}

.contacts-wrapper {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}

.contact-info,
.contact-form {
    background: #fff;
    padding: 25px 30px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgb(0 0 0 / 0.1);
    flex: 1 1 400px;
}

.contact-info h3,
.contact-form h3 {
    margin-bottom: 20px;
    color: #007BFF;
    font-size: 1.5rem;
}

.contact-info p {
    font-size: 1rem;
    margin-bottom: 10px;
    color: #333;
}

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

.contact-info a:hover {
    text-decoration: underline;
}

.footer-social {
    margin-top: 20px;
}

.footer-social .social-link {
    font-size: 1.4rem;
    color: #555;
    margin-right: 15px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-social .social-link:hover {
    color: #007BFF;
}

/* Стили формы */
form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

form input[type="text"],
form input[type="tel"],
form textarea {
    padding: 12px 15px;
    font-size: 16px;
    border: 1.8px solid #ccc;
    border-radius: 6px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    resize: vertical;
}

form input[type="text"]:focus,
form input[type="tel"]:focus,
form textarea:focus {
    border-color: #007BFF;
    box-shadow: 0 0 6px rgba(0, 123, 255, 0.4);
    outline: none;
}

form button.btn {
    padding: 12px 20px;
    background-color: #007BFF;
    color: white;
    font-size: 18px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.25s ease;
}

form button.btn:hover {
    background-color: #0056b3;
}

/* ======================== */
/* Футер */
/* ======================== */
.footer {
    background-color: var(--color-footer);
    color: var(--color-text);
    padding: var(--spacing-lg) 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.footer-social a {
    color: var(--color-text);
    margin-right: var(--spacing-md);
    font-size: 1.5rem;
}

/* ======================== */
/* Адаптивность */
/* ======================== */
@media (max-width: 768px) {
    .header-wrapper {
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-stats {
        flex-direction: column;
    }

    .stat-item {
        margin: var(--spacing-md) 0;
    }

    .services-grid, .advantages-grid {
        grid-template-columns: 1fr;
    }

    .contacts-wrapper {
        flex-direction: column;
    }

    .main-nav ul {
        flex-direction: column;
        align-items: center;
    }

    .main-nav ul li {
        margin: 15px 0;
    }

    .mobile-menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 30px;
        height: 20px;
        cursor: pointer;
        z-index: 1000;
    }

    .mobile-menu-toggle span {
        width: 100%;
        height: 3px;
        background-color: var(--text-color);
        transition: all 0.3s ease;
    }

    .main-nav {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background-color: var(--color-bg);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: left 0.3s ease;
        z-index: 999;
    }

    .main-nav.active {
        left: 0;
    }

    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
}
