* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    font-family: 'Arial', sans-serif;
    color: #3a4d39; /* заменили чёрный на природный тёмно-зелёный */
    background-color: #f5f5ef; /* вместо чисто-белого — мягкий */
    margin: 0;
    min-height: 100%;
    overflow-x: hidden;
    padding-top: 35px;
    scroll-behavior: smooth;
}

h2 {
    text-align: center;
}

.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0; /* растягивает по ширине */
    width: 100vw; /* можно для гарантии */
    z-index: 1000;
    background-color: #f5f5ef;
    padding: 18px 30px;
    box-shadow: 0 2px 8px rgba(58, 77, 57, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-weight: 700;
    font-size: 1.9rem;
    color: #2f3d2a;
    text-decoration: none;
    user-select: none;
}

.contact-block {
    display: flex;
    align-items: center;
    gap: 25px;
}

.phone-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #3a4d39;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    user-select: none;
    transition: color 0.3s ease;
}

.phone-link img {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    vertical-align: middle;
}

.phone-link:hover {
    color: #7ea84f;
}

.whatsapp-link {
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.whatsapp-link img {
    width: 24px;
    height: 24px;
    vertical-align: middle;
}

.whatsapp-link:hover {
    opacity: 0.8;
}

.btn-contact {
    background-color: #7ea84f;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 24px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    user-select: none;
    transition: background-color 0.3s ease;
}

.btn-contact:hover {
    background-color: #59774a;
}

.hero {
    background: url('/static/assets/hero-desktop.webp') center/cover no-repeat;
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.4);
}

.hero-content {
    position: relative;
    color: #fff;
    animation: fadeIn 2s ease-in-out;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.hero-btn {
    background: #8ba888;
    color: #fff;
    padding: 0.8rem 1.5rem;
    text-decoration: none;
    border-radius: 25px;
    font-size: 1rem;
    transition: background 0.3s ease;
    font-weight: 600;
}

.hero-btn:hover {
    background: #7ea84f;
    color: white;
}

.btn {
    background: #8ba888; /* природный оливковый */
    color: #fff;
    padding: 0.8rem 1.5rem;
    text-decoration: none;
    border-radius: 25px;
    transition: background 0.3s;
}

.btn:hover {
    background: #7a9777;
}

.btn.small {
    font-size: 0.9rem;
    padding: 0.6rem 1.2rem;
}

.houses {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 10px;
    background: #f5f5ef;
    border-radius: 12px;
}

.houses h2 {
    color: #3a4d39;
    font-size: 2.2rem;
    margin-bottom: 30px;
    text-align: center;
}

.house-block {
    margin-bottom: 30px;
    padding: 15px 0;
    border-bottom: 1px solid #dcdcd2;
}

.house-block:last-child {
    border-bottom: none;
}

.house-block h3 {
    margin: 0 0 6px 0;
    color: #3a4d39;
    font-weight: 600;
    font-size: 1.5rem;
}

.house-block p {
    margin: 0 0 14px 0;
    color: #6b8e69;
    font-size: 1rem;
    font-style: italic;
}

/* Tabs */

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.tab-button {
    padding: 6px 14px;
    background: #8ba888;
    border: none;
    border-radius: 20px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background-color 0.3s ease;
}

.tab-button:hover {
    background: #7a9777;
}

.tab-button.active {
    background: #3a4d39;
}

/* Tab content */

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Carousel */

.carousel {
    position: relative;
    overflow: hidden;
    max-width: 100%;
    height: 500px; /* базовая высота */
    border-radius: 10px;
    box-shadow: 0 6px 14px rgba(58, 77, 57, 0.15);
}

.carousel-track {
    display: flex;
    transition: transform 0.4s ease-in-out;
    height: 100%;
}

.carousel-track img {
    width: 100%;
    flex-shrink: 0;
    height: 500px;
    object-fit: cover;
    border-radius: 10px;
    /*user-select: none;*/
    /*pointer-events: none;*/
    /*user-drag: none;*/
    cursor: pointer; /* добавим визуальный хинт */
}

/* Кнопки переключения */

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(58, 77, 57, 0.4);
    border: none;
    color: white;
    font-size: 1.6rem;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    user-select: none;
    z-index: 10;
    transition: background 0.3s, opacity 0.3s;
    opacity: 0.5;
}

.carousel-btn:hover {
    background: rgba(58, 77, 57, 0.8);
    opacity: 1;
}

.carousel-btn.prev {
    left: 10px;
}

.carousel-btn.next {
    right: 10px;
}

.card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(138, 160, 138, 0.1);
    overflow: hidden;
    max-width: 300px;
    display: flex;
    flex-direction: column;
}


.card:hover {
    transform: translateY(-5px);
}

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card h3, .card p {
    padding: 0 1rem;
}

.card h3 {
    margin-top: 1rem;
}

.card p {
    margin: 0.5rem 0 1rem;
    flex-grow: 1; /* чтобы текст тянул карточку */
}

.card a.btn {
    margin: 1rem;
    align-self: flex-start;
}


.features {
    padding: 60px 20px;
    background-color: #ffffff;
    text-align: center;
}

.features h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #3a4d39;
}

.feature-cards {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.feature-card {
    background-color: #f5f5ef;
    border-radius: 16px;
    padding: 2rem 1.5rem;
    max-width: 280px;
    flex: 1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-card img {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.feature-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: #3a4d39;
}

.feature-card p {
    font-size: 0.95rem;
    color: #555;
}

.feature-card img {
    filter: invert(27%) sepia(15%) hue-rotate(75deg) saturate(200%) brightness(90%);
}


.gallery {
    padding: 60px 20px;
    background-color: #f5f5ef;
    text-align: center;
}

.gallery h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #3a4d39;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
}


.gallery-grid img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-grid img:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    cursor: pointer;
}

.comforts {
    padding: 60px 20px;
    background-color: #ffffff;
    text-align: center;
}

.comforts h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #3a4d39;
}

.comfort-cards {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.comfort-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 220px;
    padding: 1rem;
    background-color: #f5f5ef;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.comfort-card:hover {
    transform: translateY(-5px);
}

.comfort-card img {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    filter: invert(27%) sepia(15%) hue-rotate(75deg) saturate(200%) brightness(90%);
}

.comfort-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #3a4d39;
}

.comfort-card p {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.3;
}

/* Prices section */

.prices {
    padding: 60px 20px;
    background-color: #ffffff;
    text-align: center;
}

.prices h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #3a4d39;
}

.price-cards {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.price-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 220px;
    padding: 1rem;
    background-color: #f5f5ef;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.price-card:hover {
    transform: translateY(-5px);
}

.price-card img {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    filter: invert(27%) sepia(15%) hue-rotate(75deg) saturate(200%) brightness(90%);
}

.price-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #3a4d39;
}

.price-card p {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.3;
    text-align: center;
}

/* Contacts section */

.contacts {
    background-color: #f5f5ef;
    padding: 60px 20px;
    width: 100%;
    box-sizing: border-box;
}

.contacts h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: left;
    color: #3a4d39;
}

.contacts-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.contacts-map {
    flex: 1 1 500px;
    min-width: 300px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.contacts-info {
    flex: 1 1 350px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-card {
    background-color: #ffffff; /* белый фон */
    border-radius: 12px;
    padding: 24px 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transition: transform 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-5px);
}

.contact-card h3 {
    font-size: 1.2rem;
    margin-bottom: 12px;
    color: #3a4d39;
}

.contact-card ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.contact-card ul li {
    margin-bottom: 8px;
}

.contact-card ul li a {
    text-decoration: none;
    color: #3a4d39;
    font-weight: 600;
    transition: color 0.3s ease;
}

.contact-card ul li a:hover {
    color: #7ea84f;
}

.contact-card p {
    font-size: 1rem;
    color: #555;
    line-height: 1.4;
    margin: 0;
}

/* Instagram link */

.instagram-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: #3a4d39;
    font-weight: 600;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.instagram-link:hover {
    color: #7ea84f;
}

.instagram-icon {
    width: 24px;
    height: 24px;
    margin-right: 10px;
    object-fit: contain;
    vertical-align: middle;
}

.qr-code img {
    width: 200px;
    height: 200px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    object-fit: contain;
    margin-top: 8px;
}


footer {
    background-color: #f5f5ef;
    color: #3a4d39;
    padding: 30px 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-align: center;
    box-shadow: inset 0 1px 0 rgba(58, 77, 57, 0.1);
}

footer p {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 400;
    color: #5a6b4a;
}

footer a {
    color: #7ea84f;
    text-decoration: none;
    font-weight: 600;
    margin: 0 8px;
    transition: color 0.3s ease;
}

footer a:hover {
    color: #3a4d39;
}


@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.messengers {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.messenger {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    background-color: white;
    border-radius: 2rem;
    text-decoration: none;
    color: #333;
    font-size: 0.95rem;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: auto; /* ключевая строка */
    white-space: nowrap;
}


.messenger img {
    width: 24px;
    height: 24px;
}

.messenger:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.messenger span {
    display: inline-block;
}

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
}

.modal-content {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    animation: zoomIn 0.3s ease;
}

.modal-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    font-weight: bold;
}

.btn-route {
    background-color: #7ea84f;
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s ease;
}

.btn-route:hover {
    background-color: #59774a;
}

@keyframes zoomIn {
    from {
        transform: scale(0.7);
        opacity: 0
    }
    to {
        transform: scale(1);
        opacity: 1
    }
}

@media (max-width: 900px) {
    .carousel {
        height: 220px;
    }

    .carousel-track img {
        height: 220px;
    }

    .carousel-btn {
        width: 32px;
        height: 32px;
        font-size: 1.3rem;
    }
}

@media (max-width: 768px) {
    .hero {
        background-image: url('/static/assets/hero-mobile.webp');
    }

    .hide-on-mobile {
        display: none !important;
    }

    .main-header {
        padding: 14px 20px;
        flex-direction: row;
        justify-content: space-between;
    }

    .contact-block {
        gap: 10px;
    }

    .btn-contact {
        font-size: 0.95rem;
        padding: 8px 14px;
    }

    .gallery-grid img {
        height: 200px;
    }

    .feature-cards,
    .comfort-cards,
    .price-card {
        flex-direction: column;
        align-items: center;
    }

    .feature-card,
    .comfort-card,
    .price-card {
        width: 90vw; /* почти на всю ширину экрана */
        max-width: none;
    }
}

@media (max-width: 500px) {
    .carousel {
        height: 160px;
    }

    .carousel-track img {
        height: 160px;
    }

    .carousel-btn {
        width: 28px;
        height: 28px;
        font-size: 1.1rem;
    }

    .gallery-grid img {
        height: 160px;
    }
}