/* --- Современная шапка в стиле FitAudit (исправлено для мобильных) --- */
.site-header {
    background: #fff;
    box-shadow: 0 2px 16px rgba(44, 62, 80, 0.07);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: box-shadow 0.3s, transform 0.3s;
    min-height: 60px;
    width: 100%;
}

.site-header.scrolled {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

.header-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 60px;
    padding: 0 20px;
}

/* --- Логотип --- */
.logo-block {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    padding: 4px 0;
    flex-shrink: 0;
}

.logo-img {
    height: 40px;
    width: 40px;
    border-radius: 12px;
    background: #e8f5e9;
    box-shadow: 0 2px 8px rgba(46, 204, 113, 0.08);
    transition: box-shadow 0.2s, transform 0.2s;
    object-fit: cover;
}

.logo-block:hover .logo-img {
    box-shadow: 0 4px 16px rgba(46, 204, 113, 0.18);
    transform: scale(1.04);
}

.logo-title {
    font-size: 1.5rem;
    font-weight: 900;
    color: #2ecc71;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: color 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 250px;
}

/* --- Гамбургер-меню --- */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    flex-shrink: 0;
}

.mobile-menu-toggle span {
    width: 100%;
    height: 3px;
    background: #2ecc71;
    border-radius: 10px;
    transition: all 0.3s ease;
    transform-origin: center;
    position: relative;
}

.mobile-menu-toggle.open span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.mobile-menu-toggle.open span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.open span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* --- Навигация --- */
.main-nav {
    position: static; /* Отменяем fixed */
    transform: none;
    opacity: 1;
    visibility: visible;
    box-shadow: none;
    width: auto;
    max-width: none;
    height: auto;
    padding: 0;
    background: transparent;
}

.main-nav.show {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
}

.nav-list {
    display: flex;
    flex-direction: row;
    gap: 30px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-list li {
    border-bottom: 1px solid #eee;
}

.nav-list a {
    font-size: 1.1rem;
    color: #2c3e50;
    text-decoration: none;
    padding: 8px 0;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.nav-list a:hover,
.nav-list a:focus {
    color: #27ae60;
    border-bottom-color: #27ae60;
}

/* --- Поиск --- */
.header-search {
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border-radius: 20px;
    padding: 2px 8px 2px 14px;
    box-shadow: 0 1px 4px rgba(44, 62, 80, 0.04);
    transition: box-shadow 0.2s, background 0.2s;
    flex-shrink: 0;
}

.header-search:hover, .header-search:focus-within {
    background: #e8f5e9;
    box-shadow: 0 2px 8px rgba(46, 204, 113, 0.12);
}

.header-search input[type="search"] {
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.95rem;
    padding: 6px 0;
    width: 140px;
    color: #222;
    -webkit-appearance: textfield;
}

.header-search input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none;
    height: 16px;
    width: 16px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2364748b'%3E%3Cpath d='M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z'/%3E%3C/svg%3E") no-repeat center;
    cursor: pointer;
}

.header-search button {
    background: none;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 4px 6px;
    display: flex;
    align-items: center;
    color: #27ae60;
    transition: color 0.2s;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    justify-content: center;
}

.header-search button:hover, .header-search button:focus {
    color: #219150;
    background-color: rgba(39, 174, 96, 0.1);
}

/* --- Instagram --- */
.header-insta {
    color: #e1306c;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
    flex-shrink: 0;
    padding: 4px 8px;
    border-radius: 6px;
}

.header-insta:hover, .header-insta:focus {
    color: #c13584;
    background-color: rgba(225, 48, 108, 0.05);
}

.insta-icon {
    transition: transform 0.2s ease;
}

.header-insta:hover .insta-icon {
    transform: scale(1.1);
}

.insta-text {
    white-space: nowrap;
}

/* --- Адаптивность --- */
@media (max-width: 1024px) {
    .header-flex {
        padding: 0 15px;
    }

    .logo-img {
        height: 36px;
        width: 36px;
    }

    .logo-title {
        font-size: 1.3rem;
    }

    .nav-list a {
        font-size: 0.95rem;
        padding: 5px 12px;
    }

    .header-search input[type="search"] {
        width: 120px;
        font-size: 0.9rem;
    }
}

@media (max-width: 767px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .main-nav {
        position: fixed;
        top: 0;
        right: 0;
        width: 80%;
        max-width: 320px;
        height: 100%;
        background: #ffffff;
        box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
        transform: translateX(100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        z-index: 1000;
        border-radius: 16px 0 0 16px;
        overflow-y: auto;
        padding-top: 70px;
    }

    .main-nav.show {
        transform: translateX(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-list {
        flex-direction: column;
        gap: 0;
    }

    .nav-list a {
        padding: 15px 20px;
        border-bottom: 1px solid #eee;
    }
}

@media (max-width: 480px) {
    .header-flex {
        padding: 0 8px;
        gap: 6px;
    }

    .logo-img {
        height: 28px;
        width: 28px;
    }

    .logo-title {
        font-size: 1.1rem;
        max-width: 100px;
        letter-spacing: 0.3px;
    }

    .header-search input[type="search"] {
        width: 70px;
        font-size: 0.85rem;
    }

    .header-search button {
        width: 24px;
        height: 24px;
    }

    .insta-text {
        font-size: 0.8rem;
    }
}