/* ===================================
   Глобальные стили
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --text-color: #333;
    --bg-color: #fff;
    --light-gray: #f5f5f5;
    --dark-gray: #7f8c8d;
    --spacing: 20px;
    --border-radius: 8px;
    --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Arial', 'Helvetica Neue', Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===================================
   Навигация
   =================================== */
.navbar {
    background-color: var(--bg-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo img {
    height: 40px;
    width: auto;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

.nav-menu a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.nav-menu a:hover {
    color: var(--secondary-color);
}

/* Dropdown меню */
.dropdown {
    position: relative;
}

.dropdown .arrow {
    font-size: 10px;
    margin-left: 5px;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--bg-color);
    box-shadow: var(--box-shadow);
    list-style: none;
    min-width: 250px;
    padding: 10px 0;
    margin-top: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    padding: 0;
}

.dropdown-menu a {
    display: block;
    padding: 12px 20px;
    color: var(--text-color);
}

.dropdown-menu a:hover {
    background-color: var(--light-gray);
}

/* Мобильное меню */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    position: relative;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 2px;
    background-color: var(--text-color);
    transition: var(--transition);
    display: block;
}

/* ===================================
   Hero секция
   =================================== */
.hero {
    position: relative;
    min-height: 70vh; /* Уменьшена высота блока */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    padding: 0;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero .container {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content {
    width: 100%;
    max-width: 1200px;
    padding: 2rem;
}

.hero-text {
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    text-align: center;
}

.hero-title {
    font-size: clamp(1.5rem, 4vw, 2.5rem); /* Уменьшен размер шрифта */
    margin-bottom: 1rem;
    font-weight: 700;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.5rem); /* Уменьшен размер шрифта */
    margin-bottom: 2.5rem;
    opacity: 0.9;
    line-height: 1.4;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .hero {
        min-height: 60vh; /* Еще меньше на мобильных */
    }
    
    .hero-content {
        padding: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 280px;
        margin: 0;
    }
}

/* ===================================
   Кнопки
   =================================== */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: 2px solid;
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

.btn-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: white;
    border-color: white;
}

.btn-secondary:hover {
    background-color: white;
    color: var(--secondary-color);
}

.btn-outline {
    background-color: transparent;
    color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-outline:hover {
    background-color: var(--secondary-color);
    color: white;
}

/* ===================================
   Секции
   =================================== */
.section-title {
    text-align: center;
    font-size: 36px;
    margin-bottom: 50px;
    color: var(--primary-color);
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    margin: 60px 0;
}

.content-text h2 {
    font-size: 32px;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.content-text p {
    margin-bottom: 15px;
    line-height: 1.8;
}

.content-image img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

/* ===================================
   Продукция
   =================================== */
.products-section {
    padding: 80px 0;
    background-color: var(--light-gray);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.product-card {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-card h3 {
    padding: 20px 20px 10px;
    font-size: 20px;
    color: var(--primary-color);
}

.product-card p {
    padding: 0 20px;
    margin-bottom: 20px;
    color: var(--dark-gray);
}

.product-card .btn {
    margin: 0 20px 20px;
    width: calc(100% - 40px);
}

/* ===================================
   Услуги
   =================================== */
.services-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 40px 30px;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    text-align: center;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.service-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.service-card h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 20px;
}

.service-card p {
    color: var(--dark-gray);
    line-height: 1.6;
    margin-bottom: 20px;
}

.service-card .btn {
    margin-top: auto;
}

/* ===================================
   Преимущества
   =================================== */
.advantages-section {
    padding: 80px 0;
}

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.advantage-item {
    text-align: center;
    padding: 30px;
    background-color: var(--light-gray);
    border-radius: var(--border-radius);
}

.advantage-icon {
    width: 60px;
    height: 60px;
    background-color: var(--secondary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 32px;
    font-weight: bold;
}

.advantage-item h3 {
    margin-bottom: 10px;
    color: var(--primary-color);
}

/* ===================================
   Опыт работы
   =================================== */
.clients-section {
    padding: 80px 0;
    background-color: var(--light-gray);
}

.clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 30px;
    align-items: center;
}

.client-logo {
    background-color: white;
    padding: 20px;
    text-align: center;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    font-weight: bold;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.client-logo img {
    max-width: 150px;
    max-height: 80px;
    object-fit: contain;
}

/* ===================================
   Контакты
   =================================== */
.contacts-section {
    padding: 80px 0;
}

.contacts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.contact-info h3 {
    color: var(--primary-color);
    margin: 20px 0 10px;
}

.contact-info a {
    color: var(--secondary-color);
    text-decoration: none;
}

.contact-info a:hover {
    text-decoration: underline;
}

/* Форма обратной связи */
.contact-form-container {
    background-color: var(--light-gray);
    border-radius: var(--border-radius);
    padding: 30px;
}

.contact-form-container h3 {
    margin-bottom: 20px;
    color: var(--primary-color);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 8px;
    color: var(--text-color);
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-message {
    padding: 15px;
    border-radius: var(--border-radius);
    margin-top: 15px;
}

.form-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.social-link {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--secondary-color);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: var(--transition);
    font-weight: bold;
    font-size: 16px;
}

.social-link:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
}

/* ===================================
   Футер
   =================================== */
.footer {
    background-color: var(--primary-color);
    color: white;
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h4 {
    margin-bottom: 15px;
    font-size: 18px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section a {
    color: #ecf0f1;
    text-decoration: none;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--secondary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ===================================
   Адаптивность для мобильных устройств
   =================================== */

/* Планшеты */
@media (max-width: 1024px) {
    .container {
        padding: 0 30px;
    }
    
    .content-grid {
        gap: 30px;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 25px;
    }
}

/* Мобильные устройства (планшеты) */
@media (max-width: 768px) {
    /* Навигация */
    .nav-menu {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 100%;
        flex-direction: column;
        background-color: white;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        padding: 30px 20px;
        transition: var(--transition);
        gap: 0;
        align-items: stretch;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-menu > li {
        width: 100%;
        padding: 0;
        border-bottom: 1px solid #eee;
    }
    
    .nav-menu > li:last-child {
        border-bottom: none;
    }
    
    .nav-menu > li > a {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15px 0;
        cursor: pointer;
    }
    
    .nav-menu .arrow {
        display: inline-block;
        margin-left: auto;
        transition: transform 0.3s;
        font-size: 10px;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    
    .dropdown-menu {
        position: static !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        box-shadow: none;
        display: none;
        margin-top: 0;
        padding: 0 0 0 20px;
        background-color: #f5f5f5;
        border-radius: 0;
        width: 100%;
        left: 0;
        top: auto;
        margin-left: 0;
        min-width: auto;
    }
    
    .dropdown.active .dropdown-menu {
        display: block;
    }
    
    .dropdown.active .arrow {
        transform: rotate(180deg);
    }
    
    .dropdown-menu li {
        border-bottom: none;
        padding: 10px 0;
    }
    
    .dropdown-menu a {
        padding: 10px 0;
    }
    
    /* Hero секция */
    .hero {
        padding: 60px 0;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .hero-text {
        text-align: center;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .hero-subtitle {
        font-size: 18px;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 300px;
    }
    
    /* Секции */
    .section-title {
        font-size: 28px;
        margin-bottom: 30px;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .content-text h2 {
        font-size: 24px;
    }
    
    /* Продукция */
    .products-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    /* Преимущества */
    .advantages-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    /* Контакты */
    .contacts-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    /* Футер */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* Маленькие мобильные устройства */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero {
        padding: 40px 0;
    }
    
    .hero-title {
        font-size: 24px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    .section-title {
        font-size: 24px;
        margin-bottom: 25px;
    }
    
    .product-card img {
        height: 150px;
    }
    
    .products-grid,
    .advantages-grid,
    .services-grid {
        gap: 20px;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .social-links {
        flex-direction: column;
    }
    
    .social-link {
        width: 100%;
        text-align: center;
    }
    
    .contact-form-container {
        padding: 20px;
    }
}

/* Улучшения для touch-устройств */
@media (hover: none) and (pointer: coarse) {
    .btn,
    .nav-menu a,
    .product-card,
    .advantage-item {
        touch-action: manipulation;
    }
    
    .btn:active {
        transform: scale(0.98);
    }
}

/* Печать */
@media print {
    .navbar,
    .footer,
    .hero,
    .btn {
        display: none;
    }
    
    body {
        background-color: white;
    }
    
    .container {
        max-width: 100%;
    }
}

/* Ensure buttons have good contrast */
.btn-primary {
    background: #007bff;
    color: white;
    border: 2px solid #007bff;
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: #333;
}

/* Блок "О компании" показываем сразу без анимации */
.about-section .content-grid {
    opacity: 1 !important;
    transform: translateY(0) !important;
}