/* =====================================================
   FINAL PERFECT HEADER — CLEAN, MERGED, NO DUPLICATES
===================================================== */

/* ===============================
   HEADER
=============================== */

.header {
    position: sticky;
    top: 0;
    z-index: 2000;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* NAV WRAPPER */
.nav {
    height: 72px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    overflow: visible;
    padding: 0 10px;
}

.logo {
    display: flex;
    align-items: center;
    margin-right: 20px;
}

.logo__img {
    height: 60px;
    width: auto;
    display: block;
}

@media (max-width: 768px) {
    .logo__img {
        height: 34px;
    }
}

/* ===============================
   MENU DESKTOP
=============================== */

.nav-menu {
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    position: relative;
    z-index: 1000;
}

.nav-menu::-webkit-scrollbar {
    display: none;
}

.nav-menu a {
    font-size: 14.5px;
    font-weight: 600;
    padding: 4px 3px;
    color: #111827;
    transition: 0.25s;
}

.nav-menu a:hover {
    color: #0066ff;
}

.nav-highlight {
    background: rgba(0, 102, 255, 0.12);
    padding: 6px 10px;
    border-radius: 6px;
    font-weight: 700;
    color: #0066ff !important;
}

.btn-blue {
    background: #0066ff;
    color: #fff !important;
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
}

/* ===============================
   USER DROPDOWN DESKTOP
=============================== */

.user-menu {
    margin-left: 12px;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 5000;
}

.user-dropdown {
    position: relative;
}

.user-btn {
    background: #0066ff;
    color: white;
    padding: 7px 14px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
}

.user-dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 46px;
    background: white;
    min-width: 160px;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    overflow: hidden;
    z-index: 99999;
}

.user-dropdown-content a {
    display: block;
    padding: 10px 12px;
    font-size: 14px;
    color: #222;
    text-decoration: none;
}

.user-dropdown-content a:hover {
    background: #eef4ff;
}

.logout {
    color: #e63939 !important;
    font-weight: 700;
}

/* HOVER ONLY ON DESKTOP */
@media (min-width: 961px) {
    .user-dropdown:hover .user-dropdown-content {
        display: block;
    }
}

/* ===============================
   HAMBURGER
=============================== */

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    z-index: 3001;
    position: relative;
}

.nav-toggle span {
    width: 24px;
    height: 3px;
    background: #111;
    border-radius: 4px;
    transition: 0.3s;
}

.nav-toggle.open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.nav-toggle.open span:nth-child(2) {
    opacity: 0;
}
.nav-toggle.open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ===============================
   MOBILE MENU
=============================== */

@media (max-width: 960px) {

    .logo__img {
        height: 52px;
    }

    .user-menu {
        display: none !important;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 72px;
        width: 100%;
        left: 0;
        background: white;
        flex-direction: column;
        transform: translateY(-150%);
        opacity: 0;
        pointer-events: none;
        padding: 18px 24px;
        gap: 8px;
        transition: 0.45s ease;
        box-shadow: 0 8px 22px rgba(0, 0, 0, 0.15);
        overflow-x: hidden !important;
        overflow-y: auto !important;
        z-index: 4000;
    }

    .nav-menu.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .nav-menu a {
        width: 100%;
        padding: 12px 0;
        border-bottom: 1px solid #eee;
        font-size: 18px;
    }

    .nav-highlight,
    .btn-blue {
        width: 100%;
        text-align: center;
        padding: 14px 0;
    }
}

/* ===============================
   DESKTOP FIX – KLikalność
=============================== */

@media (min-width: 961px) {

    .nav-menu {
        overflow-x: visible !important;
        pointer-events: auto;
    }

    .nav-toggle {
        position: relative;
        z-index: 5000;
        pointer-events: auto;
    }
}

/* MOBILE ONLY LINKS */
.mobile-only {
    display: none;
}
@media (max-width: 960px) {
    .mobile-only {
        display: block;
    }
}
.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-gray {
    padding: 7px 14px;
    background: #f3f4f6;
    border-radius: 8px;
    color: #111;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.btn-gray:hover {
    background: #e5e7eb;
}

.btn-red {
    padding: 7px 14px;
    border-radius: 8px;
    background: #e63939;
    color: white !important;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
}

.btn-red:hover {
    background: #cc2e2e;
}
