:root {
    --bg-main: #2f4635;
    --accent-green: #6a8573;
    --text-gray: #d8d8d8;
}

/* ========== MAIN HEADER (корневой контейнер) ========== */
.main-header {
    margin: 0;
    padding: 15px 40px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 20px;
    background: var(--bg-main);
    flex-wrap: wrap;
    position: relative;
    z-index: 1001;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    font-family: Arial, sans-serif;
}

/* ========== LOGO ========== */
.main-header .logo {
    font-size: 24px;
    font-weight: bold;
    letter-spacing: 1px;
    white-space: nowrap;
    color: white;
    flex-shrink: 0;
    order: 1;
    cursor: pointer;
}

/* ========== NAVIGATION ========== */
.main-header nav {
    display: flex;
    gap: 20px;
    order: 2;
}

.main-header nav a {
    color: var(--text-gray);
    text-decoration: none;
    font-size: 16px;
    transition: color 0.2s;
}

.main-header nav a:hover {
    color: white;
}

/* ========== SEARCH BOX ========== */
.main-header .header {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.12);
    border-radius: 18px;
    padding: 0 15px;
    height: 40px;
    flex: 1 1 200px;
    max-width: 400px;
    order: 3;
}

.main-header .search-icon-wrapper {
    width: 24px;
    height: 24px;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-header .search-icon-wrapper svg {
    width: 100%;
    height: 100%;
    fill: white;
    opacity: 0.9;
}

.main-header .search-input {
    background: transparent;
    border: none;
    outline: none;
    color: white;
    font-size: 16px;
    width: 100%;
    height: 100%;
}

.main-header .search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

/* ========== ACTION BUTTONS ========== */
.main-header .header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    order: 4;
}

.main-header .action-btn {
    background: var(--accent-green);
    border-radius: 20px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: background 0.2s;
    height: 40px;
    color: white;
}

.main-header .action-btn:hover {
    background: #7da089;
}

.main-header .action-btn svg {
    width: 20px;
    height: 20px;
    fill: white;
}

.main-header .btn-text {
    font-size: 14px;
    white-space: nowrap;
}

/* ========== BURGER ========== */
.main-header .burger {
    display: none;
    width: 30px;
    height: 22px;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    margin-left: 10px;
    flex-shrink: 0;
    order: 5;
    z-index: 1003;
}

.main-header .burger span {
    width: 100%;
    height: 3px;
    background: white;
    border-radius: 2px;
}

/* ========== MOBILE MENU ========== */
.main-header .mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #213225;
    padding: 20px 40px;
    box-sizing: border-box;
    z-index: 1002;
    flex-direction: column;
    gap: 15px;
    border-top: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

.main-header .mobile-menu.open {
    display: flex;
}

.main-header .mobile-menu a {
    color: var(--text-gray);
    text-decoration: none;
    font-size: 18px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

/* ========== MEDIA QUERIES ========== */
@media (max-width: 1000px) {
    .main-header { padding: 15px 20px; }
    .main-header nav { display: none; }
    .main-header .burger { display: flex; }
}

@media (max-width: 700px) {
    .main-header {
        padding: 10px 15px;
        gap: 10px;
    }

    .main-header .logo { font-size: 20px; }

    .main-header .header {
        order: 6;
        width: 100%;
        max-width: 100%;
        flex: 1 1 100%;
        margin-top: 5px;
    }

    .main-header .header-actions {
        margin-left: auto;
        gap: 5px;
    }

    .main-header .btn-text { display: none; }

    .main-header .action-btn {
        padding: 0;
        width: 36px;
        height: 36px;
        justify-content: center;
        border-radius: 50%;
    }
}

@media (max-width: 370px) {
    .main-header .logo { font-size: 18px; }
}
