/* Custom Navigation Styles */
.custom-navbar {
    background-color: rgba(0, 0, 0, 0.9) !important;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.custom-navbar.scrolled {
    background-color: rgba(0, 0, 0, 1) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand img {
    max-height: 120px;
    transition: all 0.3s ease;
    padding: 5px 0;
}

.custom-navbar.scrolled .navbar-brand img {
    max-height: 100px;
}

.nav-link {
    color: white !important;
    font-size: 16px;
    padding: 1rem 1.5rem !important;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #ffd700 !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: #ffd700;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 70%;
}

.nav-link.active {
    color: #ffd700 !important;
}

.nav-link.active::after {
    width: 70%;
}

/* Mobile Navigation Styles */
.navbar-collapse {
    background: rgba(0, 0, 0, 0.95);
    padding: 15px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

@media (max-width: 991.98px) {
    .navbar-collapse {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        margin: 10px;
        z-index: 1000;
        border: none;
    }

    .navbar-nav {
        padding: 10px 0;
    }

    .navbar-nav .nav-item {
        margin: 5px 0;
    }

    .navbar-nav .nav-link {
        padding: 12px 20px;
        border-radius: 10px;
        font-size: 1rem;
        color: #fff !important;
        transition: all 0.3s ease;
    }

    .navbar-nav .nav-link:hover,
    .navbar-nav .nav-link:focus,
    .navbar-nav .nav-item.active .nav-link {
        background: rgba(255, 215, 0, 0.1);
        color: #ffd700 !important;
    }

    /* Language Switcher in Mobile */
    .language-switcher {
        padding: 12px 20px;
        margin-top: 10px;
        border-top: 2px solid rgba(255, 255, 255, 0.1);
        color: #fff;
    }

    /* User Actions in Mobile */
    .user-actions {
        display: flex;
        flex-direction: column;
        gap: 10px;
        padding: 15px 20px;
        margin-top: 10px;
        border-top: 2px solid rgba(255, 255, 255, 0.1);
    }

    .user-actions .btn {
        width: 100%;
        text-align: center;
        padding: 12px;
        border-radius: 10px;
        font-weight: 600;
        color: #fff;
        border: 1px solid rgba(255, 255, 255, 0.2);
        background: rgba(255, 255, 255, 0.1);
    }

    .user-actions .btn:hover {
        background: rgba(255, 215, 0, 0.2);
        border-color: #ffd700;
        color: #ffd700;
    }

    /* Toggler Button Style */
    .navbar-toggler {
        border: none;
        padding: 0;
        width: 40px;
        height: 40px;
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.1);
        position: relative;
        transition: all 0.3s ease;
    }

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

    .navbar-toggler:hover {
        background: rgba(255, 215, 0, 0.2);
    }

    .navbar-toggler:hover .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, 215, 0, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    }

    .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, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    }

    /* Search Bar in Mobile */
    .navbar-search {
        margin: 10px 20px;
        position: relative;
    }

    .navbar-search .form-control {
        width: 100%;
        padding: 12px 15px;
        border-radius: 10px;
        border: 1px solid rgba(255, 255, 255, 0.2);
        background: rgba(255, 255, 255, 0.1);
        color: #fff;
    }

    .navbar-search .form-control::placeholder {
        color: rgba(255, 255, 255, 0.6);
    }

    .navbar-search .form-control:focus {
        border-color: #ffd700;
        box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
        background: rgba(255, 255, 255, 0.15);
    }

    .navbar-search .search-btn {
        position: absolute;
        left: 10px;
        top: 50%;
        transform: translateY(-50%);
        background: none;
        border: none;
        color: #fff;
    }

    /* Dropdown Menu in Mobile */
    .dropdown-menu {
        background: rgba(0, 0, 0, 0.95);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 10px;
        margin-top: 5px;
    }

    .dropdown-item {
        color: #fff;
        padding: 10px 20px;
    }

    .dropdown-item:hover {
        background: rgba(255, 215, 0, 0.1);
        color: #ffd700;
    }
}

/* Ensure Desktop Navigation Remains Unchanged */
@media (min-width: 992px) {
    .navbar-collapse {
        background: none;
        padding: 0;
        box-shadow: none;
    }

    .navbar-nav .nav-link {
        padding: 25px 15px;
    }

    .user-actions {
        display: flex;
        align-items: center;
        gap: 15px;
    }

    .language-switcher {
        margin-right: 15px;
    }
}

/* RTL Support for Mobile */
[dir="rtl"] .navbar-toggler {
    margin-right: 0;
    margin-left: 15px;
}

[dir="rtl"] .navbar-nav .nav-link {
    text-align: right;
}

[dir="rtl"] .navbar-search .search-btn {
    right: 10px;
    left: auto;
}

/* Animation for mobile menu */
.navbar-collapse {
    transition: all 0.3s ease;
}

.navbar-collapse.show {
    animation: slideDown 0.3s ease forwards;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Offcanvas Navigation */
#offcanvas-nav {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    transition: all 0.4s ease;
    overflow-y: auto;
}

#offcanvas-nav.active {
    right: 0;
}

.m-nav {
    padding: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

#nav-cls-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#nav-cls-btn:hover {
    background: rgba(255, 215, 0, 0.2);
    color: #ffd700;
    transform: rotate(90deg);
}

.m-nav .logo {
    margin-bottom: 30px;
    padding: 10px 0;
}

.m-nav .logo img {
    max-height: 60px;
}

.nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-links li {
    margin-bottom: 10px;
}

.nav-links a {
    color: #fff;
    font-size: 16px;
    padding: 12px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.nav-links a:hover {
    background: rgba(255, 215, 0, 0.1);
    color: #ffd700;
}

.nav-links .dropdown {
    position: relative;
}

.nav-links .d-menu {
    list-style: none;
    padding: 10px 0;
    margin: 5px 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    display: none;
}

.nav-links .dropdown.active .d-menu {
    display: block;
}

.nav-links .d-menu li a {
    padding: 10px 25px;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.8);
}

.nav-links .d-menu li a:hover {
    background: rgba(255, 215, 0, 0.1);
    color: #ffd700;
}

.nav-links .dropdown > a span {
    transition: transform 0.3s ease;
}

.nav-links .dropdown.active > a span {
    transform: rotate(180deg);
}

/* Header Right Items in Offcanvas */
.header-right-item {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.header-right-item a {
    color: #fff;
    text-decoration: none;
    padding: 10px 15px;
    display: block;
    border-radius: 8px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
}

.header-right-item a:hover {
    background: rgba(255, 215, 0, 0.1);
    color: #ffd700;
}

/* Overlay */
.offcanvas-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    display: none;
}

.offcanvas-overlay.active {
    display: block;
}

/* RTL Support for Offcanvas */
[dir="rtl"] #offcanvas-nav {
    right: auto;
    left: -300px;
}

[dir="rtl"] #offcanvas-nav.active {
    right: auto;
    left: 0;
}

[dir="rtl"] #nav-cls-btn {
    right: auto;
    left: 20px;
}

[dir="rtl"] .nav-links .d-menu li a {
    padding: 10px 35px 10px 25px;
}

/* Scrollbar Styling */
#offcanvas-nav::-webkit-scrollbar {
    width: 5px;
}

#offcanvas-nav::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

#offcanvas-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
}

#offcanvas-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 215, 0, 0.3);
} 