/* === Reset & Base === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', 'Segoe UI', Roboto, sans-serif;
    color: #333;
    background: #f0f2f5;
    line-height: 1.6;
    overflow-x: hidden;
}
a { color: #4361ee; text-decoration: none; }
a:hover { color: #3a56d4; }
img { max-width: 100%; height: auto; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* === Navigation === */
.navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 32px; height: 64px;
    background: transparent;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}
.navbar.scrolled {
    background: rgba(26,26,46,0.95);
    box-shadow: 0 2px 20px rgba(0,0,0,0.3);
    backdrop-filter: blur(10px);
}
.navbar-logo { height: 40px; }
.navbar-logo img { height: 100%; width: auto; }
.nav-links { display: flex; gap: 4px; list-style: none; }
.nav-links a {
    color: rgba(255,255,255,0.8); font-size: 14px; font-weight: 500;
    padding: 8px 14px; border-radius: 4px;
    transition: color 0.2s, background 0.2s;
}
.nav-links a:hover { color: #fff; background: rgba(255,255,255,0.1); }
.nav-links a.active { color: #fff; background: rgba(230,57,70,0.3); }
.nav-burger { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-burger span { display: block; width: 24px; height: 2px; background: white; margin: 5px 0; transition: 0.3s; }

/* === Hero Section === */
.hero {
    position: relative; min-height: 100vh; display: flex; align-items: center; justify-content: center;
    overflow: hidden; background: #0d0d1a;
}
.hero-bg {
    position: absolute; inset: 0; z-index: 0;
}
.hero-bg img {
    width: 100%; height: 100%; object-fit: cover;
}
.hero-overlay {
    position: absolute; inset: 0; z-index: 1;
    background: linear-gradient(to bottom, rgba(13,13,26,0.65) 0%, rgba(26,26,46,0.85) 100%);
}
.hero-content {
    position: relative; z-index: 2; text-align: center; color: white; padding: 0 24px;
}
.hero-content h1 {
    font-size: 80px; font-weight: 700; letter-spacing: 12px; margin-bottom: 20px;
    text-shadow: 0 2px 40px rgba(230,57,70,0.4);
    animation: title-glow 3s ease-in-out infinite;
}
@keyframes title-glow {
    0%, 100% { text-shadow: 0 2px 40px rgba(230,57,70,0.4); }
    50% { text-shadow: 0 2px 60px rgba(230,57,70,0.7), 0 0 80px rgba(255,107,53,0.3); }
}
.hero-content .motto {
    font-size: 22px; font-weight: 300; color: rgba(255,255,255,0.8); margin-bottom: 40px;
    font-style: italic;
}
.hero-content .btn-cta {
    display: inline-block; padding: 14px 36px;
    background: linear-gradient(135deg, #e63946, #ff6b35);
    color: white; font-size: 16px; font-weight: 600;
    border-radius: 50px; border: none; cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 20px rgba(230,57,70,0.4);
}
.hero-content .btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(230,57,70,0.6);
}
.scroll-indicator {
    position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); z-index: 2;
    animation: bounce 2s ease-in-out infinite;
}
.scroll-indicator svg { width: 30px; height: 30px; fill: rgba(255,255,255,0.5); }
@keyframes bounce { 0%,100%{transform:translateX(-50%) translateY(0);} 50%{transform:translateX(-50%) translateY(10px);} }

/* === Section Base === */
.section { padding: 100px 0; position: relative; }
.section-dark { background: #1a1a2e; color: white; }
.section-dark::before {
    content: ''; position: absolute; top: -60px; left: 0; right: 0; height: 60px;
    background: linear-gradient(to bottom, transparent, #1a1a2e);
    pointer-events: none; z-index: 2;
}
.section-warm { background: linear-gradient(135deg, #1a1a2e 0%, #2a1a1e 100%); color: white; }
.section-title {
    font-size: 36px; font-weight: 700; text-align: center; margin-bottom: 16px;
}
.section-subtitle {
    text-align: center; font-size: 16px; color: #6c757d; margin-bottom: 60px; max-width: 600px; margin-left: auto; margin-right: auto;
}
.section-dark .section-subtitle { color: rgba(255,255,255,0.6); }
.section-warm .section-subtitle { color: rgba(255,255,255,0.6); }

/* === About Section === */
.about-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center;
}
.about-text p { font-size: 16px; line-height: 1.8; margin-bottom: 20px; color: #555; }
.about-stats {
    display: flex; gap: 40px; margin-top: 30px;
}
.stat-item { text-align: center; }
.stat-number { font-size: 42px; font-weight: 700; color: #e63946; display: block; }
.stat-label { font-size: 13px; color: #6c757d; text-transform: uppercase; letter-spacing: 1px; }
.about-visual {
    display: flex; align-items: center; justify-content: center;
}
.about-visual img { max-width: 100%; border-radius: 12px; }

/* === Divider === */
.lava-divider { width: 100%; height: 60px; display: block; }
.lava-divider img { width: 100%; height: 100%; object-fit: cover; }

/* === Products === */
.products-section {
    background: #f8f9fa; position: relative;
}
.products-section::before {
    content: ''; position: absolute; inset: 0; opacity: 0.03;
    background: url('../svg/circuit-bg.svg') repeat;
    background-size: 200px 200px;
}
.products-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
    position: relative; z-index: 1;
}
.product-card {
    background: white; border-radius: 12px; padding: 32px 24px;
    text-align: center; box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #e9ecef;
}
.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(67,97,238,0.2), 0 0 0 1px rgba(67,97,238,0.3);
    border-color: transparent;
    background: linear-gradient(white, white) padding-box, linear-gradient(135deg, #4361ee, #7b8cff, #e63946) border-box;
}
.product-icon {
    width: 64px; height: 64px; margin: 0 auto 20px;
    background: linear-gradient(135deg, #4361ee, #7b8cff);
    border-radius: 16px; display: flex; align-items: center; justify-content: center;
}
.product-icon svg { width: 32px; height: 32px; fill: white; }
.product-card h3 { font-size: 20px; font-weight: 600; margin-bottom: 10px; color: #1a1a2e; }
.product-card p { font-size: 14px; color: #6c757d; line-height: 1.6; }

/* === Outsourcing === */
.outsourcing-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center;
}
.outsourcing-list { list-style: none; }
.outsourcing-list li {
    padding: 16px 0; border-bottom: 1px solid rgba(255,255,255,0.1);
    font-size: 16px; display: flex; align-items: center; gap: 12px;
}
.outsourcing-list li::before {
    content: ''; width: 8px; height: 8px; flex-shrink: 0;
    background: #ff6b35; border-radius: 50%;
}
.outsourcing-visual { display: flex; justify-content: center; }
.outsourcing-visual img { max-width: 100%; }

/* === Guarantees === */
.guarantees-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.guarantee-card {
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px; padding: 32px 24px; text-align: center;
    transition: background 0.3s, border-color 0.3s;
}
.guarantee-card:hover {
    background: rgba(255,255,255,0.1);
    border-color: #ff6b35;
}
.guarantee-card:hover .guarantee-icon {
    box-shadow: 0 0 20px rgba(230,57,70,0.5), 0 0 40px rgba(255,107,53,0.3);
}
.guarantee-icon {
    width: 56px; height: 56px; margin: 0 auto 16px;
    background: linear-gradient(135deg, #e63946, #ff6b35);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    transition: box-shadow 0.3s;
}
.guarantee-icon svg { width: 28px; height: 28px; fill: white; }
.guarantee-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.guarantee-card p { font-size: 13px; color: rgba(255,255,255,0.6); line-height: 1.5; }

/* === Contacts === */
.contacts-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 60px;
}
.contacts-grid-single {
    grid-template-columns: 1fr; max-width: 500px; margin: 0 auto;
}
.contact-info h3 { font-size: 20px; margin-bottom: 24px; color: #1a1a2e; }
.contact-item {
    display: flex; align-items: flex-start; gap: 12px; margin-bottom: 20px;
}
.contact-item-icon {
    width: 40px; height: 40px; flex-shrink: 0;
    background: linear-gradient(135deg, #e63946, #ff6b35);
    border-radius: 10px; display: flex; align-items: center; justify-content: center;
}
.contact-item-icon svg { width: 20px; height: 20px; fill: white; }
.contact-item-text { font-size: 15px; }
.contact-item-text a { color: #4361ee; }
.contact-item-label { font-size: 12px; color: #6c757d; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 2px; }
.contact-form { background: white; border-radius: 12px; padding: 32px; box-shadow: 0 2px 10px rgba(0,0,0,0.06); }
.contact-form h3 { font-size: 20px; margin-bottom: 24px; color: #1a1a2e; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 14px; font-weight: 500; color: #495057; margin-bottom: 6px; }
.form-group input, .form-group textarea {
    width: 100%; padding: 10px 14px; border: 1px solid #ced4da; border-radius: 6px;
    font-size: 14px; font-family: inherit; transition: border-color 0.2s;
}
.form-group input:focus, .form-group textarea:focus {
    outline: none; border-color: #4361ee; box-shadow: 0 0 0 3px rgba(67,97,238,0.15);
}
.form-group textarea { min-height: 120px; resize: vertical; }
.btn-submit {
    display: inline-block; padding: 12px 32px;
    background: linear-gradient(135deg, #4361ee, #7b8cff);
    color: white; font-size: 15px; font-weight: 600;
    border: none; border-radius: 6px; cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}
.btn-submit:hover { transform: translateY(-1px); box-shadow: 0 4px 15px rgba(67,97,238,0.3); }
.requisites { margin-top: 30px; padding-top: 20px; border-top: 1px solid #e9ecef; }
.requisites p { font-size: 13px; color: #6c757d; margin-bottom: 4px; }

/* === Section with Background Photo === */
.section-with-bg {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.section-with-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(240, 242, 245, 0.82);
    z-index: 0;
}
.section-with-bg.section-dark::before {
    background: rgba(26, 26, 46, 0.82);
}
.section-with-bg.section-warm::before {
    background: rgba(26, 26, 46, 0.80);
}
.section-with-bg > .container {
    position: relative;
    z-index: 1;
}
.section-with-bg .section-title {
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.section-with-bg .section-subtitle {
    text-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.section-with-bg .about-text p {
    color: #1a1a2e;
    text-shadow: 0 0 8px rgba(240,242,245,0.8);
}
.section-with-bg .stat-number {
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
.section-with-bg .stat-label {
    color: #333;
    text-shadow: 0 0 6px rgba(240,242,245,0.8);
}

/* === Hero Photo Background === */
.hero-bg-photo {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* === Clients Section === */
.clients-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    max-width: 900px;
    margin: 0 auto;
}
.client-card {
    background: white;
    border-radius: 16px;
    padding: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    border: 1px solid #e9ecef;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
    aspect-ratio: 1;
}
a.client-card { cursor: pointer; }
.client-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(67,97,238,0.15);
    border-color: #4361ee;
}
.client-card img {
    max-width: 100%;
    max-height: 60px;
    object-fit: contain;
    border-radius: 10px;
}

/* === Company Life Section === */
.life-group-title {
    font-size: 22px;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
    margin-bottom: 24px;
    text-align: center;
    letter-spacing: 2px;
}
.life-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}
.life-photo-item {
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    aspect-ratio: 4/3;
    display: block;
}
.life-photo-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}
.life-photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* === Cookie Consent === */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    background: rgba(13, 13, 26, 0.97);
    color: rgba(255, 255, 255, 0.9);
    padding: 20px 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    backdrop-filter: blur(10px);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
    animation: slideUp 0.5s ease;
}
.cookie-consent.hidden {
    display: none;
}
.cookie-consent-text {
    font-size: 14px;
    line-height: 1.5;
    max-width: 700px;
}
.cookie-consent-btn {
    flex-shrink: 0;
    padding: 10px 28px;
    background: linear-gradient(135deg, #e63946, #ff6b35);
    color: white;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}
.cookie-consent-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(230, 57, 70, 0.4);
}
@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* === Footer === */
.footer {
    background: #0d0d1a; color: rgba(255,255,255,0.5); padding: 40px 0; text-align: center;
    font-size: 13px;
}
.footer a { color: rgba(255,255,255,0.6); }
.footer a:hover { color: white; }
.footer-links { display: flex; justify-content: center; gap: 24px; margin-bottom: 16px; flex-wrap: wrap; }

/* === Gallery Page === */
.gallery-header {
    background: linear-gradient(135deg, #1a1a2e, #2a1a1e);
    padding: 120px 0 60px; text-align: center; color: white;
}
.gallery-header h1 { font-size: 42px; margin-bottom: 12px; }
.gallery-header p { font-size: 16px; color: rgba(255,255,255,0.6); }
.theme-filters {
    display: flex; justify-content: center; gap: 8px; padding: 24px 0;
    flex-wrap: wrap; background: white; border-bottom: 1px solid #e9ecef;
    position: sticky; top: 64px; z-index: 100;
}
.theme-pill {
    padding: 8px 20px; border-radius: 50px; border: 1px solid #ced4da;
    background: white; color: #495057; font-size: 14px; cursor: pointer;
    transition: all 0.2s; font-family: inherit;
}
.theme-pill:hover { border-color: #4361ee; color: #4361ee; }
.theme-pill.active { background: #4361ee; color: white; border-color: #4361ee; }
.photo-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px; padding: 32px 0;
}
.photo-item {
    border-radius: 8px; overflow: hidden; cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s; background: #e9ecef;
    aspect-ratio: 4/3;
}
.photo-item:hover { transform: translateY(-4px); box-shadow: 0 8px 25px rgba(0,0,0,0.15); }
.photo-item img { width: 100%; height: 100%; object-fit: cover; }
.gallery-empty {
    text-align: center; padding: 80px 20px; color: #6c757d;
}
.gallery-empty p { font-size: 18px; }

/* === Responsive === */
@media (max-width: 1024px) {
    .products-grid { grid-template-columns: repeat(2, 1fr); }
    .guarantees-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .navbar { padding: 0 16px; }
    .nav-links { display: none; position: absolute; top: 64px; left: 0; right: 0; background: rgba(26,26,46,0.98); flex-direction: column; padding: 16px; }
    .nav-links.open { display: flex; }
    .nav-burger { display: block; }
    .hero-content h1 { font-size: 48px; letter-spacing: 6px; }
    .hero-content .motto { font-size: 18px; }
    .about-grid, .outsourcing-grid, .contacts-grid { grid-template-columns: 1fr; gap: 40px; }
    .products-grid { grid-template-columns: 1fr; }
    .guarantees-grid { grid-template-columns: 1fr 1fr; }
    .clients-grid { grid-template-columns: repeat(3, 1fr); }
    .about-stats { justify-content: center; }
    .section { padding: 60px 0; }
    .section-title { font-size: 28px; }
    .photo-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
    .life-photo-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
    .cookie-consent { flex-direction: column; text-align: center; padding: 16px 20px; gap: 12px; }
}
@media (max-width: 480px) {
    .guarantees-grid { grid-template-columns: 1fr; }
    .about-stats { flex-direction: column; gap: 20px; }
    .hero-content h1 { font-size: 36px; letter-spacing: 4px; }
}

/* === Animations (scroll reveal) === */
.fade-up {
    opacity: 0; transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }
.fade-left {
    opacity: 0; transform: translateX(-30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-left.visible { opacity: 1; transform: translateX(0); }
.fade-right {
    opacity: 0; transform: translateX(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-right.visible { opacity: 1; transform: translateX(0); }

@media (prefers-reduced-motion: reduce) {
    .fade-up, .fade-left, .fade-right { opacity: 1; transform: none; transition: none; }
    * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}
