@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700;900&display=swap');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: #F8FAFC;
    color: #1E293B;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Кнопки */
.btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all 0.2s ease;
    text-align: center;
}

.btn-primary {
    background-color: #E11D48;
    color: #FFFFFF;
}

.btn-primary:hover {
    background-color: #BE123C;
}

.btn-accent {
    background-color: #0284C7;
    color: #FFFFFF;
}

.btn-accent:hover {
    background-color: #0369A1;
}

.btn-outline {
    background-color: #E11D48;
    color: #FFFFFF;
}

.btn-outline:hover {
    background-color: #BE123C;
}

.btn-block {
    width: 100%;
}

/* Шапка сайта */
.site-header {
    background-color: #0F172A;
    color: #FFFFFF;
    position: sticky;
    top: 0;
    z-index: 900;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-container {
    display: flex;
    flex-direction: column;
    padding: 15px;
    gap: 12px;
}

.header-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 22px;
    font-weight: 900;
    color: #FFFFFF;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.main-nav {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.main-nav a {
    color: #E2E8F0;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: color 0.2s;
}

.main-nav a:hover {
    color: #38BDF8;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-phone-box {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.main-phone {
    color: #FFFFFF;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    transition: color 0.2s;
}

.main-phone:hover {
    color: #38BDF8;
}

.messengers-links {
    display: flex;
    gap: 6px;
    margin-top: 4px;
}

.messengers-links a {
    color: #FFFFFF;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    text-decoration: none;
    transition: opacity 0.2s;
}

.messengers-links a:hover {
    opacity: 0.85;
}

.msgr-tg { background-color: #24A1DE; }
.msgr-wa { background-color: #25D366; }
.msgr-vb { background-color: #7360F2; }

/* Десктопный переключатель языков */
.lang-switcher {
    position: relative;
}

.lang-btn {
    background-color: #334155;
    color: #FFFFFF;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.lang-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 5px;
    background-color: #FFFFFF;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 4px;
    overflow: hidden;
    z-index: 1000;
}

.lang-dropdown.show {
    display: block;
}

.lang-dropdown a {
    display: block;
    padding: 8px 16px;
    color: #1E293B;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
}

.lang-dropdown a:hover, .lang-dropdown a.active {
    background-color: #F1F5F9;
    color: #E11D48;
}

/* Мобильная языковая панель по умолчанию скрыта */
.mobile-lang-bar {
    display: none;
}

/* Hero Screen */
.hero-section {
    background: linear-gradient(rgba(15, 23, 42, 0.75), rgba(15, 23, 42, 0.75)), #1E293B;
    color: #FFFFFF;
    padding: 80px 0 90px;
    text-align: center;
}

.hero-title {
    font-size: 38px;
    font-weight: 900;
    margin-bottom: 15px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.hero-subtitle {
    font-size: 18px;
    color: #94A3B8;
    margin-bottom: 40px;
}

.hero-form {
    background-color: rgba(255, 255, 255, 0.15);
    padding: 20px;
    border-radius: 8px;
    backdrop-filter: blur(5px);
    max-width: 1000px;
    margin: 0 auto;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.form-grid input {
    width: 100%;
    padding: 12px 15px;
    border-radius: 6px;
    border: 1px solid #CBD5E1;
    font-size: 14px;
    outline: none;
}

/* Секции общие */
.section { padding: 70px 0; }
.section-title { text-align: center; font-size: 30px; font-weight: 900; color: #0F172A; margin-bottom: 8px; }
.section-subtitle { text-align: center; font-size: 16px; color: #64748B; margin-bottom: 45px; }

/* Услуги */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 25px; }
.service-card { background-color: #FFFFFF; border-radius: 10px; overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.05); border: 1px solid #E2E8F0; display: flex; flex-direction: column; }

.card-img-placeholder {
    width: 100%;
    height: 200px;
    background-color: #CBD5E1;
    overflow: hidden;
}
.card-img-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.card-body { padding: 20px; display: flex; flex-direction: column; justify-content: space-between; flex-grow: 1; text-align: center; }
.card-body h3 { font-size: 17px; color: #0F172A; margin-bottom: 15px; }

/* О нас */
.about-section { background-color: #FFFFFF; }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 25px; }
.feature-card { background-color: #F8FAFC; padding: 25px; border-radius: 10px; border: 1px solid #E2E8F0; }
.feature-icon { font-size: 32px; margin-bottom: 10px; }
.feature-card h3 { font-size: 18px; color: #0F172A; margin-bottom: 8px; }
.feature-card p { font-size: 14px; color: #64748B; }

.feature-card.feature-img-placeholder {
    padding: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #CBD5E1;
}

.feature-card.feature-img-placeholder img {
    width: 100%;
    height: 100%;
    min-height: 200px;
    object-fit: cover;
    display: block;
    border-radius: 10px;
}

/* Тарифы */
.tariffs-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 25px; margin-bottom: 30px; }
.tariff-card { background-color: #FFFFFF; border-radius: 10px; padding: 30px 20px; text-align: center; border: 1px solid #E2E8F0; box-shadow: 0 4px 15px rgba(0,0,0,0.04); }
.tariff-card.featured { border: 2px solid #E11D48; }
.tariff-badge { display: inline-block; background-color: #E2E8F0; color: #0F172A; padding: 4px 12px; border-radius: 20px; font-weight: 900; font-size: 12px; margin-bottom: 15px; }
.tariff-card h3 { font-size: 20px; margin-bottom: 10px; }
.tariff-card p { color: #64748B; font-size: 14px; margin-bottom: 20px; }
.tariffs-action { text-align: center; }

/* Галерея */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.gallery-placeholder {
    height: 220px;
    background-color: #CBD5E1;
    border-radius: 8px;
    overflow: hidden;
}
.gallery-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Контакты */
.contacts-section { background-color: #FFFFFF; }
.contacts-wrapper { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.contact-form { background-color: #F8FAFC; padding: 30px; border-radius: 10px; border: 1px solid #E2E8F0; }
.form-group { margin-bottom: 15px; }
.form-group label { display: block; font-weight: bold; font-size: 14px; margin-bottom: 6px; }
.form-group input, .form-group textarea { width: 100%; padding: 12px; border-radius: 6px; border: 1px solid #CBD5E1; font-family: inherit; font-size: 14px; }
.contacts-info { display: flex; flex-direction: column; gap: 20px; }

.info-img-placeholder {
    width: 100%;
    height: 220px;
    border-radius: 10px;
    overflow: hidden;
    background-color: #CBD5E1;
}
.info-img-placeholder > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.info-details { display: flex; flex-direction: column; gap: 16px; font-size: 15px; }
.contact-phone-link { color: #0F172A; text-decoration: none; font-weight: bold; }
.contact-phone-link:hover { color: #0284C7; }

/* Футер */
.site-footer { background-color: #0F172A; color: #94A3B8; padding-top: 40px; }
.footer-container { display: flex; justify-content: space-between; align-items: center; padding-bottom: 30px; border-bottom: 1px solid #334155; }
.footer-logo { color: #FFFFFF; font-size: 20px; font-weight: 900; }
.footer-nav a { color: #94A3B8; text-decoration: none; margin: 0 10px; font-size: 14px; }
.footer-nav a:hover { color: #FFFFFF; }

.footer-messengers {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-end;
}
.footer-messengers a {
    color: #FFFFFF;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
    text-decoration: none;
    text-align: center;
    min-width: 90px;
    transition: opacity 0.2s;
}
.footer-messengers a:hover { opacity: 0.85; }

.footer-bottom { padding: 20px 0; text-align: center; font-size: 13px; }

/* Модальные окна */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(15, 23, 42, 0.7);
    z-index: 2000;
    justify-content: center; align-items: center;
    backdrop-filter: blur(4px);
}
.modal-overlay.active { display: flex; }
.modal-window {
    background-color: #FFFFFF;
    padding: 30px;
    border-radius: 12px;
    width: 90%; max-width: 450px;
    position: relative;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    max-height: 90vh;
    overflow-y: auto;
}
.modal-close { position: absolute; top: 15px; right: 15px; background: none; border: none; font-size: 24px; cursor: pointer; color: #64748B; }
.modal-window h3 { font-size: 18px; margin-bottom: 5px; color: #0F172A; padding-right: 20px; }
.modal-price { font-size: 15px; font-weight: 700; color: #E11D48; margin-bottom: 20px; }
.modal-desc { font-size: 14px; color: #64748B; margin-bottom: 15px; }
.modal-success-window { text-align: center; }
.success-icon { font-size: 48px; margin-bottom: 10px; }

/* ==================== АДАПТИВНОСТЬ (МОБИЛЬНАЯ ВЕРСИЯ) ==================== */
@media (max-width: 992px) {
    .form-grid { grid-template-columns: repeat(2, 1fr); }
    .services-grid, .features-grid, .tariffs-grid, .gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .contacts-wrapper { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    /* 1. Шапка не фиксированная, скрываем телефон и мессенджеры */
    .site-header { position: relative; }

    .header-container {
        padding: 12px 15px;
        align-items: center;
    }

    .header-right { display: none !important; }

    .header-top-row {
        width: 100%;
        justify-content: center;
    }

    .main-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
        margin-top: 5px;
    }

    .main-nav a {
        font-size: 14px;
        margin: 0;
    }

    /* 2 & 3. Переключатель языков строчкой под меню */
    .mobile-lang-bar {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 8px;
        font-size: 13px;
        font-weight: 700;
        margin-top: 8px;
    }

    .mobile-lang-bar a {
        color: #94A3B8;
        text-decoration: none;
    }

    .mobile-lang-bar a.active,
    .mobile-lang-bar a:hover {
        color: #FFFFFF;
    }

    .mobile-lang-bar span {
        color: #475569;
    }

    /* 4. Футер: мессенджеры в строчку */
    .footer-container {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .footer-messengers {
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 8px;
    }

    .footer-messengers a {
        min-width: auto;
        padding: 6px 14px;
    }

    /* 5. Центрирование текста в блоках "О нас" и "Контакты" */
    .feature-card {
        text-align: center;
    }

    .contacts-info {
        text-align: center;
    }

    .contacts-info .messengers-links {
        justify-content: center;
    }

    /* Сеточные блоки в один столбец */
    .form-grid, .services-grid, .features-grid, .tariffs-grid, .gallery-grid {
        grid-template-columns: 1fr;
    }

    .hero-title { font-size: 24px; }
}