/* Header and Navigation Styles */

/* Enhanced Navigation Bar Styling */
.navbar {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(20, 184, 166, 0.1);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1000;
    min-height: 4rem;
}

/* Navigation container positioning */
.nav-links {
    margin-left: 10rem;
}

/* Reduce navbar padding */
.navbar .flex.justify-between {
    padding: 0.5rem 0;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

/* Logo Styling - Fixed positioning */
.nav-logo {
    transition: all 0.3s ease;
    height: 100%;
    width: auto;
    max-height: 6rem;
    object-fit: contain;
    overflow: hidden;
}

/* Logo container - fixed positioning */
.navbar .flex.items-center:first-child {
    overflow: hidden;
    max-height: 4rem;
    display: flex;
    align-items: center;
}

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

/* Navigation Links */
.nav-link {
    position: relative;
    color: #374151;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    margin-left: 1rem;
}

.nav-link:hover {
    color: #14b8a6;
    background-color: rgba(20, 184, 166, 0.1);
    transform: translateY(-1px);
}

.nav-link.active {
    color: #14b8a6;
    background-color: rgba(20, 184, 166, 0.15);
    font-weight: 600;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #14b8a6, #0d9488);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

/* Enhanced Dropdown Menu */
.nav-dropdown {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(20, 184, 166, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-radius: 1rem;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    z-index: 1000;
    min-width: 200px;
}

.nav-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Ensure dropdown group positioning */
.group {
    position: relative;
}

.dropdown-item {
    display: block;
    padding: 0.75rem 1.5rem;
    color: #374151;
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 0.5rem;
    margin: 0 0.5rem;
    position: relative;
    overflow: hidden;
}

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

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

.dropdown-item:hover {
    background-color: rgba(20, 184, 166, 0.1);
    color: #14b8a6;
    transform: translateX(5px);
}

/* Navigation Icons */
.nav-icon {
    color: #6b7280;
    transition: all 0.3s ease;
    padding: 0.5rem;
    border-radius: 0.5rem;
}

.nav-icon:hover {
    color: #14b8a6;
    background-color: rgba(20, 184, 166, 0.1);
    transform: scale(1.1);
}

/* New Right-Side Mobile Menu */
.left-mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 320px;
    height: 100vh;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    backdrop-filter: blur(20px);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

.left-mobile-menu.active {
    right: 0;
}

.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    border-bottom: 2px solid rgba(20, 184, 166, 0.1);
    background: rgba(20, 184, 166, 0.05);
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.menu-logo {
    height: 6rem;
    width: auto;
}

.menu-close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6b7280;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.menu-close-btn:hover {
    color: #14b8a6;
    background-color: rgba(20, 184, 166, 0.1);
    transform: scale(1.1);
}

.menu-navigation {
    display: flex;
    flex-direction: column;
    padding: 1rem 0;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.menu-link {
    display: block;
    padding: 1rem 2rem;
    color: #374151;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border-left: 4px solid transparent;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

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

.menu-link:hover::before {
    right: 100%;
}

.menu-link:hover {
    background-color: rgba(20, 184, 166, 0.1);
    color: #14b8a6;
    border-left-color: #14b8a6;
    transform: translateX(-8px);
}

.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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


/* New Left-Side Hamburger Button */
.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 40px;
    height: 32px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    position: relative;
}

.hamburger-line {
    width: 100%;
    height: 4px;
    background: #14b8a6;
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

.hamburger-btn:hover .hamburger-line {
    background: #0d9488;
}

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

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

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

/* Small Top Bar Styling */
.top-bar {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    position: relative;
    overflow: hidden;
    height: 2rem; /* Smaller height */
    display: flex;
    align-items: center;
}

.social-icon {
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    padding: 0.2rem;
    font-size: 0.8rem; /* Smaller icons */
    border-radius: 0.25rem;
}

.social-icon:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* Navigation Animation */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.navbar {
    animation: slideInDown 0.6s ease-out;
}

/* Focus States for Accessibility */
.nav-link:focus,
.nav-icon:focus,
.mobile-toggle:focus {
    outline: 2px solid #14b8a6;
    outline-offset: 2px;
}

/* Loading State */
.navbar.loading {
    opacity: 0.7;
    pointer-events: none;
}

.navbar.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Responsive Navigation */
@media (max-width: 768px) {
    .hamburger-btn {
        display: flex;
    }
    
    .nav-links {
        display: none;
    }
    
    /* Mobile navigation container improvements */
    .navbar .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Reduce mobile navbar padding */
    .navbar .flex.justify-between {
        padding: 0.25rem 0;
    }
    
    /* Mobile logo sizing - Fixed positioning */
    .nav-logo {
        height: 5rem;
        width: auto;
        max-height: 5rem;
    }
    
    /* Mobile top bar - smaller */
    .top-bar {
        height: 1.5rem;
        padding: 0.1rem 0;
    }
    
    .social-icon {
        font-size: 0.7rem;
        padding: 0.1rem;
    }
    
}

/* Mobile menu improvements for smaller screens */
@media (max-width: 480px) {
    .navbar .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    .nav-logo {
        height: 4.5rem;
        width: auto;
        max-height: 4.5rem;
    }
    
    /* Extra small mobile top bar */
    .top-bar {
        height: 1.25rem;
    }
    
    .social-icon {
        font-size: 0.6rem;
    }
    
    .hamburger-btn {
        width: 30px;
        height: 20px;
    }
    
    .left-mobile-menu {
        max-width: 100%;
        right: -100%;
        overflow-x: hidden;
    }
    
    .left-mobile-menu.active {
        right: 0;
    }
    
    .menu-header {
        padding: 1.5rem;
        overflow: hidden;
    }
    
    .menu-link {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
        overflow: hidden;
        white-space: nowrap;
    }
}

/* Enhanced mobile header responsiveness */
@media (max-width: 768px) {
    .navbar {
        position: sticky;
        top: 0;
        z-index: 1000;
    }
    
    /* Hamburger button positioning */
    .hamburger-btn {
        position: relative;
        z-index: 1002;
    }
}

/* Additional responsive breakpoints */
@media (max-width: 640px) {
    .left-mobile-menu {
        max-width: 100%;
        right: -100%;
        overflow-x: hidden;
    }
    
    .left-mobile-menu.active {
        right: 0;
    }
    
    .menu-header {
        padding: 1.5rem;
        overflow: hidden;
    }
    
    .menu-link {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
        overflow: hidden;
        white-space: nowrap;
    }
}

/* Landscape orientation adjustments */
@media (max-width: 768px) and (orientation: landscape) {
    .left-mobile-menu {
        height: 100vh;
        overflow-y: auto;
    }
    
    .menu-link {
        padding: 0.75rem 1.5rem;
        min-height: 44px;
    }
}
