/**
 * UI Polish — Praxio Blue + Dusty Rose v3
 *
 * Stylizacja komponentów UI: hero, sekcje, karty, przyciski, tabele, animacje.
 * Wszystkie reguły używają zmiennych z cis-palette.css.
 *
 * @package    InstytutSI_Theme
 * @author     Wojciech Modzelewski <kontakt@instytutsi.pl>
 * @version    1.0.0
 * @since      2026-05-24
 */

/* ═══════════════════════════════════════════════════════
   BODY — czyste jasnoniebieskie tło
   ═══════════════════════════════════════════════════════ */
body,
body.home,
body.page-template-default,
body.single {
    background: var(--csi-bg-main);
}

/* ═══════════════════════════════════════════════════════
   HERO SECTION
   ═══════════════════════════════════════════════════════ */
.fp-hero-section {
    padding: 32px 0 36px;
    background: linear-gradient(160deg, #F0F6FF 0%, #EAF2FD 60%, #EDF0F8 100%);
    min-height: auto;
    border-bottom: 1px solid rgba(27, 95, 170, 0.08);
}

/* Usuwa ozdoby/blobs */
.fp-hero-section .absolute[class*="w-96"],
.fp-hero-section .absolute[class*="h-96"],
.fp-hero-section > div.absolute {
    display: none;
}

.fp-hero-section > div,
.fp-hero-section .container {
    padding-bottom: 0;
    margin-bottom: 0;
}

.fp-hero-section .fp-cta1,
.fp-hero-section .fp-cta2 {
    margin-bottom: 0;
}

/* Hero h1 z gradientem */
.fp-hero-h1 {
    color: var(--csi-bg-dark);
    margin-bottom: 12px;
}
.fp-hero-h1 strong,
.fp-hero-h1 em,
.fp-hero-h1 span:not([class]) {
    background: linear-gradient(90deg, var(--csi-sage) 0%, var(--csi-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    font-weight: 900;
}

/* Hero badge */
.fp-hero-badge,
.knowledge-badge,
.cis-hero__badge {
    border-color: var(--csi-accent);
    color: var(--csi-accent);
    background: rgba(196, 120, 138, 0.06);
}

/* ═══════════════════════════════════════════════════════
   ODSTĘPY SEKCJI
   ═══════════════════════════════════════════════════════ */
.fp-section,
.fp-why,
.fp-news,
.fp-nl,
.fp-stats,
section[class*="py-20"],
section[class*="py-16"],
section[class*="py-24"],
section[class*="-section"] {
    padding-top: 56px;
    padding-bottom: 56px;
}

.py-20 { padding-top: 56px; padding-bottom: 56px; }
.py-16 { padding-top: 48px; padding-bottom: 48px; }
.py-24 { padding-top: 64px; padding-bottom: 64px; }

@media (max-width: 768px) {
    .fp-section,
    .fp-why,
    .py-20,
    .py-16,
    .py-24 {
        padding-top: 36px;
        padding-bottom: 36px;
    }
}

/* ═══════════════════════════════════════════════════════
   SEKCJA "ZOSTAŃ EKSPERTEM"
   ═══════════════════════════════════════════════════════ */
section.bg-slate-50 {
    background: linear-gradient(180deg, var(--csi-bg-secondary) 0%, var(--csi-bg-main) 100%);
    position: relative;
}
section.bg-slate-50 h2 {
    position: relative;
    padding-top: 14px;
}
section.bg-slate-50 h2::before {
    content: "";
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--csi-sage) 0%, var(--csi-accent) 100%);
    border-radius: 2px;
}
section.bg-slate-50 h2 span {
    background: linear-gradient(90deg, var(--csi-sage) 0%, var(--csi-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    font-weight: 900;
}
section.bg-slate-50 p {
    color: var(--csi-text-muted);
}

/* ═══════════════════════════════════════════════════════
   KAFELKI fp-card
   ═══════════════════════════════════════════════════════ */
.fp-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(13, 46, 107, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    display: flex;
    flex-direction: column;
}
.fp-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(13, 46, 107, 0.1);
    border-color: rgba(196, 120, 138, 0.25);
}

/* Ukryj stary obrazek/placeholder */
.fp-card .fp-card__img,
.fp-card .fp-card__ph {
    display: none;
}

/* Nowy header z nazwą programu */
.fp-card__header {
    height: 110px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: linear-gradient(135deg, #1a2e4a 0%, #2d4a6e 100%);
    overflow: hidden;
}
.fp-card__header::before {
    content: "";
    position: absolute;
    top: -20px;
    right: -20px;
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    pointer-events: none;
}
.fp-card__header::after {
    content: "";
    position: absolute;
    bottom: -30px;
    left: -20px;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 50%;
    pointer-events: none;
}
.fp-card__header-name {
    color: #fff;
    font-family: Georgia, serif;
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -0.01em;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
    z-index: 2;
    position: relative;
    text-align: center;
    padding: 0 16px;
}

/* Per-program kolory headera */
.fp-card[data-program="studia"] .fp-card__header      { background: linear-gradient(135deg, #1a2e4a 0%, #2d4a6e 100%); }
.fp-card[data-program="akademia"] .fp-card__header    { background: linear-gradient(135deg, #2d4a6e 0%, #3d5f8a 100%); }
.fp-card[data-program="klinika"] .fp-card__header     { background: linear-gradient(135deg, #3d5f8a 0%, #1B5FAA 100%); }
.fp-card[data-program="fizjo"] .fp-card__header       { background: linear-gradient(135deg, #1B5FAA 0%, #2E86DE 100%); }
.fp-card[data-program="masterclass"] .fp-card__header { background: linear-gradient(135deg, #C4788A 0%, #8B4A5E 100%); }
.fp-card[data-program="neuro"] .fp-card__header       { background: linear-gradient(135deg, #8B4A5E 0%, #5B2D5E 100%); }

.fp-card__body {
    padding: 16px 18px 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #fff;
}
.fp-card__badge {
    background: var(--csi-bg-secondary);
    color: var(--csi-sage);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 100px;
}
.fp-card__title { color: var(--csi-bg-dark); }
.fp-card__title a { color: var(--csi-bg-dark); }
.fp-card__title a:hover { color: var(--csi-sage); }
.fp-card__exc { color: var(--csi-text-muted); }
.fp-card__link { color: var(--csi-sage); font-weight: 700; }
.fp-card__link:hover { color: var(--csi-accent); }

/* ═══════════════════════════════════════════════════════
   PRZYCISKI
   ═══════════════════════════════════════════════════════ */
.fp-cta1,
a.fp-cta1,
button.fp-cta1,
.cis-btn-primary,
.btn-primary,
.cis-hero__btn--primary,
.kp-cta-btn {
    background: var(--csi-accent);
    color: #fff;
    box-shadow: none;
    transition: background 0.2s ease, transform 0.2s ease;
    border: none;
}
.fp-cta1:hover,
a.fp-cta1:hover,
.cis-btn-primary:hover,
.kp-cta-btn:hover {
    background: var(--csi-accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 74, 94, 0.18);
}

.fp-cta2,
a.fp-cta2,
.cis-btn-secondary,
.btn-secondary {
    background: var(--csi-bg-dark);
    color: #fff;
    box-shadow: 0 4px 14px rgba(26, 46, 74, 0.2);
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: none;
}
.fp-cta2:hover,
a.fp-cta2:hover,
.cis-btn-secondary:hover {
    background: #2d4a6e;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(26, 46, 74, 0.28);
}

/* ═══════════════════════════════════════════════════════
   RUSZAJĄCE KARTY (fp-mc)
   ═══════════════════════════════════════════════════════ */
.fp-mc {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}
.fp-mc__lbl   { color: rgba(255, 255, 255, 0.85); }
.fp-mc__name  { color: #fff; }
.fp-mc__role  { color: var(--csi-accent); }
.fp-mc__badge { color: rgba(255, 255, 255, 0.9); }

/* ═══════════════════════════════════════════════════════
   HERO KURSU/STUDIA (kp-hero)
   ═══════════════════════════════════════════════════════ */
.kp-hero {
    padding: 40px 0 0;
}
.kp-hero__inner {
    align-items: start;
    padding-bottom: 32px;
}
.kp-hero__main,
.kp-hero__sidebar {
    align-self: start;
}
.kp-hero__sidebar {
    position: relative;
}

/* Badge "Zapisy otwarte" — animowana kropka */
.kp-badge--open {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.kp-badge--open::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 6px rgba(74, 222, 128, 0.6);
    margin-right: 6px;
    vertical-align: middle;
    animation: cis-pulse-dot 2s ease-in-out infinite;
}
@keyframes cis-pulse-dot {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.5; }
}
.kp-badge--close {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.15);
}
.kp-badge--soon {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.18);
}
.kp-badge--type {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

/* ═══════════════════════════════════════════════════════
   FILTER PILLS + TABSY
   ═══════════════════════════════════════════════════════ */
.filter-pill,
.cat-filter-btn,
.fp-tab {
    background: #fff;
    color: var(--csi-bg-dark);
    border: 1.5px solid rgba(27, 95, 170, 0.2);
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(13, 46, 107, 0.04);
}
.filter-pill:hover,
.cat-filter-btn:hover,
.fp-tab:hover {
    border-color: var(--csi-sage);
    color: var(--csi-sage);
    background: var(--csi-bg-secondary);
}
.filter-pill.active,
.cat-filter-btn.active,
.fp-tab.active {
    background: var(--csi-bg-dark);
    border-color: var(--csi-bg-dark);
    color: #fff;
}

.fp-tab-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════
   TOPBAR CTA
   ═══════════════════════════════════════════════════════ */
.cis-topbar {
    background: var(--csi-bg-dark);
    color: #fff;
}
.cis-topbar__text {
    color: #fff;
}
.cis-topbar__cta {
    background: var(--csi-accent);
    color: #fff;
    padding: 6px 18px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border: none;
    transition: background 0.2s;
}
.cis-topbar__cta:hover {
    background: var(--csi-accent-hover);
}

/* ═══════════════════════════════════════════════════════
   STATS
   ═══════════════════════════════════════════════════════ */
.fp-stats {
    background: linear-gradient(180deg, #fff 0%, var(--csi-bg-main) 100%);
    padding: 32px 0;
}
.fp-stat__num {
    background: linear-gradient(135deg, var(--csi-bg-dark) 0%, var(--csi-sage) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

/* ═══════════════════════════════════════════════════════
   SEKCJA "TWORZYMY STANDARDY" (fp-why)
   ═══════════════════════════════════════════════════════ */
.fp-why {
    padding: 56px 0;
    background: #fff;
}
.fp-why__lbl {
    color: var(--csi-accent);
    background: rgba(196, 120, 138, 0.08);
    padding: 4px 14px;
    border-radius: 100px;
    display: inline-block;
    margin-bottom: 14px;
}
.fp-why__title {
    background: linear-gradient(90deg, var(--csi-bg-dark) 0%, var(--csi-sage) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

/* H2 em gradient (uniwersalne) */
h2 em,
.fp-section h2 em,
.fp-why h2 em,
.fp-why__title em {
    background: linear-gradient(90deg, var(--csi-sage) 0%, var(--csi-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    font-style: italic;
}

/* Karty fp-wc — kolorowe akcenty per karta */
.fp-wc {
    background: #fff;
    border: 1px solid rgba(13, 46, 107, 0.08);
    border-radius: 14px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.fp-wc::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--csi-sage), var(--csi-accent));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.fp-wc:hover::before { transform: scaleX(1); }
.fp-wc:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(13, 46, 107, 0.1);
    border-color: rgba(196, 120, 138, 0.25);
}
.fp-wc.open {
    border-color: var(--csi-accent);
    box-shadow: 0 16px 40px rgba(196, 120, 138, 0.18),
                0 0 0 1px rgba(196, 120, 138, 0.2);
    background: linear-gradient(135deg, #fff 0%, var(--csi-accent-soft) 100%);
}
.fp-wc.open::before { transform: scaleX(1); }

/* Numery 01-06 — różne kolory z palety */
.fp-wc__n {
    background: transparent;
    opacity: 0.35;
}
.fp-wc:hover .fp-wc__n,
.fp-wc.open .fp-wc__n { opacity: 0.65; }
.fp-wc:nth-child(1) .fp-wc__n { color: var(--csi-sage); }
.fp-wc:nth-child(2) .fp-wc__n { color: var(--csi-accent); }
.fp-wc:nth-child(3) .fp-wc__n { color: #2d4a6e; }
.fp-wc:nth-child(4) .fp-wc__n { color: var(--csi-bg-dark); }
.fp-wc:nth-child(5) .fp-wc__n { color: var(--csi-accent-hover); }
.fp-wc:nth-child(6) .fp-wc__n { color: #3d5f8a; }

/* Ikonki w kartach */
.fp-wc__ico {
    background: linear-gradient(135deg, rgba(27, 95, 170, 0.08), rgba(196, 120, 138, 0.08));
    border: 1px solid rgba(27, 95, 170, 0.15);
    border-radius: 10px;
    padding: 8px;
}

/* ═══════════════════════════════════════════════════════
   TABELA PORÓWNAWCZA (csi-porownanie-table)
   ═══════════════════════════════════════════════════════ */
.csi-porownanie-table th,
.csi-porownanie-table td:first-child {
    background: #fff;
    color: var(--csi-bg-dark);
}

/* Górna kolorowa linia per kolumna */
.csi-porownanie-table thead th:nth-child(2) { border-top: 4px solid #1a2e4a; }
.csi-porownanie-table thead th:nth-child(3) { border-top: 4px solid #2d4a6e; }
.csi-porownanie-table thead th:nth-child(4) { border-top: 4px solid #3d5f8a; }
.csi-porownanie-table thead th:nth-child(5) { border-top: 4px solid #1B5FAA; }
.csi-porownanie-table thead th:nth-child(6) { border-top: 4px solid #C4788A; }
.csi-porownanie-table thead th:nth-child(7) { border-top: 4px solid #8B4A5E; }

/* Tytuły programów per kolumna */
.csi-porownanie-table thead th:nth-child(2) h3 { color: #1a2e4a; }
.csi-porownanie-table thead th:nth-child(3) h3 { color: #2d4a6e; }
.csi-porownanie-table thead th:nth-child(4) h3 { color: #3d5f8a; }
.csi-porownanie-table thead th:nth-child(5) h3 { color: #1B5FAA; }
.csi-porownanie-table thead th:nth-child(6) h3 { color: #C4788A; }
.csi-porownanie-table thead th:nth-child(7) h3 { color: #8B4A5E; }

/* CTA buttons w tabeli per kolumna */
.csi-porownanie-table tr:last-child td:nth-child(2) a { background: #1a2e4a; color: #fff; }
.csi-porownanie-table tr:last-child td:nth-child(3) a { background: #2d4a6e; color: #fff; }
.csi-porownanie-table tr:last-child td:nth-child(4) a { background: #3d5f8a; color: #fff; }
.csi-porownanie-table tr:last-child td:nth-child(5) a { background: #1B5FAA; color: #fff; }
.csi-porownanie-table tr:last-child td:nth-child(6) a { background: #C4788A; color: #fff; }
.csi-porownanie-table tr:last-child td:nth-child(7) a { background: #8B4A5E; color: #fff; }
.csi-porownanie-table tr:last-child a:hover {
    transform: translateY(-1px);
    filter: brightness(1.1);
}

/* ═══════════════════════════════════════════════════════
   ANIMACJE
   ═══════════════════════════════════════════════════════ */
@keyframes cis-gentle-float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-6px); }
}
.fp-hero-section h1::after,
.cis-hero h1::after {
    animation: cis-gentle-float 4s ease-in-out infinite;
}

@keyframes cis-pulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.04); }
}
.knowledge-badge,
.fp-hero-badge,
.cis-hero__badge {
    animation: cis-pulse 3s ease-in-out infinite;
}

.cis-nav-link::after,
nav a::after {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.cis-footer__social-btn {
    transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.cis-footer__social-btn:hover {
    transform: translateY(-3px) scale(1.05);
}

/* Usuń cursor glow (jeśli był) */
#cis-cursor-glow {
    display: none;
}

/* ═══════════════════════════════════════════════════════
   SEKUNDARNY NAV (pod headerem)
   ═══════════════════════════════════════════════════════ */
.cis-secondary-nav,
.cis-quicknav,
.cis-header__quicknav {
    background: #fff;
    border-top: 1px solid rgba(13, 46, 107, 0.08);
    border-bottom: 1px solid rgba(13, 46, 107, 0.08);
    color: var(--csi-bg-dark);
}
.cis-secondary-nav a,
.cis-quicknav a,
.cis-header__quicknav a {
    color: var(--csi-bg-dark);
    font-weight: 700;
    text-decoration: none;
    padding: 10px 16px;
    transition: color 0.2s;
}
.cis-secondary-nav a:hover,
.cis-quicknav a:hover,
.cis-header__quicknav a:hover {
    color: var(--csi-sage);
}
