/* Header Styles */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--header-bg, #ffffff);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding: 15px 0 0;
}

.site-header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 30px rgba(0, 0, 0, 0.1);
}

.header-inner {
    display: grid;
    grid-template-columns: auto auto 1fr;
    gap: 30px;
    align-items: center;
    max-height:100px;
}

/* Левая часть - логотип и слоган */
.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.5rem;
    color: #2563eb;
}

.logo-image {
    height: 80px;
    width: auto;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
}

.slogan {
    font-style: italic;
    color: #6b7280;
    border-left: 2px solid #e5e7eb;
    padding-left: 15px;
    font-size: 0.6rem;
    max-width: 200px;
}

/* Адрес */
.header-address {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #4b5563;
    font-size: 0.9rem;
    max-width: 320px;
}

.address-icon {
    font-size: 1.1rem;
}

.address-text {
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Правая часть - контакты */
.header-contacts {
    display: flex;
    align-items: center;
    gap: 25px;
    justify-self: end;
}

.contacts-header {
    text-align: right;
}

.contacts-title {
    font-size: 0.8rem;
    color: #333;
    font-weight: 600;
    margin-bottom: 5px;
    white-space: nowrap;
}

/* Мессенджеры */
.messengers {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.messenger-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: transparent;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 50%;
}

.messenger-link:hover {
    background: #fff;
    transform: translateY(-1px);
}

.messenger-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.messenger-fallback {
    font-size: 1rem;
}

/* Информация о контактах */
.contacts-info {
    text-align: right;
}

.work-hours {
    font-size: 0.8rem;
    color: #6b7280;
    margin-bottom: 2px;
}

.phone-link {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1f2937;
    text-decoration: none;
    white-space: nowrap;
}

.phone-link:hover {
    color: #2563eb;
}

/* Кнопка */
.header-actions {
    display: flex;
    align-items: center;
}

.callback-button {
    display: inline-block;
    background: var(--btn-bg-color, #2563eb);
    color: var(--btn-text-color, #ffffff);
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    text-decoration: none;
    text-align: center;
    line-height: 1;
}

.callback-button:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    color: #ffffff;
    text-decoration: none;
}

/* Мобильное меню */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #4b5563;
}

/* Адаптивность */
@media (max-width: 1200px) {
    .header-inner {
        grid-template-columns: auto 1fr;
        gap: 20px;
    }

    .header-address {
        display: none;
    }
}

@media (max-width: 768px) {
    .header-inner {
        grid-template-columns: 1fr auto;
    }

    .header-contacts {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }


    .header-left {
        gap: 10px;
    }

    .logo-text {
        font-size: 1.3rem;
    }

    .hero-content {
        max-width: 100%;
    }

    .mobile-menu-btn {
        display: block;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
        padding: 20px;
    }

    .main-nav.active {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 1rem;
    }

    .header-inner {
        padding: 0.5rem 0;
    }
}

@media (max-width: 480px) {
    .site-header {
        padding: 0;
    }

    .logo-image {
        height: 65px;
    }

    .logo-text {
        font-size: 1.2rem;
    }
}


/* Мобильное меню */
.mobile-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100vh;
    background: #3b5998;
    z-index: 9999;
    transition: left 0.3s ease;
    overflow-y: auto;
}

.mobile-menu.active {
    left: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
    background: #f8fafc;
}

.mobile-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.mobile-logo-image {
    height: 40px;
    width: auto;
}

.mobile-logo-text {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2563eb;
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #4b5563;
    padding: 5px;
}

.mobile-menu-content {
    padding: 20px;
}

/* Контакты в мобильном меню */
.mobile-address {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8fafc;
    border-radius: 8px;
}

.mobile-address-icon {
    font-size: 1.2rem;
    margin-top: 2px;
}

.mobile-address-text {
    color: #374151;
    line-height: 1.4;
    flex: 1;
}

.mobile-phone,
.mobile-email {
    margin-bottom: 15px;
    padding: 15px;
    background: #f8fafc;
    border-radius: 8px;
}

.mobile-phone-link,
.mobile-email-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #374151;
    text-decoration: none;
    font-weight: 500;
}

.mobile-phone-link:hover,
.mobile-email-link:hover {
    color: #2563eb;
}

/* Мессенджеры в мобильном меню */
.mobile-messengers {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8fafc;
    border-radius: 8px;
}

.mobile-messengers-title {
    font-weight: 600;
    margin-bottom: 12px;
    color: #374151;
}

.mobile-messengers-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mobile-messenger-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: white;
    border-radius: 8px;
    text-decoration: none;
    color: #374151;
    transition: all 0.3s ease;
}

.mobile-messenger-link:hover {
    background: #e5e7eb;
}

.mobile-messenger-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.mobile-messenger-name {
    font-weight: 500;
}

/* Навигация в мобильном меню */
.mobile-nav {
    margin-bottom: 20px;
}

.mobile-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav-list li {
    border-bottom: 1px solid #e5e7eb;
}

.mobile-nav-list li:last-child {
    border-bottom: none;
}

.mobile-nav-list a {
    display: block;
    padding: 15px 0;
    color: #374151;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.mobile-nav-list a:hover {
    color: #2563eb;
}

/* Кнопка в мобильном меню */
.mobile-actions {
    padding: 15px 0;
}

.mobile-callback-button {
    display: block;
    width: 100%;
    background: var(--btn-bg-color, #2563eb);
    color: var(--btn-text-color, #ffffff);
    padding: 15px;
    border-radius: 8px;
    text-decoration: none;
    text-align: center;
    font-weight: 600;
    transition: all 0.3s ease;
}

.mobile-callback-button:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

/* Оверлей */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    display: none;
}

.mobile-menu-overlay.active {
    display: block;
}

/* Основное меню */
.main-navigation {
    background: #2d3748;
    border-top: 1px solid #4a5568;
}

.main-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    justify-content: flex-start;
    align-items: center;
}

.main-menu li {
    margin: 0;
    position: relative;
}

.main-menu a {
    display: block;
    padding: 5px 15px;
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.main-menu a:hover,
.main-menu .current-menu-item > a {
    background: #4a5568;
    color: #fff;
    border-bottom-color: #667eea;
}

/* Выпадающее меню */
.main-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 200px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-radius: 0 0 8px 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.main-menu li:hover .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.main-menu .sub-menu li {
    border-bottom: 1px solid #e2e8f0;
}

.main-menu .sub-menu a {
    color: #2d3748;
    padding: 12px 20px;
    border-bottom: none;
}

.main-menu .sub-menu a:hover {
    background: #f7fafc;
    color: #667eea;
}

/* Мобильное меню */
.mobile-main-menu {
    list-style: none;
    margin: 0 0 30px 0;
    padding: 0;
}

.mobile-main-menu li {
    border-bottom: 1px solid #e2e8f0;
}

.mobile-main-menu a {
    display: block;
    padding: 15px 20px;
    color: #fafafa;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    transition: background 0.3s ease;
}

.mobile-main-menu a:hover {
    background: #f7fafc;
    color: #667eea;
}

.mobile-main-menu .current-menu-item > a {
    background: #667eea;
    color: white;
}

/* Адаптивность */
@media (max-width: 768px) {
    .main-navigation, .mobile-address {
        display: none;
    }
    
    .mobile-navigation {
        display: block;
    }
    .mobile-main-menu a {
        padding:5px 10px;
    }
    .mobile-address, .mobile-phone, .mobile-email, .mobile-messengers{
        padding:10px;
        margin-bottom:5px;
    }
}

@media (min-width: 769px) {
    .mobile-navigation {
        display: none;
    }
}