/* Modern Navigation Styles */
body>.navbar {
    display: block !important;
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: transparent !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
    min-height: auto !important;
}

/* Enhanced modern navbar styling */
nav.navbar {
    position: sticky !important;
    top: 0 !important;
    background-color: #ffffff !important;
    z-index: 1000 !important;
    margin-bottom: 0 !important;
    width: 100%;
    border-bottom: 1px solid #e5e7eb !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 12px 0;
    transition: all 0.3s ease;
}

/* Container for better positioning */
nav .navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 80%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Brand styling */
nav .navbar-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: transform 0.2s ease;
}

nav .navbar-brand:hover {
    transform: translateY(-2px);
}

nav .navbar-brand i {
    color: #a91d1d;
    margin-right: 10px;
    transition: transform 0.3s ease;
    font-size: 50px;
}

nav .navbar-brand:hover i {
    transform: rotate(15deg);
}

/* Navigation menu styling */
.navbar-nav {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style-type: none; /* Remove list bullets */
}

.navbar-nav > li {
    position: relative;
    font-weight: 500;
    font-size: 16px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 4px;
}

.navbar-nav > li:hover {
    background-color: rgba(169, 29, 29, 0.05);
}



/* Dropdown styling */
.navbar-nav ul {
    position: absolute;
    top: calc(100% + 10px); /* Position below with a small gap */
    left: 0;
    background-color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    padding: 8px 0;
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
    list-style-type: none; /* Remove list bullets */
    z-index: 1001;
    pointer-events: none; /* Initially disable pointer events */
}

/* Create an invisible connection between parent and dropdown */
.navbar-nav > li::after {
    content: '';
    position: absolute;
    height: 15px; /* Height of the connecting area */
    width: 100%;
    left: 0;
    bottom: -15px; /* Position it below the parent */
    z-index: 1002;
    background: transparent;
}

/* Show dropdown when hovering parent */
.navbar-nav > li:hover > ul {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto; /* Enable pointer events when visible */
}

/* Keep dropdown visible when hovering the dropdown itself */
.navbar-nav > li > ul:hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.navbar-nav ul li {
    margin: 0;
    padding: 0;
}

.navbar-nav ul .nav-link {
    color: #333;
    padding: 10px 15px;
    display: block;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 15px;
    font-weight: 400;
}

.navbar-nav ul .nav-link:hover {
    background-color: #f8f9fa;
    color: #a91d1d;
    padding-left: 20px;
}

/* Language switcher styling */
.language-switcher {
    display: flex;
    align-items: center;
    margin-left: 20px;
}

.lang-link {
    text-decoration: none;
    padding: 5px 10px;
    color: #333;
    font-weight: 500;
    transition: all 0.2s ease;
    border-radius: 4px;
}

.lang-link:hover {
    color: #a91d1d;
    background-color: rgba(169, 29, 29, 0.05);
}

.lang-link.active {
    color: #a91d1d;
    font-weight: 600;
}

/* Responsive design */
@media (max-width: 992px) {
    nav .navbar-container {
        width: 95%;
    }
}

@media (max-width: 768px) {
    nav .navbar-container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .navbar-brand {
        margin-bottom: 15px;
    }
    
    .navbar-nav {
        flex-direction: column;
        width: 100%;
        align-items: flex-start;
    }
    
    .navbar-nav > li {
        width: 100%;
    }
    
    .navbar-nav ul {
        position: static;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        padding-left: 15px;
        margin-top: 5px;
        width: 100%;
    }
    
    .language-switcher {
        margin-top: 15px;
        margin-left: 0;
    }
}