/* Index Page Specific Styles */

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

:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #10b981;
    --accent-color: #f59e0b;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --border-light: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-light);
}

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

/* Header styles moved to header-footer.css */

/* Mobile menu styles moved to header-footer.css */

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 50%, #1e40af 100%);
    padding: 80px 0 100px;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    animation: float 20s ease-in-out infinite;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 24px;
    line-height: 1.2;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
    font-size: 1.4rem;
    margin-bottom: 40px;
    opacity: 0.95;
    font-weight: 400;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin: 48px 0;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.hero-features .feature:nth-child(4) {
    grid-column: 1 / -1 !important;
    justify-self: center !important;
    max-width: 300px !important;
    width: 300px !important;
}

/* На мобильных устройствах четвертый блок такой же как остальные */
@media (max-width: 640px) {
    .hero-features .feature:nth-child(4) {
        grid-column: unset !important;
        justify-self: unset !important;
        width: unset !important;
        max-width: unset !important;
        min-width: unset !important;
    }
    
    /* Дополнительная специфичность для переопределения inline стилей */
    .hero-features .feature:nth-child(4)[style] {
        grid-column: unset !important;
        justify-self: unset !important;
        width: unset !important;
        max-width: unset !important;
        min-width: unset !important;
    }
}

.feature {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 32px 24px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.6s ease;
}

.feature:hover::before {
    left: 100%;
}

.feature:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 40px;
    margin-bottom: 16px;
    transition: transform 0.3s ease;
}

.feature:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
}

.feature-title {
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.feature-text {
    font-size: 1rem;
    opacity: 0.9;
}

.hero-cta {
    margin-top: 48px;
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #10b981 !important;
    color: white;
    padding: 16px 32px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 18px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 16px 32px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

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

/* Products Section */
.products {
    padding: 100px 0;
    background: var(--bg-white);
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-title {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 16px;
    line-height: 1.2;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 32px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.view-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    padding: 12px 24px;
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.view-all-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Mobile performance optimizations */
@media (max-width: 768px) {
    /* Disable heavy animations on mobile */
    .hero::before,
    .hero::after {
        animation: none !important;
    }
    
    /* Simplify transitions on mobile */
    .product-card,
    .service-card,
    .brand-card {
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }
    
    /* Reduce shadow complexity on mobile */
    .product-card:hover,
    .service-card:hover {
        box-shadow: var(--shadow-md);
    }
    
    /* Optimize scroll performance */
    .animate-on-scroll {
        will-change: transform, opacity;
    }
    
    /* Disable hover effects on mobile */
    .product-card:hover,
    .service-card:hover,
    .brand-card:hover {
        transform: none;
    }
    
    /* Optimize hero section for mobile */
    .hero {
        background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    }
    
    /* Reduce animation complexity */
    .feature::before {
        display: none;
    }
    
    .btn-primary::before {
        display: none;
    }
}
