/* ========================================
   MODERN GLASSMORPHISM NAVBAR STYLES
   ======================================== */

/* Glass effect navbar */
.navbar-glass {
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    padding: 16px 0;
    width: 100%;
}

.navbar-custom.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Navbar container layout */
.navbar-custom .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Desktop navigation */
.navbar-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-direction: row;
}

/* Hide mobile toggle on desktop */
.navbar-toggler-custom {
    display: none !important;
}

/* Navbar brand */
.navbar-brand {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
}

.navbar-brand:hover {
    text-decoration: none;
}

/* Logo with modern design */
.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    /* box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3); */
    transition: all var(--transition-base);
    border-radius: 50%;
    overflow: hidden;
}

/* Logo image inside icon container */
.logo-icon img.navbar-brand-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.navbar-brand:hover .logo-icon {
    transform: rotate(5deg) scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 102, 204, 0.4);
}

.brand-text-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.navbar-brand-text {
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.navbar-brand-tagline {
    font-size: 10px;
    color: var(--gray-600);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Navigation links with modern styling */
.nav-link-custom {
    display: flex !important;
    align-items: center;
    gap: 6px;
    padding: 10px 12px;
    color: var(--gray-700);
    text-decoration: none !important;
    font-weight: 600;
    font-size: 14px;
    border-radius: 10px;
    transition: all 0.2s ease;
    position: relative;
}

.nav-link-custom .nav-icon {
    font-size: 18px;
    transition: transform 0.2s ease;
}

.nav-link-custom:hover {
    color: var(--primary-color);
    background: rgba(0, 102, 204, 0.08);
    text-decoration: none !important;
}

.nav-link-custom:hover .nav-icon {
    transform: translateY(-2px);
}

.nav-link-custom.active {
    color: var(--primary-color);
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.1) 0%, rgba(0, 168, 107, 0.1) 100%);
    text-decoration: none !important;
}

.nav-link-custom.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 16px;
    right: 16px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 3px 3px 0 0;
}

/* CTA button style */
.nav-link-cta {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%) !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

.nav-link-cta:hover {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%) !important;
    box-shadow: 0 6px 20px rgba(0, 102, 204, 0.4);
    transform: translateY(-2px);
}

.nav-link-cta.active::after {
    display: none;
}

/* Outline button style */
.nav-link-outline {
    border: 2px solid var(--primary-color) !important;
    color: var(--primary-color) !important;
}

.nav-link-outline:hover {
    background: var(--primary-color) !important;
    color: white !important;
}

/* Dropdown arrow animation */
.dropdown-arrow {
    font-size: 12px;
    margin-left: 4px;
    transition: transform 0.2s ease;
}

.nav-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

/* Modern dropdown menu */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 8px;
    min-width: 220px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(0, 0, 0, 0.08);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--gray-700);
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.nav-dropdown-item i {
    font-size: 18px;
    color: var(--gray-500);
    transition: all 0.2s ease;
}

.nav-dropdown-item:hover {
    background: linear-gradient(90deg, rgba(0, 102, 204, 0.08) 0%, transparent 100%);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    padding-left: 24px;
    text-decoration: none !important;
}

.nav-dropdown-item:hover i {
    color: var(--primary-color);
    transform: scale(1.1);
}

/* Mobile menu modern styling */
.navbar-mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 400px;
    height: 100vh;
    z-index: 1020;
    visibility: hidden;
    opacity: 0;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55), 
                opacity 0.3s ease,
                visibility 0s linear 0.4s;
}

.navbar-mobile-menu.active {
    visibility: visible;
    opacity: 1;
    transform: translateX(0);
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55), 
                opacity 0.3s ease,
                visibility 0s linear 0s;
}

.navbar-mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.navbar-mobile-menu.active .navbar-mobile-overlay {
    opacity: 1;
    pointer-events: all;
}

.navbar-mobile-content {
    position: absolute;
    right: 0;
    top: 0;
    width: 100%;
    max-width: 400px;
    height: 100%;
    background: white;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.15);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.mobile-menu-header {
    padding: 24px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.mobile-menu-header .logo-wrapper-mobile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-menu-header .logo-icon {
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    width: 48px;
    height: 48px;
}

.mobile-menu-header .logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mobile-menu-header .navbar-brand-text {
    color: white;
    -webkit-text-fill-color: white;
}

.mobile-menu-header .navbar-brand-tagline {
    color: rgba(255, 255, 255, 0.9);
}

.mobile-menu-items {
    flex: 1;
    padding: 16px;
}

/* Mobile navigation links */
.nav-link-mobile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    color: var(--dark-color);
    text-decoration: none !important;
    transition: all 0.2s ease;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 10px;
    margin-bottom: 4px;
}

.nav-link-mobile i:first-child {
    font-size: 20px;
    color: var(--gray-600);
    transition: all 0.2s ease;
}

.nav-link-mobile:hover {
    background: linear-gradient(90deg, rgba(0, 102, 204, 0.1) 0%, transparent 100%);
    color: var(--primary-color);
    padding-left: 20px;
    text-decoration: none !important;
}

.nav-link-mobile:hover i:first-child {
    color: var(--primary-color);
    transform: scale(1.1);
}

.nav-link-mobile.active {
    color: var(--primary-color);
    background: linear-gradient(90deg, rgba(0, 102, 204, 0.15) 0%, rgba(0, 168, 107, 0.05) 100%);
    border-left: 4px solid var(--primary-color);
    padding-left: 20px;
}

.nav-link-mobile.active i:first-child {
    color: var(--primary-color);
}

.nav-link-mobile-cta {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white !important;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
    margin-top: 16px;
}

.nav-link-mobile-cta i {
    color: white !important;
}

.nav-link-mobile-cta:hover {
    box-shadow: 0 6px 20px rgba(0, 102, 204, 0.4);
    transform: translateX(-4px);
}

/* Mobile dropdown */
.nav-mobile-dropdown {
    margin-bottom: 4px;
}

.nav-mobile-dropdown-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    margin-left: 32px;
    margin-top: 4px;
}

.nav-mobile-dropdown-menu.active {
    max-height: 400px;
}

.nav-mobile-dropdown .nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--gray-700);
    text-decoration: none !important;
    font-size: 14px;
    border-radius: 8px;
    margin-bottom: 4px;
    transition: all 0.2s ease;
}

.nav-mobile-dropdown .nav-dropdown-item i {
    font-size: 16px;
    color: var(--gray-500);
}

.nav-mobile-dropdown .nav-dropdown-item:hover {
    background: rgba(0, 102, 204, 0.08);
    color: var(--primary-color);
    padding-left: 20px;
    text-decoration: none !important;
}

.nav-mobile-dropdown .nav-dropdown-item:hover i {
    color: var(--primary-color);
}

/* Hamburger modern animation */
.navbar-toggler-custom {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 32px;
    height: 28px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1030;
    position: relative;
}

.navbar-toggler-icon {
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border-radius: 3px;
    transform-origin: center;
}

.navbar-toggler-custom:hover .navbar-toggler-icon {
    background: linear-gradient(90deg, var(--secondary-color) 0%, var(--primary-color) 100%);
}

.navbar-toggler-custom.active .navbar-toggler-icon:nth-child(1) {
    transform: rotate(45deg) translate(9px, 9px);
}

.navbar-toggler-custom.active .navbar-toggler-icon:nth-child(2) {
    opacity: 0;
    transform: scale(0);
}

.navbar-toggler-custom.active .navbar-toggler-icon:nth-child(3) {
    transform: rotate(-45deg) translate(9px, -9px);
}

/* Responsive adjustments */

/* Large Desktop (≥ 1400px) - Wider container */
@media (min-width: 1400px) {
    .navbar-custom .container {
        max-width: 1320px;
    }
}

/* Desktop (≥ 993px) - Full horizontal navbar */
@media (min-width: 993px) {
    .navbar-nav {
        display: flex !important;
    }
    
    .navbar-toggler-custom {
        display: none !important;
    }
    
    /* Mobile menu should be hidden on desktop but allow JS to show it if needed */
    .navbar-mobile-menu:not(.active) {
        display: none;
    }
}

/* Tablet and Mobile (≤ 992px) - Hamburger menu */
@media (max-width: 992px) {
    .navbar-nav {
        display: none !important;
    }
    
    .navbar-toggler-custom {
        display: flex !important;
    }

    .navbar-brand-tagline {
        display: none;
    }

    .logo-icon {
        width: 42px;
        height: 42px;
        font-size: 20px;
    }

    .navbar-brand-text {
        font-size: 20px;
    }
}

/* Tablet Portrait (≤ 768px) - Adjusted sizing */
@media (max-width: 768px) {
    .navbar-glass {
        padding: 12px 0;
    }
    
    .navbar-custom .container {
        padding: 0 16px;
    }
}

/* Small Mobile (≤ 576px) - Optimized sizing */
@media (max-width: 576px) {
    .navbar-mobile-menu {
        max-width: 100%;
    }

    .logo-wrapper {
        gap: 8px;
    }

    .logo-icon {
        width: 38px;
        height: 38px;
        font-size: 18px;
        border-radius: 10px;
    }

    .navbar-brand-text {
        font-size: 18px;
    }
}

/* Scroll progress indicator for navbar */
@keyframes slideInDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.navbar-custom {
    animation: slideInDown 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}
