/* Подключаем шрифты */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&family=Roboto:wght@400;500&display=swap');

/* Общие стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    scroll-behavior: smooth;
}

/* Шапка */
header {
    position: sticky;
    top: 0;
    background: linear-gradient(135deg, #2e7d32, #4caf50);
    color: white;
    padding: 15px 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

header h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.8em;
}

nav a {
    color: white;
    text-decoration: none;
    margin: 0 15px;
    font-weight: 500;
    transition: color 0.3s ease;
}

nav a:hover {
    color: #e8f5e9;
}

/* Hero-секция */
.hero {
    background: url('/images/roof1.jpg') no-repeat center center/cover;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    position: relative;
    z-index: 1;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 20px;
}

.hero h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 3em;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2em;
    margin-bottom: 30px;
}

.cta-button {
    background: linear-gradient(135deg, #2e7d32, #4caf50);
    color: white;
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Основной контент */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
}

/* Заголовки */
h1, h2, h3 {
    font-family: 'Poppins', sans-serif;
    color: #2e7d32;
}

h1 {
    font-size: 2.5em;
    text-align: center;
    margin-bottom: 30px;
}

h2 {
    font-size: 2em;
    margin: 40px 0 20px;
    text-align: center;
}

h3 {
    font-size: 1.5em;
    margin: 20px 0 10px;
}

p {
    font-size: 1.1em;
    margin-bottom: 15px;
}

/* Карточки */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.card {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 20px;
    text-align: center;
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.card img {
    max-width: 100%;
    border-radius: 8px;
    margin-bottom: 15px;
}

/* Карусель */
.carousel {
    position: relative;
    max-width: 100%;
    margin: 40px auto;
    z-index: 1;
}

.carousel-wrapper {
    position: relative;
    width: 100%;
    height: 400px; /* Фиксированная высота для всей карусели */
    overflow: hidden;
    border-radius: 10px;
}

.carousel-container {
    display: flex;
    transition: transform 0.5s ease;
    width: 100%;
    height: 100%;
    position: relative;
}

.carousel-slide {
    min-width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    position: absolute;
    top: 0;
    left: 0;
}

.carousel-prev, .carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    color: #2e7d32;
    border: 1px solid #2e7d32;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 1.2em;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.3s ease, color 0.3s ease;
}

.carousel-prev:hover, .carousel-next:hover {
    background: #2e7d32;
    color: white;
}

.carousel-prev {
    left: 15px;
}

.carousel-next {
    right: 15px;
}

/* Форма */
form {
    max-width: 600px;
    margin: 0 auto;
    background-color: #f5f5f5;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

input, textarea {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 1px solid #2e7d32;
    border-radius: 5px;
    font-size: 1em;
}

textarea {
    resize: vertical;
}

button {
    background: linear-gradient(135deg, #2e7d32, #4caf50);
    color: white;
    padding: 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1em;
    width: 100%;
    transition: transform 0.3s ease;
}

button:hover {
    transform: translateY(-2px);
}

.success-message {
    color: #2ecc71;
    text-align: center;
    font-weight: bold;
    margin-top: 15px;
}

/* Карта */
.map-container {
    margin: 20px 0;
    border-radius: 10px;
    overflow: hidden;
}

/* Privacy Policy и Terms of Use */
.privacy-terms h2, .privacy-terms h3 {
    text-align: left;
}

/* Футер */
footer {
    background: linear-gradient(135deg, #2e7d32, #4caf50);
    color: white;
    padding: 40px 20px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

footer a {
    color: #e8f5e9;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Анимации */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 1s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Адаптивность */
@media (max-width: 768px) {
    .hero {
        min-height: 400px;
    }

    .hero h1 {
        font-size: 2em;
    }

    .hero p {
        font-size: 1em;
    }

    .header-container {
        flex-direction: column;
        text-align: center;
    }

    nav {
        margin-top: 10px;
    }

    nav a {
        margin: 0 10px;
    }

    .carousel-wrapper {
        height: 300px;
    }

    .carousel-prev, .carousel-next {
        width: 35px;
        height: 35px;
        font-size: 1em;
        padding: 6px 10px;
    }
}