/* Modern Navigation - Clean & Minimalist like Friluftsguide.se */
/* Override Bootstrap with stronger selectors */

/* Reset & Base Navbar */
.modern-navbar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    background-color: #376D67 !important;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1) !important;
    z-index: 1000 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    margin: 0 !important;
    border-radius: 0 !important;
}

.modern-navbar .nav-container {
    max-width: 1200px;
    margin: 0 auto !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 0 2rem !important;
    height: 65px;
}

/* Logo Section */
.modern-navbar .nav-logo a {
    display: flex !important;
    align-items: center !important;
    text-decoration: none !important;
}

.modern-navbar .nav-logo img {
    height: 35px !important;
    width: auto !important;
    transition: transform 0.3s ease !important;
}

.modern-navbar .nav-logo a:hover img {
    transform: scale(1.05);
}

/* Desktop Navigation Menu */
.modern-navbar .nav-menu {
    display: flex !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 2.5rem;
    flex: 1 !important;
    justify-content: center !important;
    align-items: center !important;
}

.modern-navbar .nav-item {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.modern-navbar .nav-link {
    color: rgba(255, 255, 255, 0.95) !important;
    text-decoration: none !important;
    font-size: 0.95rem !important;
    font-weight: 500 !important;
    letter-spacing: 0.3px !important;
    padding: 0.5rem 0.75rem !important;
    position: relative !important;
    transition: all 0.3s ease !important;
    white-space: nowrap !important;
    display: inline-block !important;
    background: none !important;
    border: none !important;
}

.modern-navbar .nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: #ffffff;
    transition: width 0.3s ease;
}

.modern-navbar .nav-link:hover {
    color: #ffffff !important;
    transform: translateY(-1px);
    background: none !important;
}

.modern-navbar .nav-link:hover::after {
    width: 80%;
}

/* Right Side Icons */
.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-search-icon {
    display: none;
}

.nav-search-icon img {
    height: 24px;
    width: auto;
    filter: brightness(0) invert(1);
    transition: opacity 0.3s ease;
}

.nav-search-icon:hover img {
    opacity: 0.7;
}

/* Hamburger Menu Button */
.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 22px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.hamburger-line {
    width: 100%;
    height: 3px;
    background-color: #ffffff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.nav-hamburger:hover .hamburger-line {
    background-color: rgba(255, 255, 255, 0.8);
}

/* Mobile Menu Overlay */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 999;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(5px);
}

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

.mobile-menu-header {
    background-color: #376D67;
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.mobile-logo {
    height: 45px;
    width: auto;
}

.mobile-close {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.mobile-close:hover {
    transform: rotate(90deg);
}

.close-icon {
    font-size: 2.5rem;
    color: #ffffff;
    line-height: 1;
    font-weight: 300;
}

.mobile-menu-list {
    background-color: #ffffff;
    list-style: none;
    padding: 0;
    margin: 0;
    width: 85%;
    max-width: 400px;
    margin-left: auto;
    height: calc(100vh - 80px);
    overflow-y: auto;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
}

.mobile-nav-item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

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

.mobile-nav-link {
    display: block;
    padding: 1.25rem 2rem;
    color: #333333;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.mobile-nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background-color: #376D67;
    transition: width 0.3s ease;
}

.mobile-nav-link:hover {
    background-color: rgba(55, 109, 103, 0.05);
    color: #376D67;
    padding-left: 2.5rem;
}

.mobile-nav-link:hover::before {
    width: 4px;
}

/* Prevent body scroll when mobile menu is open */
body.menu-open {
    overflow: hidden;
}

/* Add spacing for fixed navbar */
main {
    padding-top: 65px;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
    .nav-container {
        padding: 0 1.5rem;
    }

    .nav-menu {
        gap: 2rem;
    }

    .nav-link {
        font-size: 0.9rem;
        padding: 0.5rem 0.5rem;
    }
}

@media (max-width: 900px) {
    /* Hide desktop menu, show mobile elements */
    .nav-menu {
        display: none;
    }

    .nav-hamburger {
        display: flex;
    }

    .nav-search-icon {
        display: block;
    }

    .nav-container {
        height: 60px;
    }

    .nav-logo img {
        height: 32px;
    }

    main {
        padding-top: 60px;
    }
}

@media (max-width: 600px) {
    .nav-container {
        padding: 0 1rem;
    }

    .nav-logo img {
        height: 28px;
    }

    .mobile-menu-list {
        width: 100%;
        max-width: 100%;
    }

    .mobile-nav-link {
        padding: 1rem 1.5rem;
        font-size: 0.95rem;
    }

    .mobile-nav-link:hover {
        padding-left: 2rem;
    }
}

@media (max-width: 400px) {
    .nav-container {
        padding: 0 0.75rem;
        height: 55px;
    }

    .nav-logo img {
        height: 26px;
    }

    .nav-search-icon img {
        height: 20px;
    }

    .nav-hamburger {
        width: 24px;
        height: 18px;
    }

    .hamburger-line {
        height: 2.5px;
    }

    main {
        padding-top: 55px;
    }
}
