/* CSS Variables - Minimalistic, Light, Blue-Gray Metallic Theme */
:root {
    --color-primary: #5c7285; /* Blue-gray */
    --color-primary-light: #8fa3b3;
    --color-primary-dark: #3a4b59;
    --color-bg-main: #ffffff;
    --color-bg-secondary: #f4f6f8; /* Very light blue-gray */
    --color-card-bg: #ffffff;
    --color-footer-bg: #3a4b59; /* Same as primary-dark in light mode */
    --color-text-main: #2c3e50;
    --color-text-muted: #64748b;
    --color-accent: #e2e8f0; /* Metallic light silver */
    --color-header-bg: rgba(255, 255, 255, 0.9);
    --font-main: 'Inter', sans-serif;
    --transition: all 0.3s ease-in-out;
    --shadow-sm: 0 4px 6px rgba(92, 114, 133, 0.05);
    --shadow-md: 0 10px 15px rgba(92, 114, 133, 0.1);
    --shadow-lg: 0 20px 25px rgba(92, 114, 133, 0.15);
    --border-radius: 12px;
}

[data-theme="dark"] {
    --color-bg-main: #000000;
    --color-bg-secondary: #0a0a0a;
    --color-card-bg: #121212;
    --color-footer-bg: #050505;
    --color-text-main: #ffffff;
    --color-text-muted: #e4e4e7;
    --color-accent: #222222;
    --color-header-bg: rgba(0, 0, 0, 0.9);
    --color-primary-dark: #8fa3b3; /* Keep light blue-gray for text elements */
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 120px; /* Fix for fixed header blocking anchor links */
}

body {
    font-family: var(--font-main);
    color: var(--color-text-main);
    background-color: var(--color-bg-main);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

.section {
    padding: 100px 0;
}

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

.text-center {
    text-align: center;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 3rem;
    color: var(--color-primary-dark);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 28px;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    color: #fff;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.btn-outline:hover {
    background-color: var(--color-primary);
    color: #fff;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--color-header-bg);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--color-accent);
    padding: 15px 0;
    transition: var(--transition);
}

.header.scrolled {
    padding: 10px 0;
    box-shadow: var(--shadow-sm);
}

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

.logo {
    display: flex;
    align-items: center;
}

.header-logo-img {
    height: 80px;
    width: auto;
}

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

.nav-link {
    font-weight: 600;
    color: var(--color-text-muted);
}

.nav-link:hover, .nav-link.active {
    color: var(--color-primary);
}

.header-contacts {
    display: flex;
    gap: 20px;
}

.contact-link {
    font-weight: 600;
    color: var(--color-primary-dark);
}

.contact-link:hover {
    color: var(--color-primary);
}

.contact-list a:hover {
    color: var(--color-accent);
    text-decoration: underline;
}

/* Managers Grid */
.managers-grid.full-width {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    justify-items: center;
}
.manager-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 15px;
    font-size: 1.1rem;
    color: #fff;
}
.manager-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--color-accent);
    background-color: var(--color-bg-secondary);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

@media (max-width: 992px) {
    .managers-grid.full-width {
        grid-template-columns: 1fr 1fr;
    }
}
@media (max-width: 576px) {
    .managers-grid.full-width {
        grid-template-columns: 1fr;
    }
}

.footer-nav ul {
    list-style: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.burger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.burger span {
    width: 25px;
    height: 3px;
    background-color: var(--color-primary-dark);
    transition: var(--transition);
}

/* Hero Section (Minimalistic without heavy backgrounds) */
.hero {
    padding: 180px 0 120px;
    background: linear-gradient(135deg, var(--color-bg-main), var(--color-bg-secondary));
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(143, 163, 179, 0.1) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--color-primary-dark);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: var(--color-text-muted);
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.stat-card {
    background: var(--color-card-bg);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    flex: 1;
    text-align: center;
    border: 1px solid var(--color-accent);
}

.stat-number {
    font-size: 2.5rem;
    color: var(--color-primary);
    margin-bottom: 10px;
}

/* Products Section */
.products-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    align-items: start;
}

.products-sidebar {
    position: sticky;
    top: 100px; /* offset for fixed header */
    background: var(--color-card-bg);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-accent);
}

.products-tree {
    list-style: none;
    padding: 0;
    margin: 0;
}

.products-tree li {
    margin-bottom: 8px;
}

.products-tree a {
    text-decoration: none;
    color: var(--color-text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
    display: block;
    padding: 10px 15px;
    border-radius: var(--border-radius);
}

.products-tree a:hover {
    background-color: var(--color-primary-light);
    color: #fff;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.product-card {
    background: var(--color-card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid var(--color-accent);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.product-img-wrapper {
    height: 240px;
    overflow: hidden;
    background: var(--color-bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.product-info {
    padding: 30px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-info.no-img-top {
    justify-content: center;
    text-align: center;
    background: linear-gradient(180deg, var(--color-bg-secondary), var(--color-card-bg));
}

.product-title {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--color-primary-dark);
}

.product-desc {
    color: var(--color-text-muted);
    margin-bottom: 25px;
    flex-grow: 1;
}

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

.service-item {
    padding: 40px;
    background: var(--color-card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border-top: 4px solid var(--color-primary-light);
    transition: var(--transition);
}

.service-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-5px);
}

.service-item h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--color-primary-dark);
}

.service-item p {
    color: var(--color-text-muted);
}

/* Footer */
.footer {
    background-color: var(--color-footer-bg);
    color: #fff;
    padding-top: 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 30px;
    margin-bottom: 20px;
}

.footer-logo {
    display: inline-block;
    margin-bottom: 20px;
}

.footer-logo-img {
    height: 100px;
    width: auto;
}

.footer-desc {
    color: var(--color-primary-light);
    max-width: 300px;
}

.footer-title {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #fff;
}

.contact-list li, .footer-nav li {
    margin-bottom: 8px;
}

.contact-list a, .footer-nav a {
    color: var(--color-primary-light);
}

.contact-list a:hover, .footer-nav a:hover {
    color: #fff;
}

.footer-bottom {
    background-color: rgba(0,0,0,0.2);
    padding: 20px 0;
    text-align: center;
    color: var(--color-primary-light);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 992px) {
    /* Header / Nav */
    .header-contacts {
        display: none;
    }
    
    /* Products Layout */
    .products-layout {
        grid-template-columns: 1fr;
    }
    .products-sidebar {
        position: static;
        margin-bottom: 20px;
    }
    .products-tree {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }
    .products-tree li {
        margin-bottom: 0;
    }
    .products-tree a {
        background-color: var(--color-bg-main);
        border: 1px solid var(--color-accent);
    }
    
    /* About */
    .about-grid {
        grid-template-columns: 1fr;
    }
    .hero-title {
        font-size: 3rem;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .burger {
        display: flex;
        z-index: 1001;
    }
    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 400px;
        height: 100vh;
        background: var(--color-bg-main);
        box-shadow: var(--shadow-lg);
        padding: 100px 40px;
        transition: var(--transition);
        z-index: 1000;
    }
    .nav.active {
        right: 0;
    }
    .nav-list {
        flex-direction: column;
        gap: 20px;
    }
    .nav-link {
        font-size: 1.2rem;
    }
    .burger.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .burger.active span:nth-child(2) {
        opacity: 0;
    }
    .burger.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    .hero-title {
        font-size: 2.5rem;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

/* Language Toggle Switcher */
.lang-toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 15px;
}

.lang-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-primary-dark);
}

.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    -webkit-transition: .4s;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    -webkit-transition: .4s;
    transition: .4s;
}

input:checked + .slider {
    background-color: var(--color-primary);
}

input:focus + .slider {
    box-shadow: 0 0 1px var(--color-primary);
}

input:checked + .slider:before {
    -webkit-transform: translateX(20px);
    -ms-transform: translateX(20px);
    transform: translateX(20px);
}

/* Rounded sliders */
.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Modal Styles */
.modal {
    display: none; 
    position: fixed; 
    z-index: 1000; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--color-bg-main);
    border: 1px solid var(--color-primary-light);
    border-radius: var(--border-radius);
    padding: 30px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: var(--shadow-lg);
}

.close-modal {
    color: var(--color-text-muted);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 15px;
}

.close-modal:hover,
.close-modal:focus {
    color: var(--color-primary);
    text-decoration: none;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: var(--color-text-main);
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--color-bg-secondary);
    border-radius: 6px;
    background-color: var(--color-bg-secondary);
    color: var(--color-text-main);
    font-family: var(--font-main);
}

.form-group input:focus {
    outline: none;
    border-color: var(--color-primary);
}

/* FAQ Styles */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 15px;
    border: 1px solid var(--color-accent);
    border-radius: var(--border-radius);
    background-color: var(--color-card-bg);
    overflow: hidden;
}

.faq-question {
    width: 100%;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: none;
    border: none;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-primary-dark);
    cursor: pointer;
    transition: var(--transition);
}

.faq-question:hover {
    background-color: var(--color-bg-secondary);
}

.faq-icon {
    font-size: 1.5rem;
    color: var(--color-primary);
    transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background-color: var(--color-card-bg);
}

.faq-answer p {
    padding: 0 20px 20px;
    color: var(--color-text-muted);
}

/* Floating Action Button (Messengers) */
.fab-wrapper {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    display: flex;
    flex-direction: column-reverse;
    gap: 15px;
    align-items: center;
}

.fab-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--color-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    position: relative;
}

.fab-btn:hover {
    transform: scale(1.1);
}

.fab-main {
    background-color: var(--color-primary-dark);
}

.fab-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition);
}

.fab-wrapper:hover .fab-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.fab-viber {
    background-color: #7360f2;
}

.fab-telegram {
    background-color: #0088cc;
}

.fab-phone {
    background-color: #25d366;
}
