/* ============================================================
   SOLÁRIA ROSE — Header / Navigation 2026
   ============================================================ */

header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

header.glass-header {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 clamp(1.25rem, 4vw, 3rem);
    height: 72px;
    z-index: 9999;
    background: rgba(250, 248, 244, 0.92);
    backdrop-filter: blur(18px) saturate(180%);
    -webkit-backdrop-filter: blur(18px) saturate(180%);
    border-bottom: 1px solid rgba(44, 34, 24, 0.08);
    box-shadow: 0 1px 8px rgba(44,34,24,0.06);
    transition: background var(--transition-normal), box-shadow var(--transition-normal);
    margin: 0;
    border-radius: 0;
    overflow: visible;
}
header.glass-header::before { content: none; }
header.glass-header > * { position: relative; z-index: 1; }

header.glass-header.scrolled {
    background: rgba(250, 248, 244, 0.97);
    box-shadow: 0 2px 20px rgba(44,34,24,0.09);
}

/* ── Logo ── */
.hlavicka_vlevo h1 a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.6rem;
    transition: color var(--transition-fast);
    letter-spacing: -0.02em;
}
.hlavicka_vlevo h1 a:hover { color: var(--accent); }

/* ── Desktop nav links ── */
nav.hlavicka-vpravo {
    display: flex;
    gap: 2px;
    align-items: center;
}
nav.hlavicka-vpravo a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.92rem;
    transition: color var(--transition-fast), background var(--transition-fast);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
}
nav.hlavicka-vpravo a:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
    text-decoration: none;
}
/* ── Pozdrav „Ahoj, …" ──
   Dřív se pozdrav vešel do CTA pilulky #call_to_action_button, která má
   `overflow: hidden`. To ve flexovém řádku sráží min-width na 0, takže text
   klesl pod svou šířku a ořízl se uprostřed písmena — bez tří teček a bez
   možnosti si zbytek přečíst. Pozdrav má proto vlastní třídu s pevnou spodní
   hranicí, výpustkem a `flex-shrink: 0` na obalu.

   Selektor `nav.hlavicka-vpravo a.profile-greeting` tu byl dřív taky, jenže
   pozdrav je v `div.hlavicka_vpravo`, ne v `nav` — nikdy se neuplatnil. */
.profile-greeting {
    display: inline-block;
    max-width: 18ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 10px 20px;
    border-radius: var(--radius-pill);
    background: var(--accent);
    color: #fff !important;
    text-decoration: none !important;
    font-weight: 700;
    font-size: 0.88rem;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 14px rgba(184,135,107,0.32);
    transition: background var(--transition-fast), transform var(--transition-fast);
}
.profile-greeting:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
}

/* ── Register button ── */
.btn-register {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-register:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

/* ── Profil + odhlášení (vedle sebe) ── */
.profile-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
/* Hlavička je flex se `space-between`; bez tohohle se pravý blok smrskával
   dřív než logo a pozdrav se ořezával. */
.hlavicka_vpravo {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
}
.btn-register { text-decoration: none; white-space: nowrap; }

.logout-form { display: inline-flex; }

.logout-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    border-radius: 50%;
    cursor: pointer;
    padding: 0;
    transition: all var(--transition-fast);
}
.logout-icon-btn svg { width: 18px; height: 18px; pointer-events: none; }
.logout-icon-btn:hover {
    border-color: var(--accent);
    color: var(--accent-dark);
    background: var(--accent-subtle);
}

.profile-row-mobile {
    padding: 12px 10px;
    border-bottom: 1px solid var(--glass-border);
}
.profile-row-mobile .profile-greeting {
    flex: 1;
    max-width: none;
    text-align: center;
}

.auth-row-mobile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 10px;
}
.auth-row-mobile a {
    flex: 1;
    text-align: center;
}

.btn-register-mobile {
    display: block;
    padding: 12px;
    text-align: center;
    border: 1px solid var(--accent);
    color: var(--accent);
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
}

.odhlasit-btn:hover {
    border-color: var(--accent);
    color: var(--accent-dark);
    background: var(--accent-subtle);
}

/* ── CTA Call button ── */
#call_to_action_button {
    padding: 10px 24px;
    border-radius: var(--radius-pill);
    background: var(--accent);
    color: #fff !important;
    text-decoration: none !important;
    font-weight: 700;
    font-size: 0.88rem;
    letter-spacing: 0.04em;
    border: none;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: 0 4px 14px rgba(184,135,107,0.32);
    white-space: nowrap;
    position: relative;
    /* `overflow: hidden` tu bylo kvůli dávno smazanému ::before efektu, ale
       ve flexové hlavičce srazilo min-width na 0 — tlačítko se pak smrsklo
       pod šířku textu a oříznulo ho. */
    flex: 0 0 auto;
}
#call_to_action_button::before { content: none; }
#call_to_action_button:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(184,135,107,0.42);
}
#call_to_action_button span { position: relative; z-index: 1; }

/* ── Hamburger ── */
.hamburger {
    display: none !important;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 0;
    color: var(--text-primary);
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: color var(--transition-fast), background var(--transition-fast);
    line-height: 1;
}
.hamburger svg { width: 26px; height: 26px; }
.hamburger:hover {
    color: var(--accent);
    background: var(--bg-secondary);
}

/* ── Sidebar close button ── */
.sidebar-close-btn {
    align-self: flex-end;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 0;
    color: var(--text-primary);
    cursor: pointer;
    padding: 4px;
    position: absolute;
    top: 20px;
    right: 20px;
    transition: color var(--transition-fast);
}
.sidebar-close-btn svg { width: 24px; height: 24px; }
.sidebar-close-btn:hover { color: var(--accent); }

/* ── Sidebar (mobile) ── */
.sidebar {
    position: fixed;
    top: 0;
    right: -320px !important;
    width: 300px;
    height: 100vh;
    background: var(--bg-card);
    color: var(--text-primary);
    z-index: 99999;
    padding: 48px 24px 32px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
    border-left: 1px solid var(--glass-border);
    box-shadow: -8px 0 40px rgba(44,34,24,0.12);
    transition: right 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}
.sidebar.open { right: 0 !important; }
.sidebar a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    padding: 12px 10px;
    border-bottom: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    transition: color var(--transition-fast), padding-left var(--transition-fast), background var(--transition-fast);
    display: block;
}
.sidebar a:hover {
    color: var(--accent-dark);
    padding-left: 18px;
    background: var(--bg-secondary);
    text-decoration: none;
}
.sidebar-close {
    align-self: flex-end;
    background: transparent;
    border: 0;
    font-size: 1.8rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color var(--transition-fast);
    line-height: 1;
}
.sidebar-close:hover { color: var(--text-primary); }

/* ── Mobile call ── */
.mobile-call-wrapper { margin-top: auto; padding-top: 24px; }
#mobile-call {
    display: block;
    text-align: center;
    background: var(--accent);
    color: #fff;
    padding: 14px 28px;
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none !important;
    box-shadow: 0 4px 14px rgba(184,135,107,0.30);
    transition: background var(--transition-fast), transform var(--transition-fast);
}
#mobile-call:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
}

/* ── Mobile nav .nav buttons ── */
.mobile-nav { display: flex; flex-direction: column; gap: 0; }
.mobile-nav .odhlasit-btn {
    margin-top: 4px;
    width: 100%;
    text-align: left;
    border-radius: var(--radius-sm);
}

/* ── Responsive breakpoint ── */
@media (max-width: 1024px) {
    nav.hlavicka-vpravo,
    .hlavicka_vpravo.desktop-only,
    #call_to_action_button {
        display: none !important;
    }
    .desktop-only {
        display: none !important;
    }
    .hamburger {
        display: block !important;
    }
    header.glass-header { padding: 0 20px; }
}


/* ============================================================
   NOVÁ ÉRA – tmavá hlavička a boční menu (všude, i nad světlým účtem)
   Proměnné jsou přepsané jen uvnitř hlavičky a menu.
   ============================================================ */
header.glass-header,
.sidebar {
    --text-primary:   #f6e3e3;
    --text-secondary: #d9bcbc;
    --text-muted:     #c9a9a9;
    --bg-secondary:   rgba(255, 42, 77, .16);
    --bg-card:        #160c0c;
    --accent-subtle:  rgba(255, 42, 77, .16);
    --accent-dark:    #ff2a4d;
}
header.glass-header,
header.glass-header.scrolled {
    background: rgba(22, 12, 12, 0.92);
    border-bottom: 1px solid rgba(255, 42, 77, .30);
    box-shadow: 0 6px 24px rgba(0, 0, 0, .45);
}
nav.hlavicka-vpravo a,
.sidebar a,
.profile-greeting,
.btn-register,
#call_to_action_button,
#mobile-call {
    font-family: "Oswald", sans-serif;
    text-transform: uppercase;
    letter-spacing: .1em;
}
nav.hlavicka-vpravo a:hover { color: #fff; }
.btn-register { border-color: rgba(255, 42, 77, .5); }
#call_to_action_button, .profile-greeting, #mobile-call {
    background: linear-gradient(135deg, #c8102e, #ff2a4d);
}
.sidebar { border-left: 1px solid rgba(255, 42, 77, .3); }
header.glass-header img { background: transparent; }
