/* ==========================================================================
   SITE HEADER & NAVIGATION
   ========================================================================== */

.site-header {
    background: var(--header-bg);
    backdrop-filter: blur(6px);
    padding: 20px 60px;
    border-bottom: 1px solid var(--header-border);
    position: relative;
    z-index: 1000;
}

.navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-left .navbar-brand {
    font-size: 22px;
    font-weight: 400;
    color: var(--color-brand-light); /* Променено */
    letter-spacing: 1px;
}

.navbar-center {
    display: flex;
    gap: 30px;
}

.navbar-center a {
    color: var(--nav-text);
    font-weight: 300;
    letter-spacing: 1px;
    transition: color 0.2s ease;
}

.navbar-center a:hover {
    color: var(--nav-hover);
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 24px;
    color: var(--nav-text);
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--avatar-border); /* Променено */
    cursor: pointer;
    transition: opacity 0.2s;
}

.language-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--nav-text);
}

.lang-icon {
   width: 20px;
    height: 20px;
    /* Стойност между 4 и 5 ще я направи точно толкова плътна, колкото иконата до нея */
    stroke-width: 2.5px;
    color: var(--nav-text);
    transition: all 0.2s ease;
    display: inline-block;
    vertical-align: middle;
}

/* ==========================================================================
   DROPDOWNS (Language & User)
   ========================================================================== */
.language-dropdown:hover .lang-icon {
    color: var(--nav-hover);
    transform: scale(1.05);
}

.language-dropdown, .user-dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

.language-menu, .dropdown-menu {
    position: absolute;
    top: 100%;
    margin-top: 15px;
    background: var(--dropdown-bg);
    border: 1px solid var(--dropdown-border);
    border-radius: 8px;
    padding: 8px;
    display: none;
    box-shadow: var(--dropdown-shadow);
    z-index: 2000;
    min-width: 150px;
}

.language-menu {
    left: 50%;
    transform: translateX(-50%);
}

.dropdown-menu {
    right: 0;
}

.language-menu.active, .dropdown-menu.active {
    display: flex !important;
    flex-direction: column;
}

.language-menu button,
.dropdown-menu form button,
.dropdown-menu a {
    background: none;
    border: none;
    color: var(--dropdown-text); /* Променено */
    padding: 10px 15px;
    text-align: left;
    font-size: 14.5px;
    font-family: var(--font-dropdown);
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
    border-radius: 4px;
    display: block;
    text-decoration: none;
}

.language-menu button:hover,
.dropdown-menu a:hover,
.dropdown-menu form button:hover {
    background: var(--dropdown-hover-bg); /* Променено */
}

.dropdown-menu form {
    margin: 0;
    padding: 0;
}

/* Скриваме бутона на десктоп, за да не изглежда като точка */
.mobile-nav-toggle {
    display: none;
}

.mobile-auth-link, .mobile-divider {
    display: none;
}

/* Контейнер на иконката */
.nav-notification-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: #ffffff;
    opacity: 0.8;
    transition: opacity 0.3s ease;
    text-decoration: none;
    margin-right: 0; /* Нагласи спрямо другите икони */
}

.nav-notification-link:hover {
    opacity: 1;
}

/* Самата SVG иконка */
.notification-icon {
    width: 20px;
    height: 20px;
}

/* Златистата точка за нови съобщения */
.notification-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    background-color: #edbe24; /* Златисто */
    border-radius: 50%;
    box-shadow: 0 0 0 2px #000000; /* Черен бордюр, за да се отдели от иконката */
}


/* ==========================================================================
   MOBILE ADAPTIVITY (Замени стария @media блок с този)
   ========================================================================= */

@media (max-width: 1024px) {
    .site-header {
        padding: 12px 20px;
        overflow: visible;
    }

    .navbar-container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        position: relative;
    }

    /* Показваме бутона и гарантираме, че не е точка */
    .mobile-nav-toggle {
        display: flex;
        order: 3;
        width: 28px;
        height: 18px;
        min-width: 28px;
        flex-direction: column;
        justify-content: space-between;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 2001;
    }

    .mobile-nav-toggle .bar {
        display: block;
        height: 2px;
        width: 100%;
        background-color: var(--color-brand-light);
        border-radius: 10px;
        transition: all 0.3s ease;
    }

    .navbar-left {
        order: 1;
    }



    .navbar-right > a:not(.nav-notification-link) {
        display: none !important;
    }

    /* Показваме новите мобилни линкове вътре в менюто */
    .mobile-auth-link {
        display: block !important;
        font-weight: 500;
        color: var(--color-brand-light) !important; /* Акцентен цвят за регистрация */
    }

    .mobile-divider {
        display: block;
        width: 40px;
        height: 1px;
        background-color: rgba(255, 255, 255, 0.2);
        margin: 5px 0;
    }

    /* Подсигуряваме, че менюто се разтяга според съдържанието */
    .navbar-center.active {
        display: flex;
        height: auto;
        min-height: 0; /* Покрива екрана */
        top: calc(100% + 1px); /* Може да го направиш +1px за по-плътно залепване */
        padding: 30px 0;
    }

    .navbar-right {
        order: 2;
        margin-left: auto;
        margin-right: 15px;
        gap: 15px;
        display: flex;
        align-items: center;
    }

    /* МОБИЛНОТО МЕНЮ - Спускащо се на цял екран */
    .navbar-center {
        display: none;
        position: absolute;
        top: calc(100% + 12px);
        left: -20px;
        width: calc(100% + 40px);
        background-color: #1a1a1a; /* Тъмен фон, за да се вижда текста */
        flex-direction: column;
        align-items: center;
        padding: 40px 0;
        gap: 25px;
        z-index: 999;
        border-bottom: 1px solid var(--header-border);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    }


    .navbar-center a {
        font-size: 18px;
        font-weight: 400;
        width: 100%;
        text-align: center;
        color: #fff; /* Бял текст за линковете */
    }

    /* Анимация на хиксчето (X) */
    .mobile-nav-toggle.is-active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .mobile-nav-toggle.is-active .bar:nth-child(2) {
        opacity: 0;
    }

    .mobile-nav-toggle.is-active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}