/* Enhanced Navigation Styles */
.header {
    background: var(--gradient-primary);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
    height: 80px;
    gap: 1rem;
}

/* Logo Section Styles */
.logo-container {
    display: flex;
    align-items: center;
    padding: 0.25rem 0;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    margin-right: 1rem;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 55px;
    height: 55px;
}

.logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.brand-title {
    color: #FFFFFF;
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.2;
    margin: 0;
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.brand-subtitle {
    color: #FFFFFF;
    font-size: 0.65rem;
    font-weight: 400;
    line-height: 1.2;
    margin-top: -10px;
    letter-spacing: 0.5px;
    opacity: 0.95;
    margin-bottom: 8px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        height: 70px;
        padding: 0 1.5rem;
    }

    .logo-wrapper {
        width: 50px;
        height: 50px;
    }
    
    .brand-subtitle {
        display: none;
    }
    
    .logo-link {
        gap: 1rem;
    }

    /* Hide desktop nav */
    .nav-links {
        display: none;
    }

    /* Show mobile menu button */
    .mobile-menu-btn {
        display: flex;
        align-items: center;
        padding: 8px;
    }

    .mobile-menu-btn span {
        display: block;
        width: 24px;
        height: 2px;
        background-color: var(--mbdi-white);
        transition: all 0.3s ease;
        position: relative;
    }

    /* Hamburger Animation */
    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    /* Remove conflicting mobile styles */
    .nav-links.active,
    .nav-links {
        display: none;
    }

    .dropdown-menu,
    .dropdown-item,
    .nav-link.cta {
        display: none;
    }
}

@media (max-width: 480px) {
    .brand-title {
        font-size: 1.25rem;
    }

    .nav-container {
        padding: 0 1rem;
    }
}

/* Navigation Links Container */
.nav-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 1rem;
}

/* Navigation Items */
.nav-item {
    position: relative;
    display: flex;
    align-items: center;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--mbdi-white);
    text-decoration: none;
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    transition: all 0.25s ease;
    font-size: 0.85rem;
    white-space: normal;
}

.nav-icon {
    font-size: 1.1rem;
}

/* Dropdown Styles */
.has-dropdown .nav-link {
    padding-right: 2rem;
    position: relative;
}

.dropdown-arrow {
    position: absolute;
    right: 0.75rem;
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.has-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

/* Improved Dropdown Styles */
.nav-item.has-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--mbdi-white);
    min-width: 220px;
    padding: 0.75rem 0;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

/* Arrow indicator */
.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 12px;
    height: 12px;
    background: var(--mbdi-white);
    box-shadow: -2px -2px 5px rgba(0, 0, 0, 0.05);
}

/* Show dropdown on hover */
.nav-item.has-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.25rem;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    position: relative;
}

.dropdown-item:hover {
    background: rgba(0, 102, 204, 0.05);
    color: var(--mbdi-blue);
    padding-left: 1.5rem;
}

/* Hover indicator line */
.dropdown-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: var(--mbdi-blue);
    transition: height 0.2s ease;
}

.dropdown-item:hover::before {
    height: 70%;
}

/* CTA Button */
.nav-link.cta {
    background: var(--gradient-secondary);
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    box-shadow: 0 4px 15px rgba(227, 6, 19, 0.2);
}

.nav-link.cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(227, 6, 19, 0.3);
}

/* Active States */
.nav-link.active {
    background-color: rgba(255, 255, 255, 0.15);
    color: var(--mbdi-yellow);
}

/* Mobile Menu Button - Move this outside media queries */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--mbdi-white);
    transition: all 0.3s ease;
}

/* Responsive Design */
@media (max-width: 992px) {
    .nav-links {
        gap: 1rem;
    }

    .nav-link {
        padding: 0.6rem 1rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--gradient-primary);
        flex-direction: column;
        padding: 1rem;
        gap: 0.5rem;
        height: calc(100vh - 70px);
        overflow-y: auto;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease;
    }

    .nav-links.active {
        opacity: 1;
        visibility: visible;
    }

    .nav-item.has-dropdown .dropdown-menu {
        position: static;
        background: rgba(255, 255, 255, 0.05);
        box-shadow: none;
        transform: none;
        padding: 0;
        margin: 0.5rem 0;
        border-radius: 8px;
        min-width: 100%;
        opacity: 0;
        max-height: 0;
        overflow: hidden;
        visibility: visible;
        transition: all 0.3s ease;
    }

    .nav-item.has-dropdown.active .dropdown-menu {
        opacity: 1;
        max-height: 500px;
        padding: 0.5rem 0;
    }

    .dropdown-menu::before {
        display: none;
    }

    .dropdown-item {
        padding: 0.75rem 1.5rem;
        color: var(--mbdi-white);
    }

    .dropdown-item:hover {
        background: rgba(255, 255, 255, 0.1);
        color: var(--mbdi-white);
    }

    .dropdown-item::before {
        background: var(--mbdi-white);
    }

    /* Mobile dropdown arrow animation */
    .nav-link .dropdown-arrow {
        transition: transform 0.3s ease;
    }

    .nav-item.has-dropdown.active .nav-link .dropdown-arrow {
        transform: rotate(180deg);
    }

    .nav-item {
        width: 100%;
    }

    .nav-link {
        width: 100%;
        justify-content: flex-start;
        padding: 0.75rem 1rem;
    }

    .dropdown-menu {
        position: static;
        background: rgba(255, 255, 255, 0.1);
        box-shadow: none;
        margin: 0.5rem 0;
        padding: 0.5rem;
    }

    .dropdown-item {
        color: var(--mbdi-white);
    }

    .dropdown-item:hover {
        background: rgba(255, 215, 0, 0.15);
        color: var(--mbdi-yellow);
    }

    .nav-link.cta {
        margin-top: 1rem;
    }

    /* Show mobile menu button */
    .mobile-menu-btn {
        display: flex;
    }

    .mobile-menu-btn span {
        margin: 2px 0;
    }

    /* Hamburger Animation */
    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .nav-link:hover,
    .nav-link:focus {
        color: var(--mbdi-yellow);
    }

    .has-dropdown:hover .nav-link {
        color: var(--mbdi-yellow);
    }

    /* Hide the default dropdown */
    .nav-container .dropdown-menu {
        display: none;
    }

    /* Show only mobile dropdown */
    .mobile-nav .dropdown-menu {
        position: static;
        background: rgba(255, 255, 255, 0.1);
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        padding: 0;
        margin-left: 1rem;
        border-left: 2px solid rgba(255, 255, 255, 0.2);
    }

    .mobile-nav .dropdown-item {
        color: var(--mbdi-white);
        padding: 0.5rem 1rem;
    }

    .mobile-nav .dropdown-item:hover {
        background: rgba(255, 255, 255, 0.1);
    }
}

/* Search Styles */
.nav-search {
    margin: 0 1rem;
    position: relative;
}

.search-wrapper {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.12);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 7px 16px;
    transition: all 0.25s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.search-wrapper:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

.search-wrapper:focus-within {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.search-input {
    background: transparent;
    border: none;
    color: var(--mbdi-white);
    padding: 8px 12px;
    width: 180px;
    font-size: 0.92rem;
    font-weight: 400;
    letter-spacing: 0.3px;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.75);
    font-weight: 400;
    letter-spacing: 0.2px;
}

.search-input:focus {
    outline: none;
}

.search-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.75);
    cursor: pointer;
    padding: 6px;
    margin-left: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn:hover {
    color: var(--mbdi-white);
    transform: scale(1.08);
}

.search-btn i {
    font-size: 0.95rem;
}

/* Search Overlay */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.search-overlay.active {
    display: flex;
    opacity: 1;
}

.search-overlay-content {
    width: 100%;
    max-width: 600px;
    margin: 100px auto;
    padding: 20px;
}

.overlay-search-form {
    display: flex;
    gap: 10px;
}

.overlay-search-input {
    flex: 1;
    padding: 15px 20px;
    font-size: 1.2rem;
    border: none;
    border-radius: 10px;
    background: var(--mbdi-white);
}

.overlay-search-btn {
    padding: 0 25px;
    background: var(--mbdi-blue);
    color: var(--mbdi-white);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.overlay-search-btn:hover {
    background: var(--blue-dark);
}

.close-search-overlay {
    position: absolute;
    top: 30px;
    right: 30px;
    background: none;
    border: none;
    color: var(--mbdi-white);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-search-overlay:hover {
    transform: rotate(90deg);
}

/* Mobile Search Toggle */
.mobile-search-toggle {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--mbdi-blue);
    color: var(--mbdi-white);
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 100;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .nav-search {
        display: none;
    }

    .mobile-search-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

@media (max-width: 1280px) {
    .nav-container {
        padding: 0 1rem;
        justify-content: space-between;
    }
}

/* Add smooth transition for dropdown items */
.dropdown-menu .dropdown-item {
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    transition-delay: calc(var(--item-index) * 0.05s);
}

.nav-item.has-dropdown:hover .dropdown-item {
    opacity: 1;
    transform: translateY(0);
}

/* Prevent dropdown from disappearing when moving to it */
.nav-item.has-dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 20px;
}