/* Navigation Styles */
.nav-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Brand/Logo */
.nav-brand {
    flex: 0 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-img {
    height: 40px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

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

/* Navigation Menu */
.nav-menu-container {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
}

.nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: #1e293b;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #2563eb;
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: #2563eb;
}

.nav-link:hover::after {
    width: 100%;
}

/* Mobile Toggle */
.nav-toggle {
    display: none;
}

.hamburger {
    background: none;
    border: none;
    cursor: pointer;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 32px;
    min-height: 32px;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1000;
}

.hamburger:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.5);
}

.hamburger-line {
    width: 20px;
    height: 2px;
    background: #1e293b;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger.active .hamburger-line:first-child {
    transform: rotate(45deg) translate(5px, 5px);
}

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

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

/* Mobile Styles */
@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }

    .nav-menu-container {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        z-index: 9999;
        padding: 1rem;
        box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    }

    .nav-menu-container.active {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        height: 100vh;
        overflow-y: auto;
    }

    .nav-menu {
        flex-direction: column;
        gap: 1.5rem;
        padding: 2rem 0;
        width: 100%;
    }

    .nav-link {
        font-size: 1.1rem;
        padding: 1rem;
        width: 100%;
        text-align: center;
        border-radius: 8px;
        transition: all 0.3s ease;
        margin: 0.5rem 0;
    }

    .nav-link::after {
        display: none;
    }

    .nav-link:hover {
        background: rgba(37, 99, 235, 0.1);
        color: #2563eb;
    }

    /* Close button */
    .nav-menu-container::before {
        content: '×';
        position: absolute;
        top: 1rem;
        right: 1rem;
        font-size: 2rem;
        font-weight: bold;
        color: #1e293b;
        cursor: pointer;
        transition: all 0.3s ease;
        background: rgba(255, 255, 255, 0.9);
        padding: 0.5rem;
        border-radius: 50%;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }

    .nav-menu-container::before:hover {
        color: #2563eb;
        background: rgba(37, 99, 235, 0.1);
        transform: scale(1.1);
    }

    /* Prevent horizontal layer issue */
    .nav-bar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
    }

    .nav-container {
        max-width: 100%;
        margin: 0 auto;
        padding: 1rem;
    }

    .nav-brand {
        flex: 0 0 auto;
    }

    .nav-menu-container {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        z-index: 9999;
        padding: 1rem;
        display: none;
    }
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 60px;
    object-fit: contain;
}

/* Navigation Toggle */
.nav-toggle {
    display: none;
}

.mobile-nav-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 32px;
    min-height: 32px;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1000;
}

.mobile-nav-toggle:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.5);
}

.hamburger-line {
    width: 20px;
    height: 2px;
    background: black;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-nav-toggle.active .hamburger-line:first-child {
    transform: rotate(45deg) translate(5px, 5px);
}

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

.mobile-nav-toggle.active .hamburger-line:last-child {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Add hover effects */
.mobile-nav-toggle:hover .hamburger-line {
    background: #2563eb;
}

/* Add focus ring for accessibility */
.mobile-nav-toggle:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.5);
}

/* Navigation Menu */
nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 2rem;
}

.nav-menu li {
    margin: 0;
}

.nav-menu a {
    color: #1e293b;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.nav-menu a:hover {
    color: #2563eb;
    background: rgba(37, 99, 235, 0.1);
}

/* Responsive Styles */
@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }

    nav {
        display: none;
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        padding: 20px;
        gap: 1rem;
        box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    }

    .navigation-wrapper.active nav {
        display: flex;
        flex-direction: column;
    }

    .nav-menu {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-menu a {
        width: 100%;
        text-align: center;
        padding: 12px 20px;
        font-size: 18px;
        transition: all 0.3s ease;
    }

    .nav-menu a:hover {
        background: rgba(37, 99, 235, 0.1);
    }
}

/* Desktop Navigation */
.desktop-nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 60px;
    width: auto;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 30px;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    color: #1e293b;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    padding: 10px 15px;
    transition: all 0.3s ease;
    border-radius: 6px;
}

.nav-menu a:hover {
    color: #2563eb;
    background: rgba(37, 99, 235, 0.1);
}

/* Mobile Navigation Toggle Container */
.mobile-nav-toggle-container {
    display: none;
    padding: 15px 20px;
}

/* Mobile Navigation Toggle */
.mobile-nav-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 12px;
    display: flex;
    color: #1e293b;
    flex-direction: column;
    gap: 4px;
    min-width: 32px;
    min-height: 32px;
    align-items: center;
    justify-content: center;
}

.mobile-nav-toggle span {
    width: 20px;
    height: 2px;
    background: #1e293b;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-nav-toggle.active span:first-child {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-nav-toggle.active span:last-child {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile Navigation */
.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    height: 100vh;
    background: white;
    padding: 60px 20px 20px;
    transition: all 0.3s ease;
    box-shadow: -4px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 9995;
}

.mobile-nav.active {
    right: 0;
}

.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9994;
    display: none;
}

.mobile-nav-overlay.active {
    display: block;
}

/* Mobile Menu */
.mobile-nav-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 24px;
    height: 24px;
    cursor: pointer;
}

.mobile-nav-close::before,
.mobile-nav-close::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 2px;
    background: #1e293b;
    transform: translate(-50%, -50%);
}

.mobile-nav-close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.mobile-nav-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.mobile-nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-nav-menu li {
    margin-bottom: 20px;
}

.mobile-nav-menu a {
    color: #1e293b;
    text-decoration: none;
    font-size: 18px;
    font-weight: 500;
    padding: 10px 15px;
    display: block;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.mobile-nav-menu a:hover {
    color: #2563eb;
    background: rgba(37, 99, 235, 0.1);
}

/* Responsive Styles */
@media (max-width: 768px) {
    .desktop-nav {
        display: none;
    }

    .mobile-nav-toggle-container {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .mobile-nav-toggle {
        display: block;
    }

    .navigation-wrapper {
        background: rgba(255,255,255,0.95);
        backdrop-filter: blur(10px);
    }

    .mobile-nav,
    .mobile-nav-toggle-container,
    .mobile-nav-overlay {
        display: none !important;
    }
}

/* Smooth Scrolling */
.navigation-wrapper {
    will-change: transform;
}

/* Prevent content from jumping */
body.no-scroll {
    overflow: hidden;
    height: 100vh;
}

/* Page Content Padding */
.page-content {
    padding-top: 80px;
}

.mobile-nav-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.mobile-nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-nav-menu li {
    margin-bottom: 15px;
}

.mobile-nav-menu a {
    color: #2d4a79;
    text-decoration: none;
    font-size: 18px;
    font-weight: 600;
    padding: 12px 15px;
    border-radius: 5px;
    transition: all 0.3s ease;
    display: block;
}

.mobile-nav-menu a:hover {
    color: #1f3a66;
    background: rgba(45, 74, 121, 0.1);
}

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

    .mobile-nav-toggle-container {
        display: flex;
    }

    .mobile-nav-toggle {
        display: block;
    }

    .nav-menu a {
        padding: 15px 10px;
    }

    .nav-menu {
        gap: 20px;
        position: fixed;
        top: 0;
        right: 0;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: #fff;
        z-index: 9999;
        padding: 80px 20px 20px;
        box-sizing: border-box;
        box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    }

    .mobile-nav.active {
        display: block;
    }

    .mobile-nav-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 9998;
    }

    .mobile-nav-overlay.active {
        display: block;
    }
}

/* Sticky Navigation */
.sticky {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 9999;
    padding: 10px 0;
}

.sticky .logo {
    height: 40px;
}

.sticky .nav-menu a {
    padding: 8px 12px;
}
