* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
}

body {
    background: var(--background-light);
}

/* Общий контейнер */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: var(--background-white);
    border: 1px solid var(--border-light);
    position: relative;
}

.header__inner {
    padding-left: 3%;
    padding-right: 3%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

/* Логотип */
.header__logo img {
    max-height: 40px;
    width: auto;
}

/* Бургер меню */
.header__burger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.header__burger span {
    display: block;
    height: 3px;
    width: 100%;
    background: var(--text-dark);
    border-radius: 3px;
    transition: 0.3s;
}

/* Навигация */
.header__content {
    display: flex;
    align-items: center;
    flex-grow: 1;
    justify-content: space-between;
    margin-left: 40px;
}

.header__nav {
    display: flex;
    gap: 20px;
}

.header__nav a {
    color: var(--text-dark);
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
}

.header__nav a:hover {
    color: var(--primary-color);
}

/* Контакты */
.header__contacts {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header__phone {
    font-size: 14px;
    text-align: right;
    padding-top: 5px;
}

.header__phone a {
    color: var(--text-dark);
    font-weight: bold;
    text-decoration: none;
}

.phone-link {
    display: flex;
    align-items: center;
    gap: 8px;
}

.phone-link i {
    font-size: 16px;
    color: var(--primary-color);
}

.header__phone span {
    display: block;
    font-size: 12px;
    color: var(--text-light);
}

/* Иконки */
.header__socials {
    display: flex;
    gap: 10px;
}

.icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: #fff;
    font-size: 12px;
    text-decoration: none;
}

.icon-svg-telegram {
    margin-right: 3px;
    width: 18px;
    height: 18px;
    fill: #fff;
}

.icon-svg-whatsapp {
    width: 22px;
    height: 22px;
    fill: #fff;
}

.telegram {
    background: #2aa1da;
}

.whatsapp {
    background: #25d366;
}

/* Кнопка */
.header__btn {
    padding: 10px 16px;
    background: var(--primary-color);
    color: var(--background-white);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
    transition: background 0.3s;
}

.header__btn:hover {
    background: var(--primary-dark);
}

/* Выпадающие меню */
.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--background-white);
    border: 1px solid var(--border-light);
    border-radius: 5px;
    box-shadow: 0 2px 6px var(--shadow-color);
    min-width: 160px;
    z-index: 10;
    margin-top: 6px;
}

.dropdown-menu a {
    display: block;
    padding: 10px 16px;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 14px;
}

.dropdown-menu a:hover {
    background: var(--background-grey);
}

.header__nav .dropdown {
    display: inline-flex;
    align-items: center;
    position: relative;
}



/* Мега меню */
.mega-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 800px;
    padding: 20px 25px;
    background: var(--background-white);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    box-shadow: 0 4px 15px var(--shadow-dark);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.mega-row {
    display: grid;
    grid-template-columns: 120px 1fr;
    align-items: start;
}

.mega-title {
    font-weight: bold;
    font-size: 14px;
    color: var(--text-dark);
    white-space: nowrap;
    text-decoration: underline;
}

.mega-title img {
    width: 2rem;
    padding-right: 3px;
    vertical-align: middle;
    position: relative;
    bottom: 2px;
}

.mega-list-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;    
}

.mega-list-links a {
    font-size: 13px;
    color: var(--text-dark);
    text-decoration: none;
    border-radius: 12px;
    padding: 5px 12px;
    background: var(--background-grey);
    transition: background 0.3s;
}

.mega-list-links a:hover {
    background: #e0e0e0;
    color: var(--primary-color);
}

/* Медиа запросы для адаптива */

/* Планшеты (768px - 1024px) */
@media (max-width: 1024px) {
    .header__inner {
        padding-left: 2%;
        padding-right: 2%;
    }
    
    .header__content {
        margin-left: 20px;
    }
    
    .header__nav {
        gap: 15px;
    }
    
    .header__contacts {
        gap: 15px;
    }
    
    .mega-menu {
        width: 700px;
    }
}

/* Мобильные устройства (до 768px) */
@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }
    .header__inner {
        height: 70px;
        padding: 0 15px;
    }
      
    .header__burger {
        display: flex;
    }
        
    .header__content {
        display: none;
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--background-white);
        flex-direction: column;
        padding: 20px;
        overflow-y: auto;
        z-index: 1000;
        box-shadow: 0 4px 12px var(--shadow-color);
    }

    .header__content.active {
        display: flex;
    }
    
    .header__nav {
        flex-direction: column;
        width: 100%;
        gap: 0;
        margin-bottom: 30px;
    }
    
    .header__nav > a,
    .header__nav > .dropdown {
        width: 100%;
        padding: 15px 0;
        border-bottom: 1px solid var(--border-light);
    }
    
    .dropdown-toggle {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }
    
    .dropdown-toggle::after {
        content: '+';
        font-size: 18px;
        transition: transform 0.3s;
    }
    
    .dropdown.active .dropdown-toggle::after {
        content: '−';
    }
    
    .dropdown-menu {
        position: static;
        width: 100%;
        border: none;
        box-shadow: none;
        display: none;
        padding-left: 15px;
        margin-top: 10px;
    }
    
    .dropdown.active .dropdown-menu {
        display: block;
    }
    
    .mega-menu {
        position: static;
        width: 100%;
        padding: 15px;
        margin-top: 10px;
        display: none;
    }
    
    .dropdown.active .mega-menu {
        display: flex;
    }
    
    .mega-row {
        grid-template-columns: 1fr;
        margin-bottom: 20px;
    }
    
    .mega-title {
        padding: 10px 0;
        font-size: 16px;
    }
    
    .mega-list-links {
        flex-direction: column;
        gap: 10px;
    }
    
    .mega-list-links a {
        padding: 12px 15px;
        background: var(--background-light);
        border-radius: 8px;
    }
    
    .header__contacts {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        gap: 25px;
    }
    
    .header__phone {
        text-align: left;
        width: 100%;
    }
    
    .phone-link {
        font-size: 18px;
        margin-bottom: 5px;
    }
    
    .header__socials {
        width: 100%;
        justify-content: center;
        gap: 20px;
    }
    
    .header__btn {
        width: 100%;
        padding: 15px;
        font-size: 16px;
        border-radius: 8px;
    }
    
    /* Анимация бургера */
    .header__burger.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }
    
    .header__burger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .header__burger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }
}

/* Маленькие мобильные (до 480px) */
@media (max-width: 480px) {
    .header__logo img {
        max-height: 35px;
    }
    
    .header__inner {
        height: 65px;
    }
    
    .header__content {
        top: 65px;
        height: calc(100vh - 65px);
    }
    
    .phone-link {
        font-size: 16px;
    }
    
    .header__phone span {
        font-size: 14px;
    }
    
    .icon {
        width: 40px;
        height: 40px;
    }
    
    .icon-svg-telegram,
    .icon-svg-whatsapp {
        width: 24px;
        height: 24px;
    }
}

.mega-menu {
    display: none;
}

/* Показывать меню только при активном состоянии */
.dropdown.active .dropdown-menu {
    display: block;
}

/* Для мега-меню */
.dropdown.active .mega-menu {
    display: flex;
}