/*
* CIS Hero — wspólny komponent hero dla wszystkich podstron
 * @author Wojciech Modzelewski
 * @version 1.0 — 2026-05
 *
 * UŻYCIE w szablonie:
 *   <section class="cis-hero">
 *     <div class="cis-hero__inner">
 *       <div class="cis-hero__badge">Etykieta</div>
 *       <h1>Tytuł <em>akcent</em></h1>
 *       <p class="cis-hero__desc">Opis</p>
 *       [opcjonalne: cis-hero__actions, cis-hero__meta, cis-hero__extra]
 *     </div>
 *   </section>
 *
 * Modyfikatory:
 *   .cis-hero--search   → dodaje pasek wyszukiwania (archiwum kursów)
 *   .cis-hero--tabs     → dodaje zakładki pod opisem (programy)
 *   .cis-hero--filters  → dodaje kafelki filtrów (szkolenia-hub)
 *
 * Brand Kit: automatycznie używa var(--csi-*) z pluginu Brand Kit
 */

/* ═══════════════════════════════════════════════════════
   BASE — jasny pergamin, elegancki, akademicki
═══════════════════════════════════════════════════════ */
.cis-hero {
    background: #E8F1FB;
    padding: 64px 24px 52px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Subtelna tekstura — linie siatki w tle */
.cis-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(13,43,69,.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(13,43,69,.04) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}

/* Delikatny gradient w prawym górnym rogu */
.cis-hero::after {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 320px;
    height: 320px;
    background: radial-gradient(ellipse, rgba(196,120,138, .10) 0%, transparent 70%);
    pointer-events: none;
}

.cis-hero__inner {
    position: relative;
    z-index: 1;
    max-width: 720px;
    margin: 0 auto;
}

/* ── BADGE ──────────────────────────────────────────── */
.cis-hero__badge {
    display: inline-block;
    padding: 5px 16px;
    border-radius: 100px;
    background: white;
    border: 1px solid #C4788A;
    color: #C4788A;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(196,120,138, .10);
}

/* ── H1 ─────────────────────────────────────────────── */
.cis-hero h1 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 900;
    color: var(--csi-text-secondary, #0D2038);
    line-height: 1.12;
    margin: 0 0 16px;
    letter-spacing: -.01em;
}

.cis-hero h1 em {
    font-style: normal;
    background: linear-gradient(90deg, #C4788A, #8B4A5E);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Linia dekoracyjna pod H1 */
.cis-hero h1::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background: #C4788A;
    margin: 14px auto 0;
    border-radius: 2px;
}

/* ── OPIS ────────────────────────────────────────────── */
.cis-hero__desc {
    font-size: .92rem;
    color: #4a6080;
    line-height: 1.8;
    max-width: 560px;
    margin: 0 auto 28px;
}

/* ── PRZYCISKI CTA ───────────────────────────────────── */
.cis-hero__actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 0;
}

.cis-hero__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 26px;
    border-radius: 12px;
    font-size: .84rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    text-decoration: none;
    transition: all .2s;
    cursor: pointer;
    border: none;
}

.cis-hero__btn--primary {
    background: linear-gradient(90deg, #C4788A, #8B4A5E);
    color: #1a2e4a;
    box-shadow: 0 6px 20px rgba(196,120,138, .28);
}
.cis-hero__btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(196,120,138, .35);
}

.cis-hero__btn--secondary {
    background: white;
    color: #1a2e4a;
    border: 1.5px solid rgba(13,46,107,.1);
}
.cis-hero__btn--secondary:hover {
    border-color: #1a2e4a;
    background: #E8F1FB;
}

/* ── META (statystyki, daty) ─────────────────────────── */
.cis-hero__meta {
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid rgba(#1a2e4a, .10);
}
/* fallback bez rgb */
.cis-hero__meta { border-top-color: #e2ddd5; }

.cis-hero__meta-item {
    text-align: center;
}
.cis-hero__meta-num {
    display: block;
    font-size: 1.5rem;
    font-weight: 900;
    color: #1a2e4a;
    line-height: 1;
    margin-bottom: 2px;
}
.cis-hero__meta-lbl {
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #4a6080;
}

/* ── BREADCRUMB (opcjonalny, nad badge) ──────────────── */
.cis-hero__breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: .72rem;
    color: #4a6080;
    font-weight: 600;
    margin-bottom: 16px;
}
.cis-hero__breadcrumb a {
    color: #4a6080;
    text-decoration: none;
}
.cis-hero__breadcrumb a:hover { color: #1a2e4a; }
.cis-hero__breadcrumb-sep { opacity: .4; }

/* ═══════════════════════════════════════════════════════
   MODYFIKATOR: --search (archiwum kursów)
═══════════════════════════════════════════════════════ */
.cis-hero--search .cis-hero__search {
    display: flex;
    gap: 8px;
    max-width: 480px;
    margin: 20px auto 0;
}
.cis-hero__search-input {
    flex: 1;
    padding: 11px 16px;
    border: 1.5px solid rgba(13,46,107,.1);
    border-radius: 10px;
    font-size: .88rem;
    font-family: inherit;
    background: white;
    color: var(--csi-text-secondary, #0D2038);
    outline: none;
    transition: border-color .2s;
}
.cis-hero__search-input:focus {
    border-color: #1a2e4a;
}
.cis-hero__search-btn {
    padding: 11px 20px;
    background: #1a2e4a;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: .84rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity .2s;
}
.cis-hero__search-btn:hover { opacity: .88; }

/* ═══════════════════════════════════════════════════════
   MODYFIKATOR: --tabs (zakładki programów)
═══════════════════════════════════════════════════════ */
.cis-hero--tabs .cis-hero__tabs {
    display: flex;
    gap: 6px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}
.cis-hero__tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border: 1.5px solid rgba(13,46,107,.1);
    border-radius: 100px;
    background: white;
    font-size: .75rem;
    font-weight: 700;
    color: var(--csi-text-primary, #374151);
    cursor: pointer;
    transition: all .2s;
    white-space: nowrap;
    text-decoration: none;
}
.cis-hero__tab:hover,
.cis-hero__tab.active {
    border-color: #1a2e4a;
    color: #1a2e4a;
    background: white;
    box-shadow: 0 2px 8px rgba(13,43,69,.08);
}
.cis-hero__tab-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
    background: currentColor;
    opacity: .5;
}
.cis-hero__tab.active .cis-hero__tab-dot { opacity: 1; }

/* ═══════════════════════════════════════════════════════
   MODYFIKATOR: --filters (kafelki kategorii)
═══════════════════════════════════════════════════════ */
.cis-hero--filters .cis-hero__filters {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}
.cis-hero__filter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: 100px;
    background: white;
    border: 1px solid rgba(13,46,107,.1);
    color: var(--csi-text-primary, #1a2e4a);
    font-size: .78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s;
}
.cis-hero__filter:hover,
.cis-hero__filter.active {
    background: white;
    border-color: var(--c, #1a2e4a);
    color: var(--c, #1a2e4a);
    box-shadow: 0 3px 10px rgba(13,43,69,.10);
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════ */
@media (max-width: 640px) {
    .cis-hero { padding: 40px 16px 36px; }
    .cis-hero h1 { font-size: clamp(1.5rem, 6vw, 2rem); }
    .cis-hero__desc { font-size: .85rem; }
    .cis-hero__actions { flex-direction: column; align-items: center; }
    .cis-hero__btn { width: 100%; max-width: 320px; justify-content: center; }
    .cis-hero__meta { gap: 16px; }
    .cis-hero--tabs .cis-hero__tabs { gap: 4px; justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
    .cis-hero--tabs .cis-hero__tabs::-webkit-scrollbar { display: none; }
    .cis-hero__tab { flex-shrink: 0; }
}

/* ═══════════════════════════════════════════════════════
   LEGACY ALIASES — przykrywa stare klasy hero przez var()
   Dzięki temu szablony które nie zostały jeszcze przepisane
   też wyglądają spójnie.
═══════════════════════════════════════════════════════ */

/* Wszystkie stare hero → pergamin */
.p-hero, .sh-hero, .onas-hero, .kon-hero,
.sciezka-hero, .wyd-hero, .wyk-hero, .arch-hero {
    background: #E8F1FB !important;
    color: var(--csi-text-secondary, #0D2038) !important;
}

/* Stare hero h1 → ciemny tekst */
.p-hero h1, .sh-hero h1, .onas-hero h1, .kon-hero h1,
.sciezka-hero h1, .wyd-hero h1, .wyk-hero h1, .arch-hero h1,
.arch-hero h1 { color: var(--csi-text-secondary, #0D2038) !important; }

/* Stare hero em → złoty gradient */
.p-hero h1 em, .sh-hero h1 em, .onas-hero h1 em, .kon-hero h1 em,
.sciezka-hero h1 em, .wyd-hero h1 em, .wyk-hero h1 em {
    font-style: normal;
    background: linear-gradient(90deg, #C4788A, #8B4A5E) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    color: transparent !important;
}

/* Stare hero p/desc → muted */
.p-hero p, .sh-hero-desc, .onas-hero p, .kon-hero p,
.sciezka-hero p, .wyd-hero-desc, .wyk-hero p, .arch-hero-sub {
    color: #4a6080 !important;
}

/* Stare hero before/after — usuń ciemne gradienty */
.onas-hero::before, .kon-hero::before, .sciezka-hero::before,
.wyk-hero::before, .arch-hero::before {
    background: radial-gradient(ellipse 50% 60% at 80% 30%,
        rgba(196,120,138, .08) 0%, transparent 65%) !important;
}

/* Stare badge → styl spójny */
.p-badge, .sh-badge, .onas-badge, .kon-badge,
.sciezka-badge, .wyd-badge, .wyk-badge {
    display: inline-block !important;
    padding: 5px 16px !important;
    border-radius: 100px !important;
    background: white !important;
    border: 1px solid #C4788A !important;
    color: #C4788A !important;
    font-size: .68rem !important;
    font-weight: 800 !important;
    letter-spacing: .16em !important;
    text-transform: uppercase !important;
    margin-bottom: 18px !important;
}

/* Wyrównaj padding wszystkich starych hero */
.p-hero, .onas-hero, .kon-hero, .sciezka-hero, .wyk-hero {
    padding: 64px 24px 52px !important;
}
.sh-hero, .wyd-hero {
    padding: 64px 40px 52px !important;
}
.arch-hero {
    padding: 56px 24px 48px !important;
}

/* Biały tekst w hero który ma ciemne tło — napraw */
.arch-hero-sub { color: #4a6080 !important; }

/* single.php — brak hero, dodaj minimalny spacer */
.single-post-header {
    background: #E8F1FB;
    padding: 40px 24px 32px;
    border-bottom: 1px solid rgba(13,46,107,.1);
}
