:root {
    /* Custom Color Preview Colors */
    --primary-navy: #3E3E3E;
    --accent-orange: #F27E03;
    --pure-white: #FFFFFF;
    --light-gray: #ECECEC;
    --mid-gray: #D0D0D0;
    --text-dark: #3E3E3E;
    --text-gray: #6B6B6B;
    
    /* Spacing */
    --space-xs: 8px;
    --space-sm: 16px;
    --space-md: 24px;
    --space-lg: 32px;
    --space-xl: 48px;
    --space-xxl: 64px;
    --space-xxxl: 96px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--pure-white);
}

/* Header стили унифицированы в style.css - все дублирующие стили удалены */

/* Hero Section */
.hero {
    margin-top: 80px;
    position: relative;
    height: 600px;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    overflow: hidden;
}

.hero::before {
    display: none; /* Скрываем старый фоновый элемент, так как используем видео */
}

/* Video Background */
.hero-video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    min-width: 100%;
    min-height: 100%;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: 0;
    -webkit-transform: translate(-50%, -50%);
    -moz-transform: translate(-50%, -50%);
    -ms-transform: translate(-50%, -50%);
}

/* Safari video fix */
@supports (-webkit-appearance: none) {
    .hero-video {
        -webkit-transform: translate3d(-50%, -50%, 0);
    }
}

.hero-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.7) 100%);
    z-index: 1;
}

.hero-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 80px;
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
}

.hero-content {
    max-width: 600px;
}

.hero-eyebrow {
    color: var(--accent-orange);
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: var(--space-sm);
}

.hero-title {
    color: var(--text-dark);
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: var(--space-md);
}

.hero-subtitle {
    color: var(--text-dark);
    font-size: 1.125rem;
    line-height: 1.6;
    margin-bottom: var(--space-xl);
}

.hero-actions {
    display: flex;
    gap: var(--space-md);
}

.btn-primary {
    background: var(--accent-orange);
    color: var(--pure-white);
    padding: 16px 32px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover,
.btn-primary:hover svg,
.btn-primary:hover svg path {
    background: #d96f02;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(242, 126, 3, 0.4);
    color: var(--pure-white);
}

.btn-secondary {
    background: transparent;
    color: var(--text-dark);
    padding: 16px 32px;
    border: 2px solid var(--text-dark);
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: var(--text-dark);
    color: var(--pure-white);
}

/* Container */
.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 80px;
}

.section {
    padding: var(--space-xxxl) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-xxl);
}

.section-eyebrow {
    color: var(--accent-orange);
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: var(--space-sm);
}

.section-title {
    color: var(--primary-navy);
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--space-sm);
}

.section-subtitle {
    color: var(--text-gray);
    font-size: 1.125rem;
    max-width: 700px;
    margin: 0 auto;
}

/* Solutions Grid */
.solutions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

.solution-card {
    background: var(--pure-white);
    border: 1px solid var(--mid-gray);
    padding: var(--space-lg);
    transition: all 0.3s;
    position: relative;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.solution-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.25;
    transition: all 0.4s ease;
    z-index: 0;
    filter: grayscale(20%);
}

.solution-card:hover::before {
    opacity: 0.35;
    filter: grayscale(0%);
    transform: scale(1.05);
}

.solution-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.85) 60%, transparent 100%);
    z-index: 0;
}

.solution-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0, 43, 73, 0.1);
    border-color: var(--accent-orange);
}

/* Thematic backgrounds for each industry */
.solution-card.foundry::before {
    background-image: url('https://images.unsplash.com/photo-1587293852726-70cdb56c2866?q=80&w=1200');
}

.solution-card.drilling::before {
    background-image: url('https://images.unsplash.com/photo-1518709268805-4e9042af9f23?q=80&w=1200');
}

.solution-card.construction::before {
    background-image: url('https://images.unsplash.com/photo-1503387762-592deb58ef4e?q=80&w=1200');
}

.solution-card.pet-care::before {
    background-image: url('https://images.unsplash.com/photo-1573865526739-10c1dd7aa5cd?q=80&w=1200');
}

.solution-card.agriculture::before {
    background-image: url('https://images.unsplash.com/photo-1625246333195-78d9c38ad449?q=80&w=1200');
}

.solution-card.wine::before {
    background-image: url('https://images.unsplash.com/photo-1586281010691-31b98e22641d?q=80&w=1200');
}

/* Dynamic industry cards background (from featured image) */
.solution-card--dynamic::before {
    background-image: var(--solution-bg);
}

        .solution-icon {
            width: 48px;
            height: 48px;
            background: linear-gradient(135deg, #F27E03, #FF8E1A);
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: var(--space-md);
            position: relative;
            z-index: 1;
        }

.solution-icon svg {
    width: 24px;
    height: 24px;
    color: var(--pure-white);
}

.solution-title {
    color: var(--primary-navy);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
    position: relative;
    z-index: 1;
}

.solution-description {
    color: var(--text-gray);
    line-height: 1.6;
    margin-bottom: var(--space-md);
    position: relative;
    z-index: 1;
}

.solution-link {
    color: var(--accent-orange);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9375rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: gap 0.3s;
    position: relative;
    z-index: 1;
}

.solution-link:hover {
    gap: 12px;
}

        /* Products Section */
        .products-section {
            background: #f5f5f5;
        }

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
}

/* Honeycomb Layout for Products */
.products-honeycomb {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    max-width: 1400px;
    margin: 0 auto;
}

.honeycomb-row {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    width: 100%;
}

.honeycomb-row-top {
    /* 3 элемента в ряду */
}

.honeycomb-row-bottom {
    /* 4 элемента в ряду с отступом для эффекта сот */
    /* Смещение для центрирования: половина разницы между шириной элемента верхнего и нижнего ряда */
    /* (33.333% - 25%) / 2 = 4.166% */
    padding-left: calc(4.166% - var(--space-md) / 2);
    padding-right: calc(4.166% - var(--space-md) / 2);
    box-sizing: border-box;
}

.honeycomb-item {
    flex: 0 0 auto;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.honeycomb-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.honeycomb-row-top .honeycomb-item {
    width: calc(33.333% - var(--space-md) * 2 / 3);
    max-width: calc(33.333% - var(--space-md) * 2 / 3);
}

.honeycomb-row-bottom .honeycomb-item {
    /* Ширина с учетом padding контейнера: (100% - padding-left - padding-right - 3*gap) / 4 */
    width: calc((100% - var(--space-md) * 3 - (4.166% - var(--space-md) / 2) * 2) / 4);
    max-width: calc((100% - var(--space-md) * 3 - (4.166% - var(--space-md) / 2) * 2) / 4);
    flex-shrink: 0;
}

/* Products Grid Layout */
.products-masonry {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
    max-width: 1400px;
    margin: 0 auto;
}

/* Все продукты автоматически размещаются по 4 в ряд (1234, 5678...) */
/* Убираем специальные правила позиционирования - grid автоматически разместит элементы */

.product-card {
    background: var(--pure-white);
    overflow: hidden;
    transition: all 0.3s;
    width: 100%;
    max-width: 100%;
}

.product-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.product-card:hover .product-title {
    color: var(--accent-orange);
}

.product-image-wrapper {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.product-image-wrapper {
    height: 200px;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}

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

.product-content {
    padding: var(--space-md) var(--space-lg);
    display: flex;
    flex-direction: column;
}

        .product-tag {
            display: inline-block;
            background: rgba(242, 126, 3, 0.1);
            color: #F27E03;
            padding: 4px 12px;
            border-radius: 12px;
            font-size: 0.75rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-bottom: var(--space-sm);
            margin-top: 0;
        }

.product-title {
    color: var(--primary-navy);
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
    margin-top: 0;
    line-height: 1.3;
}

.product-description {
    color: var(--text-gray);
    font-size: 0.9375rem;
    line-height: 1.6;
    margin: 0;
}

/* Custom product card (5th column) */
.product-card--custom {
    position: relative;
    background: linear-gradient(135deg, #F27E03 0%, #FF8E1A 60%, #F27E03 100%);
    color: var(--pure-white);
    padding: var(--space-xl) var(--space-lg);
    text-align: center;
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-card--custom .product-link {
    display: block;
    width: 100%;
    height: 100%;
}

.product-card--custom .product-content--centered {
    max-width: 420px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.product-card--custom .product-title {
    color: var(--pure-white);
    font-size: 1.5rem;
    margin-bottom: var(--space-md);
}

.product-card--custom .product-description {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1rem;
}

/* Полупрозрачный фон с изображением завода / НПЗ */
.product-card--custom::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Индустриальное фото (завод/НПЗ) */
    background-image: url('https://images.unsplash.com/photo-1581092580348-6a5a9a8e45a6?q=80&w=1400');
    background-size: cover;
    background-position: center;
    opacity: 0.14;
    mix-blend-mode: multiply;
    z-index: 0;
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.product-card--custom:hover::before {
    opacity: 0.28;
    transform: scale(1.03);
}

.product-card--custom .product-actions {
    margin-top: var(--space-lg);
    width: 100%;
    text-align: center;
}

.product-card--custom .btn-secondary {
    border-color: var(--pure-white);
    color: var(--pure-white);
    background: transparent;
    padding: 14px 40px;
    min-width: 180px;
    display: inline-flex;
    justify-content: center;
    margin: 0 auto;
}

.product-card--custom:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(242, 126, 3, 0.3);
}

.product-card--custom:hover .product-title {
    color: var(--pure-white);
}

.no-products {
    text-align: center;
    color: var(--text-gray);
    padding: var(--space-xxl);
    font-size: 1.125rem;
}

/* News Section */
.news-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--space-lg);
}

.news-featured {
    position: relative;
    height: 500px;
    background: var(--primary-navy);
    overflow: hidden;
}

.news-featured::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(62, 62, 62, 0.5) 0%, rgba(62, 62, 62, 0.7) 100%);
    z-index: 1;
    pointer-events: none;
}

.news-featured-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.news-featured:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.news-featured-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: relative;
    z-index: 0;
}

.news-featured-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-xl);
    color: var(--pure-white);
    z-index: 2;
}

.news-date {
    font-size: 0.875rem;
    opacity: 0.9;
    margin-bottom: var(--space-xs);
}

.news-featured-title {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: var(--space-sm);
}

.news-featured-excerpt {
    font-size: 1rem;
    line-height: 1.6;
    opacity: 0.95;
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.news-item {
    background: var(--pure-white);
    border: 1px solid var(--mid-gray);
    padding: var(--space-md);
    transition: all 0.3s;
    text-decoration: none;
    display: block;
}

.news-item:hover {
    border-color: var(--accent-orange);
    transform: translateX(4px);
}

.news-item-date {
    color: var(--text-gray);
    font-size: 0.8125rem;
    margin-bottom: var(--space-xs);
}

.news-item-title {
    color: var(--primary-navy);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: var(--space-xs);
}

.news-item-excerpt {
    color: var(--text-gray);
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0;
}

.no-news {
    text-align: center;
    color: var(--text-gray);
    padding: var(--space-xxl);
    font-size: 1.125rem;
}

        /* Stats Section */
        .stats-section {
            background: #3E3E3E;
            color: var(--pure-white);
        }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-xxl);
    text-align: center;
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--accent-orange);
    line-height: 1;
    margin-bottom: var(--space-sm);
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
}

        /* CTA Banner */
        .cta-banner {
            background: linear-gradient(135deg, #F27E03, #FF8E1A);
            color: var(--pure-white);
            padding: var(--space-xxl) 0;
            text-align: center;
        }

.cta-banner h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--space-md);
}

.cta-banner p {
    font-size: 1.125rem;
    margin-bottom: var(--space-xl);
    opacity: 0.95;
}

.cta-banner .btn-secondary {
    border-color: var(--pure-white);
}

/* Mobile menu styles handled globally in style.css */

/* Responsive */
@media (max-width: 1024px) {
    /* Header стили унифицированы в style.css */
    .header-container,
    .container {
        padding: 0 40px;
    }

    .mobile-menu-toggle {
        display: inline-flex;
        color: var(--text-dark);
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .solutions-grid,
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .products-masonry {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    /* Header стили унифицированы в style.css */
    .header-container,
    .container {
        padding: 0 20px;
    }

    .mobile-menu-toggle {
        display: inline-flex;
        color: var(--text-dark);
    }
    
    .hero {
        height: auto;
        min-height: 500px;
        padding: var(--space-xxl) 0;
    }
    
    .hero-video {
        width: 100%;
        height: 100%;
        min-width: 100%;
        min-height: 100%;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .solutions-grid,
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .products-masonry {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    /* На мобилке спец-карточка ведет себя как обычная, но с выравниванием по центру */
    .product-card--custom {
        min-height: auto;
        padding: var(--space-xl) var(--space-md);
        display: block;
    }

    .product-card--custom .product-link {
        display: block;
        height: auto;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }

    /* Мобильное меню - стили унифицированы в style.css */
    
    .section-title {
        font-size: 2rem;
    }
}
