
/* ===== Base Styles ===== */
.navbar {
    background-color: #36558b;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 0.8rem 1rem;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.container {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

/* ===== Logo Styles ===== */
.navbar-brand img {
    height: 40px;
    transition: transform 0.3s ease;
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

/* ===== Mobile Toggle Button ===== */
.navbar-toggler {
    border: none;
    padding: 0.5rem;
    font-size: 1.25rem;
    line-height: 1;
    background-color: transparent;
    color: white;
}

.navbar-toggler-icon {
    display: inline-block;
    width: 1.5em;
    height: 1.5em;
    vertical-align: middle;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100%;
}

/* ===== Navigation Links ===== */
.navbar-nav {
    display: flex;
    flex-direction: column;
    padding-left: 0;
    margin-bottom: 0;
    list-style: none;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: block;
    padding: 0.5rem 1rem;
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-link:hover, 
.nav-link.active {
    color: #39ad39;
    transform: translateY(-2px);
}

.telegram-btn {
    background-color: #0088cc;
    border-radius: 50px;
    padding: 0.5rem 1.2rem !important;
    margin-left: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.telegram-btn:hover {
    background-color: #0077b3;
    color: white !important;
}

/* ===== Search Form ===== */
#searchForm {
    position: relative;
    min-width: 200px;
}

#searchInput {
    border: none;
    border-radius: 50px;
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    width: 100%;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    font-size: 0.9rem;
    outline: none;
}

#searchInput::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

#searchForm .btn {
    position: absolute;
    left: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    padding: 0;
}

#searchResults {
    width: 100%;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1001;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.15);
}

.dropdown-item {
    padding: 0.5rem 1.5rem;
    color: #333;
    white-space: normal;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    color: #212529;
}

/* ===== Profile Dropdown ===== */
.profile-dropdown {
    position: relative;
}

.profile-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.profile-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.profile-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, #25D366, #128C7E);
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-menu {
    position: absolute;
    right: 0;
    top: 100%;
    min-width: 240px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    z-index: 1000;
    display: none;
}

.profile-dropdown:hover .profile-menu {
    display: block;
}

.profile-header {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid #eee;
}

.profile-name {
    font-weight: 600;
    color: #333;
}

.profile-email {
    font-size: 0.8rem;
    color: #666;
}

.profile-menu-item {
    padding: 0.6rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #444;
    text-decoration: none;
    transition: all 0.2s;
}

.profile-menu-item:hover {
    background: #f5f5f5;
    color: #25D366;
}

.profile-menu-item i {
    width: 20px;
    text-align: center;
}

.profile-menu-divider {
    border-top: 1px solid #eee;
    margin: 0.5rem 0;
}

/* ===== Auth Buttons ===== */
.auth-buttons {
    display: flex;
    gap: 0.8rem;
}

.login-btn {
    border: 2px solid #fd7e14;
    color: #fd7e14;
    background: transparent;
    border-radius: 50px;
    padding: 0.5rem 1.2rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.login-btn:hover {
    background: rgba(57, 173, 57, 0.1);
    color: #fd7e14;
}

.signup-btn {
    background: #fd7e14;
    color: white;
    border: 2px solid #fd7e14;
    border-radius: 50px;
    padding: 0.5rem 1.2rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.signup-btn:hover {
    background: #fd7e25;
    border-color: #fd7e14;
    color: white;
}

/* ===== Responsive Styles ===== */
@media (min-width: 992px) {
    .navbar-expand-lg .navbar-nav {
        flex-direction: row;
    }
    
    .navbar-expand-lg .nav-link {
        padding-right: 0.8rem;
        padding-left: 0.8rem;
    }
    
    .me-auto {
        margin-right: auto !important;
    }
    
    .d-flex {
        display: flex !important;
    }
    
    .align-items-center {
        align-items: center !important;
    }
    
    .me-3 {
        margin-right: 1rem !important;
    }
    
    .ms-3 {
        margin-left: 1rem !important;
    }
    
    .d-none {
        display: none !important;
    }
    
    .d-lg-inline {
        display: inline !important;
    }
}

@media (max-width: 991.98px) {
    .navbar-collapse {
        flex-basis: 100%;
        flex-grow: 1;
        align-items: center;
        padding-top: 1rem;
    }
    
    #searchForm {
        margin-top: 1rem;
        margin-bottom: 1rem;
        width: 100%;
    }
    
    .auth-buttons {
        width: 100%;
        justify-content: center;
        margin-bottom: 1rem;
    }
    
    .profile-dropdown {
        width: 100%;
        text-align: center;
    }
    
    .profile-menu {
        left: 50%;
        transform: translateX(-50%);
        width: 90%;
    }
}

@media (max-width: 767.98px) {
    .telegram-btn {
        margin-left: 0;
        margin-top: 0.5rem;
        justify-content: center;
    }
    
    .auth-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .login-btn, 
    .signup-btn {
        width: 100%;
        text-align: center;
    }
}

/* Animation for smoother transitions */
.navbar-collapse.collapsing {
    transition: height 0.35s ease;
}

/* Fix for Bootstrap 5 dropdowns */
.dropdown-menu[data-bs-popper] {
    left: auto;
    right: 0;
    margin-top: 0.125rem;
}