/* =============================================
   EASYWAY - HEADER.CSS
   VERZIA: 8.3.0
   ============================================= */

:root {
    --primary-color: #1a2b6e;
    --primary-dark: #0d1a4d;
    --primary-light: #4a64d4;
    --primary-ultralight: #eef2ff;
    --secondary-color: #6c757d;
    --secondary-light: #f8f9fa;
    --success-color: #27ae60;
    --white: #ffffff;
    --radius-sm: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =============================================
   HLAVNÝ HEADER
   ============================================= */
.site-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    padding: 0;
    box-shadow: 0 6px 25px rgba(26, 43, 110, 0.25);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid var(--primary-light);
    min-height: 80px;
    width: 100%;
}

.site-header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
    height: 80px;
}

/* =============================================
   NAVIGAČNÉ OBALY
   ============================================= */
.nav-left, .nav-center {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

/* =============================================
   HLAVNÉ NAVIGAČNÉ ODKAZY (DESKTOP)
   ============================================= */
.nav-link {
    color: var(--white);
    text-decoration: none;
    padding: 15px 25px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-weight: 600;
    min-width: 120px;
    text-align: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 15px;
    white-space: nowrap;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.15);
}

/* 🔥 AKTÍVNY ODKAZ - GLOW EFEKT (DESKTOP) */
.nav-link.active {
    background: rgba(255, 255, 255, 0.28) !important;
    font-weight: 800 !important;
    border: 2px solid rgba(255, 255, 255, 0.8) !important;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.8),
                0 0 35px rgba(255, 255, 255, 0.5),
                0 0 50px rgba(255, 255, 255, 0.3),
                inset 0 0 15px rgba(255, 255, 255, 0.4) !important;
    position: relative;
    z-index: 10;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
    transform: scale(1.02);
    letter-spacing: 0.5px;
    cursor: default;
}

.nav-link.active:hover {
    transform: scale(1.02) !important;
    background: rgba(255, 255, 255, 0.28) !important;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.8),
                0 0 35px rgba(255, 255, 255, 0.5),
                0 0 50px rgba(255, 255, 255, 0.3),
                inset 0 0 15px rgba(255, 255, 255, 0.4) !important;
}

/* =============================================
   MOBILNÉ MENU - ODKAZY
   ============================================= */
.mobile-nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 20px;
    margin: 4px 0;
    color: var(--white);
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.mobile-nav-link:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.15);
}

/* 🔥 AKTÍVNY ODKAZ - GLOW EFEKT (MOBILNÉ) */
.mobile-nav-link.active {
    background: rgba(255, 255, 255, 0.28) !important;
    font-weight: 800 !important;
    border: 2px solid rgba(255, 255, 255, 0.8) !important;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.8),
                0 0 35px rgba(255, 255, 255, 0.5),
                0 0 50px rgba(255, 255, 255, 0.3),
                inset 0 0 15px rgba(255, 255, 255, 0.4) !important;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
    transform: scale(1.02);
    letter-spacing: 0.5px;
}

.mobile-nav-link.active .nav-icon {
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.8));
    transform: scale(1.05);
}

/* =============================================
   UŽÍVATEĽSKÉ INFORMÁCIE
   ============================================= */
.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: auto;
    padding-left: 20px;
}

.login-status {
    color: var(--white);
    font-size: 14px;
    background: rgba(255, 255, 255, 0.15);
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(12px);
    min-width: 220px;
    max-width: 280px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-status .user-name {
    display: block;
    font-weight: 700;
    font-size: 15px;
    color: white;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.login-status .user-details {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    flex-wrap: nowrap;
    white-space: nowrap;
    overflow: hidden;
}

.user-email {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

.email-separator {
    color: rgba(255, 255, 255, 0.6);
    font-weight: 600;
}

/* =============================================
   ROLE BADGE
   ============================================= */
.role-badge {
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    flex-shrink: 0;
}

.role-badge.super-admin { background: linear-gradient(135deg, #8a2be2, #6a1cb0); color: white; }
.role-badge.manager { background: linear-gradient(135deg, #ffd700, #ffc107); color: #1a2b6e; }
.role-badge.dopravca { background: linear-gradient(135deg, #c0c0c0, #a8a8a8); color: #1a2b6e; }
.role-badge.zamestnanec { background: linear-gradient(135deg, #27ae60, #1e8449); color: white; }
.role-badge.uzivatel { background: linear-gradient(135deg, #ff8c00, #e67e22); color: white; }

/* =============================================
   TLAČIDLÁ
   ============================================= */
.moja-zona-btn, .logout-btn {
    background: rgba(255, 255, 255, 0.18);
    color: var(--white);
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 120px;
    height: 40px;
    border: none;
    transition: var(--transition);
}

.moja-zona-btn:hover, .logout-btn:hover {
    background: rgba(255, 255, 255, 0.28);
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

/* 🔥 AKTÍVNE TLAČIDLO MOJA ZÓNA */
.moja-zona-btn.active {
    background: rgba(255, 255, 255, 0.22);
    font-weight: 700;
    box-shadow: 0 6px 18px rgba(255, 255, 255, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

/* =============================================
   LOGOUT INDIKÁTOR
   ============================================= */
.logout-indicator {
    width: 18px;
    height: 36px;
    background-color: var(--success-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
    position: relative;
}

.logout-indicator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
}

/* =============================================
   MOBILNÉ MENU - KONTEJNER
   ============================================= */
.mobile-menu {
    position: absolute;
    top: 80px;
    left: 0;
    right: 0;
    width: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    z-index: 999;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    border-bottom: 2px solid var(--primary-light);
}

.mobile-menu.active {
    max-height: 600px;
    overflow-y: auto;
}

.mobile-menu-content {
    display: flex;
    flex-direction: column;
    padding: 15px 20px 25px;
    gap: 8px;
}

.mobile-menu-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mobile-menu-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    margin: 15px 0 10px;
}

.mobile-menu-title {
    color: rgba(255, 255, 255, 0.6);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 10px 0 5px;
    padding-left: 5px;
}

.mobile-user-info {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mobile-login-status {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    padding: 12px;
    margin-bottom: 5px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.mobile-login-status .user-name {
    font-size: 15px;
    font-weight: 700;
    display: block;
    margin-bottom: 5px;
    color: white;
}

.mobile-login-status .user-details {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 11px;
    flex-wrap: wrap;
}

.mobile-btn {
    width: 100%;
    margin: 4px 0;
    padding: 12px;
    font-size: 14px;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--radius-sm);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.mobile-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.mobile-btn.active {
    background: rgba(255, 255, 255, 0.22);
    font-weight: 700;
    box-shadow: 0 6px 18px rgba(255, 255, 255, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.mobile-menu-overlay {
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    height: calc(100% - 80px);
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* =============================================
   SCROLLBAR PRE MOBILNÉ MENU
   ============================================= */
.mobile-menu::-webkit-scrollbar {
    width: 4px;
}

.mobile-menu::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.mobile-menu::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

/* =============================================
   HAMBURGER MENU TLAČIDLO
   ============================================= */
.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 32px;
    height: 24px;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 0;
    z-index: 1002;
    transition: var(--transition);
}

.hamburger-menu span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--white);
    border-radius: 3px;
    transition: var(--transition);
}

.hamburger-menu.active span:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
    transform: scale(0);
}

.hamburger-menu.active span:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
}

.mobile-logo {
    display: none;
    color: white;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 1px;
}

/* =============================================
   RESPONZÍVNE ŠTÝLY
   ============================================= */
@media (max-width: 1024px) {
    .site-header nav {
        padding: 0 20px;
        min-height: 70px;
    }
    .nav-link {
        padding: 10px 16px;
        font-size: 13px;
        min-width: 90px;
        height: 42px;
    }
    .login-status {
        min-width: 180px;
        padding: 8px 12px;
    }
    .moja-zona-btn, .logout-btn {
        padding: 8px 14px;
        min-width: 100px;
        font-size: 12px;
        height: 36px;
    }
}

@media (max-width: 900px) {
    .nav-left {
        display: none;
    }
    .site-header > nav > .user-info {
        display: none;
    }
    .hamburger-menu {
        display: flex;
    }
    .mobile-logo {
        display: block;
    }
    .site-header nav {
        justify-content: space-between;
        min-height: 70px;
    }
}

@media (max-width: 768px) {
    .nav-left, .nav-center {
        flex-wrap: wrap;
        justify-content: center;
    }
    .nav-link {
        flex: 1;
        min-width: auto;
        margin: 3px;
        padding: 10px 12px;
    }
    .user-info {
        flex-wrap: wrap;
        justify-content: center;
    }
    .login-status {
        min-width: 100%;
        text-align: center;
        margin-bottom: 10px;
    }
    .mobile-menu {
        top: 70px;
    }
    .mobile-menu-overlay {
        top: 70px;
        height: calc(100% - 70px);
    }
}

@media (max-width: 600px) {
    .site-header nav {
        min-height: 60px;
        padding: 0 15px;
    }
    .mobile-logo {
        font-size: 16px;
    }
    .hamburger-menu {
        width: 28px;
        height: 20px;
    }
    .mobile-menu {
        top: 60px;
    }
    .mobile-menu-overlay {
        top: 60px;
        height: calc(100% - 60px);
    }
    .mobile-menu-content {
        padding: 12px 15px 20px;
    }
    .mobile-nav-link {
        padding: 12px 16px;
        font-size: 14px;
    }
    .nav-link {
        width: 100%;
        margin: 4px 0;
    }
    .moja-zona-btn, .logout-btn {
        width: 100%;
        margin-bottom: 8px;
    }
}

@media (max-width: 390px) {
    .site-header nav {
        min-height: 55px;
    }
    .mobile-logo {
        font-size: 15px;
    }
    .hamburger-menu {
        width: 25px;
        height: 18px;
    }
    .mobile-menu {
        top: 55px;
    }
    .mobile-menu-overlay {
        top: 55px;
        height: calc(100% - 55px);
    }
    .mobile-nav-link {
        padding: 10px 14px;
        font-size: 13px;
    }
}

/* =============================================
   TLAČ (PRINT)
   ============================================= */
@media print {
    .site-header, #header-container, .moja-zona-btn, .logout-btn, .logout-indicator {
        display: none !important;
    }
}

/* =============================================
   VYSOKÝ KONTRAST (HIGH CONTRAST)
   ============================================= */
@media (prefers-contrast: high) {
    .site-header {
        background: var(--primary-color);
        border: 2px solid black;
    }
    .nav-link, .moja-zona-btn, .logout-btn {
        border: 2px solid white;
    }
    .login-status {
        border: 2px solid white;
    }
}