.site-header {
        background: #f4f4f4;
        padding: 0;
        width: 100%;
        height: 60px;
        opacity: 1;
        visibility: visible;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }
    .site-header .container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 15px;
        display: flex;
        align-items: center;
        width: 100%;
        box-sizing: border-box;
        display: table;
    }
    .site-header .header-content {
        display: flex;
        align-items: center;
        width: 100%;
        justify-content: space-between;
        min-width: 0;
        box-sizing: border-box;
        flex-wrap: nowrap;
        height: 60px;
        padding: 0;
    }
    .site-header .logo {
        flex: 0 0 20%; /* 20% ширины */
        max-width: 200px; /* Ограничение максимальной ширины */
        min-width: 0;
    }
    .site-header .main-nav {
        flex: 1 1 50%; /* 60% ширины, растягивается */
        min-width: 0;
        display: flex;
        justify-content: flex-end;
        position: relative;
        box-sizing: border-box;
    }
    .site-header .main-nav .main-nav-list {
        display: flex;
        list-style: none;
        margin: 0;
        padding: 0;
        align-items: center;
        /* min-width: 0; */
        flex-wrap: nowrap;
    }
    .site-header .main-nav .main-nav-list li {
        margin: 0;
        min-width: 0;
    }
    .site-header .main-nav .main-nav-list .nav-main-link {
        text-decoration: none;
        color: #333;
        font-size: 14px;
        display: flex;
        align-items: center;
        padding: 4px 8px;
        white-space: nowrap;
        min-width: 0;
    }
    .site-header .main-nav .main-nav-list .nav-main-link i {
        margin-right: 5px;
    }
    .site-header .main-nav .nav-more-btn {
        display: none;
        align-items: center;
        background: none;
        border: none;
        font-size: 14px;
        cursor: pointer;
        color: #333;
        padding: 8px 12px;
        margin-left: 8px;
        border-radius: 6px;
        transition: all 0.2s ease;
        position: relative;
        min-width: 60px;
        font-weight: 500;
    }

    .site-header .main-nav .nav-more-btn:hover {
        background-color: rgba(0, 0, 0, 0.05);
        color: #007cba;
    }
    .site-header .main-nav .nav-more-btn i {
        margin-left: 5px;
    }
    .site-header .main-nav .nav-more-menu {
        display: none;
        position: absolute;
        background: #fff;
        border: 1px solid #e1e5e9;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        z-index: 1000;
        width: max-content;
        min-width: 120px;
        max-width: 250px;
        top: 100%;
        right: 0;
        padding: 8px 0;
        border-radius: 8px;
        opacity: 0;
        transform: translateY(-8px);
        transition: all 0.2s ease;
        margin-top: 4px;
    }
    .site-header .main-nav .nav-more-menu.active {
        display: block;
        opacity: 1;
        margin-top: 20px; /* Уменьшен margin-top для лучшего отображения */
    }
    .site-header .main-nav .nav-more-list {
        list-style: none;
        margin: 0;
        padding: 0;
    }
    .site-header .main-nav .nav-more-list li {
        margin: 0;
        padding: 0;
    }
    .site-header .main-nav .nav-more-list .nav-main-link {
        color: #333;
        font-size: 14px;
        padding: 8px 16px;
        width: auto;
        border-radius: 6px;
        transition: background-color 0.2s ease;
        text-decoration: none;
        display: block;
        font-weight: 500;
    }

    .site-header .main-nav .nav-more-list .nav-main-link:hover {
        background-color: rgba(0, 123, 186, 0.1);
        color: #007cba;
    }
    .site-header .user-actions {
        flex: none;
        min-width: 0;
        text-align: right;
        display: flex;
        align-items: center;
        gap: 12px;
    }

    /* Кнопка "Создать статью" */
    .create-article-btn {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 4px 8px;
				background: linear-gradient(135deg, #007cba 0%, #308bb9 100%);
        color: white;
        text-decoration: none;
        border-radius: 6px;
        font-size: 14px;
        font-weight: 500;
        transition: all 0.2s ease;
        border: none;
        cursor: pointer;
        white-space: nowrap;
    }

    .create-article-btn:hover {
        background: linear-gradient(135deg, #005a87 0%, #004466 100%);
				color: #eeeeee;
    }

    .create-article-btn i {
        font-size: 16px;
    }

    .create-article-btn span {
        display: inline;
    }

    /* Переключатель языка */
    .language-selector-compact {
        position: relative;
        display: inline-block;
    }

    .language-toggle {
        display: flex;
        align-items: baseline;
        gap: 6px;
        padding: 6px 8px;
        background: transparent;
        border: 1px solid rgba(0, 0, 0, 0.2);
        border-radius: 6px;
        color: #000 !important;
        cursor: pointer;
        font-size: 14px;
        transition: all 0.2s ease;
        min-width: 50px;
        justify-content: center;
    }

    .language-toggle:hover {
        background: rgba(0, 0, 0, 0.05);
        border-color: rgba(0, 0, 0, 0.3);
    }

    .language-toggle:focus {
        outline: none;
        border-color: rgba(0, 0, 0, 0.5);
        box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.2);
    }

    .language-icon {
        font-size: 14px;
        opacity: 0.8;
        color: #000 !important;
    }

    .current-flag {
        font-size: 16px;
        line-height: 1;
        color: #000 !important;
    }

    .toggle-arrow {
        font-size: 10px;
        opacity: 0.7;
        transition: transform 0.2s ease;
        color: #000 !important;
    }

    .language-toggle[aria-expanded="true"] .toggle-arrow {
        transform: rotate(180deg);
    }

		.language-dropdown {
    position: fixed;
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    padding: 8px 0;
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    pointer-events: none;
		right: 0;
		max-width: 220px;
}


.language-dropdown:not(.hidden) {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.language-dropdown.hidden {
    display: none !important;
}

.language-option {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 16px;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    transition: background-color 0.15s ease;
    position: relative;
}

.language-option:hover {
    background-color: rgba(0, 123, 186, 0.08);
		color: #2980b9;
}

.language-option.active {
    background-color: rgba(0, 123, 186, 0.12);
    font-weight: 500;
}

.language-option .flag {
    font-size: 16px;
    line-height: 1;
    flex-shrink: 0;
}

.language-option .name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.language-option .check-icon {
    color: #007cba;
    font-size: 12px;
    flex-shrink: 0;
}

/* Темная тема для header */
.site-header .language-selector-compact .language-toggle {
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.site-header .language-selector-compact .language-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}


    /* Адаптивность для кнопки "Создать статью" */
    @media (max-width: 768px) {

			    .language-toggle {
        padding: 5px 6px;
        min-width: 40px;
    }

    .language-icon {
        font-size: 13px;
    }

    .current-flag {
        font-size: 15px;
    }

    .language-dropdown {
        min-width: 140px;
    }

    .language-option {
        padding: 6px 12px;
        font-size: 13px;
    }
        .create-article-btn span {
            display: none;
        }

        .create-article-btn {
            padding: 8px 12px;
        }

        .language-toggle {
            padding: 5px 6px;
            min-width: 40px;
        }

        .language-icon {
            font-size: 13px;
        }

        .current-flag {
            font-size: 15px;
        }
    }
    @media (max-width: 1200px) {
        .site-header .container {
            max-width: 100%;
        }
        .site-header .logo {
            flex: 0 0 25%;
            max-width: 300px;
        }
        .site-header .main-nav {
            flex: 1 1 50%;
        }
        .site-header .user-actions {
            flex: none;
            /* max-width: 180px; */
        }
    }
    @media (max-width: 992px) {
        .site-header .container {
            padding: 0 8px;
        }
        .site-header .logo {
            flex: 0 0 40%;
            max-width: 300px;
        }
        .site-header .main-nav {
            flex: 1 1 50%;
        }
        .site-header .user-actions {
            flex: none;
            /* max-width: 180px; */
        }
    }
    @media (max-width: 768px) {
        .site-header {
            /* padding: 6px 0; */
        }
        .site-header .container {
            padding: 0 4px;
        }
        .site-header .header-content {
            flex-direction: row;
            flex-wrap: nowrap;
            gap: 4px;
            display: flex !important;
        }
        .site-header .main-nav {
            display: none !important;
        }
        .site-header .logo {
            flex: 0 0 30%;
            max-width: 300px;
            margin-right: 4px;
        }
        .site-header .user-actions {
            flex: none;
            margin-left: 4px;
            gap: 8px;
        }
        .create-article-btn {
            display: none; /* Скрываем кнопку на мобильных, она есть в мобильном меню */
        }
    }
    @media (max-width: 480px) {
        .site-header .logo {
            flex: 0 0 40%;
            max-width: 100px;
            margin-right: 2px;
        }
        .site-header .user-actions {
            flex: none;
            /* max-width: 180px; */
            margin-left: 2px;
        }
        /* Mobile: hide text on login/register buttons, show only icons */
        .site-header .user-actions > a.button-outline,
        .site-header .user-actions > a.button-primary {
            font-size: 0; /* скрываем текст */
            padding: 8px 10px; /* компактнее */
            line-height: 1;
        }
        .site-header .user-actions > a.button-outline i,
        .site-header .user-actions > a.button-primary i {
            font-size: 16px; /* размер иконки */
            margin-right: 0; /* без отступа под текст */
        }
    }
    /* Notifications modal (bell) */
.notif-modal { position: fixed; inset: 0; z-index: 2000; background: rgba(0,0,0,.45); display: none; }
.notif-modal.open { display: block; }
.notif-panel { position: absolute; right: 20px; top: 70px; width: 420px; max-height: min(70vh, 85vh); overflow: hidden; background:#fff; border-radius:12px; box-shadow: 0 12px 40px rgba(0,0,0,.18); display:flex; flex-direction:column; }
.notif-header { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:12px 14px; border-bottom:1px solid #eee; }
.notif-title { font-weight:700; }
.notif-close { border:none; background:transparent; font-size:22px; line-height:1; cursor:pointer; color:#6b7280; padding:4px; }
.notif-close:hover { color:#111827; }
.notif-content { padding:10px 12px; overflow:auto; overscroll-behavior: contain; }
.notif-section { margin-top: 8px; }
.notif-section:first-child { margin-top: 0; }
.notif-section-title { font-weight:600; margin:6px 0 8px; display:flex; align-items:center; gap:8px; }
.notif-list { border:1px solid #eee; border-radius:10px; overflow:hidden; background:#fff; }
.notif-skel { padding:10px; color:#6b7280; }
.notif-empty { padding:10px; color:#6b7280; }
.notif-message-item { display:flex; gap:10px; padding:10px; border-bottom:1px solid #f3f4f6; text-decoration:none; color:inherit; }
.notif-message-item:last-child { border-bottom:0; }

/* Mobile layout */
@media (max-width: 768px) {
  .notif-panel { left: 0; right: 0; top: auto; bottom: 0; width: auto; max-height: 85vh; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
  .notif-content { padding: 12px; max-height: calc(85vh - 48px); }
}

@media (max-width: 480px) {
  .notif-header { padding: 10px 12px; }
  .notif-title { font-size: 16px; }
  .notif-close { font-size: 20px; }
  .notif-content { padding: 10px; }

		i.fas.fa-globe.language-icon {
    display: none;
}
}