/* Apply styles only to the nav with custom-nav class */
.custom-nav {
    background: linear-gradient(135deg, #5b95f6 0%, #3a7de0 100%);
    padding: 12px 0;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

/* Navbar brand styling */
.custom-nav .navbar-brand {
    padding: 8px 16px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    margin-left: 15px;
}

.custom-nav .navbar-brand:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.custom-nav .navbar-brand i {
    font-size: 1.6rem;
    color: white;
}

/* General styling for nav items */
.custom-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 16px;
    padding: 12px 20px !important;
    margin: 0 4px;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    position: relative;
    font-weight: 500;
}

/* Hover effect for all nav links */
.custom-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: #fff !important;
    transform: translateY(-2px);
}

/* Active state for nav link */
.custom-nav .nav-link.active {
    background-color: rgba(255, 255, 255, 0.25);
    color: #fff !important;
}

/* Dropdown menu styling */
.custom-nav .dropdown-menu {
    background: linear-gradient(135deg, #5b95f6 0%, #3a7de0 100%);
    border: none;
    border-radius: 8px;
    padding: 8px 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    margin-top: 8px;
}

.custom-nav .dropdown-item {
    color: rgba(255, 255, 255, 0.9) !important;
    padding: 10px 20px;
    transition: all 0.3s ease;
    font-size: 15px;
}

.custom-nav .dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: #fff !important;
    padding-right: 25px;
}

/* Search form styling */
.custom-nav .d-flex {
    background: rgba(255, 255, 255, 0.95);
    padding: 5px 5px 5px 15px;
    border-radius: 50px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    margin-left: 15px;
    display: flex;
    align-items: center;
}

.custom-nav .d-flex:focus-within {
    border-color: rgba(91, 149, 246, 0.5);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.custom-nav .d-flex .form-control {
    border: none;
    background: transparent;
    padding: 8px 10px;
    width: 220px;
    font-size: 15px;
    box-shadow: none !important;
    transition: all 0.3s ease;
}

.custom-nav .d-flex .form-control:focus {
    width: 260px;
}

.custom-nav .d-flex .btn {
    background: #5b95f6;
    color: white;
    border-radius: 50px;
    padding: 8px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.custom-nav .d-flex .btn:hover {
    background: #3a7de0;
    transform: translateY(-2px);
}

.custom-nav .d-flex .btn i {
    margin-left: 8px;
}

/* Navbar toggler */
.custom-nav .navbar-toggler {
    border: none;
    padding: 8px 10px;
}

.custom-nav .navbar-toggler:focus {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.4);
}

.custom-nav .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%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    width: 1.2em;
    height: 1.2em;
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .custom-nav .d-flex {
        margin: 15px 0 10px;
        width: 100%;
        max-width: 500px;
    }
    
    .custom-nav .d-flex .form-control {
        width: 100%;
    }
    
    .custom-nav .d-flex .form-control:focus {
        width: 100%;
    }
}

@media (max-width: 767px) {
    .custom-nav .nav {
        flex-direction: column;
    }

    .custom-nav .nav-item {
        text-align: center;
        margin-bottom: 5px;
    }
    
    .custom-nav .d-flex {
        width: 100%;
    }
}

/* Show dropdown menu on hover */
.custom-nav .nav-item.dropdown:hover .dropdown-menu {
    display: block;
    visibility: visible;
    opacity: 1;
    transition: opacity 0.3s ease;
}