/* ========================================
   NAGŁÓWEK - Pearl Theme
   ======================================== */

:root {
    --header-logo-width: clamp(190px, 22vw, 300px);
    --header-logo-width-mobile: clamp(160px, 36vw, 220px);
}

/* ===== GŁÓWNY KONTENER NAGŁÓWKA ===== */
.site-header-pearl {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--gray-200);
    transition: all var(--transition-base);
}

    .site-header-pearl.scrolled {
        box-shadow: var(--shadow-md);
    }

/* ===== WEWNĘTRZNY KONTENER ===== */
.header-container-pearl {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    width: 100%;
    min-height: 72px;
    padding: 1rem 1.25rem;
}

/* ===== LOGO FIRMY ===== */
.brand-pearl {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: opacity var(--transition-base);
}

    .brand-pearl:hover {
        opacity: 0.8;
    }

html[data-theme="pearl"] .site-header-pearl .brand-logo-pearl {
    width: var(--header-logo-width) !important;
    max-width: var(--header-logo-width) !important;
    height: auto !important;
    max-height: none !important;
    object-fit: contain;
    flex-shrink: 0;
}

/* ===== NAWIGACJA DESKTOP ===== */
.nav-desktop-pearl {
    display: flex;
    align-items: center;
    gap: 2rem;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    justify-content: center;
    white-space: nowrap;
}

/* ===== LINKI NAWIGACYJNE ===== */
.nav-link-pearl {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.5rem 0;
    transition: color var(--transition-base);
}

    .nav-link-pearl::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 0;
        height: 2px;
        background: var(--gradient-brand);
        transition: width var(--transition-base);
    }

    .nav-link-pearl:hover,
    .nav-link-pearl.active {
        color: var(--brand-green);
    }

        .nav-link-pearl:hover::after,
        .nav-link-pearl.active::after {
            width: 100%;
        }

/* ===== AKCJE W NAGŁÓWKU ===== */
.header-actions-pearl {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
}

/* ===== PRZYCISK STREFA KLIENTA ===== */
.btn-client-zone-pearl {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--brand-green);
    background: var(--gradient-brand-soft);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
}

    .btn-client-zone-pearl:hover {
        background: linear-gradient(135deg, rgba(164, 214, 94, 0.15), rgba(102, 217, 239, 0.15));
        transform: translateY(-2px);
    }

.btn-text-desktop {
    display: inline;
}

/* ===== PRZYCISK MENU MOBILNE ===== */
.mobile-menu-toggle-pearl {
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-base);
}

    .mobile-menu-toggle-pearl:hover {
        color: var(--brand-green);
    }

/* ===== OVERLAY MOBILNE ===== */
.mobile-overlay-pearl {
    position: fixed;
    top: 73px;
    left: 0;
    width: 100%;
    height: calc(100vh - 73px);
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ===== MENU MOBILNE ===== */
.nav-mobile-pearl {
    position: fixed;
    top: 73px;
    right: 0; /* zawsze przy prawej krawędzi */
    width: 300px;
    max-width: 80%;
    height: calc(100vh - 73px);
    background: white;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
    transform: translateX(100%); /* chowane przez transform, nie right */
    transition: transform var(--transition-base); /* animujemy transform, nie right */
    overflow-y: auto;
    z-index: 999;
}

    .nav-mobile-pearl.open {
        transform: translateX(0); /* wysunięte */
    }

/* ===== NAGŁÓWEK MENU MOBILNEGO ===== */
.mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.mobile-nav-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.mobile-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-base);
}

    .mobile-close-btn:hover {
        color: var(--brand-green);
    }

/* ===== TREŚĆ MENU MOBILNEGO ===== */
.mobile-nav-content {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    gap: 0.5rem;
}

    .mobile-nav-content .nav-link-pearl {
        padding: 1rem;
        border-radius: var(--radius-md);
        font-size: 1.0625rem;
    }

        .mobile-nav-content .nav-link-pearl::after {
            display: none;
        }

        .mobile-nav-content .nav-link-pearl:hover,
        .mobile-nav-content .nav-link-pearl.active {
            background: var(--gradient-brand-soft);
        }

.mobile-nav-divider {
    height: 1px;
    background: var(--gray-200);
    margin: 1rem 0;
}

.nav-mobile-highlight {
    background: var(--gradient-brand-soft);
    border: 2px solid var(--brand-green);
}

/* ===== RESPONSYWNOŚĆ ===== */
@media (max-width: 992px) {
    .nav-desktop-pearl {
        display: none;
    }

    .btn-client-zone-pearl .btn-text-desktop {
        display: none;
    }

    .mobile-menu-toggle-pearl {
        display: flex;
    }
}

@media (max-width: 768px) {
    .header-container-pearl {
        padding: 0.875rem 1rem;
    }

    html[data-theme="pearl"] .site-header-pearl .brand-logo-pearl {
        width: var(--header-logo-width-mobile) !important;
        max-width: var(--header-logo-width-mobile) !important;
        height: auto !important;
    }

    .nav-mobile-pearl {
        width: 280px;
    }
}

@media (max-width: 480px) {
    .header-container-pearl {
        padding: 0.75rem 0.875rem;
    }

    html[data-theme="pearl"] .site-header-pearl .brand-logo-pearl {
        width: clamp(145px, 44vw, 190px) !important;
        max-width: clamp(145px, 44vw, 190px) !important;
        height: auto !important;
    }

    .nav-mobile-pearl {
        width: 100%;
        max-width: 100%;
    }
}
