/* PX Sticky Header Extension Styles */

.px-sticky-header {
    position: fixed;
    top: 0;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100%;
    margin-top: 0;
    z-index: 999;
    transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1) !important;
    will-change: width, margin-top, border-radius, background-color, transform, border;
    border: 1px solid transparent;

    /* Default variables (fallback) */
    --px-header-bg: rgba(0, 0, 0, 0.8);
    --px-header-height: auto;
    --px-header-width: 90%;
    --px-header-margin-top: 20px;
    --px-header-radius: 16px;
    --px-header-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    --px-logo-scale: 100;
}

/* "Scrolled" state - Capsule */
.px-sticky-header.px-header-scrolled {
    background-color: var(--px-header-bg) !important;
    min-height: var(--px-header-height) !important;
    width: var(--px-header-width) !important;
    margin-top: var(--px-header-margin-top) !important;
    border-radius: var(--px-header-radius) !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
    box-shadow: var(--px-header-shadow) !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Scaling logo inside header */
.px-sticky-header img,
.px-sticky-header .elementor-widget-image img,
.px-sticky-header .site-logo img {
    transform: scale(1);
    filter: none;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1), filter 0.7s cubic-bezier(0.4, 0, 0.2, 1) !important;
    will-change: transform, filter;
}

/* Skalowanie logo w stanie Scrolled */
.px-sticky-header.px-header-scrolled img,
.px-sticky-header.px-header-scrolled .elementor-widget-image img,
.px-sticky-header.px-header-scrolled .site-logo img {
    transform: scale(calc(var(--px-logo-scale) / 100));
}

/* Smooth text color transition in Scrolled state */
.px-sticky-header.px-header-scrolled {
    --px-scrolled-safe-color: var(--px-scrolled-text-color, #ffffff);
}

/* Aplikacja koloru - TYLKO gdy element nie jest Hover ani Active */
.px-sticky-header.px-header-scrolled .elementor-nav-menu .elementor-item:not(:hover):not(.elementor-item-active),
.px-sticky-header.px-header-scrolled .e-n-menu-title:not(:hover):not(.e-current) .e-n-menu-title-text,
.px-sticky-header.px-header-scrolled .e-n-menu-title:not(:hover):not(.e-current) .e-n-menu-icon,
.px-sticky-header.px-header-scrolled .elementor-heading-title:not(:hover),
.px-sticky-header.px-header-scrolled .elementor-icon-list-item:not(:hover) .elementor-icon-list-text,
.px-sticky-header.px-header-scrolled .elementor-icon-list-item:not(:hover) .elementor-icon-list-icon,
.px-sticky-header.px-header-scrolled a:not(.elementor-button):not(:hover),
.px-sticky-header.px-header-scrolled p:not(:hover) {
    color: var(--px-scrolled-safe-color) !important;
    transition: color 0.4s ease !important;
}

/* FIX: Wymuszenie dziedziczenia koloru na hover/active */
.px-sticky-header.px-header-scrolled .e-n-menu-title:hover .e-n-menu-title-text,
.px-sticky-header.px-header-scrolled .e-n-menu-title.e-current .e-n-menu-title-text,
.px-sticky-header.px-header-scrolled .e-n-menu-title:hover .e-n-menu-icon,
.px-sticky-header.px-header-scrolled .elementor-nav-menu .elementor-item:hover,
.px-sticky-header.px-header-scrolled .elementor-nav-menu .elementor-item.elementor-item-active {
    color: inherit !important;
}

/* Disable effect on mobile devices (< 768px) */
@media (max-width: 767px) {
    .px-sticky-header.px-disable-mobile {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        transform: none !important;
        width: 100% !important;
        margin-top: 0 !important;
        transition: none !important;
        box-shadow: none !important;
    }
}

/* Disable effect on tablets and smartphones (< 1025px) */
@media (max-width: 1024px) {
    .px-sticky-header.px-disable-tablet {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        transform: none !important;
        width: 100% !important;
        margin-top: 0 !important;
        transition: none !important;
        box-shadow: none !important;
    }
}