/* Modern Navbar Styles */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar.scrolled {
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(30px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Container */
.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 70px;
}

/* Logo */
.navbar-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    /* background: linear-gradient(135deg, var(--primary-color), rgba(255, 255, 255, 0.2)); */
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    /* color: white; */
}

/* .logo-icon:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(255, 68, 68, 0.3);
} */

.logo-text {
    font-size: 1.5rem;
    font-weight: 900;
    color: #fff;
    font-family: var(--font-primary);
    animation: pulse 2s infinite;
}

.logo-content {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.logo-main {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.logo-sub {
    font-size: 0.7rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
}

.navbar.scrolled .logo-main {
    font-size: 1rem;
}

.navbar.scrolled .logo-content{
    display: none;
}

/* Desktop Menu */
.navbar-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.nav-link:hover::before {
    left: 100%;
}

.nav-link:hover {
    color: var(--primary-color);
    transform: translateY(-1px);
}

.nav-link.active {
    color: var(--primary-color);
    background: rgba(255, 255, 255, 0.1);
}

/* Dropdown Styles */
.dropdown {
    position: relative;
}

.dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.dropdown-trigger::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.dropdown-trigger:hover::before {
    left: 100%;
}

.dropdown-trigger:hover {
    color: var(--primary-color);
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-1px);
}

.dropdown-arrow {
    width: 16px;
    height: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.5rem 0;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(-10px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    z-index: 1001;
}

.dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0) scale(1);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.dropdown-item:hover {
    /* background: linear-gradient(135deg, var(--primary-color), rgba(255, 255, 255, 0.1)); */
    color: white;
    padding-left: 2rem;
    transform: translateX(5px);
}

.dropdown-item i {
    width: 16px;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.dropdown-item:hover i {
    opacity: 1;
    color: var(--primary-color);
}

.dropdown-item.active {
    /* background: linear-gradient(135deg, var(--primary-color), rgba(255, 255, 255, 0.1)); */
    color: white;
    padding-left: 2rem;
    transform: translateX(5px);
}

.dropdown-item.active i {
    opacity: 1;
    color: var(--primary-color);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1002;
}

.mobile-menu-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.hamburger-line {
    width: 24px;
    height: 2px;
    background: var(--primary-color);
    margin: 3px 0;
    border-radius: 1px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.mobile-menu-btn.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu {
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem;
    transform: translateY(-20px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-overlay.active .mobile-menu {
    transform: translateY(0);
    opacity: 1;
}

.mobile-nav-link {
    display: block;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 500;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.mobile-nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: var(--primary-color);
    transition: left 0.3s ease;
}

.mobile-nav-link:hover::before {
    left: 0;
}

.mobile-nav-link:hover {
    color: var(--primary-color);
    padding-left: 1rem;
}

.mobile-nav-link.active {
    color: var(--primary-color);
    padding-left: 1rem;
}

/* Mobile Dropdowns */
.mobile-dropdown {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-dropdown-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
    font-weight: 500;
    padding: 1rem 0;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-dropdown-arrow {
    width: 20px;
    height: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-dropdown.open .mobile-dropdown-arrow {
    transform: rotate(180deg);
}

.mobile-dropdown-menu {
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    margin: 0.5rem 0 1rem 0;
}

.mobile-dropdown.open .mobile-dropdown-menu {
    max-height: 500px;
}

.mobile-dropdown-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 6px;
    margin: 0.25rem 0;
}

.mobile-dropdown-item:hover {
    background: linear-gradient(135deg, var(--primary-color), rgba(255, 255, 255, 0.1));
    color: white;
    padding-left: 1.5rem;
    transform: translateX(5px);
}

.mobile-dropdown-item i {
    width: 16px;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.mobile-dropdown-item:hover i {
    opacity: 1;
    color: var(--primary-color);
}

.mobile-dropdown-item.active {
    background: linear-gradient(135deg, var(--primary-color), rgba(255, 255, 255, 0.1));
    color: white;
    padding-left: 1.5rem;
    transform: translateX(5px);
}

.mobile-dropdown-item.active i {
    opacity: 1;
    color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar-menu {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .navbar-container {
        padding: 0 1rem;
    }

    .logo-content {
        display: none;
    }

    .logo-icon {
        width: 45px;
        height: 45px;
    }

    .navbar.scrolled .logo-icon {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .navbar-container {
        padding: 0 0.75rem;
    }

    .mobile-menu {
        padding: 1.5rem;
    }

    .mobile-nav-link,
    .mobile-dropdown-trigger {
        font-size: 1.1rem;
        padding: 0.875rem 0;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for accessibility */
.dropdown-trigger:focus,
.mobile-menu-btn:focus,
.nav-link:focus,
.mobile-nav-link:focus,
.mobile-dropdown-trigger:focus,
.dropdown-item:focus,
.mobile-dropdown-item:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Large screens layout (920px+) */
@media (min-width: 769px) and (max-width: 919px) {
    .navbar-container {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 1rem;
        min-height: 100px;
        padding: 1rem 2rem;
    }

    .navbar-logo {
        order: -1;
        text-align: center;
    }

    .navbar-menu {
        justify-content: center;
        gap: 3rem;
    }

    .navbar.scrolled .navbar-container {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 0;
        min-height: 70px;
        padding: 0.5rem 2rem;
    }

    .navbar.scrolled .navbar-logo {
        text-align: center;
    }

    .navbar.scrolled .logo-icon {
        justify-content: center;
    }
}