/* ========== HEADER BASE ========== */
.main-header {
    background-color: #1e1e1e;
    border-bottom: 1px solid #2c2c2c;
    padding: 30px 0;
    color: white;
    font-size: 16px;
    width: 100%;
}

.header-container {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;    
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

/* ========== LOGO ========== */
.logo {
    position: relative;
    margin-left: 32px;
    padding-right: 40px;
    min-width: 270px;
}

.logo::after {
    content: '';
    position: absolute;
    height: 60px;
    right: 0;
    top: -10px;
    width: 2px;
    margin-right: 20px;
    background-color: #2c2c2c;   
}

.logo a {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.9rem;
    font-weight: 680;
    color: #f0620f;
    text-decoration: none;
    letter-spacing: 2px;
    margin-right: 30px;
    text-shadow: 0 0 4px rgba(240, 98, 15, 0.4), 2px 2px 6px rgba(0, 0, 0, 0.25);
}

.logo a:hover {
    text-shadow: 0 0 8px #ff6600;
}

/* ========== DESKTOP MENU ========== */
.main-nav {
    display: flex;
    flex-grow: 1;
    justify-content: center;
    align-items: center;
    gap: 24px;
    font-family: 'Exo 2', 'Fira Sans', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    padding-left: 10px;
}

.main-nav a {    
    text-decoration: none;
    color: white;
    font-weight: 500;
    transition: color 0.2s;
}

.main-nav a:hover {
    color: #ff6600;
}

.main-nav a.active{
    color: #00BFFF; /* бирюзово-синий, можно другой */
    font-weight: bold;
    padding-bottom: 3px ;
    padding-top: 3px;
    border-bottom: 1px solid #00BFFF;
}

/* ========== BURGER BUTTON ========== */
.burger-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.burger-line {
    width: 100%;
    height: 3px;
    background-color: white;
    border-radius: 2px;
}

/*============DROPDOWN Lang MENU=================*/
.lang-layout {    
    flex-grow: 1;
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;    
    border-radius: 2px;
    height: 35px;
    max-width: 275px;
    padding-left: 15px;
    color: black;
    
}

.lang-container {
    width: 90px;
    height: 35px;
    background-color: black;
    margin-right: 25px;
    border-radius: 5px;            
}

.language-switcher {
    margin: 0;
    padding: 0;
    width: inherit;
    height: inherit;
    position: relative;

}

.lang-dropdown {
    position: relative;
    width: 100%;
    height: 100%;
}

.lang-current {
    width: 100%;
    height: 100%;
    background-color: black;
    border: 1px solid #333;
    border-radius: 3px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
}

.lang-current img {
    display: block;
    margin: 0 4px 0 0;
    padding: 0 0 2px 0;
    width: 18px;
    height: 14px;
}

.lang-options {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: black;
    border: 1px solid #333;
    border-radius: 8px;
    width: 80px;
    z-index: 1000;
    padding: 0;
    margin: 2px 0 0 4px;

}

.lang-options.show {
    display: block;
}

.lang-option {
    width: 100%;
    padding: 5px 8px;
    background: black;
    border: none;
    color: white;
    cursor: pointer;
    text-align: left;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    margin: 0;
    box-sizing: border-box;
}

.lang-option:hover {
    background-color: #333;
}

.lang-option img {
    display: block;
    width: 16px;
    height: 12px;
    flex-shrink: 0;
}

.arrow {
    font-size: 8px;
    padding-left: 4px ;
}

/* Дальше не разобрано */

/* ========== MOBILE NAVIGATION ========== */
.mobile-menu {
    display: none;
    font-size: 1.3rem;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: -320px;
    width: 300px;
    height:100vh;
    background-color: #1e1e1e;
    padding: 32px 24px;
    padding-bottom: 50px;
    gap: 0px;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    transition: left 0.3s ease;
    z-index: 1001;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-menu-list a {
    word-break: break-word; /* можно перенести длинные слова */
    white-space: normal;
}

.mobile-menu-list li{
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-menu-list li a {
    color: white;
    list-style: none;
    text-decoration: none;
    display: block;
    padding: 10px 0;
}

.mobile-menu.open {
    left: 0;
}

.mobile-menu-list li a:hover {

    color: #ff6600;
}

.mobile-menu a.active,
.mobile-menu .submenu-title.active{
    color: #00BFFF;
    font-weight: bold;
    border-bottom: none;
    display: inline-block;
    border-bottom: 1px solid #00BFFF;
    padding-bottom: 1px;
    margin-bottom: 10px;
}

#articles-dropdown {
    margin-top: 8px;
    margin-bottom: 6px;
    border-left: 2px solid #00BFFF;
    padding-left: 20px; /* чтобы текст не прилипал к линии */
}

#articles-dropdown a {
/*    margin-top: 20px; *//* или больше, по вкусу */
    padding: 4px 0;
}

#articles-dropdown li {
    margin-top: 2px;
    margin-bottom: 2px; /* если хочешь еще больше разделения между пунктами */
}

/* Только для активных категорий в мобильном меню */
.mobile-menu-list .submenu li.active a {
    position: relative;
    color: white;
    font-weight: bold;
    z-index: 1;
}

.mobile-menu-list .submenu li.active a::before {
    content: "";
    position: absolute;
    top: 0;
    left: -10px; /* фон левее текста */
    height: 100%;
    width: calc(100% + 20px); /* фон шире, чем текст */
    background-color: #ff6600;
    border-radius: 5px;
    box-shadow: 0 0 5px rgba(255, 165, 0, 0.6);
    z-index: -1; /* чтобы фон был под текстом */
}

.submenu {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.4s ease;
}

.submenu.open {
    opacity: 1;
}

.submenu-title {
    cursor: pointer;
    font-weight: bold;
    display: block;
    padding: 8px 0;
}

.submenu-title .dropdown-icon {
    display: inline-block;
    transition: transform 0.3s ease;
}

.submenu-title.open .dropdown-icon {
    transform: rotate(180deg);
}

.dropdown-icon {
    margin-left: 4px;
}

.mobile-menu-header {
    display: flex;
    justify-content: flex-end;
    padding: 0.25rem 0.5rem; /* минимальные отступы */
}

.mobile-menu-close {
    font-size: 1.2rem;      /* поменьше ✖ */
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0;
    margin: 0;
    line-height: 1;
    width: auto;
    height: auto;
}

.mobile-menu-content {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
/*    min-height: 0; *//* ← ключевой момент */
}

/* Панель прижата к низу, но не выпадет из скролла */
.mobile-lang-switcher {
    flex-shrink: 0;
    margin-bottom: 60px;
    border-top: 1px solid #2c2c2c;
    padding-top: 16px;
    background-color: #1e1e1e;
}

/* ========== LANGUAGE SWITCHERS ========== */
.language-switcher {
    margin-left: auto;
}

.language-switcher-mobile {
    display: block;
    margin-top: 16px; /* например */
}

.mobile-lang-switcher {
    border-top: 1px solid #2c2c2c;
    padding-top: 16px;
}

.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ========== MEDIA QUERIES ========== */
@media (max-width: 760px) {
    .main-nav {
        display: none;
    }

    .main-nav.open {
        left: 0;
    }

    .burger-btn {
        display: flex;
    }

    .mobile-menu {
        display: flex;
    }

    .language-switcher {
        display: none;
    }

    .language-switcher-mobile {
        display: block;
    }
}

@media (max-width: 500px) {
    .logo a {
        font-size: 1.6rem;
        letter-spacing: 1.8px;
        font-weight: 620;
    }
}

@media (max-width: 430px) {
    .logo a {
        font-size: 1.4rem;
        letter-spacing: 1.7px;
    }
}

/* Стиль для Chrome, Edge, Safari */
.mobile-menu::-webkit-scrollbar {
    width: 8px;
}

.mobile-menu::-webkit-scrollbar-track {
    background: #1e1e1e;
}

.mobile-menu::-webkit-scrollbar-thumb {
    background-color: #555;
    border-radius: 4px;
    border: 2px solid #1e1e1e;
}

.mobile-menu::-webkit-scrollbar-thumb:hover {
    background-color: #888;
}

/* Стиль для Firefox */
.mobile-menu {
    scrollbar-width: thin;
    scrollbar-color: #555 #1e1e1e;
}





