/* =============================
   HEADER — ГЛАВНАЯ НАВИГАЦИЯ
   Адаптивный, современный стиль
   ============================= */

/* Общий контейнер шапки */
.header {
    width: 100%;
    background: #ffffff;
    border-bottom: 1px solid #e6e6e6;
    position: sticky;
    top: 0;
    left: 0;
    z-index: 999;
}

/* Контейнер внутри */
.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Логотип */
.header-logo a {
    font-size: 24px;
    color: #222;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.5px;
}

/* =============================
   МЕНЮ (ДЕСКТОП)
   ============================= */

.nav {
    display: flex;
    gap: 25px;
}

.nav a {
    color: #333;
    text-decoration: none;
    font-size: 17px;
    font-weight: 500;
    transition: 0.3s ease;
}

.nav a:hover {
    color: #ff4800;
}

/* =============================
   БУРГЕР-МЕНЮ (МОБИЛЬНЫЕ)
   ============================= */

.burger {
    display: none;
    width: 32px;
    height: 24px;
    cursor: pointer;
    position: relative;
}

.burger span {
    width: 100%;
    height: 3px;
    background: #333;
    display: block;
    position: absolute;
    transition: 0.3s ease;
}

.burger span:nth-child(1) {
    top: 0;
}
.burger span:nth-child(2) {
    top: 10px;
}
.burger span:nth-child(3) {
    top: 20px;
}

/* Когда меню открыто */
.burger.active span:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
}
.burger.active span:nth-child(2) {
    opacity: 0;
}
.burger.active span:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
}

/* =============================
   МЕНЮ (МОБИЛЬНАЯ ВЕРСИЯ)
   ============================= */

.mobile-nav {
    display: none;
    flex-direction: column;
    background: #ffffff;
    padding: 15px 20px;
    border-top: 1px solid #e6e6e6;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    position: relative;
}

.mobile-nav a {
    padding: 10px 0;
    font-size: 18px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease, padding-left 0.3s ease;
}

.mobile-nav a:hover {
    color: #ff4800;
    padding-left: 10px;
}

/* Overlay при открытом меню */
.mobile-nav::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.3);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-nav.open {
    display: flex;
    max-height: 500px;
    padding: 15px 20px;
}

.mobile-nav.open::before {
    opacity: 1;
    z-index: 998;
}

/* =============================
   АДАПТИВНОСТЬ
   ============================= */

/* Планшеты и ниже */
@media (max-width: 992px) {
    .nav {
        display: none; /* прячем основное меню */
    }
    .burger {
        display: block; /* показываем бургер */
    }
    .mobile-nav a {
        font-size: 18px;
    }
}

/* Мобильные */
@media (max-width: 560px) {
    .header-inner {
        padding: 12px 15px;
    }
    .header-logo a {
        font-size: 20px;
    }
    .mobile-nav a {
        font-size: 16px;
        padding: 8px 0;
    }
}
