/* Floating Glassmorphic Navigation Styles */
.glassmorphic-nav {
    position: fixed;
    top: 20px;
    left: 20px;
    right: 20px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    width: calc(100% - 40px);
}

.glassmorphic-nav:hover {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15), 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

/* Navigation Wrapper - Contains all nav content */
.nav-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 75px;
}

/* Main Navigation Row - Flex container for logo, menu, CTA */
.nav-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    height: 100%;
    min-width: 0;
    flex-wrap: nowrap;
}

/* Logo Group */
.nav-logo-group {
    flex: 0 0 auto;
    min-width: 0;
}

.nav-logo-group .logo-image {
    height: 50px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    transition: transform 0.3s ease;
    display: block;
}

.nav-logo-group .logo-image:hover {
    transform: scale(1.05);
}

/* Navigation Menu - Responsive flex */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex: 1 1 auto;
    justify-content: center;
    min-width: 0;
    flex-wrap: nowrap;
    overflow: hidden;
}

/* CTA Button Group */
.nav-cta-group {
    flex: 0 0 auto;
    white-space: nowrap;
    min-width: fit-content;
}

.nav-link {
    color: #1a1a1a;
    text-decoration: none;
    font-family: 'Inter', 'Segoe UI', 'Helvetica Neue', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 600;
    font-size: 15px;
    padding: 0.5rem 0;
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
    letter-spacing: -0.025em;
}

.nav-link:hover {
    color: #3182ce;
    transform: translateY(-1px);
    text-shadow: 0 2px 4px rgba(49, 130, 206, 0.2);
}

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

.dropdown-arrow {
    font-size: 10px;
    transition: transform 0.3s ease;
}

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

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15), 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 0.75rem 0;
    min-width: 240px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 0.75rem;
}

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

.dropdown-item {
    display: block;
    color: #1a1a1a;
    text-decoration: none;
    padding: 0.875rem 1.75rem;
    font-family: 'Inter', 'Segoe UI', 'Helvetica Neue', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 3px solid transparent;
    letter-spacing: -0.025em;
}

.dropdown-item:hover {
    background: rgba(66, 153, 225, 0.1);
    color: #4299e1;
    border-left-color: #4299e1;
}

/* Book Appointment Button */
.book-appointment-btn {
    background: linear-gradient(135deg, #4299e1 0%, #805ad5 100%);
    color: white;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-family: 'Inter', 'Segoe UI', 'Helvetica Neue', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.3);
    white-space: nowrap;
    letter-spacing: -0.025em;
    border: none;
    cursor: pointer;
    min-width: fit-content;
}

.book-appointment-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(66, 153, 225, 0.4);
    background: linear-gradient(135deg, #3182ce 0%, #6b46c1 100%);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: #2d3748;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.mobile-menu-toggle:hover {
    background: rgba(66, 153, 225, 0.1);
    color: #4299e1;
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    padding: 1rem 2rem 2rem 2rem;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 1000;
}

.mobile-menu.active {
    max-height: 80vh;
    display: flex;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

.mobile-nav-link {
    color: #1a1a1a;
    text-decoration: none;
    padding: 1rem 0;
    font-family: 'Inter', 'Segoe UI', 'Helvetica Neue', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 600;
    font-size: 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    letter-spacing: -0.025em;
}

.mobile-nav-link:hover {
    color: #4299e1;
}

.mobile-dropdown-menu {
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    background: rgba(66, 153, 225, 0.05);
    margin: 0 -1rem;
    padding: 0;
    border-radius: 8px;
}

.mobile-dropdown-menu.active {
    max-height: none;
    padding: 0.5rem 0;
    overflow: visible;
}

.mobile-dropdown-item {
    display: block;
    color: #1a1a1a;
    text-decoration: none;
    padding: 0.75rem 2rem;
    font-family: 'Inter', 'Segoe UI', 'Helvetica Neue', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
    letter-spacing: -0.025em;
}

.mobile-dropdown-item:hover {
    background: rgba(66, 153, 225, 0.1);
    color: #4299e1;
}

.dropdown-toggle {
    cursor: pointer;
}

.dropdown-toggle i.rotated {
    transform: rotate(180deg);
}

.mobile-book-btn {
    background: linear-gradient(135deg, #4299e1 0%, #805ad5 100%);
    color: white;
    text-decoration: none;
    padding: 1rem 2rem;
    border-radius: 30px;
    font-family: 'Inter', 'Segoe UI', 'Helvetica Neue', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 700;
    font-size: 16px;
    text-align: center;
    margin-top: 1rem;
    transition: all 0.3s ease;
    letter-spacing: -0.025em;
    border: none;
    cursor: pointer;
}

.mobile-book-btn:hover {
    background: linear-gradient(135deg, #3182ce 0%, #6b46c1 100%);
}

/* Responsive Design - Desktop */
@media (min-width: 1280px) {
    .mobile-menu-toggle {
        display: none;
    }
    
    .nav-menu {
        gap: 1.8rem;
    }
    
    .nav-link {
        font-size: 15px;
    }
    
    .nav-wrapper {
        padding: 0 2rem;
    }
}

/* Large screens */
@media (min-width: 1024px) and (max-width: 1279px) {
    .mobile-menu-toggle {
        display: none;
    }
    
    .nav-menu {
        gap: 1.2rem;
    }
    
    .nav-link {
        font-size: 13.5px;
    }
    
    .book-appointment-btn {
        padding: 0.7rem 1.3rem;
        font-size: 13px;
    }
}

/* Tablet - Switch to mobile menu */
@media (max-width: 1023px) {
    .nav-menu {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .nav-wrapper {
        padding: 0 1.25rem;
    }
    
    .nav-row {
        gap: 0.75rem;
    }
    
    .book-appointment-btn {
        padding: 0.6rem 1.1rem;
        font-size: 12.5px;
    }
}

/* Mobile devices */
@media (max-width: 768px) {
    .glassmorphic-nav {
        top: 10px;
        left: 10px;
        right: 10px;
        border-radius: 15px;
        width: calc(100% - 20px);
    }
    
    .nav-wrapper {
        padding: 0 1rem;
        height: 60px;
    }
    
    .nav-row {
        gap: 0.6rem;
    }
    
    .nav-logo-group .logo-image {
        height: 40px;
        max-width: 120px;
    }
    
    .book-appointment-btn {
        padding: 0.5rem 0.9rem;
        font-size: 11.5px;
        border-radius: 20px;
    }
    
    .mobile-menu-toggle {
        font-size: 1.4rem;
        padding: 0.4rem;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .nav-wrapper {
        padding: 0 0.75rem;
        height: 58px;
    }
    
    .nav-row {
        gap: 0.5rem;
    }
    
    .nav-logo-group .logo-image {
        height: 36px;
        max-width: 110px;
    }
    
    .book-appointment-btn {
        padding: 0.45rem 0.8rem;
        font-size: 11px;
    }
}

/* Extra small devices */
@media (max-width: 375px) {
    .nav-wrapper {
        padding: 0 0.6rem;
    }
    
    .nav-row {
        gap: 0.4rem;
    }
    
    .nav-logo-group .logo-image {
        height: 34px;
        max-width: 100px;
    }
    
    .book-appointment-btn {
        padding: 0.4rem 0.7rem;
        font-size: 10.5px;
    }
    
    .mobile-menu-toggle {
        font-size: 1.3rem;
        padding: 0.3rem;
    }
}

/* Very small screens */
@media (max-width: 320px) {
    .nav-wrapper {
        padding: 0 0.5rem;
    }
    
    .nav-logo-group .logo-image {
        height: 30px;
        max-width: 90px;
    }
    
    .book-appointment-btn {
        padding: 0.35rem 0.6rem;
        font-size: 10px;
    }
}

/* Enhanced scrolling for mobile menu */
.mobile-menu {
    scrollbar-width: thin;
    scrollbar-color: rgba(66, 153, 225, 0.3) transparent;
}

.mobile-menu::-webkit-scrollbar {
    width: 6px;
}

.mobile-menu::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.mobile-menu::-webkit-scrollbar-thumb {
    background: rgba(66, 153, 225, 0.4);
    border-radius: 3px;
    transition: background 0.3s ease;
}

.mobile-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(66, 153, 225, 0.6);
}

/* Improved mobile dropdown visibility */
.mobile-dropdown {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.mobile-dropdown:last-child {
    border-bottom: none;
}

/* Mobile dropdown header with clickable link and toggle button */
.mobile-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.mobile-nav-link-clickable {
    flex: 1;
    color: #1a1a1a;
    text-decoration: none;
    padding: 1rem 0;
    font-family: 'Inter', 'Segoe UI', 'Helvetica Neue', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 600;
    font-size: 16px;
    transition: color 0.3s ease;
    letter-spacing: -0.025em;
    min-height: 48px;
    display: flex;
    align-items: center;
}

.mobile-nav-link-clickable:hover {
    color: #4299e1;
}

.mobile-dropdown-toggle-btn {
    background: none;
    border: none;
    color: #1a1a1a;
    padding: 1rem;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    min-height: 48px;
}

.mobile-dropdown-toggle-btn:hover {
    color: #4299e1;
}

.mobile-dropdown-toggle-btn i {
    transition: transform 0.3s ease;
}

.mobile-dropdown-toggle-btn i.rotated {
    transform: rotate(180deg);
}

/* Better touch targets */
.mobile-nav-link,
.mobile-dropdown-item {
    min-height: 48px;
    display: flex;
    align-items: center;
}

.mobile-dropdown-item {
    padding: 0.875rem 2rem;
    border-bottom: 1px solid rgba(66, 153, 225, 0.1);
}

.mobile-dropdown-item:last-child {
    border-bottom: none;
}

/* Add top padding to body to account for floating nav */
body {
    padding-top: 0px;
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Enhanced glassmorphic effect on scroll */
.glassmorphic-nav.scrolled {
    background: rgba(192, 192, 192, 0.35);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

/* Prevent layout shifts */
.nav-row > * {
    flex-shrink: 0;
}

.nav-menu {
    flex-shrink: 1;
    overflow: visible;
}

/* Ensure proper z-index for dropdowns */
.nav-dropdown {
    z-index: 10;
}

.dropdown-menu {
    z-index: 100;
}