/* Компактен Navbar с долен стъклен ефект */
:root {
    /* цветове */
    --fb-blue: rgba(75, 159, 62, 0);
    --fb-blue-hover: #1e8d92;
    --fb-bg: #f0f2f5;
    --fb-white: #ffffff;
    --fb-text: #1c1e21;
    --fb-text-secondary: #65676b;
    --fb-border: #e4e6ea;
    --fb-hover: #f0f2f5;
    --fb-green: #42b883;
    --fb-red: #e74c3c;

    /* SmolyanVote цветове */
    --primary-color: #4cb15c;
    --primary-dark: #198754;
    --accent-green: #228e55;

    /* Размери и shadow */
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --sidebar-width: 280px;
    --main-feed-width: 680px;
    --transition: all 0.2s ease;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
}

/* Main Navbar Container */
.navbar-glassmorphism {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    padding: 0;
    margin: 0;
    width: 100%;
}

.navbar-container {
    max-width: 100%;
    margin: 0;
    padding: 0;
    width: 100%;
}

.navbar-content {
    position: relative;
    z-index: 2;
    /* Градиент от плътен сив към стъклен ефект */
    background: linear-gradient(
            180deg,
            rgba(248, 249, 250, 0.95) 0%,
            rgba(248, 249, 250, 0.85) 40%,
            rgba(255, 255, 255, 0.6) 70%,
            rgba(255, 255, 255, 0.3) 100%
    );
    backdrop-filter: blur(5px);
    border-radius: 0;
    padding: 1.0rem 1rem;
    /* Само долен border */
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    width: 100%;
}


/* Brand Section - най-вляво */
.navbar-brand-section {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    /* Фиксирана позиция вляво */
}

.navbar-brand-glass {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.brand-logo-glass {
    width: 30px;
    height: 30px;
    transition: all 0.3s ease;
}

.navbar-brand-glass:hover .brand-logo-glass {
    transform: scale(1.05);
}

.brand-text-glass {
    font-family: var(--font-secondary), serif;
    font-size: 1.1rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--accent-green) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s ease;
}

/* Navigation Section - ориентирана наляво с разстояние от auth */
.navbar-nav-section-glass {
    display: flex;
    align-items: center;
    gap: 5rem;
    flex: 1; /* Заема останалото пространство */
    justify-content: flex-end;
    max-width: none; /* Премахваме ограничението */
    margin-right: 5rem; /* Добавяме разстояние до auth секцията */
}

/* Search Component в navigation section-а */
.search-container-glass {
    margin-right: 1rem; /* Умерено разстояние след search-а */
    position: relative;
}

.search-input-glass {
    width: 200px;
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.4);
    color: var(--text-primary);
    outline: none;
    transition: all 0.3s ease;
}

.search-input-glass:focus {
    background: rgba(255, 255, 255, 0.6);
    border-color: var(--primary-green);
}

.search-input-glass::placeholder {
    color: rgba(0, 0, 0, 0.5);
}

.search-icon-glass {
    position: absolute;
    right: 0.6rem;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    color: rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

/* Navigation Links - като обикновени надписи */
.nav-links-glass {
    display: flex;
    align-items: center;
    gap: 2.0rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item-glass {
    list-style: none;
}

.nav-link-glass {
    font-family: var(--font-primary);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    padding: 0.3rem 0;
    transition: all 0.3s ease;
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-link-glass::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(45deg, var(--primary-green), var(--accent-green));
    transition: all 0.3s ease;
}

.nav-link-glass:hover {
    color: var(--primary-green);
    text-decoration: none;
    transform: translateY(-1px);
}

.nav-link-glass:hover::after {
    width: 100%;
}

/* Vote Toggle - обикновен надпис с arrow */
.vote-toggle-glass {
    color: var(--text-primary) !important;
    background: none !important;
    border: none !important;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-weight: 500;
    padding-bottom: 7px;
}

.vote-toggle-glass:hover {
    color: var(--primary-green) !important;
}

.vote-arrow-glass {
    transition: transform 0.3s ease;
    font-size: 0.7rem;
    padding-top: 5px;
}

.vote-arrow-glass.rotated {
    transform: rotate(180deg);
}

/* Auth/Profile Section - най-вдясно (нова структура) */
.auth-profile-section-glass {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
    position: relative;
    z-index: 1040;
    justify-content: flex-end; /* Подравнява съдържанието вдясно */
    border-left: 0 solid rgba(255, 255, 255, 0.15); /* Визуално разграничение */
    margin-left: 1rem; /* Допълнително разстояние */
}

/* Subtle визуален акцент за auth секцията */
.auth-profile-section-glass::before {
    content: '';
    position: absolute;
    left: -1rem;
    top: 20%;
    bottom: 20%;
    width: 0;
    background: linear-gradient(180deg,
    transparent 0%,
    rgba(255, 255, 255, 0.3) 20%,
    rgba(255, 255, 255, 0.3) 80%,
    transparent 100%);
    pointer-events: none;
}

/* Auth Buttons Container */
.auth-buttons-glass {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Auth Links като привлекателни бутони */
.auth-link-glass {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--white);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: buttonPulse 3s ease-in-out infinite;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    cursor: pointer;
}

/* Pulse анимация за привличане на внимание */
@keyframes buttonPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(25, 134, 28, 0.3);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 6px 20px rgba(25, 134, 28, 0.4);
    }
}

/* Вход бутон - акцентен зелен */
.auth-link-glass:first-of-type {
    background: linear-gradient(135deg, var(--primary-green), var(--accent-green));
    box-shadow: 0 4px 15px rgba(25, 134, 28, 0.3);
    font-weight: 700;
}

.auth-link-glass:first-of-type:hover {
    background: linear-gradient(135deg, var(--accent-green), var(--primary-green));
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(25, 134, 28, 0.5);
    color: var(--white);
    text-decoration: none;
    animation: none; /* Спира pulse при hover */
}

/* Регистрация бутон - outline стил с акцент */
.auth-link-glass:last-of-type {
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid var(--primary-green);
    color: var(--primary-green);
    backdrop-filter: blur(8px);
    animation-delay: 0.5s; /* Малко закъснение за по-интересен ефект */
    font-weight: 600;
    position: relative;
}

.auth-link-glass:last-of-type::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--primary-green), var(--accent-green));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.auth-link-glass:last-of-type:hover {
    color: var(--white);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(25, 134, 28, 0.4);
    text-decoration: none;
    animation: none; /* Спира pulse при hover */
    border-color: transparent;
}

.auth-link-glass:last-of-type:hover::after {
    opacity: 1;
}

/* Shimmer ефект за бутоните */
.auth-link-glass::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
    z-index: -1;
}

.auth-link-glass:hover::before {
    left: 100%;
}

.profile-dropdown-glass {
    position: relative;
    z-index: 1050; /* Най-висок z-index */
}

/* Когато има логнат потребител, profile toggle заема мястото на auth бутоните */
.profile-toggle-glass {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 0 0 0.1rem;
    background: rgba(225, 225, 225, 0.49);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    font-weight: 500;
}

.profile-toggle-glass:hover {
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
    color: var(--text-primary);
    text-decoration: none;
}

.profile-image-glass {

    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

.avatar-placeholder-glass {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--medium-gray), var(--dark-gray));
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

.username-glass {
    font-weight: 100;
    font-size: 1rem;
    padding-right: 12px;
}

/* Dropdown Menu - оправен z-index */
.dropdown-menu-glass {
    position: absolute;
    top: 100%;
    right: 0;
    opacity: 0;
    transform: translateY(10px) scale(0.95);
    visibility: hidden;
    transition: all 0.3s ease;
    border: none;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.89);
    backdrop-filter: blur(10px);
    overflow: hidden;
    padding: 0;
    margin-top: 0.5rem;
    z-index: 1060; /* Най-висок z-index за видимост */
    min-width: 100px;
}

.dropdown-menu-glass.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    visibility: visible;
}

.dropdown-item-glass {
    font-size: 0.85rem;
    padding: 0.5rem 0.8rem;
    transition: all 0.3s ease;
    border-radius: 6px;
    margin: 0.125rem 0;
    color: var(--text-primary);
    text-decoration: none;
    display: block;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.dropdown-item-glass:hover {
    background: linear-gradient(135deg, var(--primary-green), var(--accent-green));
    color: var(--white);
    text-decoration: none;
}

.logout-btn-glass {
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
}

/* Mobile Toggler - основни стилове */
.mobile-toggler-glass {
    display: none;
    flex-direction: column;
    gap: 3px;
    padding: 0.4rem;
    background: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.toggler-line-glass {
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 1px;
    transition: all 0.3s ease;
}

.mobile-toggler-glass:hover .toggler-line-glass {
    background: var(--primary-green);
}

/* Vote Menu Container */
.vote-menu-container-glass {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1020;
    background: linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.95) 0%,
            rgba(255, 255, 255, 0.9) 100%
    );
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s ease;
}

.vote-menu-container-glass.show {
    margin-top: 50px; /* Точно под navbar-а */
    max-height: 400px;
    padding: 1.5rem 0;
}

.vote-overlay-glass {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(2px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.vote-overlay-glass.show {
    opacity: 1;
    visibility: visible;
}
