:root {
    --green-main: #5f7f47;
    --green-dark: #3e5c2a;
    --green-light: #e8f0e3;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

section {
    scroll-margin-top: 110px;
}

body {
    font-family: 'Manrope', sans-serif;
    background: #f5f7f2;
    color: #1c1f1a;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1200px;
    width: 100%;
    padding: 0 20px;
    margin: 0 auto;
}

.page-content {
    transition: transform 0.4s ease, filter 0.4s ease;
}

/*Шапка сайта*/
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    padding: 20px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 1200;
}

.header .btn-primary {
    display: inline-flex;
}

.nav-wrapper {
    display: flex;
    align-items: center;
}

.logo {
    margin-right: auto;
    font-weight: 700;
    font-size: 20px;
    color: var(--green-main);
}

.nav {
    display: flex;
    gap: 40px;
    align-items: center;
}

.header .btn-primary {
    margin-left: auto;
}

.nav a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
}

.nav a::after {
    content: "";
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--green-main);
    transition: width 0.3s ease;
}

.nav a:hover {
    color: var(--green-main);
}

.nav a:hover::after {
    width: 100%;
}

/* Основная кнопка */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--green-main);
    color: #ffffff;
    padding: 14px 32px;
    border: none;
    border-radius: 14px;
    font-weight: 600;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 8px 20px rgba(95, 127, 71, 0.25);
}

.btn-primary:hover {
    background: var(--green-dark);
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(95, 127, 71, 0.35);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 6px 15px rgba(95, 127, 71, 0.25);
}

/* Hero-блок */
.hero {
    min-height: 85vh;
    display: flex;
    align-items: center;
    background: linear-gradient(rgba(25, 35, 20, 0.55), rgba(25, 35, 20, 0.55)), url("image/hero.jpg") center/cover no-repeat;
    color: #ffffff;
}

.hero-content {
    max-width: 650px;
    animation: heroFade 0.9s ease forwards;
}

@keyframes heroFade {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero h1 {
    font-size: 60px;
    line-height: 1.1;
    margin-bottom: 25px;
}

.hero p {
    font-size: 20px;
    margin-bottom: 40px;
    opacity: 0.95;
}

/* Секции */
.section {
    padding: 140px 0;
}

.section h2 {
    font-size: 36px;
    font-weight: 600;
    margin-bottom: 30px;
    position: relative;
}

.section h2::after {
    content: "";
    display: block;
    width: 60px;
    height: 3px;
    background: var(--green-main);
    margin-top: 15px;
}

/* Сетка услуг */
.services-grid {
    width: 100%;
    padding: 0 60px;
    display: grid;
    grid-template-columns: repeat(5, minmax(180px, 1fr));
    justify-content: center;
    gap: 30px;
    margin-top: 60px;
}

.service-card {
    background: white;
    border-radius: 16px;
    border: 1px solid #e8e8e8;
    padding: 30px 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 110px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.service-title {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
}

.service-description {
    display: none;
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.08);
}

.service-card.active {
    border-color: var(--green-main);
    box-shadow: 0 12px 35px rgba(95, 127, 71, 0.25);
    transform: translateY(-4px);
}

.service-expanded-full {
    margin: 120px 0 0 0;
    width: 100%;
    height: 0;
    overflow: hidden;
    position: relative;
    transition: height 0.6s cubic-bezier(.77, 0, .18, 1);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.service-expanded-full::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(20, 30, 15, 0.8), rgba(20, 30, 15, 0.6));
    z-index: 1;
}

.service-expanded-content {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 140px 40px;
    color: #ffffff;
    animation: expandedFade 0.6s ease;
}

@keyframes expandedFade {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.service-expanded-content h3 {
    font-size: 42px;
    margin-bottom: 25px;
}

.service-expanded-content p {
    font-size: 20px;
    max-width: 700px;
    line-height: 1.7;
}

/* Светлая и темная секции */
.accent {
    background: var(--green-light);
}

.dark {
    background: #1e1f1c;
    color: #ffffff;
}

.contacts-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 80px;
}

.contacts-list {
    list-style: none;
    margin-top: 15px;
}

.contacts-list li {
    margin-bottom: 12px;
}

.contact-link {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s ease;
}

.contact-link:hover {
    opacity: 0.7;
}

.footer {
    text-align: center;
    padding: 40px 20px;
    background: #111;
    color: #ffffff;
    font-size: 14px;
}

/* Модальные окна */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
    z-index: 2000;
}

body.no-scroll {
    overflow: hidden;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modalBody {
    background: white;
    padding: 40px;
    width: 420px;
    border-radius: 20px;
    position: relative;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.25);
    transform: translateY(40px) scale(0.96);
    opacity: 0;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.modal.active .modalBody {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.modalBody h3 {
    margin-bottom: 20px;
    font-size: 22px;
}

.modalBody input,
.modalBody textarea {
    width: 100%;
    padding: 12px 14px;
    margin-bottom: 14px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.modalBody input:focus,
.modalBody textarea:focus {
    outline: none;
    border-color: var(--green-main);
}

.modalBody textarea {
    resize: none;
    min-height: 90px;
}

.modalBody button {
    width: 100%;
}

.modalClose {
    position: absolute;
    right: 18px;
    top: 15px;
    font-size: 22px;
    cursor: pointer;
    opacity: 0.6;
}

/* Секция Отзывов */
.reviews {
    background: #ffffff;
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.review-card {
    background: #f9faf7;
    border-radius: 24px;
    padding: 28px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
}

.review-text {
    font-size: 16px;
    margin-bottom: 15px;
    color: #2a2e25;
}

.review-author {
    font-weight: 700;
    color: var(--green-dark);
}

.review-stars {
    color: #f5b042;
    margin-top: 5px;
}

.review-photo-attached {
    margin: 15px 0;
    border-radius: 12px;
    overflow: hidden;
    max-height: 180px;
}

.review-photo-attached img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Форма добавления отзыва */
.add-review-section {
    margin-top: 60px;
    background: #f4f7f1;
    padding: 40px;
    border-radius: 24px;
}

.add-review-section h3 {
    margin-bottom: 20px;
}

.add-review-section form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-row input, .rating-select select {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 12px;
    font-family: inherit;
}

.form-row input { flex: 1; }

.add-review-section textarea {
    height: 120px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 12px;
    resize: none;
    font-family: inherit;
}

.file-upload {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 14px;
}

/* === ЧАТ-БОТ ВИДЖЕТ === */
.chatbot-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1500;
    font-family: 'Manrope', sans-serif;
}

.chatbot-toggle {
    background: var(--green-main);
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(95, 127, 71, 0.35);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: 0.3s ease;
}

.chatbot-toggle:hover {
    background: var(--green-dark);
    transform: scale(1.03);
}

.chatbot-box {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 360px;
    height: 500px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px);
    opacity: 0;
    pointer-events: none;
    transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.chatbot-box.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.chatbot-header {
    background: var(--green-main);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bot-header-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar-dot {
    width: 10px;
    height: 10px;
    background: #2ecc71;
    border-radius: 50%;
}

#chatCloseBtn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

.chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #fbfcf9;
}

.chat-msg {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 14px;
}

.chat-msg.bot {
    background: #eef2eb;
    align-self: flex-start;
    color: #2a2e25;
}

.chat-msg.user {
    background: var(--green-main);
    color: white;
    align-self: flex-end;
}

.chatbot-options {
    padding: 10px 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    background: #fbfcf9;
}
/* Кастомная кнопка загрузки файла в отзывах */
.file-upload-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 5px;
}

.custom-file-upload {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #ffffff;
    border: 2px dashed #cbd9c2;
    padding: 16px 20px;
    border-radius: 14px;
    cursor: pointer;
    transition: border-color 0.3s ease, background-color 0.3s ease, transform 0.1s ease;
    font-weight: 600;
    color: var(--green-main);
    text-align: center;
}

.custom-file-upload:hover {
    border-color: var(--green-main);
    background-color: #fbfdfa;
}

.custom-file-upload:active {
    transform: scale(0.98);
}

.upload-icon {
    font-size: 20px;
}

.file-name-preview {
    font-size: 13px;
    color: #777;
    font-style: italic;
    padding-left: 5px;
    transition: color 0.3s ease;
}

.file-name-preview.active {
    color: var(--green-dark);
    font-weight: 600;
}

.chat-opt-btn {
    padding: 8px 14px;
    background: white;
    border: 1px solid var(--green-main);
    border-radius: 18px;
    color: var(--green-main);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: 0.2s;
}

.chat-opt-btn:hover {
    background: var(--green-main);
    color: white;
}

.chatbot-input-container {
    padding: 15px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
}

.chatbot-input-container input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 8px 12px;
    font-family: inherit;
}

#chatSendBtn {
    background: var(--green-main);
    color: white;
    border: none;
    border-radius: 10px;
    width: 36px;
    cursor: pointer;
}

/* Галерея */
.gallery-hero {
    background: linear-gradient(rgba(20, 30, 15, 0.65), rgba(20, 30, 15, 0.65)), url("image/hero.jpg") center/cover no-repeat;
    color: white;
    padding: 140px 0 80px 0;
}

.gallery-grid {
    column-count: 3;
    column-gap: 30px;
}

.gallery-item {
    break-inside: avoid;
    margin-bottom: 30px;
    border-radius: 18px;
    overflow: hidden;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.6s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Мобильный бургер */
.burger {
    width: 30px;
    height: 22px;
    display: none;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    position: relative;
    z-index: 1300;
}

.burger span {
    height: 3px;
    width: 100%;
    background: #333;
    border-radius: 3px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.burger.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.burger.active span:nth-child(2) { opacity: 0; }
.burger.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

.menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    z-index: 1100;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Адаптивность */
@media (max-width: 992px) {
    .hero h1 { font-size: 44px; }
    .hero p { font-size: 18px; }
    .contacts-wrapper { flex-direction: column; gap: 40px; }
    .gallery-grid { column-count: 2; }
}

@media (max-width: 768px) {
    .section { padding: 100px 0; }
    .services-grid { grid-template-columns: 1fr; padding: 0 20px; }
    .gallery-grid { column-count: 1; }
    .form-row { flex-direction: column; gap: 15px; }
    .add-review-section { padding: 20px; }
    .chatbot-toggle .toggle-text { display: none; }
    .chatbot-box { width: 300px; height: 420px; right: 0; }
    .burger { display: flex; }
    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(14px);
        display: flex;
        flex-direction: column;
        padding: 120px 35px;
        gap: 25px;
        box-shadow: -25px 0 70px rgba(0, 0, 0, 0.18);
        transition: right 0.45s cubic-bezier(.77, 0, .18, 1);
        z-index: 1200;
    }
    .nav.active { right: 0; }
    .header .btn-primary { display: none; }
}

/* ИСПРАВЛЕННАЯ СИНТАКСИЧЕСКАЯ ОШИБКА ИЗ style.css */
@media (max-width: 576px) {
    .reviews-grid {
        gap: 20px;
    }
    .review-card {
        padding: 22px;
    }
}


