/* === ОСНОВНЫЕ НАСТРОЙКИ === */
html { scroll-behavior: smooth; }
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0; padding: 0;
    color: #333;
    line-height: 1.6;
    background-color: #fff;
    -webkit-font-smoothing: antialiased;
}
*, *:before, *:after { box-sizing: border-box; }

.container {
    width: 90%; max-width: 1200px;
    margin: 0 auto; padding: 0 15px;
}

input, button, textarea, select { font-family: inherit; }
a { text-decoration: none; color: inherit; transition: 0.3s; }
img { max-width: 100%; display: block; }
ul { list-style: none; padding: 0; }

/* === ШАПКА === */
header {
    background: #0044cc; color: white;
    padding: 15px 0; position: sticky; top: 0;
    z-index: 1000; box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
.header-content { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 24px; font-weight: 800; text-transform: uppercase; }

nav ul { display: flex; gap: 20px; margin: 0; }
nav a { color: white; font-weight: 600; }
nav a:hover { color: #ffaa00; }
.mobile-menu-btn { display: none; font-size: 24px; cursor: pointer; color: white; }
.lang-switch { font-size: 14px; opacity: 0.8; margin-left: 20px; }

/* === HERO === */
.hero {
    position: relative; height: 75vh; min-height: 500px;
    background: url('img/hero.jpg') no-repeat center/cover;
    background-color: #333;
    display: flex; align-items: center; justify-content: center;
    text-align: center; color: white;
}
.hero-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
}
.hero-text { position: relative; z-index: 2; max-width: 800px; }
.hero h1 { font-size: 3rem; margin-bottom: 20px; line-height: 1.2; }
.hero p { font-size: 1.2rem; margin-bottom: 30px; }

.btn {
    display: inline-block; padding: 15px 35px;
    border-radius: 5px; font-weight: bold; cursor: pointer; border: none;
    font-size: 1rem; text-align: center;
}
.btn-primary { background: #ff6600; color: white; }
.btn-primary:hover { background: #e65c00; transform: translateY(-2px); }

/* === ЭКСТРЕННЫЕ КНОПКИ (ИСПРАВЛЕНИЕ ВЫРАВНИВАНИЯ) === */
.emergency-section {
    position: relative; z-index: 10;
    margin-top: -50px; padding-bottom: 50px;
}
.emergency-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}
.emergency-card {
    background: white; padding: 30px; border-radius: 8px;
    text-align: center; box-shadow: 0 10px 20px rgba(0,0,0,0.15);
    border-top: 5px solid #0044cc;
    /* Flexbox для выравнивания кнопок по низу */
    display: flex;
    flex-direction: column;
    height: 100%; 
}
.emergency-card.alert { border-top-color: #d90000; }
.card-content-top {
    flex-grow: 1; /* Этот блок растягивается, толкая кнопку вниз */
}
.emergency-card i { font-size: 40px; margin-bottom: 15px; color: #555; }
.emergency-card.alert i { color: #d90000; }

.btn-small {
    display: inline-block; padding: 10px 20px; background: #333; color: white;
    border-radius: 4px; font-size: 0.9rem; border: none; cursor: pointer; margin-top: 20px;
    width: 100%; /* Кнопка на всю ширину для красоты */
}
.btn-alert { background: #d90000; font-weight: bold; }

/* === УСЛУГИ === */
.services { padding: 80px 0; text-align: center; background: #fff; }
.services h2 { font-size: 2.5rem; margin-bottom: 15px; }
.services-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px; margin-top: 40px;
}
.service-item { padding: 30px; border: 1px solid #eee; border-radius: 8px; }
.service-item i { font-size: 45px; color: #0044cc; margin-bottom: 20px; }
.service-item h3 { margin-bottom: 10px; font-size: 1.4rem; }

/* === БЛОК О НАС (Синий фон) === */
.about-text-section {
    padding: 60px 0; background: #0044cc; color: white; text-align: center;
}
.text-content { max-width: 800px; margin: 0 auto; }
.text-content h3 { font-size: 2rem; margin-bottom: 20px; }
.text-content p { font-size: 1.1rem; margin-bottom: 20px; opacity: 0.9; }
.text-content strong { color: #ffaa00; }

/* === БЛОК ПРЕИМУЩЕСТВА (6 карточек) === */
.features-section {
    padding: 80px 0; background-color: #f4f7f6; text-align: center;
}
.features-section h2 { font-size: 2.5rem; margin-bottom: 10px; }
.features-section p { color: #666; margin-bottom: 40px; }
.features-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}
.feature-box {
    background: white; padding: 30px; border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05); transition: transform 0.3s;
    height: 100%;
}
.feature-box:hover { transform: translateY(-5px); }
.feature-box i { font-size: 40px; color: #ff6600; margin-bottom: 20px; }
.feature-box h3 { font-size: 1.3rem; margin-bottom: 15px; color: #333; }
.feature-box p { font-size: 0.95rem; line-height: 1.6; color: #555; margin-bottom: 0; }

/* === БЛОК FAQ === */
.faq-section { padding: 80px 0; background: #fff; }
.faq-section h2 { text-align: center; font-size: 2.5rem; margin-bottom: 40px; }
.faq-wrapper { max-width: 800px; margin: 0 auto; }
details {
    margin-bottom: 15px; border: 1px solid #eee;
    border-radius: 5px; background: #fff; overflow: hidden;
}
summary {
    padding: 20px; cursor: pointer; font-weight: bold;
    font-size: 1.1rem; background-color: #f9f9f9;
    list-style: none; display: flex; justify-content: space-between; align-items: center;
}
summary::after { content: '+'; font-size: 1.5rem; font-weight: bold; color: #0044cc; }
details[open] summary::after { content: '-'; color: #ff6600; }
details p { padding: 20px; margin: 0; border-top: 1px solid #eee; color: #555; }

/* === ПРОЕКТЫ === */
.gallery { padding: 80px 0; background: #f9f9f9; text-align: center; }
.gallery-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px; margin-top: 40px;
}
.project-card {
    background: white; border-radius: 10px; overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.slider-container {
    position: relative; width: 100%; height: 250px; background: #000;
}
.slides img { width: 100%; height: 100%; object-fit: cover; display: none; }
.slides img.active { display: block; }
.prev, .next {
    cursor: pointer; position: absolute; top: 50%; transform: translateY(-50%);
    padding: 15px; color: white; font-weight: bold; font-size: 18px;
    background-color: rgba(0,0,0,0.4); border: none;
}
.next { right: 0; } .prev { left: 0; }
.card-info { padding: 15px; text-align: left; min-height: 90px; }
.card-info h4 {
    margin: 0 0 5px 0; font-size: 1.2rem; color: #0044cc; border-bottom: 1px solid #eee; padding-bottom: 5px;
}
.hidden-desc {
    max-height: 0; overflow: hidden; opacity: 0; transition: 0.4s;
}
.project-card:hover .hidden-desc { max-height: 100px; opacity: 1; margin-top: 5px; }

/* === ФОРМА === */
.form-section { padding: 80px 0 40px 0; background: #fff; text-align: center; }
.form-wrapper { max-width: 800px; margin: 0 auto; }
.form-wrapper h2 { font-size: 2.5rem; margin-bottom: 10px; color: #000; }
.form-wrapper p { color: #666; margin-bottom: 40px; }
.main-form { text-align: left; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 600; color: #444; }
.main-form input, .main-form textarea {
    width: 100%; padding: 12px 15px; border: 1px solid #ddd;
    border-radius: 5px; font-size: 1rem; background: #fff;
    color: #333; transition: border 0.3s;
}
.main-form input:focus, .main-form textarea:focus {
    border-color: #0044cc; outline: none; background: #fdfdfd;
}
.form-row { display: flex; gap: 20px; }
.form-row .form-group { flex: 1; }
.full-width { width: 100%; padding: 15px; font-size: 1.1rem; margin-top: 10px; }

/* === КАРТА И КОНТАКТЫ (ИСПРАВЛЕН ПОРЯДОК) === */
.map-section { height: 400px; background: #ddd; width: 100%; display: block; }
.map-section iframe { width: 100%; height: 100%; border: 0; }

.contact-info-section {
    background: #f4f4f4; padding: 60px 0; text-align: center;
}
.contact-wrapper {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 40px;
}
.contact-box i { font-size: 30px; color: #ff6600; margin-bottom: 10px; }
.big-number { font-size: 1.4rem; color: #ff6600; font-weight: bold; }
footer { background: #111; color: #888; text-align: center; padding: 20px; }

/* === МОБИЛЬНАЯ АДАПТАЦИЯ === */
@media (max-width: 768px) {
    .header-content { justify-content: space-between; }
    .mobile-menu-btn { display: block; }
    nav {
        position: absolute; top: 100%; left: 0; width: 100%;
        background: #003399; display: none;
        flex-direction: column; text-align: center; padding: 20px 0;
    }
    nav.active { display: flex; }
    nav ul { flex-direction: column; gap: 15px; }
    .hero h1 { font-size: 2rem; }
    .form-row { flex-direction: column; gap: 0; }
    .hidden-desc { max-height: 100px; opacity: 1; margin-top: 5px; }
    .slider-container { height: 200px; }
    .emergency-card { height: auto; } /* На мобильном карточки не обязаны быть одной высоты */
}