/* Navbar */
.navbar .nav-item {
    margin-left: 10px;
}

.navbar-brand {
    font-weight: bold;
}

.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background-color: #1f1b2c !important;
    padding: 0.8rem 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding-left: 2rem;  /* 32px left padding */
    padding-right: 2rem; /* 32px right padding */
    padding-bottom: 0.25rem;
    padding-top: 0.25rem;
}

/* Add spacing for main content container - navbar height + 4px gap */
body {
    padding-top: calc(76px + 4px); /* Original navbar height + 4px gap below */
}

.navbar-light .navbar-brand,
.navbar-light .navbar-nav .nav-link {
    color: #6b6b6b !important;
    font-weight: 500;
}

.navbar-light .navbar-nav .nav-link:hover {
    color: rgb(139, 132, 132) !important;
}

/* Adjust main content for fixed navbar */
.static-slider1 {
    margin-top: calc(76px + 4px); /* Height of navbar + 4px gap */
}

 /* Login/Register button styles */
 .nav-link.btn-link {
    color: #c8bdcb !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link.btn-link:hover {
    color: white !important;
}

.nav-link.btn-link i {
    font-size: 1.2rem;
}

   /* Modal form groups */
   .modal .form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.modal .form-group i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #8d8698;
}

.modal .form-group .form-control {
    padding-left: 2.5rem;
}

.btn-primary {
    background-color: #6c63ff;
    border-color: #6c63ff;
}

.btn-primary:hover {
    background-color: #5a52e5;
    border-color: #5a52e5;
}

/* Navbar toggle button for dark theme */
.navbar-toggler {
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: none;
    outline: none;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 0.9)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

@media (max-width: 991.98px) {
    .navbar {
        padding: 0.5rem 1rem;
        height: auto;
        min-height: 60px;
    }

    .navbar .container {
        display: grid;
        grid-template-columns: auto 1fr auto;
        gap: 10px;
        width: 100%;
        max-width: 100%;
    }

    .navbar-brand {
        font-size: 0.9rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }

    .navbar-center-buttons {
        position: relative;
        transform: none;
        left: auto;
        justify-self: center;
        margin: 0;
    }

    .navbar-center-buttons button {
        min-width: 36px;
        width: 36px;
        height: 36px;
        padding: 0;
        margin: 0 3px;
        border-radius: 50%;
    }

    .navbar-center-buttons button span {
        display: none;
    }

    .navbar-center-buttons button i {
        margin-right: 0;
        font-size: 1rem;
    }

    .navbar-center-buttons .button-divider {
        height: 20px;
        margin: 0 2px;
    }

    /* Modify navbar-collapse to always be visible and take less space */
    .navbar-collapse {
        position: static;
        display: flex !important;
        flex-basis: auto;
        flex-grow: 0;
        justify-self: end;
        width: auto;
        padding: 0;
        margin: 0;
    }

    /* Make sure the navbar-nav is properly aligned */
    .navbar-nav {
        flex-direction: row;
        align-items: center;
        margin: 0;
        padding: 0;
    }

    /* Mobile login/signup buttons - minimal design with icons only */
    #loginSignupNav {
        flex-direction: row;
        align-items: center;
        gap: 8px;
        margin: 0;
        padding: 0;
        white-space: nowrap;
    }

    /* Only apply flex display when the element is meant to be visible */
    #loginSignupNav:not([style*="display: none"]) {
        display: flex !important;
    }

    #loginSignupNav button {
        background: transparent !important;
        border: none !important;
        color: rgba(255, 255, 255, 0.8) !important;
        padding: 8px !important;
        margin: 0 !important;
        min-width: auto !important;
        width: auto !important;
        height: auto !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        transition: color 0.2s ease, transform 0.1s ease;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    #loginSignupNav button:hover {
        color: #ffffff !important;
        background: transparent !important;
        border: none !important;
        transform: scale(1.1) !important;
        box-shadow: none !important;
    }

    #loginSignupNav button:focus {
        box-shadow: none !important;
        outline: none !important;
    }

    #loginSignupNav button:active {
        transform: scale(0.95) !important;
    }

    /* Hide button text on mobile, show only icons */
    #loginSignupNav button .bi {
        margin-right: 0 !important;
        font-size: 1.2rem;
    }

    /* Hide text spans on mobile */
    #loginSignupNav button .btn-text {
        display: none !important;
    }

    /* Create a vertical divider between login and signup buttons */
    #navLoginBtn::after {
        content: '';
        position: absolute;
        right: -4px;
        top: 50%;
        transform: translateY(-50%);
        width: 1px;
        height: 16px;
        background: rgba(255, 255, 255, 0.3);
    }

    #navLoginBtn {
        position: relative;
    }

    /* Adjust profile pic size for smaller screens */
    #navProfilePic {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    #navProfilePic img {
        width: 36px;
        height: 36px;
    }

    #navProfilePic .fa-user-circle {
        font-size: 36px;
    }

    /* Fix the dropdown positioning */
    .dropdown-menu.custom-dropdown {
        position: absolute;
        right: 0;
        left: auto;
        top: 100%;
        transform: none;
        width: 320px;
    }
}

@media (max-width: 576px) {
    .navbar {
        padding: 0.4rem 0.75rem;
    }

    .navbar .container {
        grid-template-columns: auto auto auto;
        padding: 0;
    }

    .navbar-brand {
        font-size: 0.9rem;
        max-width: 80px;
    }

    .navbar-center-buttons {
        scale: 0.9;
    }

    .navbar-center-buttons button {
        width: 32px;
        height: 32px;
        min-width: 32px;
    }

    /* Mobile login/signup buttons - even more compact */
    #loginSignupNav {
        gap: 6px !important;
    }

    #loginSignupNav button {
        padding: 6px !important;
    }

    #loginSignupNav button .bi {
        font-size: 1.1rem !important;
    }

    /* Adjust divider for smaller screens */
    #navLoginBtn::after {
        right: -3px;
        height: 14px;
    }

    /* Further reduce profile pic size for very small screens */
    #navProfilePic img {
        width: 32px;
        height: 32px;
    }

    #navProfilePic .fa-user-circle {
        font-size: 32px;
    }

    /* Adjust custom dropdown width for smaller screens */
    .dropdown-menu.custom-dropdown {
        width: 280px;
        max-width: calc(100vw - 20px);
    }

    /* Make profile section more compact */
    .profile-section {
        flex-direction: column;
        align-items: center;
        padding: 5px 0;
    }

    .profile-box {
        width: 100%;
        height: 100px;
        margin-bottom: 5px;
    }

    .dropdown-menu-items {
        width: 100%;
        margin-left: 0;
        padding: 5px 0;
    }

    .dropdown-item {
        padding: 6px 8px;
        font-size: 12px;
    }

    .dropdown-item i {
        font-size: 14px;
    }
}

/* Desktop login/signup buttons - ensure text is visible */
@media (min-width: 992px) {
    #loginSignupNav button .btn-text {
        display: inline !important;
    }

    #loginSignupNav button .bi {
        margin-right: 0.25rem !important;
    }
}

/* Search Interface Styles */
.nav-tabs-light {
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.nav-tabs-light .nav-link {
    color: rgba(255, 255, 255, 0.7);
    border: none;
    padding: 0.75rem 1.25rem;
    transition: all 0.3s ease;
}

.nav-tabs-light .nav-link.active {
    color: #fd5631;
    background: none;
    border-bottom: 2px solid #fd5631;
}
.navbar .container {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    width: 100%;
    gap: 10px;
}

.navbar-brand {
    margin: 0;
    padding: 0;
    font-size: calc(1rem + 0.3vw);
    white-space: nowrap;
}

.navbar-center-buttons {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3px;
    margin: 0 auto;
    width: fit-content;
    backdrop-filter: none;
}

.navbar-center-buttons button {
    min-width: 140px;
    height: 40px;
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    padding: 0 24px;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.navbar-center-buttons button i {
    font-size: clamp(0.8rem, 1.5vw, 1rem);
    margin-right: clamp(6px, 1vw, 10px);
    transition: transform 0.2s ease;
}

.navbar-toggler {
    padding: 0.25rem 0.5rem;
    font-size: 1rem;
    margin-left: auto;
}

/* Keep existing button styles */
.navbar-center-buttons #searchButton {
    background: transparent;
    color: #ffffff;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    min-width: 100px; /* Reduced width */
    height: 32px; /* Reduced height */
    padding: 0 16px; /* Reduced padding */
}

.navbar-center-buttons #searchButton:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.navbar-center-buttons .btn-primary {
    background: linear-gradient(135deg, #fd5631 0%, #fd5631 100%);
    color: #ffffff;
    border: none;
    border-radius: 0px;
    box-shadow: 0 2px 8px rgba(255, 52, 25, 0.3);
}

.navbar-center-buttons .btn-primary:hover {
    background: linear-gradient(135deg, #fd5631 0%, #fd5631 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(255, 52, 25, 0.4);
}

/* Divider between buttons */
.navbar-center-buttons .button-divider {
    width: 3px;
    height: 28px;
    background: rgba(255, 255, 255, 0.15);
    margin: 0 clamp(4px, 1vw, 8px);
    flex-shrink: 0;
}

/* Profile Section: Side-by-Side Layout */
.profile-section {
    display: flex;
    flex-direction: column; /* Change to column layout */
    align-items: center;
    padding: 10px;
    gap: 10px;
    background-color: #1f1b2c !important; /* Dark background */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Profile Box (Top Side) */
.profile-box {
    width: 100%; /* Fill available width */
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background-color: #1f1b2c !important; /* Dark background */
    border-radius: 0;
    margin: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Profile Image */
.profile-dropdown-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease-in-out;
    margin: 0;
    border-radius: 0;
}

/* Navbar Profile Image */
#navProfilePic img {
    width: 80px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

#navProfilePic .fa-user-circle {
    font-size: 40px;
    color: #6c757d;
}

/* Hover Effect: Show Name & Email */
.profile-hover-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.8); /* Slightly darker overlay */
    color: white;
    text-align: center;
    padding: 10px;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

/* User Info Text Styles */
.profile-hover-info #userName {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 2px;
    line-height: 1.2;
}

.profile-hover-info #userEmail {
    display: block;
    font-size: 0.8rem;
    opacity: 0.9;
    line-height: 1.2;
}

/* Show Name & Email on Hover */
.profile-box:hover .profile-hover-info {
    opacity: 1;
}

/* Dropdown Menu Items (Bottom Side) */
.dropdown-menu-items {
    flex-grow: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    justify-content: space-between;
    gap: 0;
    padding: 10px 8px;
    position: relative;
    margin: 0;
    width: 100%;
    overflow: hidden; /* Prevent hover effects from overflowing */
    background-color: #1f1b2c !important; /* Dark background */
}

/* Column divider */
.dropdown-menu-items::after {
    content: '';
    position: absolute;
    top: 10px;
    bottom: 10px;
    left: 50%;
    width: 1px;
    background-color: rgba(255, 255, 255, 0.1);
}

.dropdown-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Prevent hover effects from overflowing */
}

.dropdown-column:first-child {
    margin-right: 3px; /* Reduced margin by 50% */
}

.dropdown-column:last-child {
    margin-left: 10px;
    padding-right: 5px; /* Add padding to prevent hover effect from touching edge */
}

/* Style for dropdown items */
.custom-dropdown .dropdown-item {
    padding: 8px 10px;
    font-size: 14px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    margin: 2px 3px;
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.8); /* Light text color */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    background: transparent;
}

.custom-dropdown .dropdown-item:hover {
    background-color: rgba(253, 86, 49, 0.1); /* Match theme accent color */
    color: #fd5631; /* Match theme accent color */
    transform: translateX(5px);
    max-width: 100%; /* Ensure hover effect doesn't exceed container width */
}

.custom-dropdown .dropdown-item i {
    margin-right: 8px;
    font-size: 16px;
    width: 20px; /* Fixed width for icons */
    text-align: center;
    transition: transform 0.3s ease;
    color: #fd5631; /* Match theme accent color */
}

.custom-dropdown .dropdown-item:hover i {
    transform: scale(1.1); /* Slightly enlarge icon on hover */
}

/* Style for the logout item */
.custom-dropdown .dropdown-item.text-danger {
    color: #dc3545 !important;
}

.custom-dropdown .dropdown-item.text-danger:hover {
    background-color: rgba(220, 53, 69, 0.1); /* Light red background */
    color: #dc3545 !important;
}

/* Badge styling */
.custom-dropdown .badge {
    transition: all 0.3s ease;
}

.custom-dropdown .dropdown-item:hover .badge {
    background-color: #0a58ca;
    transform: scale(1.1);
}

/* Adjust Dropdown Width */
.custom-dropdown {
    width: 320px; /* Reduced width for better proportions */
    padding: 0;
    background-color: #212529; /* Dark background */
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

/* Search Dropdown Styles */
.search-container {
    position: relative;
}

.search-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    background: transparent;
    border-radius: 8px;
    padding: 8px;
    margin-top: 4px;
    display: none;
    z-index: 1000;
}

/* Ensure this rule works correctly to show the dropdown */
.search-dropdown.active {
    display: block !important;
    animation: dropdownFadeIn 0.2s ease-out;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -4px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

.search-input-container {
    display: flex;
    align-items: center;
    background: rgba(31, 27, 44, 0.95);
    border-radius: 6px;
    padding: 2px 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
}

.search-input-container:focus-within {
    background: rgba(31, 27, 44, 0.98);
    border-color: #fd5631;
    box-shadow: 0 0 0 2px rgba(253, 86, 49, 0.1);
}

.search-input-container input {
    flex: 1;
    background: transparent;
    border: none;
    color: #ffffff;
    padding: 8px 12px;
    font-size: 14px;
    width: 100%;
}

.search-input-container input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-input-container input:focus {
    outline: none;
}

.search-submit {
    background: transparent;
    border: none;
    color: #fd5631;
    padding: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-submit:hover {
    color: #ff6b4a;
    transform: scale(1.1);
}

.search-submit i {
    font-size: 16px;
}

.search-suggestions {
    margin-top: 8px;
    max-height: 300px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #fd5631 rgba(255, 255, 255, 0.1);
    background: rgba(31, 27, 44, 0.95);
    border-radius: 6px;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.search-suggestions::-webkit-scrollbar {
    width: 6px;
}

.search-suggestions::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.search-suggestions::-webkit-scrollbar-thumb {
    background: #fd5631;
    border-radius: 3px;
}

.search-suggestion-item {
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-suggestion-item:hover {
    background: rgba(253, 86, 49, 0.1);
    color: #fd5631;
    transform: translateX(4px);
}

.search-suggestion-item i {
    color: #fd5631;
    opacity: 0.7;
}

/* Remove the arrow since we're using a transparent background */
.search-dropdown::before {
    display: none;
}

@media (max-width: 991.98px) {
    .search-dropdown {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        transform: none;
        width: 100%;
        border-radius: 0;
        margin: 0;
        padding: 6px;
    }
}

@media (max-width: 576px) {
    .search-dropdown {
        padding: 4px;
    }

    .search-input-container input {
        padding: 6px 10px;
        font-size: 13px;
    }

    /* Make profile section more compact for mobile */
    .profile-section {
        padding: 5px;
        gap: 5px;
    }

    .profile-box {
        height: 120px;
    }

    .dropdown-menu.custom-dropdown {
        width: 280px;
        max-width: calc(100vw - 20px);
    }

    .dropdown-menu-items {
        padding: 5px;
    }
}

@media (max-width: 375px) {
    .navbar {
        padding: 0.3rem 0.5rem;
    }

    .navbar-brand {
        font-size: 0.8rem;
        max-width: 70px;
    }

    .navbar-center-buttons {
        scale: 0.85;
        margin: 0 -8px;
    }

    .navbar-center-buttons button {
        margin: 0 2px;
    }

    .navbar-center-buttons .button-divider {
        margin: 0 1px;
        height: 18px;
    }

    /* Extra small mobile login/signup buttons */
    #loginSignupNav {
        gap: 4px !important;
    }

    #loginSignupNav button {
        padding: 4px !important;
    }

    #loginSignupNav button .bi {
        font-size: 1rem !important;
    }

    /* Adjust divider for extra small screens */
    #navLoginBtn::after {
        right: -2px;
        height: 12px;
    }

    #navProfilePic img,
    #navProfilePic .fa-user-circle {
        width: 28px;
        height: 28px;
        font-size: 28px;
    }

    .profile-box {
        height: 100px;
    }

    .dropdown-menu.custom-dropdown {
        width: 250px;
    }
}