/* Основные стили */
:root {
    --primary-color: #2E8B57;
    --secondary-color: #1E90FF;
    --accent-color: #FF6B6B;
    --text-color: #333333;
    --light-text: #ffffff;
    --light-bg: #f9f9f9;
    --dark-bg: #333333;
    --border-color: #dddddd;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    line-height: 1.3;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

.section-title {
    text-align: center;
    font-size: 36px;
    margin-bottom: 50px;
    position: relative;
    padding-bottom: 15px;
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--primary-color);
}

.section-title span {
    color: var(--primary-color);
}

section {
    padding: 80px 0;
}

.primary-btn, .secondary-btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 16px;
}

.primary-btn {
    background-color: var(--primary-color);
    color: var(--light-text);
}

.primary-btn:hover {
    background-color: #236b43;
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.secondary-btn {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.secondary-btn:hover {
    background-color: var(--primary-color);
    color: var(--light-text);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

/* Хедер */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--light-text);
    box-shadow: var(--shadow);
    z-index: 1000;
    padding: 15px 0;
    transition: var(--transition);
}

.header.scrolled {
    padding: 10px 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 50px;
    margin-right: 10px;
}

.logo-text h1 {
    font-size: 24px;
    color: var(--primary-color);
    margin: 0;
}

.logo-text p {
    font-size: 12px;
    color: var(--text-color);
    margin: 0;
}

.main-nav ul {
    display: flex;
}

.main-nav ul li {
    margin: 0 15px;
}

.main-nav ul li a {
    font-weight: 500;
    position: relative;
}

.main-nav ul li a:after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.main-nav ul li a:hover:after {
    width: 100%;
}

.header-contacts {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.phone {
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 5px;
}

.callback-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
}

.callback-btn:hover {
    color: var(--secondary-color);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    cursor: pointer;
}

.mobile-menu-btn span {
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

/* Главный баннер */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('images/hero-bg.jpg') no-repeat center center/cover;
    height: 100vh;
    display: flex;
    align-items: center;
    color: var(--light-text);
    text-align: center;
    margin-top: 80px;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-content h2 {
    font-size: 48px;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 20px;
    margin-bottom: 30px;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 50px;
}

.hero-features {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.feature {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.feature i {
    font-size: 36px;
    margin-bottom: 10px;
    color: var(--primary-color);
}

/* О компании */
.about {
    background-color: var(--light-bg);
}

.about-content {
    display: flex;
    gap: 50px;
}

.about-text {
    flex: 1;
}

.about-text p {
    margin-bottom: 20px;
}

.about-features {
    margin-top: 30px;
}

.about-features li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.about-features li i {
    color: var(--primary-color);
    margin-right: 10px;
}

.about-image {
    flex: 1;
}

/* Продукция */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.product-card {
    background-color: var(--light-text);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.product-image {
    height: 250px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-info {
    padding: 20px;
}

.product-info h3 {
    margin-bottom: 10px;
    font-size: 20px;
}

.product-info p {
    margin-bottom: 15px;
    color: #666;
}

.product-link {
    color: var(--primary-color);
    font-weight: 600;
    display: flex;
    align-items: center;
}

.product-link i {
    margin-left: 5px;
    transition: var(--transition);
}

.product-link:hover i {
    transform: translateX(5px);
}

/* Преимущества */
.advantages {
    background-color: var(--light-bg);
}

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.advantage-card {
    background-color: var(--light-text);
    padding: 30px 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.advantage-icon {
    width: 80px;
    height: 80px;
    background-color: rgba(46, 139, 87, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.advantage-icon i {
    font-size: 36px;
    color: var(--primary-color);
}

.advantage-card h3 {
    margin-bottom: 15px;
    font-size: 20px;
}

/* Процесс работы */
.process-steps {
    max-width: 800px;
    margin: 0 auto;
}

.process-step {
    display: flex;
    margin-bottom: 30px;
    position: relative;
}

.process-step:not(:last-child):after {
    content: '';
    position: absolute;
    top: 50px;
    left: 25px;
    width: 2px;
    height: calc(100% - 20px);
    background-color: var(--primary-color);
}

.step-number {
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: var(--light-text);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    margin-right: 20px;
    flex-shrink: 0;
    z-index: 1;
}

.step-content {
    padding-bottom: 20px;
}

.step-content h3 {
    margin-bottom: 10px;
    font-size: 20px;
}

/* Портфолио */
.portfolio {
    background-color: var(--light-bg);
}

.portfolio-filters {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.filter-btn {
    background: none;
    border: none;
    padding: 10px 20px;
    margin: 0 5px 10px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
    border-radius: 5px;
}

.filter-btn.active, .filter-btn:hover {
    background-color: var(--primary-color);
    color: var(--light-text);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.portfolio-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    height: 250px;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(46, 139, 87, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 0;
    transition: var(--transition);
    color: var(--light-text);
    text-align: center;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-item:hover img {
    transform: scale(1.1);
}

.portfolio-overlay h3 {
    margin-bottom: 10px;
    font-size: 20px;
}

.portfolio-overlay p {
    margin-bottom: 15px;
}

.portfolio-link {
    color: var(--light-text);
    border: 2px solid var(--light-text);
    padding: 8px 20px;
    border-radius: 5px;
    font-weight: 600;
    transition: var(--transition);
}

.portfolio-link:hover {
    background-color: var(--light-text);
    color: var(--primary-color);
}

.portfolio-more {
    text-align: center;
    margin-top: 40px;
}

/* Калькулятор */
.calculator-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    font-family: 'Arial', sans-serif;
}

.calculator-container h3 {
    text-align: center;
    color: #2E8B57;
    margin-bottom: 20px;
    font-size: 24px;
}

.calculator-form {
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.calculate-button {
    background-color: #2E8B57;
    color: white;
    border: none;
    padding: 12px 20px;
    width: 100%;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.calculate-button:hover {
    background-color: #1E90FF;
}

.calculator-result {
    background-color: #fff;
    padding: 15px;
    border-radius: 5px;
    border-left: 4px solid #2E8B57;
}

.result-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.result-item.total {
    font-weight: 700;
    font-size: 18px;
    color: #2E8B57;
    border-bottom: none;
}

.note {
    font-size: 12px;
    color: #777;
    margin-top: 15px;
    text-align: center;
}

/* Отзывы */
.testimonials {
    background-color: var(--light-bg);
}

.testimonials-slider {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.testimonial-card {
    background-color: var(--light-text);
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin: 0 10px;
}

.testimonial-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.testimonial-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 20px;
    flex-shrink: 0;
}

.testimonial-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.testimonial-author h3 {
    margin-bottom: 5px;
    font-size: 18px;
}

.testimonial-author p {
    color: #666;
    font-size: 14px;
}

.testimonials-nav {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.prev-btn, .next-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--light-text);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin: 0 5px;
    transition: var(--transition);
}

.prev-btn:hover, .next-btn:hover {
    background-color: var(--primary-color);
    color: var(--light-text);
}

/* Форма обратной связи */
.contact-content {
    display: flex;
    gap: 50px;
}

.contact-form {
    flex: 1;
    background-color: var(--light-text);
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.contact-form h3 {
    margin-bottom: 20px;
    font-size: 24px;
    color: var(--primary-color);
}

.form-privacy {
    margin-top: 15px;
    font-size: 12px;
    color: #666;
}

.contact-info {
    flex: 1;
    background-color: var(--light-text);
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.contact-info h3 {
    margin-bottom: 20px;
    font-size: 24px;
    color: var(--primary-color);
}

.info-item {
    display: flex;
    margin-bottom: 20px;
}

.info-item i {
    width: 40px;
    height: 40px;
    background-color: rgba(46, 139, 87, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    margin-right: 15px;
    flex-shrink: 0;
}

.info-item h4 {
    margin-bottom: 5px;
    font-size: 18px;
}

.social-links {
    display: flex;
    margin-top: 30px;
}

.social-link {
    width: 40px;
    height: 40px;
    background-color: rgba(46, 139, 87, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    margin-right: 10px;
    transition: var(--transition);
}

.social-link:hover {
    background-color: var(--primary-color);
    color: var(--light-text);
}

/* Футер */
.footer {
    background-color: var(--dark-bg);
    color: var(--light-text);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.footer-logo {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.footer-logo img {
    height: 40px;
    margin-right: 10px;
}

.footer h3 {
    margin-bottom: 20px;
    font-size: 18px;
    position: relative;
    padding-bottom: 10px;
}

.footer h3:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer ul li {
    margin-bottom: 10px;
}

.footer ul li a:hover {
    color: var(--primary-color);
}

.footer-contacts p {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.footer-contacts p i {
    margin-right: 10px;
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.footer-links a {
    margin-left: 20px;
    font-size: 14px;
    opacity: 0.7;
}

.footer-links a:hover {
    opacity: 1;
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: var(--light-text);
    padding: 30px;
    border-radius: 10px;
    max-width: 500px;
    width: 100%;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
}

/* Кнопка "Наверх" */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: var(--light-text);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}

.scroll-top.active {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    background-color: var(--secondary-color);
}

/* Медиа-запросы */
@media (max-width: 992px) {
    .main-nav {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .hero-content h2 {
        font-size: 36px;
    }

    .hero-content p {
        font-size: 18px;
    }

    .about-content {
        flex-direction: column;
    }

    .contact-content {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .section-title {
        font-size: 28px;
    }

    .hero-features {
        flex-wrap: wrap;
    }

    .feature {
        width: 45%;
        margin-bottom: 20px;
    }

    .process-step {
        flex-direction: column;
    }

    .step-number {
        margin-bottom: 10px;
    }

    .process-step:not(:last-child):after {
        display: none;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        margin-top: 15px;
    }

    .footer-links a {
        margin: 0 10px;
    }
}

@media (max-width: 576px) {
    .hero-content h2 {
        font-size: 28px;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .feature {
        width: 100%;
    }

    .portfolio-filters {
        flex-direction: column;
        align-items: center;
    }

    .filter-btn {
        margin-bottom: 10px;
        width: 80%;
    }
}


/* Улучшения для мобильных устройств */
@media (max-width: 768px) {
    /* Улучшенные touch targets */
    .btn {
        min-height: 44px;
        padding: 12px 20px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Улучшенные формы */
    input, select, textarea {
        font-size: 16px; /* Prevents zoom on iOS */
        min-height: 44px;
        padding: 12px 15px;
    }
    
    /* Более удобные кнопки навигации */
    .mobile-menu-btn {
        min-height: 44px;
        min-width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Улучшенные карточки */
    .benefit-card, .testimonial-card {
        padding: 20px;
        margin-bottom: 15px;
    }
    
    /* Улучшенный контакт */
    .contact-item {
        padding: 15px 0;
        border-bottom: 1px solid var(--light-gray-color);
    }
    
    /* Улучшенные социальные ссылки */
    .social-links a {
        min-height: 44px;
        min-width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 18px;
    }
    
    /* Улучшенная навигация */
    .main-nav ul li a {
        padding: 15px 0;
        display: block;
        border-bottom: 1px solid var(--light-gray-color);
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    /* Еще больше адаптации для маленьких экранов */
    .hero-content h1 {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
    
    .section-title {
        font-size: 1.8rem;
        text-align: center;
    }
    
    .portfolio-filters {
        gap: 8px;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .filter-btn {
        padding: 8px 12px;
        font-size: 14px;
    }
}


/* Улучшения модального окна для мобильных */
@media (max-width: 768px) {
    .modal-content {
        margin: 20px;
        padding: 25px;
        max-width: calc(100vw - 40px);
        max-height: calc(100vh - 40px);
        overflow-y: auto;
    }
    
    .close-modal {
        font-size: 24px;
        padding: 10px;
        min-height: 44px;
        min-width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}
