/* ===== NAVBAR STYLES ===== */
.navbar {
    background: linear-gradient(135deg, rgba(0, 38, 35, 0.95) 0%, rgba(5, 66, 57, 0.95) 100%);
    backdrop-filter: blur(10px);
    min-height: 60px;
    padding: 0.5rem 0;
    position: relative;
    overflow: visible;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
}

/* Damascus Pattern Background */
.navbar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('/images/pattern.svg') repeat;
    background-size: 120px 120px;
    opacity: 0.08;
    z-index: 0;
    animation: damascusPatternFadeIn 1.5s ease-out;
    pointer-events: none;
}

/* Pattern fade in animation */
@keyframes damascusPatternFadeIn {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }

    to {
        opacity: 0.08;
        transform: translateX(0);
    }
}

/* Navbar content positioning */
.navbar .container {
    position: relative;
    z-index: 1;
    overflow: visible;
}

/* Navbar brand styling */
.navbar-brand {
    color: rgba(255, 255, 255, 0.95) !important;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 0.5rem 0;
    text-decoration: none;
}

.navbar-brand:hover {
    color: rgba(255, 255, 255, 1) !important;
    transform: translateY(-1px);
    text-decoration: none;
}

.navbar-brand img {
    height: 35px;
    width: auto;
    transition: transform 0.3s ease;
    filter: brightness(0) invert(1);
}

.navbar-brand:hover img {
    transform: scale(1.05);
    filter: brightness(0) invert(1);
}

/* Navigation links */
.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
    padding: 0.75rem 1rem !important;
    margin: 0 0.25rem;
    transition: all 0.3s ease;
    position: relative;
    font-weight: 500;
    border-radius: 8px;
    text-decoration: none;
}

.navbar-nav .nav-link:hover {
    color: rgba(255, 255, 255, 1) !important;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
    text-decoration: none;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(255, 255, 255, 0.05);
}

/* Active link indicator */
.navbar-nav .nav-link.active {
    color: rgba(255, 255, 255, 1) !important;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.1);
}

.navbar-nav .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 35px;
    height: 4px;
    background: linear-gradient(90deg, #b9a779, #d4c08a);
    border-radius: 3px;
    animation: activeLinkIndicator 0.3s ease-out;
    box-shadow: 0 2px 8px rgba(185, 167, 121, 0.6);
}

@keyframes activeLinkIndicator {
    from {
        width: 0;
        opacity: 0;
        transform: translateX(-50%) scaleX(0);
    }

    to {
        width: 35px;
        opacity: 1;
        transform: translateX(-50%) scaleX(1);
    }
}

/* Navbar toggler */
.navbar-toggler {
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.navbar-toggler:hover {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.1);
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.15);
}

/* Language switcher */
.language-switcher {
    position: relative;
    z-index: 9999;
}

.language-switcher .dropdown-menu {
    min-width: 200px;
    padding: 0.5rem 0;
    margin: 0;
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 9999 !important;
    position: absolute !important;
}

.language-switcher .dropdown-item {
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    border: none;
    background: transparent;
}

.language-switcher .dropdown-item:hover {
    background: rgba(66, 129, 119, 0.1);
    color: var(--primary-color);
    transform: translateX(5px);
}

/* Ensure dropdown menu is always visible */
.language-switcher .dropdown-menu {
    z-index: 99999 !important;
    position: absolute !important;
    top: 100% !important;
    left: auto !important;
    right: 0 !important;
    margin-top: 0.5rem !important;
    transform: none !important;
    pointer-events: auto !important;
}

/* Force language switcher to be above everything */
.language-switcher {
    position: relative !important;
    z-index: 99999 !important;
}

/* Override hero section z-index */
.hero-section,
.hero-section::before,
.hero-section>.container {
    z-index: 1 !important;
}

/* Ensure navbar is above hero */
.navbar {
    z-index: 99999 !important;
    position: relative !important;
    overflow: visible !important;
}

/* Ensure navbar collapse allows dropdowns */
.navbar-collapse {
    overflow: visible !important;
}

/* Ensure navbar nav allows dropdowns */
.navbar-nav {
    overflow: visible !important;
}

/* Ensure dropdown items are clickable */
.language-switcher .dropdown-item {
    z-index: 99999 !important;
    position: relative !important;
}

/* Force dropdown to show above other elements */
.language-switcher .dropdown-menu.show {
    z-index: 99999 !important;
    position: absolute !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
}

/* Override any conflicting z-index from other elements */
.language-switcher .dropdown-menu,
.language-switcher .dropdown-menu.show,
.language-switcher .dropdown-menu.dropdown-menu-end {
    z-index: 99999 !important;
    position: absolute !important;
    top: 100% !important;
    left: auto !important;
    right: 0 !important;
    margin-top: 1rem !important;
    transform: none !important;
    pointer-events: auto !important;
}

/* Final override for all dropdown menus */
.dropdown-menu,
.dropdown-menu.show,
.dropdown-menu.dropdown-menu-end {
    z-index: 99999 !important;
}

/* Bootstrap dropdown fix */
.dropdown {
    position: relative !important;
    overflow: visible !important;
}

.dropdown-menu {
    position: absolute !important;
    top: 100% !important;
    left: auto !important;
    right: 0 !important;
    margin-top: 0.5rem !important;
    z-index: 99999 !important;
    overflow: visible !important;
}

/* Ensure language switcher dropdown is always on top */
.language-switcher .dropdown-menu {
    z-index: 999999 !important;
    position: absolute !important;
    top: 100% !important;
    left: auto !important;
    right: 0 !important;
    margin-top: 0.5rem !important;
}

.language-switcher .dropdown-item img {
    width: 20px;
    height: 15px;
    border-radius: 2px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.language-switcher .btn {
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.language-switcher .btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.language-switcher .btn:focus {
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
}

/* Show dropdown menu */
.dropdown-menu.show {
    display: block !important;
    animation: fadeInDown 0.3s ease-out;
    z-index: 9999 !important;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .navbar {
        min-height: 55px;
        padding: 0.4rem 0;
    }

    .navbar-brand {
        font-size: 1rem;
    }

    .navbar-nav .nav-link {
        padding: 0.6rem 0.8rem !important;
        margin: 0.2rem 0;
    }

    .navbar-nav .nav-link.active::after {
        width: 25px;
        height: 2px;
    }
}

@media (max-width: 575.98px) {
    .navbar {
        min-height: 50px;
    }

    .navbar-brand {
        font-size: 0.9rem;
    }

    .navbar-brand img {
        height: 30px;
    }
}

/* Ensure navbar is visible */
.navbar {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.navbar-nav {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.navbar-nav .nav-item {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}