/* ==========================================
   TOP NAVIGATION BAR
   ========================================== */

.app-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 0;
    z-index: 1000;
    background: transparent;
    transition: background-color 0.3s ease;
}

.app-navbar.scrolled {
    background: transparent;
}

.navbar-container {
    max-width: 100%;
    height: 100%;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ==========================================
   LOGO
   ========================================== */

.navbar-logo {
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: transform 0.3s ease;
	position:relative;
	top: 35px;
	left:0;
}

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

.navbar-logo svg {
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5));
}

/* ==========================================
   BURGER MENU ICON
   ========================================== */

.burger-menu {
    width: 40px;
    height: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    position: relative;
    z-index: 1001;
    padding: 8px;
    transition: transform 0.3s ease;
	top: 35px;
}

.burger-menu:hover {
    transform: scale(1.1);
}

.burger-menu:active {
    transform: scale(0.95);
}

.burger-line {
    width: 28px;
    height: 3px;
    background-color: #fff;
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: absolute;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.5));
}

.burger-line:nth-child(1) {
    transform: translateY(-8px);
}

.burger-line:nth-child(2) {
    transform: translateY(0);
}

.burger-line:nth-child(3) {
    transform: translateY(8px);
}

/* Burger till Kryss Animation */
.burger-menu.active .burger-line:nth-child(1) {
    transform: translateY(0) rotate(45deg);
}

.burger-menu.active .burger-line:nth-child(2) {
    opacity: 0;
    transform: translateX(20px);
}

.burger-menu.active .burger-line:nth-child(3) {
    transform: translateY(0) rotate(-45deg);
}

/* ==========================================
   SIDE PANEL
   ========================================== */

.side-panel {
    position: fixed;
    top: 0;
    right: -100%;
    width: 320px;
    max-width: 85vw;
    height: 100vh;
    background: var(--dark-bg);
    z-index: 999;
    transition: right 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
}

.side-panel.active {
    right: 0;
}

.side-panel-content {
    position: relative;
    overflow: hidden;
}

.panel-title {
    color: #fff;
    font-size: 20px;
    margin-bottom: 20px;
    letter-spacing: 2px;
	transition: transform 0.3s ease;
}
.panel-title a{
    color: #fff;
	text-decoration:none;
}

/* ==========================================
   NAVIGATION MENU
   ========================================== */

/* Meny-nivåer container */
.menu-level {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 100%;
    padding: 25px 30px 40px;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.4s ease;
}

/* Huvudmeny (nivå 0) */
.menu-level.level-0 {
    position: relative;
    transform: translateX(0);
}

/* Undermeny (nivå 1+) */
.menu-level.level-1,
.menu-level.level-2,
.menu-level.level-3 {
    transform: translateX(100%);
}

/* Visa aktuell nivå */
.menu-level.active {
    transform: translateX(0);
}

/* Dölj föregående nivå åt vänster */
.menu-level.previous {
    transform: translateX(-30%);
    opacity: 0;
}

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

.nav-menu li {
    transform: translateX(50px);
    opacity: 0;
    transition: all 0.3s ease;
}

.side-panel.active .nav-menu li {
    transform: translateX(0);
    opacity: 1;
}

/* Stagger effect för menyitems */
.side-panel.active .nav-menu li:nth-child(1) { transition-delay: 0.1s; }
.side-panel.active .nav-menu li:nth-child(2) { transition-delay: 0.15s; }
.side-panel.active .nav-menu li:nth-child(3) { transition-delay: 0.2s; }
.side-panel.active .nav-menu li:nth-child(4) { transition-delay: 0.25s; }
.side-panel.active .nav-menu li:nth-child(5) { transition-delay: 0.3s; }
.side-panel.active .nav-menu li:nth-child(6) { transition-delay: 0.35s; }
.side-panel.active .nav-menu li:nth-child(7) { transition-delay: 0.4s; }
.side-panel.active .nav-menu li:nth-child(8) { transition-delay: 0.45s; }

.nav-link {
    display: block;
    color: #d6d6d6;
    padding: 8px 0 12px 0;
    border-bottom: 1px #9999994f solid;
    text-decoration: none;
    position: relative;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: #fff;
}


/* ==========================================
   DRILL-DOWN NAVIGATION
   ========================================== */

/* Länkar med undernivåer */
.nav-link.has-submenu {
    padding-right: 40px;
}

.nav-link.has-submenu::after {
    content: '';
    position: absolute;
    right: 5px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-right: 2px solid #d6d6d6;
    border-top: 2px solid #d6d6d6;
    transform: translateY(-50%) rotate(45deg);
    transition: all 0.3s ease;
}

.nav-link.has-submenu:hover::after {
    border-color: #fff;
    right: 2px;
}

/* Tillbaka-knapp */
.back-link {
    display: flex;
    align-items: center;
    color: #fff;
    padding: 0 0 20px 0;
    border-bottom: 2px #999 solid;
    margin-bottom: 20px;
    text-decoration: none;
    font-size: 16px;
    transition: all 0.3s ease;
    cursor: pointer;
	margin-top: -5px;
}

.back-link:hover {
    color: #fff;
    padding-left: 5px;
}

.back-link::before {
    content: '';
    width: 10px;
    height: 10px;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(45deg);
    margin-right: 12px;
    transition: all 0.3s ease;
}



.back-link:hover::before {
    margin-right: 15px;
}

/* Submenu titel */
.submenu-title {
    color: #fff;
    font-size: 18px;
    opacity: 0.9;
}

/* ==========================================
   WHITE
   ========================================== */
   
.app-navbar.bg-white .burger-menu.active .burger-line {
    background-color: #666;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0));
}
.app-navbar.bg-white .burger-menu.active:hover .burger-line {
    background-color: #6a6a6a;
}

.side-panel.bg-white {
    height: 100vh;
    background: #fff;
}

.side-panel.bg-white .panel-title {
    color: #000;
}
.side-panel.bg-white .panel-title a{
    color: #000;
}
.side-panel.bg-white .panel-title a:hover{
    color: #000;
}

.side-panel.bg-white .nav-link {
    color: #666;
    border-bottom: 1px #9999994f solid;
}

.side-panel.bg-white .nav-link:hover {
    color: #000;
}
.side-panel.bg-white .nav-link.has-submenu:after {
    border-color: #6a6a6a;
}
.side-panel.bg-white .nav-link.has-submenu:hover::after {
    border-color: #000;
}
.side-panel.bg-white .back-link {
	color: #666;
	border-bottom: 2px #cbcbcb solid;
}
.side-panel.bg-white .back-link:hover {
    color: #666;
}

.side-panel.bg-white .back-link::before {
    border-left: 2px solid #666;
    border-bottom: 2px solid #666;
}

.side-panel.bg-white .submenu-title {
    color: #666;
}

.side-panel.bg-white .submenu-title:hover {
    color: #000;
}



/* ==========================================
   OVERLAY
   ========================================== */

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

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

/* ==========================================
   CONTENT SECTION
   ========================================== */

.content-section {
    background: #f8f9fa;
    min-height: 100vh;
}

/* ==========================================
   RESPONSIV DESIGN
   ========================================== */

@media (max-width: 768px) {

    .side-panel {
        width: 100%;
        max-width: 100vw;
    }
    
    .navbar-container {
        padding: 0 15px;
    }
	
    .panel-title {
		padding-left: 50px;
    }
	
	.back-link {
		padding: 0 0 20px 50px;
	}	
		
}

@media (max-width: 480px) {    
    .nav-link {
        font-size: 20px;
    }
}

/* ==========================================
   SMOOTH SCROLLING
   ========================================== */

html {
    scroll-behavior: smooth;
}

/* Förhindra scroll när menyn är öppen */
body.menu-open {
    overflow: hidden;
}
