/* ========================================
   MODERN PHARMACEUTICAL NAVBAR
   ======================================== */

/* CSS Variables */
:root {
    --primary-color: #0C359E;
    --secondary-color: #00224d;
    --accent-color: #4A90E2;
    --gradient-blue: linear-gradient(135deg, #0C359E 0%, #4A90E2 100%);
}

/* Prevent horizontal scrolling */
html,
body {
    overflow-x: hidden;
    max-width: 100%;
}

.modern-navbar {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    transition: all 0.3s ease;
}

.modern-navbar.scrolled {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.12);
}

.navbar-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

/* Logo Section */
.navbar-brand {
    display: flex;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.logo-link:hover {
    transform: scale(1.05);
}

.navbar-logo {
    height: 45px;
    width: auto;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-name {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--secondary-color);
    letter-spacing: 0.5px;
}

.brand-subtitle {
    font-size: 0.75rem;
    color: var(--primary-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Desktop Menu */
.navbar-menu {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 5px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
    z-index: 10;
}

.nav-item.dropdown {
    position: relative;
}

.nav-item.dropdown:hover {
    z-index: 200;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 10px 18px;
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 60%;
    height: 2px;
    background: var(--gradient-blue);
    transition: transform 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
    background: rgba(12, 53, 158, 0.05);
}

.nav-link:hover::before,
.nav-link.active::before {
    transform: translateX(-50%) scaleX(1);
}

.dropdown-icon {
    transition: transform 0.3s ease;
}

.nav-item.dropdown:hover .dropdown-icon {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    padding: 10px;
    z-index: 1000;
    display: none;
}

.nav-item.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-link {
    display: block;
    padding: 12px 16px;
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.dropdown-link:hover {
    background: rgba(12, 53, 158, 0.08);
    color: var(--primary-color);
    transform: translateX(5px);
}

/* Mega Menu */
.mega-menu {
    min-width: 800px;
    left: 50%;
    transform: translateX(-50%);
    padding: 25px;
}

.mega-menu-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.mega-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid rgba(12, 53, 158, 0.1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mega-links {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.mega-links li {
    margin-bottom: 8px;
}

.mega-links a {
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: inline-block;
}

.mega-links a:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

.mega-image {
    border-radius: 12px;
    overflow: hidden;
}

.mega-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.mega-image:hover img {
    transform: scale(1.1);
}

/* Navbar Actions */
.navbar-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.login-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--gradient-blue);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(12, 53, 158, 0.2);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(12, 53, 158, 0.3);
    color: white;
}

.login-btn svg {
    fill: white;
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-toggle span {
    width: 25px;
    height: 3px;
    background: var(--secondary-color);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.mobile-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translateY(8px);
}

.mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translateY(-8px);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 320px;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.2);
    transform: translateX(100%);
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: 1001;
    overflow-y: auto;
}

.mobile-menu.active {
    transform: translateX(0);
    visibility: visible;
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.mobile-logo {
    height: 35px;
}

.mobile-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--secondary-color);
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.mobile-close:hover {
    background: rgba(12, 53, 158, 0.1);
}

.mobile-nav-links {
    list-style: none;
    padding: 20px;
    margin: 0;
}

.mobile-nav-links > li {
    margin-bottom: 5px;
}

.mobile-nav-links > li > a {
    display: block;
    padding: 14px 16px;
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.mobile-nav-links > li > a:hover {
    background: rgba(12, 53, 158, 0.08);
    color: var(--primary-color);
}

.mobile-dropdown-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: none;
    border: none;
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 1rem;
    text-align: left;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-dropdown-toggle:hover {
    background: rgba(12, 53, 158, 0.08);
}

.mobile-dropdown-toggle svg {
    transition: transform 0.3s ease;
}

.mobile-dropdown.active .mobile-dropdown-toggle svg {
    transform: rotate(180deg);
}

.mobile-submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-dropdown.active .mobile-submenu {
    max-height: 500px;
}

.mobile-submenu li {
    padding-left: 20px;
}

.mobile-submenu a {
    display: block;
    padding: 10px 16px;
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.mobile-submenu a:hover {
    background: rgba(12, 53, 158, 0.05);
    color: var(--primary-color);
}

/* Mobile Overlay */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Responsive */
/* Hide mobile menu and overlay on large screens */
@media (min-width: 992px) {
    .mobile-menu,
    .mobile-overlay {
        display: none !important;
    }
}

@media (max-width: 1024px) {
    .mega-menu {
        min-width: 600px;
    }
    
    .mega-menu-content {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .mega-image {
        display: none;
    }
}

@media (max-width: 991px) {
    .navbar-container {
        padding: 0 20px;
        height: 70px;
    }
    
    .navbar-logo {
        height: 38px;
    }
    
    .brand-text {
        display: none;
    }
    
    .navbar-menu {
        display: none;
    }
    
    .login-btn span {
        display: none;
    }
    
    .login-btn {
        padding: 10px 12px;
    }
    
    .mobile-toggle {
        display: flex;
    }
}
