/* Gemensam navigation för alla sidor */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    z-index: 1000;
    padding: clamp(0.8rem, 2vh, 1rem) 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: min(1200px, 95vw);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 clamp(1rem, 3vw, 2rem);
}

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

.logo a {
    text-decoration: none;
}

.logo-icon {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    min-width: clamp(50px, 10vw, 65px);
    width: auto;
    padding: 0 clamp(0.5rem, 1vw, 0.8rem);
    height: clamp(40px, 8vw, 50px);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: clamp(0.85rem, 1.8vw, 1.1rem);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    letter-spacing: 0.5px;
}

/* Logo bild - om du har en egen logotyp, lägg den i public/images/logo.png */
.logo-icon img,
.logo img {
    max-width: 300px;
    width: auto;
    height: auto;
    max-height: 90px;
    min-height: 60px;
    object-fit: contain;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative;
    z-index: 1;
    /* Statisk logotyp i navigation - ingen glow */
}

/* Dölj text om bild finns */
.logo img ~ .logo-text,
.logo img ~ .logo-icon {
    display: none;
}

.logo:has(img) .logo-text,
.logo:has(img) .logo-icon {
    display: none;
}

.logo:has(img) {
    background: transparent;
}

.logo-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.logo-main {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    font-weight: bold;
    color: #333;
    line-height: 1.2;
    text-decoration: none;
    margin: 0;
    padding: 0;
    white-space: nowrap;
}

.logo-slogan {
    font-size: clamp(0.65rem, 1.3vw, 0.75rem);
    color: #667eea;
    font-weight: 500;
    text-decoration: none;
    line-height: 1.2;
    margin: 0;
    padding: 0;
    margin-top: 0.1rem;
}

.nav-links {
    display: flex;
    gap: clamp(1rem, 2vw, 2rem);
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: clamp(0.9rem, 1.8vw, 1rem);
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #667eea;
}

.nav-buttons {
    display: flex;
    align-items: center;
    gap: clamp(0.5rem, 1vw, 1rem);
}

/* Dölj nav-buttons på mobil, visa hamburger istället */
@media (max-width: 1180px) {
    .nav-buttons {
        display: none !important;
    }
}

.nav-btn-secondary {
    background: linear-gradient(45deg, #1e293b, #334155);
    color: white;
    padding: clamp(0.6rem, 1.5vw, 0.8rem) clamp(1rem, 2.5vw, 1.5rem);
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: clamp(0.8rem, 1.5vw, 0.9rem);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 2px solid #1e293b;
    box-shadow: 0 4px 15px rgba(30, 41, 59, 0.3);
}

.nav-btn-secondary:hover {
    background: linear-gradient(45deg, #334155, #475569);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 41, 59, 0.4);
}

.nav-btn-primary {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: clamp(0.6rem, 1.5vw, 0.8rem) clamp(1rem, 2.5vw, 1.5rem);
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: clamp(0.8rem, 1.5vw, 0.9rem);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 2px solid #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.nav-btn-primary:hover {
    background: linear-gradient(45deg, #764ba2, #667eea);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Användarinfo för företagssidor */
.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info span {
    font-weight: 500;
    color: #333;
    font-size: clamp(0.7rem, 1.2vw, 0.8rem);
}

/* Snabbknappar i navigation */
.nav-quick-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-right: 1rem;
}

.nav-quick-btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 0.8rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.nav-quick-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.nav-quick-btn i {
    font-size: 0.9rem;
}

/* Hamburger menu button - Synlig som standard på små skärmar */
.mobile-menu-toggle {
    display: flex !important; /* Synlig som standard - använd flex för centrering */
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: #333;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
    min-width: 44px; /* Touch-friendly size */
    min-height: 44px;
    margin-left: auto; /* Push till höger */
}

.mobile-menu-toggle:hover {
    color: #667eea;
}

/* Mobile menu overlay */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

/* Mobile menu sidebar */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: min(300px, 85vw);
    height: 100vh;
    background: white;
    z-index: 1000;
    transition: right 0.3s ease;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    padding: 1rem;
}

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

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 1rem;
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #333;
    cursor: pointer;
    padding: 0.5rem;
}

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

.mobile-menu-links li {
    margin-bottom: 0.5rem;
}

.mobile-menu-links a {
    display: block;
    padding: 1rem;
    color: #333;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.3s ease;
    font-weight: 500;
}

.mobile-menu-links a:hover {
    background: #f3f4f6;
    color: #667eea;
}

.mobile-menu-buttons {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mobile-menu-buttons .nav-btn-primary,
.mobile-menu-buttons .nav-btn-secondary {
    width: 100%;
    justify-content: center;
}

/* Dölj hamburger-meny på stora skärmar (desktop) */
@media (min-width: 1181px) {
    .mobile-menu-toggle {
        display: none !important;
    }
    
    .nav-links {
        display: flex !important;
    }
}

/* Responsiv navigation - Visa hamburger-meny på alla skärmar under 1200px */
/* Detta inkluderar iPhone 12/13 (390px) och större mobiler/tablets */
@media (max-width: 1180px) {
    .mobile-menu-toggle {
        display: flex !important; /* Flex för centrering */
        align-items: center;
        justify-content: center;
    }
    
    .nav-links {
        display: none !important;
    }
    
    .nav-quick-actions {
        display: none !important;
    }
    
    .user-info {
        display: none !important;
    }
    
    .user-info.mobile-only {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem;
        border-bottom: 1px solid #e5e7eb;
        margin-bottom: 1rem;
    }
    
    .nav-buttons {
        gap: 0.5rem;
    }
    
    /* Dölj text i knappar, visa bara ikoner */
    .nav-btn-text {
        display: none !important;
    }
    
    .nav-btn-secondary,
    .nav-btn-primary {
        padding: 0.6rem !important;
        min-width: auto;
        font-size: 0.9rem;
    }
    
    .nav-btn-primary i,
    .nav-btn-secondary i {
        margin: 0 !important;
        font-size: 1rem;
    }
}

/* Ytterligare anpassningar för mindre mobiler (iPhone 12/13 = 390px) */
@media (max-width: 480px) {
    .mobile-menu {
        width: 100vw !important;
    }
    
    .logo-main {
        font-size: 0.9rem;
    }
    
    .logo-slogan {
        font-size: 0.6rem;
    }
    
    .nav-btn-secondary,
    .nav-btn-primary {
        padding: 0.5rem 0.8rem !important;
        font-size: 0.75rem !important;
    }
    
    .mobile-menu-toggle {
        font-size: 1.3rem;
        padding: 0.4rem;
    }
}

/* Extra små skärmar (mindre än iPhone 12/13) */
@media (max-width: 360px) {
    .logo-main {
        font-size: 0.85rem;
    }
    
    .logo-slogan {
        font-size: 0.55rem;
    }
    
    .mobile-menu-toggle {
        font-size: 1.2rem;
        padding: 0.3rem;
    }
}



