/* ==========================================================
   TEMPLATE OFERTA - COMPACT STICKY NAVIGATION
   ========================================================== */

/* Nawigacja podstrona - mniejsza i bardziej subtelna */
.nawigacja-podstorna {
    background: linear-gradient(135deg, 
        rgba(224, 7, 23, 0.95) 0%, 
        rgba(183, 32, 46, 0.98) 100%
    );
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    z-index: 999;
    position: sticky;
    top: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(224, 7, 23, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 20px !important; /* Zmniejszone z 15px */
}

/* Gdy główne menu jest static, sticky podmenu na samej górze */
body:not(.admin-bar) .nawigacja-podstorna {
    top: 0;
}

/* Dla użytkowników zalogowanych (admin bar) */
.admin-bar .nawigacja-podstorna {
    top: 32px;
}

@media screen and (max-width: 782px) {
    .admin-bar .nawigacja-podstorna {
        top: 46px;
    }
}

/* Mniejsze logo */
.nawigacja-podstorna img {
    width: 90px !important; /* Zmniejszone z 120px */
    transition: width 0.3s ease;
    filter: brightness(1.1);
}

@media (max-width: 768px) {
    .nawigacja-podstorna img {
        width: 75px !important; /* Zmniejszone z 100px */
    }
}

/* ==========================================================
   COMPACT NAVIGATION LINKS
   ========================================================== */

.nav-podstorna {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px; /* Zmniejszone z 10px */
}

.przy-nav-podstorna {
    color: rgba(255, 255, 255, 0.9) !important;
    text-decoration: none !important;
    padding: 6px 12px; /* Zmniejszone z 8px 15px */
    border-radius: 18px !important; /* Zmniejszone z 25px */
    font-size: 12px; /* Zmniejszone z 14px */
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px; /* Zmniejszone z 0.5px */
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Subtelny efekt hover */
.przy-nav-podstorna::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.1) 50%, 
        transparent 100%
    );
    transition: left 0.4s ease;
    z-index: -1;
}

.przy-nav-podstorna:hover::before {
    left: 100%;
}

.przy-nav-podstorna:hover {
    color: white !important;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

/* ==========================================================
   ACTIVE STATE INDICATOR - BARDZIEJ SUBTELNY
   ========================================================== */

.przy-nav-podstorna.active {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    color: white !important;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.15);
    position: relative;
}

/* Subtelny wskaźnik aktywnej sekcji - mała kropka */
.przy-nav-podstorna.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
    animation: pulseIndicator 2s infinite ease-in-out;
}

@keyframes pulseIndicator {
    0%, 100% {
        opacity: 1;
        transform: translateX(-50%) scale(1);
    }
    50% {
        opacity: 0.7;
        transform: translateX(-50%) scale(1.2);
    }
}

/* ==========================================================
   PROGRESS INDICATOR - POKAZUJE POSTĘP PRZECZYTANIA
   ========================================================== */

.scroll-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.6) 0%, 
        rgba(255, 255, 255, 0.9) 50%,
        rgba(255, 255, 255, 0.6) 100%
    );
    transition: width 0.1s ease;
    border-radius: 0 2px 0 0;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}

/* ==========================================================
   MOBILE RESPONSIVE - JESZCZE BARDZIEJ KOMPAKTOWE
   ========================================================== */

@media (max-width: 768px) {
    .nawigacja-podstorna {
        padding: 8px 15px !important; /* Zmniejszone z 10px */
        flex-direction: row; /* Pozostawiam w rzędzie */
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .nav-podstorna {
        flex-direction: row;
        justify-content: center;
        width: auto;
        flex-wrap: wrap;
        gap: 5px;
        margin-left: 10px;
    }
    
    .przy-nav-podstorna {
        padding: 4px 8px; /* Zmniejszone z 6px 12px */
        font-size: 10px; /* Zmniejszone z 12px */
        margin: 1px;
        border-radius: 12px !important;
        letter-spacing: 0.2px;
    }
    
    .przy-nav-podstorna.active::after {
        bottom: -6px;
        width: 3px;
        height: 3px;
    }
}

@media (max-width: 480px) {
    .nawigacja-podstorna {
        padding: 6px 10px !important;
    }
    
    .nav-podstorna {
        gap: 3px;
    }
    
    .przy-nav-podstorna {
        padding: 3px 6px;
        font-size: 9px;
        letter-spacing: 0.1px;
        border-radius: 10px !important;
    }
}

/* ==========================================================
   INTERSECTION OBSERVER ENHANCEMENT
   ========================================================== */

/* Sekcje z lepszą detekcją */
.section-in-view {
    transition: all 0.3s ease;
}

/* Highlight effect dla aktualnej sekcji - bardziej subtelny */
.section-highlight {
    position: relative;
}

.section-highlight::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(224, 7, 23, 0.03) 0%, 
        transparent 50%,
        rgba(224, 7, 23, 0.03) 100%
    );
    pointer-events: none;
    animation: subtleHighlight 1s ease-out;
    z-index: -1;
}

@keyframes subtleHighlight {
    0% {
        opacity: 0;
        transform: scale(1.01);
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: scale(1);
    }
}

/* ==========================================================
   ENTRY HEADER STYLES - ZACHOWUJĘ ISTNIEJĄCE
   ========================================================== */

.entry-header {
    background-color: #D9D9D9 !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    position: relative;
}

.entry-header .kreska-full {
    width: 100%;
    height: 3px;
    background-color: #E00717;
    margin: 15px 0;
    position: relative;
}

.entry-header .kreska-full::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.6) 0%, 
        rgba(255, 255, 255, 0.3) 50%, 
        transparent 100%
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { width: 0; left: 0; }
    50% { width: 100%; left: 0; }
    100% { width: 0; left: 100%; }
}

.entry-header p {
    color: #666;
    font-size: 14px;
    font-weight: 400;
    margin-bottom: 10px;
}

.entry-header .entry-title {
    color: #000;
    font-weight: 700;
    line-height: 1.2;
}

/* ==========================================================
   CONTENT ADJUSTMENTS
   ========================================================== */

#content {
    position: relative;
    background: #f8f9fa;
    min-height: 100vh;
}

.main-content {
    position: relative;
    z-index: 1;
}

/* ==========================================================
   ACCESSIBILITY & PERFORMANCE
   ========================================================== */

/* Focus states */
.przy-nav-podstorna:focus {
    outline: 2px solid rgba(255, 255, 255, 0.6);
    outline-offset: 2px;
    background: rgba(255, 255, 255, 0.15);
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .nawigacja-podstorna,
    .przy-nav-podstorna,
    .przy-nav-podstorna::before,
    .przy-nav-podstorna.active::after,
    .scroll-progress {
        transition: none;
        animation: none;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .przy-nav-podstorna {
        border-width: 2px;
        font-weight: 600;
    }
    
    .przy-nav-podstorna.active {
        border-width: 3px;
    }
    
    .nawigacja-podstorna {
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6);
    }
}

/* ==========================================================
   SCROLL BEHAVIOR
   ========================================================== */

html {
    scroll-behavior: smooth;
    scroll-padding-top: 70px; /* Dostosowane do mniejszego menu */
}

@media (max-width: 768px) {
    html {
        scroll-padding-top: 80px;
    }
}

/* ==========================================================
   HIDE ON SPECIFIC PAGES
   ========================================================== */

.home .nawigacja-podstorna {
    display: none !important;
}

.page-id-103 .nawigacja-podstorna {
    display: none !important;
}