/* --- HEADER & NAVIGATION --- */

/*
 * WordPress generates header styles with high specificity via inline block markup.
 * Prefixing with `header.wp-block-template-part` gives us enough specificity
 * to override them without !important.
 */

header.wp-block-template-part {
    position: sticky;
    top: 0;
    z-index: 9999;
    background: rgba(250, 249, 246, 0.95); /* Linen White */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 2px solid var(--color-moss);
    padding: 10px 20px;
}

header.wp-block-template-part > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

header.wp-block-template-part .wp-block-site-title a {
    font-weight: 900;
    text-transform: uppercase;
    color: var(--wp--preset--color--contrast);
    text-decoration: none;
    line-height: 1.1;
    font-size: clamp(16px, 5vw, 24px);
    letter-spacing: -0.02em;
}

/* Action deck (shortcode [wyraj_actions]) */
.klgw-action-deck {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wyraj-btn {
    font-family: var(--wp--preset--font-family--primary);
    font-size: 11px;
    font-weight: 800;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    white-space: nowrap;
    text-transform: uppercase;
    transition: filter 0.2s;
}

.wyraj-btn:hover        { filter: brightness(1.1); }
.wyraj-btn:focus-visible {
    outline: 2px solid var(--wp--preset--color--veles);
    outline-offset: 3px;
}

.wyraj-btn-primary {
    background: var(--wp--preset--color--veles);
    color: #fff;
}

.wyraj-btn-secondary {
    background: #fff;
    border: 1px solid var(--color-border);
    color: var(--color-text-mid);
}

@media (max-width: 850px) {
    header.wp-block-template-part > div { justify-content: center; }
    header.wp-block-template-part .wp-block-site-title { width: 100%; text-align: center; }
    .klgw-action-deck { width: 100%; justify-content: center; }
    .wyraj-btn { flex-grow: 1; text-align: center; }
}

/* ==========================================================================
   2-TIER PROFESSIONAL HEADER (BRAND ROW + HORIZONTAL NAV BAR)
   ========================================================================== */
.wyraj-topbar {
    padding: 0 !important;
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border-bottom: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    position: sticky;
    top: 0;
    z-index: 999;
}

/* 1. Górny rząd: Logo po lewej, szybkie odznaki po prawej */
.wyraj-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: min(1200px, calc(100% - 40px));
    margin: 0 auto;
    padding: 12px 0 10px;
    border-bottom: 1px solid #f1f5f9;
}

.wyraj-topbar .wp-block-site-title {
    margin: 0;
}

.wyraj-topbar .wp-block-site-title a {
    color: #0f172a !important;
    font-size: 1.3rem !important;
    letter-spacing: -0.03em;
    font-weight: 900;
    text-decoration: none;
    white-space: nowrap;
}

.wyraj-header-badges {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.wyraj-nav-badge-link {
    font-size: 12px;
    font-weight: 800;
    padding: 6px 14px;
    border-radius: 9999px;
    text-decoration: none;
    letter-spacing: 0.3px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.wyraj-badge-today {
    background: #0284c7;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
}
.wyraj-badge-today:hover {
    background: #0369a1;
    transform: translateY(-1px);
}

.wyraj-badge-weekend {
    background: #f8fafc;
    color: #0f172a !important;
    border: 1px solid #e2e8f0;
}
.wyraj-badge-weekend:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

/* 2. Dolny rząd: Pasek menu w jednej równej linii bez łamania słów */
.wyraj-topbar .wyraj-nav-strip {
    background: transparent;
    border: none;
    box-shadow: none;
    margin: 0 auto;
    width: min(1200px, calc(100% - 40px));
    padding: 0;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.wyraj-topbar .wyraj-nav-strip::-webkit-scrollbar {
    display: none;
}

.wyraj-topbar .wyraj-nav-items {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 6px 0;
    list-style: none;
    white-space: nowrap;
    flex-wrap: nowrap;
}

.wyraj-topbar .wyraj-nav-items li {
    flex-shrink: 0;
    margin: 0;
}

.wyraj-topbar .wyraj-nav-items li a {
    display: block;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 700;
    color: #475569;
    border-radius: 8px;
    transition: all 0.15s ease;
    text-transform: none;
    white-space: nowrap !important;
    user-select: none;
}

.wyraj-topbar .wyraj-nav-items li a:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.wyraj-topbar .wyraj-nav-items li.current-menu-item a {
    background: #f1f5f9;
    color: #0284c7;
    font-weight: 800;
}

@media (max-width: 600px) {
    .wyraj-header-top {
        padding: 10px 0 8px;
        width: calc(100% - 24px);
    }
    .wyraj-topbar .wyraj-nav-strip {
        width: calc(100% - 24px);
    }
    .wyraj-topbar .wp-block-site-title a {
        font-size: 1.1rem !important;
    }
    .wyraj-nav-badge-link {
        font-size: 11px;
        padding: 5px 10px;
    }
}
