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

:root {
    /* Палитра из обновленного бренд-бука */
    --primary: #2E6F5E;        /* основной зеленый */
    --primary-dark: #1F4F43;   /* темный зеленый (ховер, кнопки) */
    --primary-light: #4F9A85;  /* светлый зеленый */

    --secondary: #5E6E78;      /* серо-синий (контейнеры/иконки) */
    --secondary-dark: #3F4C54; /* темный серый */
    --secondary-light: #8A98A3;/* светлый серый */

    --background: #F4F6F5;     /* фон */
    --white: #FFFFFF;

    --text-main: #2B2B2B;      /* основной текст */
    --text-muted: #6B7280;     /* вторичный текст */

    /* Обратная совместимость со старыми переменными */
    --primary-color: var(--primary);
    --secondary-color: var(--secondary);
    --accent-color: var(--primary-light);
    --dark-bg: var(--secondary-dark);
    --light-bg: var(--background);
    --text-color: var(--text-main);
    --text-light: var(--text-muted);
    --border-color: var(--secondary-light);
    --success: #10B981;
    --warning: #F59E0B;
}

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

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

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    box-shadow: 0 4px 12px rgba(46, 111, 94, 0.25);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo h1 {
    color: var(--white);
    font-size: 24px;
    font-weight: 700;
}

.logo img {
    max-height: 50px;
    width: auto;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-list a {
    color: var(--white);
    font-weight: 500;
    transition: all 0.3s;
    padding: 8px 12px;
    border-radius: 4px;
}

.nav-list a:hover,
.nav-list a.active {
    color: var(--white);
    background: rgba(255, 255, 255, 0.15);
}

.header-contacts {
    display: flex;
    align-items: center;
    gap: 15px;
}

.phone {
    font-weight: 700;
    color: var(--white);
    font-size: 16px;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--white);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    text-align: center;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-outline {
    background: var(--white);
    border: 2px solid var(--white);
    color: var(--primary-dark);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.85);
    color: var(--primary-dark);
}

.btn-link {
    color: var(--primary-color);
    padding: 0;
    background: none;
}

.btn-link:hover {
    text-decoration: underline;
}

.btn-large {
    padding: 15px 30px;
    font-size: 18px;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(31, 79, 67, 0.85), rgba(31, 79, 67, 0.85)),
                url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><rect fill="%232E6F5E" width="1200" height="600"/></svg>');
    background-size: cover;
    background-position: center;
    color: var(--white);
    padding: 120px 0;
    text-align: center;
}

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

.hero-subtitle {
    font-size: 20px;
    margin-bottom: 30px;
    opacity: 0.9;
}

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

/* Sections */
.section {
    padding: 80px 0;
}

.bg-light {
    background: var(--light-bg);
}

.section-title {
    text-align: center;
    font-size: 36px;
    margin-bottom: 50px;
    color: var(--primary-color);
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.service-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    padding: 30px;
}

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

.service-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 20px;
}

.service-image-placeholder {
    width: 100%;
    height: 200px;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: var(--white);
    border-radius: 4px;
    margin-bottom: 20px;
}

.service-card h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.project-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

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

.project-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.project-info {
    padding: 25px;
}

.project-info h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.project-category {
    color: #718096;
    font-size: 14px;
    margin-bottom: 15px;
}

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

.advantage-card {
    text-align: center;
    padding: 30px;
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.advantage-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.advantage-card h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* CTA Section */
.cta-section {
    background: var(--primary-color);
    color: var(--white);
    text-align: center;
}

.cta-content h2 {
    font-size: 36px;
    margin-bottom: 20px;
}

.cta-content p {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* Footer */
.footer {
    background: #1a202c;
    color: var(--white);
    padding: 60px 0 20px;
}

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

.footer-info h3 {
    margin-bottom: 15px;
}

.footer-contacts p {
    margin-bottom: 10px;
}

.footer-contacts a {
    color: #90cdf4;
}

.footer-social {
    display: flex;
    gap: 15px;
}

.social-link {
    padding: 10px 20px;
    border-radius: 4px;
    color: var(--white);
    font-weight: 500;
}

.social-link.whatsapp {
    background: #25D366;
}

.social-link.telegram {
    background: #0088cc;
}

.footer-bottom {
    border-top: 1px solid #2d3748;
    padding-top: 20px;
    text-align: center;
    opacity: 0.7;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--white);
    padding: 40px;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: #718096;
}

.modal-form input,
.modal-form select,
.modal-form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: inherit;
}

.modal-form button {
    width: 100%;
}

/* Contact Page */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-item {
    margin-bottom: 20px;
}

.contact-item a {
    color: var(--primary-color);
}

.contact-form-wrapper {
    background: var(--light-bg);
    padding: 30px;
    border-radius: 8px;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: inherit;
}

.contact-form p {
    margin-bottom: 0;
}

.map-container {
    margin-top: 30px;
    height: 300px;
    background: var(--light-bg);
    border-radius: 8px;
    overflow: hidden;
}

/* Page Header */
.page-header {
    background: var(--primary-color);
    color: var(--white);
    padding: 60px 0;
    text-align: center;
}

/* Service Detail */
.service-detail-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 30px;
}

.service-content {
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: 40px;
}

/* Project Detail */
.project-detail-image {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 30px;
}

.project-meta {
    background: var(--light-bg);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.project-description {
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: 40px;
}

.project-gallery {
    margin-bottom: 40px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
    transition: transform 0.3s;
}

.gallery-item img:hover {
    transform: scale(1.05);
}

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

.certificate-card {
    background: var(--white);
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.certificate-preview {
    width: 100%;
    height: 200px;
    object-fit: contain;
    margin-bottom: 20px;
}

.certificate-placeholder {
    width: 100%;
    height: 200px;
    background: var(--light-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    border-radius: 4px;
    margin-bottom: 20px;
}

/* CTA Box */
.cta-box {
    background: var(--light-bg);
    padding: 40px;
    border-radius: 8px;
    text-align: center;
    margin-top: 40px;
}

.cta-box h2 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* Success Message */
.success-message {
    background: #c6f6d5;
    color: #22543d;
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 30px;
}

/* Text Center */
.text-center {
    text-align: center;
}

/* About Content */
.about-content h2,
.about-content h3 {
    color: var(--primary-color);
    margin: 30px 0 15px;
}

.about-content ul {
    margin-left: 20px;
    margin-bottom: 20px;
}

.about-content li {
    margin-bottom: 10px;
}

.production-info {
    background: var(--light-bg);
    padding: 30px;
    border-radius: 8px;
    margin-top: 40px;
}

/* Projects Filter */
.projects-filter {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 1024px) {
    .header-contacts .btn {
        display: none;
    }

    .services-grid,
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    .header-container {
        position: relative;
        padding: 12px 0;
    }

    .logo h1 {
        font-size: 20px;
    }

    .nav {
        display: none;
    }

    .nav.nav-open {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        border-radius: 0 0 8px 8px;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
        padding: 12px;
    }

    .nav.nav-open .nav-list {
        flex-direction: column;
        gap: 6px;
    }

    .nav.nav-open .nav-list a {
        display: block;
        color: var(--text-color);
    }

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

    .header-contacts {
        display: none;
    }

    .hero {
        padding: 80px 0;
    }

    .hero-content h1 {
        font-size: 32px;
    }

    .hero-subtitle {
        font-size: 18px;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .section {
        padding: 56px 0;
    }

    .section-title {
        font-size: 30px;
        margin-bottom: 32px;
    }

    .contact-grid,
    .footer-container {
        grid-template-columns: 1fr;
    }

    .cta-box,
    .contact-form-wrapper,
    .modal-content {
        padding: 24px;
    }
}

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

    .section-title {
        font-size: 26px;
    }

    .service-card,
    .project-info,
    .certificate-card {
        padding: 20px;
    }

    .projects-grid,
    .services-grid,
    .certificates-grid {
        grid-template-columns: 1fr;
    }
}
