html {
  scroll-behavior: smooth;
}
/* --- НАСТРОЙКИ ДИЗАЙНА --- */
:root {
    --primary: #0277bd;      /* Основной синий */
    --primary-dark: #01579b; /* Темно-синий для акцентов */
    --accent: #43a047;       /* Зеленый (природа) */
    --text-dark: #333333;
    --text-light: #666666;
    --bg-light: #f5fafd;     /* Очень светло-голубой фон */
    --white: #ffffff;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-dark);
    background-color: var(--white);
    line-height: 1.7;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* --- КНОПКИ --- */
.btn {
    display: inline-block;
    padding: 12px 35px;
    background-color: var(--accent);
    color: var(--white);
    border-radius: 50px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(67, 160, 71, 0.3);
    transition: all 0.3s ease;
}
.btn:hover {
    background-color: #2e7d32;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(67, 160, 71, 0.4);
}

/* --- ЗАГОЛОВКИ --- */
h2 {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-dark);
    margin-bottom: 1rem;
}
.section-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 4rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    font-size: 1.1rem;
}

/* --- НАВИГАЦИЯ --- */
nav {
    background-color: var(--white);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.logo { font-size: 1.8rem; font-weight: 800; color: var(--primary-dark); }
.logo span { color: var(--accent); }
.nav-links { display: flex; gap: 30px; }
.nav-links a { font-weight: 500; font-size: 0.95rem; color: var(--text-dark); }
.nav-links a:hover { color: var(--primary); }

/* --- HERO (ГЛАВНЫЙ ЭКРАН) --- */
.hero {
    position: relative;
    height: 85vh; 
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    overflow: hidden;
}
.hero-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.4); z-index: 1;
}
.hero-content { position: relative; z-index: 2; max-width: 900px; padding: 20px; }
.hero-content h1 { font-size: 3.5rem; font-weight: 800; margin-bottom: 1.5rem; line-height: 1.2; }
.hero-content p { font-size: 1.3rem; margin-bottom: 2.5rem; opacity: 0.9; }

.slide {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover; background-position: center;
    opacity: 0; transition: opacity 1.5s ease; z-index: 0;
    transform: scale(1.1); animation: zoomEffect 20s infinite alternate;
}
.slide.active { opacity: 1; }
@keyframes zoomEffect { from { transform: scale(1); } to { transform: scale(1.1); } }

/* --- СЕКЦИИ --- */
section { padding: 5rem 10%; }
.bg-light { background-color: var(--bg-light); }

/* --- ПРЕИМУЩЕСТВА (WHY US) --- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
.feature-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: 0.3s;
    text-align: left;
}
.feature-card:hover { transform: translateY(-5px); }
.feature-icon {
    font-size: 3rem; margin-bottom: 20px; color: var(--primary);
}
.feature-card h3 { font-size: 1.4rem; margin-bottom: 15px; color: var(--text-dark); }
.feature-card p { color: var(--text-light); font-size: 0.95rem; }

/* --- О НАС (TEXT BLOCK) --- */
.about-container {
    display: flex;
    align-items: center;
    gap: 50px;
    flex-wrap: wrap;
}
.about-text { flex: 1; min-width: 300px; }
.about-text p { margin-bottom: 20px; font-size: 1.05rem; }
.about-image { flex: 1; min-width: 300px; }
.about-image img { border-radius: 10px; box-shadow: 0 15px 40px rgba(0,0,0,0.1); }
.highlight { color: var(--primary); font-weight: bold; }

/* --- ТИПЫ ПРУДОВ --- */
.types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}
.type-card {
    position: relative;
    height: 350px;
    border-radius: 10px;
    overflow: hidden;
    color: white;
    display: flex;
    align-items: flex-end;
}
.type-card img {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover; transition: 0.5s; z-index: 1;
}
.type-content {
    position: relative; z-index: 3; padding: 30px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    width: 100%;
}
.type-card:hover img { transform: scale(1.1); }
.type-card h3 { margin-bottom: 10px; font-size: 1.5rem; }

/* Контейнер для центрирования стрелок */
.gallery-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
}
/* Основной контейнер сетки с плавным переходом */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, 200px);
    gap: 15px;
    flex-grow: 1;
    /* Плавность для всех изменений */
    transition: opacity 0.4s ease-in-out, transform 0.4s ease-in-out;
    opacity: 1;
    transform: translateY(0);
}

/* Состояние во время переключения */
.gallery-grid.fade-out {
    opacity: 0;
    transform: translateY(10px); /* Легкий эффект «уплывания» вниз */
}

/* Стили для самих карточек, чтобы они не «прыгали» */
.gallery-item {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Сетка 2 колонки, 3 строки */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 колонки */
    grid-template-rows: repeat(3, 200px); /* 3 строки по 200px */
    gap: 15px;
    flex-grow: 1;
}

.gallery-item {
    height: 100%; /* Занимает всю высоту ячейки */
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    display: none; /* Скрыты по умолчанию, JS покажет нужные */
}

/* Кнопки навигации */
.gallery-nav {
    background: var(--primary);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
    z-index: 10;
    flex-shrink: 0;
}

.gallery-nav:hover {
    background: var(--accent);
    transform: scale(1.1);
}

/* Адаптация для мобилок: оставляем 2 колонки, как вы просили, но уменьшаем высоту */
@media (max-width: 600px) {
    .gallery-grid {
        grid-template-rows: repeat(3, 140px);
        gap: 8px;
    }
    .gallery-nav {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }
}


/* --- МОДАЛЬНОЕ ОКНО --- */
.modal {
    display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.9); justify-content: center; align-items: center;
}
.modal-content { max-width: 90%; max-height: 90%; border-radius: 5px; }
.close-modal {
    position: absolute; top: 20px; right: 35px; color: #fff; font-size: 40px; cursor: pointer;
}

/* --- КАЛЬКУЛЯТОР --- */
.calc-wrapper {
    background: var(--white);
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    max-width: 800px;
    margin: 0 auto;
}
.form-row { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }
.form-col { flex: 1; min-width: 200px; }
label { display: block; margin-bottom: 8px; font-weight: 600; font-size: 0.9rem; }
input, select {
    width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 6px;
    font-size: 1rem; background: #f9f9f9;
}
input:focus, select:focus { outline: none; border-color: var(--primary); background: #fff; }

/* --- КОНТАКТЫ --- */
.contact-container {
    background: var(--primary-dark);
    color: var(--white);
    border-radius: 20px;
    padding: 50px;
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: flex-start;
}

.contact-text {
    flex: 1;
    min-width: 300px;
    display: block;
}

.contact-text h2 {
    color: white !important;
    text-align: left;
    margin-bottom: 20px;
    font-size: 2.2rem;
}

.contact-form {
    flex: 1;
    min-width: 320px; /* Чтобы поля не сжимались слишком сильно */
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 15px;
}

/* Поля формы на всю ширину */
.contact-form input, 
.contact-form textarea {
    width: 100% !important;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 5px;
    border: none;
    display: block;
    box-sizing: border-box; /* Важно, чтобы padding не сжимал поле */
    font-family: inherit;
}

.contact-form .btn {
    width: 100%; /* Кнопка на всю ширину формы */
}

/* Список контактов */
.contact-list {
    margin-top: 30px;
}

.contact-row {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 10px;
    margin-bottom: 15px;
}

/* Адаптация для телефона */
@media (max-width: 768px) {
    .contact-container {
        padding: 30px 15px;
    }
    
    .contact-text h2 {
        font-size: 1.8rem;
    }

    .contact-form {
        min-width: 100%; /* Форма во весь экран на мобилке */
        padding: 20px;
    }

    .contact-row {
        grid-template-columns: 1fr; /* Данные под заголовком */
        gap: 5px;
    }
}

/* --- FOOTER --- */
footer 
{ 
    background: #1a1a1a; 
    color: #888; 
    text-align: center; 
    padding: 40px 10%; 
    font-size: 0.9rem; 
}

footer strong 
{ 
    color: #fff; 
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .hero-content h1 { font-size: 2.5rem; }
    section { padding: 3rem 5%; }
}
/* Кнопка Наверх */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--accent); /* Ваш зеленый цвет */
    color: white;
    border: none;
    border-radius: 50%; /* Делаем круглой */
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    display: none; /* Скрыта по умолчанию */
    z-index: 1001;
    box-shadow: 0 4px 15px rgba(67, 160, 71, 0.3);
    transition: all 0.3s ease;
    align-items: center;
    justify-content: center;
}

.back-to-top:hover {
    background-color: #2e7d32;
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(67, 160, 71, 0.4);
}

/* Адаптив для мобилок (чтобы не мешала) */
@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}
