/* New Navigation Styles */
:root {
    --nav-height: 70px;
    --nav-bg: #ffffff;
    --nav-text: #333333;
    --nav-hover: #007bff;
    --nav-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --mobile-breakpoint: 768px;
}

body {
    padding-top: var(--nav-height); /* Prevent content from being hidden behind fixed nav */
}

.new-nav-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    background-color: var(--nav-bg);
    box-shadow: var(--nav-shadow);
    z-index: 1000;
    transition: all 0.3s ease;
}

.new-nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo */
.new-nav-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--nav-text);
    font-weight: bold;
    font-size: 20px;
}

.new-nav-logo img {
    height: 40px;
    margin-right: 10px;
}

/* Desktop Menu */
.new-nav-menu {
    display: flex;
    gap: 30px;
}

.new-nav-link {
    text-decoration: none;
    color: var(--nav-text);
    font-size: 16px;
    font-weight: 500;
    position: relative;
    padding: 5px 0;
    transition: color 0.3s ease;
}

.new-nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--nav-hover);
    transition: width 0.3s ease;
}

.new-nav-link:hover {
    color: var(--nav-hover);
}

.new-nav-link:hover::after {
    width: 100%;
}

.new-nav-link.active {
    color: var(--nav-hover);
}

.new-nav-link.active::after {
    width: 100%;
}

/* Mobile Toggle Button */
.new-nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.hamburger {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--nav-text);
    position: relative;
    transition: all 0.3s ease;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 3px;
    background-color: var(--nav-text);
    transition: all 0.3s ease;
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    bottom: -8px;
}

/* Custom Sidebar (Contact & Back to Top) */
.custom-sidebar {
    position: fixed;
    right: 20px;
    bottom: 100px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-item {
    width: 50px;
    height: 50px;
    background-color: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none; /* For anchor tags */
}

.sidebar-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.sidebar-item svg {
    width: 24px;
    height: 24px;
    fill: #007bff; /* Using --nav-hover color */
}

.sidebar-item.telegram:hover svg {
    fill: #0088cc;
}

.sidebar-item.back-to-top {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.sidebar-item.back-to-top.show {
    display: flex;
    opacity: 1;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .new-nav-toggle {
        display: block;
    }

    .new-nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background-color: var(--nav-bg);
        flex-direction: column;
        padding-top: 80px;
        padding-left: 30px;
        gap: 20px;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .new-nav-menu.open {
        right: 0;
    }

    .new-nav-link {
        font-size: 18px;
        opacity: 0;
        transform: translateX(20px);
        transition: all 0.3s ease;
    }

    .new-nav-menu.open .new-nav-link {
        opacity: 1;
        transform: translateX(0);
    }

    .new-nav-menu.open .new-nav-link:nth-child(1) { transition-delay: 0.1s; }
    .new-nav-menu.open .new-nav-link:nth-child(2) { transition-delay: 0.2s; }
    .new-nav-menu.open .new-nav-link:nth-child(3) { transition-delay: 0.3s; }

    /* Hamburger Animation */
    .new-nav-toggle.active .hamburger {
        background-color: transparent;
    }

    .new-nav-toggle.active .hamburger::before {
        transform: rotate(45deg);
        top: 0;
    }

    .new-nav-toggle.active .hamburger::after {
        transform: rotate(-45deg);
        bottom: 0;
    }

    /* Overlay */
    .new-nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .new-nav-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    /* Adjust sidebar position on mobile */
    .custom-sidebar {
        bottom: 80px;
        right: 15px;
    }
}
