:root {
    --primary: #2c3e50;
    --secondary: #3498db;
    --accent: #e74c3c;
    --light: #ecf0f1;
    --dark: #2c3e50;
    --text: #333333;
}

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

body {
    font-family: 'Roboto', sans-serif;
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    background-color: #f9f9f9;
    padding-top: 80px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--dark);
}

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

/* Header & Navigation */
header {
    background-color: rgba(255, 255, 255, 0.95);
    position: fixed;
    width: 100%;
    z-index: 1000;
    padding: 15px 0;
    transition: all 0.3s ease;
    top: 0;
    left: 0;
}

header.scrolled {
    padding: 10px 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

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

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

.logo-text {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    margin-left: 10px;
}

.nav-links {
    color: var(--dark);
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    color: var(--dark);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--secondary);
    transition: width 0.3s ease;
}

.nav-links a:hover:after {
    width: 100%;
}

.nav-links a:hover {
    color: var(--secondary);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Панель редактирования Битрикс */
#panel {
    padding: 80px 0;
}

/* Фиксированная верхняя панель контактов */
.top-bar {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    padding: 8px 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.contact-bar {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    padding: 0 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #FFFFFF;
    font-size: 14px;
}

.contact-item .icon {
    display: flex;
    align-items: center;
}

.contact-item .icon img {
    width: 16px;
    height: 16px;
}

/* Основной хедер - под top-bar */
#mainHeader {
    position: fixed;
    top: 40px; /* Высота top-bar */
    left: 0;
    width: 100%;
    background: #fff;
    z-index: 999;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.header-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Отступ для body чтобы контент не был под хедером */
body {
    margin: 0;
    padding-top: 120px; /* top-bar (40px) + header (~80px) */
}

/* Мобильная адаптация */
@media (max-width: 768px) {
    .contact-bar {
        flex-direction: column;
        gap: 8px;
    }
    
    .contact-item {
        font-size: 12px;
    }
    
    #mainHeader {
        top: auto; /* Может быть лучше сделать статичным на мобильных */
        position: relative;
    }
    
    body {
        padding-top: 0;
    }
}


@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }
    
    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background-color: var(--primary);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
        z-index: 999;
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .nav-links li {
        margin: 15px 0;
    }
}

.top-bar {
    background: var(--dark);
    padding: 8px 0;
    font-size: 14px;
}

.contact-bar {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    color: white;
    gap: 8px;
}

.contact-item .icon img {
    height: 16px;
    width: auto;
}

.contact-item a:hover {
    text-decoration: underline;
}

/* Header styles */
header {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 15px 0;
    transition: all 0.3s ease;
}

header.scrolled {
    padding: 10px 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
}

.header-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.header-logo {
    flex: 0 0 auto;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-image {
    height: 50px;
    transition: all 0.3s ease;
}

header.scrolled .logo-image {
    height: 40px;
}

.logo-text {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 22px;
    color: var(--primary);
    margin-left: 10px;
}

.header-menu {
    flex: 1 1 auto;
    display: flex;
    justify-content: flex-end;
}

.main-navigation ul {
    display: flex;
    list-style: none;
    gap: 25px;
}

.main-navigation ul li a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    font-size: 16px;
    transition: all 0.3s ease;
    position: relative;
    padding: 5px 0;
}

.main-navigation ul li a:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.main-navigation ul li a:hover {
    color: var(--primary);
}

.main-navigation ul li a:hover:after {
    width: 100%;
}

.btn {
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    cursor: pointer;
    border: none;
    font-family: 'Montserrat', sans-serif;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: 2px solid var(--primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(44, 84, 235, 0.2);
}

.mobile-toggle {
    display: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--dark);
    background: none;
    border: none;
}


/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Media queries */
@media (max-width: 992px) {
    .contact-bar {
        gap: 15px;
    }
    
    .hero-content {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-text, .hero-image {
        flex: none;
        width: 100%;
    }
    
    .hero-text {
        margin-bottom: 50px;
    }
    
    .hero p {
        max-width: 100%;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .main-navigation ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        padding: 20px;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    }
    
    .main-navigation.active ul {
        display: flex;
    }
    
    .mobile-toggle {
        display: block;
    }
}

@media (max-width: 768px) {
    .contact-bar {
        flex-direction: column;
        gap: 8px;
        align-items: center;
    }
    
    .contact-item {
        justify-content: center;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
}