Files
Projektarbeit-MYP/backend/static/css/navbar.css

468 lines
9.8 KiB
CSS

/* =============================================
MYP PLATFORM - MODERNE NAVBAR
Mercedes-Benz Design System
============================================= */
:root {
/* Mercedes-Benz Farbpalette */
--mb-primary: #00adef;
--mb-secondary: #6c757d;
--mb-dark: #1e2125;
--mb-light: #f8f9fa;
--mb-silver: #c7c7cc;
/* Navbar-spezifische Variablen */
--navbar-height: 4rem;
--navbar-bg: rgba(255, 255, 255, 0.95);
--navbar-border: rgba(0, 173, 239, 0.1);
--navbar-shadow: 0 2px 20px rgba(0, 173, 239, 0.1);
--navbar-blur: 20px;
/* Navigation Items */
--nav-item-hover: rgba(0, 173, 239, 0.1);
--nav-item-active: rgba(0, 173, 239, 0.15);
--nav-text-primary: #1e2125;
--nav-text-secondary: #6c757d;
--nav-text-active: #00adef;
/* Transitions */
--transition-fast: 0.15s ease;
--transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.dark {
--navbar-bg: rgba(30, 33, 37, 0.95);
--navbar-border: rgba(0, 173, 239, 0.2);
--navbar-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
--nav-item-hover: rgba(0, 173, 239, 0.15);
--nav-item-active: rgba(0, 173, 239, 0.25);
--nav-text-primary: #f8f9fa;
--nav-text-secondary: #c7c7cc;
}
/* ===== NAVBAR CONTAINER ===== */
.navbar {
position: sticky;
top: 0;
z-index: 1000;
width: 100%;
height: var(--navbar-height);
background: var(--navbar-bg);
backdrop-filter: blur(var(--navbar-blur));
-webkit-backdrop-filter: blur(var(--navbar-blur));
border-bottom: 1px solid var(--navbar-border);
box-shadow: var(--navbar-shadow);
transition: all var(--transition-smooth);
}
.navbar.scrolled {
--navbar-height: 3.5rem;
--navbar-blur: 30px;
--navbar-shadow: 0 4px 25px rgba(0, 173, 239, 0.15);
}
/* ===== NAVBAR LAYOUT ===== */
.navbar-container {
height: 100%;
max-width: 1400px;
margin: 0 auto;
padding: 0 1.5rem;
display: flex;
align-items: center;
justify-content: space-between;
gap: 2rem;
}
/* ===== BRAND SECTION ===== */
.navbar-brand {
display: flex;
align-items: center;
gap: 0.75rem;
text-decoration: none;
color: var(--nav-text-primary);
font-weight: 600;
transition: transform var(--transition-fast);
flex-shrink: 0;
}
.navbar-brand:hover {
transform: scale(1.02);
color: var(--mb-primary);
}
.navbar-brand .brand-icon {
width: 2rem;
height: 2rem;
color: var(--mb-primary);
transition: transform var(--transition-smooth);
}
.navbar-brand:hover .brand-icon {
transform: rotate(15deg);
}
.brand-text {
display: flex;
flex-direction: column;
line-height: 1.2;
}
.brand-title {
font-size: 1.1rem;
font-weight: 700;
color: var(--nav-text-primary);
}
.brand-subtitle {
font-size: 0.75rem;
color: var(--nav-text-secondary);
font-weight: 500;
}
/* ===== DESKTOP NAVIGATION ===== */
.navbar-nav {
display: none;
flex: 1;
justify-content: center;
align-items: center;
gap: 0.5rem;
background: rgba(0, 173, 239, 0.05);
border-radius: 1rem;
padding: 0.5rem;
backdrop-filter: blur(10px);
border: 1px solid rgba(0, 173, 239, 0.1);
}
@media (min-width: 1024px) {
.navbar-nav {
display: flex;
}
}
.nav-item {
display: flex;
align-items: center;
gap: 0.5rem;
padding: 0.5rem 0.75rem;
border-radius: 0.5rem;
color: var(--nav-text-secondary);
text-decoration: none;
font-size: 0.875rem;
font-weight: 500;
white-space: nowrap;
transition: all var(--transition-fast);
position: relative;
}
.nav-item:hover {
color: var(--nav-text-active);
background: var(--nav-item-hover);
transform: translateY(-1px);
}
.nav-item.active {
color: var(--nav-text-active);
background: var(--nav-item-active);
font-weight: 600;
}
.nav-item.active::after {
content: '';
position: absolute;
bottom: -0.25rem;
left: 50%;
transform: translateX(-50%);
width: 0.25rem;
height: 0.25rem;
background: var(--mb-primary);
border-radius: 50%;
}
.nav-item i {
font-size: 1rem;
width: 1.25rem;
height: 1.25rem;
display: flex;
align-items: center;
justify-content: center;
}
/* ===== NAVBAR ACTIONS (Rechte Seite) ===== */
.navbar-actions {
display: flex;
align-items: center;
gap: 0.75rem;
flex-shrink: 0;
}
.navbar-btn {
display: flex;
align-items: center;
justify-content: center;
width: 2.5rem;
height: 2.5rem;
border-radius: 0.75rem;
background: transparent;
border: 1px solid transparent;
color: var(--nav-text-secondary);
cursor: pointer;
transition: all var(--transition-fast);
position: relative;
}
.navbar-btn:hover {
background: var(--nav-item-hover);
color: var(--nav-text-active);
border-color: var(--navbar-border);
transform: scale(1.05);
}
.navbar-btn.has-notifications::after {
content: '';
position: absolute;
top: 0.25rem;
right: 0.25rem;
width: 0.5rem;
height: 0.5rem;
background: #dc3545;
border-radius: 50%;
border: 2px solid var(--navbar-bg);
}
/* ===== MOBILE MENU TOGGLE ===== */
.mobile-menu-toggle {
display: flex;
align-items: center;
justify-content: center;
width: 2.5rem;
height: 2.5rem;
border: none;
background: transparent;
color: var(--nav-text-primary);
cursor: pointer;
border-radius: 0.5rem;
transition: all var(--transition-fast);
}
.mobile-menu-toggle:hover {
background: var(--nav-item-hover);
color: var(--nav-text-active);
}
@media (min-width: 1024px) {
.mobile-menu-toggle {
display: none;
}
}
/* ===== MOBILE MENU ===== */
.mobile-menu {
position: fixed;
top: var(--navbar-height);
left: 0;
right: 0;
bottom: 0;
background: var(--navbar-bg);
backdrop-filter: blur(var(--navbar-blur));
-webkit-backdrop-filter: blur(var(--navbar-blur));
transform: translateX(-100%);
transition: transform var(--transition-smooth);
overflow-y: auto;
z-index: 999;
}
.mobile-menu.active {
transform: translateX(0);
}
.mobile-nav {
padding: 2rem 1.5rem;
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.mobile-nav-item {
display: flex;
align-items: center;
gap: 1rem;
padding: 1rem;
border-radius: 0.75rem;
color: var(--nav-text-secondary);
text-decoration: none;
font-size: 1rem;
font-weight: 500;
transition: all var(--transition-fast);
border: 1px solid transparent;
}
.mobile-nav-item:hover {
background: var(--nav-item-hover);
color: var(--nav-text-active);
border-color: var(--navbar-border);
}
.mobile-nav-item.active {
background: var(--nav-item-active);
color: var(--nav-text-active);
border-color: var(--mb-primary);
font-weight: 600;
}
.mobile-nav-item i {
font-size: 1.25rem;
width: 1.5rem;
height: 1.5rem;
display: flex;
align-items: center;
justify-content: center;
}
/* ===== DROPDOWN MENUS ===== */
.dropdown {
position: relative;
}
.dropdown-menu {
position: absolute;
top: calc(100% + 0.5rem);
right: 0;
min-width: 16rem;
background: var(--navbar-bg);
border: 1px solid var(--navbar-border);
border-radius: 0.75rem;
box-shadow: 0 8px 30px rgba(0, 173, 239, 0.15);
backdrop-filter: blur(20px);
-webkit-backdrop-filter: blur(20px);
opacity: 0;
visibility: hidden;
transform: translateY(-0.5rem);
transition: all var(--transition-fast);
z-index: 1001;
}
.dropdown.active .dropdown-menu {
opacity: 1;
visibility: visible;
transform: translateY(0);
}
.dropdown-header {
padding: 1rem;
border-bottom: 1px solid var(--navbar-border);
font-size: 0.875rem;
font-weight: 600;
color: var(--nav-text-primary);
}
.dropdown-item {
display: flex;
align-items: center;
gap: 0.75rem;
padding: 0.75rem 1rem;
color: var(--nav-text-secondary);
text-decoration: none;
font-size: 0.875rem;
transition: all var(--transition-fast);
}
.dropdown-item:hover {
background: var(--nav-item-hover);
color: var(--nav-text-active);
}
.dropdown-divider {
margin: 0.5rem 0;
border-top: 1px solid var(--navbar-border);
}
/* ===== USER AVATAR ===== */
.user-avatar {
width: 2.25rem;
height: 2.25rem;
border-radius: 50%;
background: linear-gradient(135deg, var(--mb-primary), #0086c3);
color: white;
display: flex;
align-items: center;
justify-content: center;
font-size: 0.875rem;
font-weight: 600;
cursor: pointer;
transition: all var(--transition-fast);
border: 2px solid transparent;
}
.user-avatar:hover {
transform: scale(1.05);
border-color: var(--mb-primary);
box-shadow: 0 4px 15px rgba(0, 173, 239, 0.3);
}
/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 768px) {
.navbar-container {
padding: 0 1rem;
gap: 1rem;
}
.brand-text {
display: none;
}
.navbar-actions {
gap: 0.5rem;
}
}
@media (max-width: 480px) {
.navbar-container {
padding: 0 0.75rem;
}
.navbar-actions .navbar-btn:not(.mobile-menu-toggle) {
display: none;
}
}
/* ===== ACCESSIBILITY ===== */
.navbar-btn:focus,
.nav-item:focus,
.mobile-nav-item:focus {
outline: 2px solid var(--mb-primary);
outline-offset: 2px;
}
/* ===== ANIMATIONS ===== */
@keyframes slideDown {
from {
opacity: 0;
transform: translateY(-1rem);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.navbar {
animation: slideDown 0.5s ease;
}
/* ===== PERFORMANCE OPTIMIZATIONS ===== */
.navbar * {
will-change: auto;
}
.navbar-brand:hover,
.nav-item:hover,
.navbar-btn:hover {
will-change: transform;
}
/* ===== PRINT STYLES ===== */
@media print {
.navbar {
display: none;
}
}