/* Header */

header {
    display: flex;
    align-items: center;
    justify-content: center;

    position: fixed;
    top: 0;
    width: 100%;
    height: 82px;
    z-index: 1000;

    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(89, 221, 15, 0.25);
    box-shadow: 0 12px 35px rgba(0,0,0,0.45);
    user-select: none;
    transition: 
        height 0.35s ease,
        background 0.35s ease,
        box-shadow 0.35s ease,
        backdrop-filter 0.35s ease;
}

header::after {
    display: none;
}

.logo img {
    flex-shrink: 0;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    margin: 5px 0 7px 23px;
}

.logo.has-user .logo-link {
    margin: 0;
    margin-left: 5px;
}

.logo-text {
    display: flex;
    flex-direction: column;  /* texty pod sebe */
    justify-content: center; /* vycentrovat k ikoně */
    margin-left: 10px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-right: 55px;
}

#nadpis_u_loga {
    font-size: 17px;
    font-weight: 650;
    letter-spacing: 0.3px;
    color: rgba(255,255,255,0.88);
}

.logo.has-user #nadpis_u_loga {
    padding-top: 0;
}

.user-name {
    font-size: 14px;
    color: #ddd;
    text-decoration: none;
}

.user-name:hover{
    text-decoration: underline;
}

.user-name strong {
    color: #e2dfdb;
}

.user-name strong i {
    margin-left: 2px;
}

.nav-avatar-main {
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(89,221,15,.6);
    box-shadow: 0 0 12px rgba(89,221,15,.35);
}

.menu-icons {
    display: none;
    color: #e2dfdb;
    cursor: pointer;
    z-index: 500;
    position: relative;
}

.rotate-icon {
    transition: transform 0.4s ease;
    /* Přidání transition pro transform */
    transform: rotate(90deg);
    /* Počáteční rotace 90 stupňů */
}

.rotate-icon.fa-bars {
    transform: rotate(0deg);
    /* Pokud má třídu fa-bars, rotace bude 0 stupňů */
}

/* Desktop navigace */

nav#mainNav {
    display: flex;
}

nav#mainNav ul {
    display: flex;
    list-style: none;
    gap: 30px;
    padding: 0;
    margin: 0;
}

nav#mainNav ul li a {
    position: relative;
    color: rgba(255,255,255,0.82);
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-decoration: none;

    padding: 10px 14px;
    border-radius: 999px;

    transition: 
        background 0.25s ease,
        color 0.25s ease,
        transform 0.25s ease;
    
    will-change: transform;
}

nav#mainNav ul li a:hover {
    background: rgba(89,221,15,0.10);
    color: #fff;
    transform: translateY(-1px);
}

nav#mainNav ul li a::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 6px;
    width: 0%;
    height: 2px;
    background: #59dd0f;
    border-radius: 99px;
    transition: 0.3s ease;
    transform: translateX(-50%);
}

nav#mainNav ul li a:hover::after {
    width: 55%;
}

nav#mainNav ul li a i {
    display: none !important;
}

/* Aktivní odkaz */

nav#mainNav ul li a.current-section {
    background: rgba(89,221,15,0.16);
    color: #59dd0f;
}

nav#mainNav ul li a.current-section::after {
    width: 55%;
}

/* Mobilní verze */
@media (max-width: 1036px) {
    .logo {
        flex-grow: 1;
    }
    .logo.has-user {
        margin-left: 18px;
    }
    .menu-icons {
        display: block;
        font-size: 23px;
        margin-right: 20px;
    }
    nav#mainNav {
        position: fixed;
        top: 82px;
        left: -315px;
        width: 300px;
        height: 100vh;
        background: #000000e0;
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.9);
        transition: left 0.3s cubic-bezier(0.77, 0, 0.175, 1);
        padding-top: 100px;
        z-index: 1400;
        border-top-right-radius: 14px;
        border-bottom-right-radius: 14px;
        overflow-y: auto;
    }
    header.shrink nav#mainNav {
        top: 68px; /* když header shrinkne */
    }
    nav#mainNav.open {
        left: 0;
    }
    nav#mainNav ul {
        flex-direction: column;
        padding-left: 25px;
        gap: 32px;
    }
    nav#mainNav ul li a {
        font-size: 19px;
        font-weight: 600;
        color: rgba(180, 255, 140, 0.85);
        display: flex;
        align-items: center;
        gap: 18px;
        padding: 12px 18px;
        border-radius: 10px;
        transition: background-color 0.3s ease, color 0.3s ease;
    }
    nav#mainNav ul li a:hover {
        background: rgba(89, 221, 15, 0.15);
        color: #d9f4c8;
    }
    nav#mainNav ul li a i {
        display: inline !important;
    }  
    nav#mainNav ul li a.current-section {
        background: rgba(89, 221, 15, 0.15);
        color: #59dd0f; 
        font-weight: 600;
        border-radius: 10px;
    }
    /* Aby tam nebyl podtržený efekt (pseudo-element ::after) */
    nav#mainNav ul li a.current-section::after {
        width: 0 !important;
        display: none;
    }
}


/*Běžící lišta*/

.news-ticker {
    position: fixed;
    top: 82px;
    width: 100%;
    height: 34px;
    display: flex;
    align-items: center;
    overflow: hidden;
    /* napojený gradient */
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0.72),
        rgba(0,0,0,0.35)
    );
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    z-index: 900;
    transition: 
        top 0.35s ease,
        height 0.35s ease,
        background 0.35s ease;
    }
}

.news-ticker::before,
.news-ticker::after {
    content: "";
    position: absolute;
    top: 0;
    width: 80px;
    height: 100%;
    z-index: 5;
    pointer-events: none;
}

.news-ticker::before {
    left: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.9), transparent);
}
header.shrink {
    height: 64px;
    background: rgba(0,0,0,0.82);
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}
.news-ticker.shrink {
    top: 64px;
    height: 28px;
    font-size: 14px;
    opacity: 0.92;
}
header.shrink .logo img {
    width: 42px;
    height: 42px;
    transition: 0.35s ease;
}

header.shrink #nadpis_u_loga {
    font-size: 15px;
}
.news-ticker.shrink {
    top: 64px;
}
.news-ticker::after {
    right: 0;
    background: linear-gradient(to left, rgba(0,0,0,0.9), transparent);
}

.news-ticker-inner {
    white-space: nowrap;
    padding-left: 100%;

    animation: scroll-left 30s linear infinite;

    font-size: 14.5px;
    font-weight: 500;
    color: rgba(255,255,255,0.75);
    letter-spacing: 0.4px;
}

.news-ticker span {
    display: inline-block;
    padding-right: 100%;
}

@keyframes scroll-left {
    0% {
        transform: translateX(0%);
    }
    100% {
        transform: translateX(-100%);
    }
}
