:root {
    --bg-color: #0d0d0d;
    --card-bg: #141416;
    --card-border: #26262a;
    --text-primary: #ffffff;
    --text-muted: #a0a0a0;
    --accent: #f9a826; /* Żółty ze zrzutu ekranu */
    --error-red: #ff3b30;
    --success-green: #34c759;
}

/* Reset, blokady mobilne i zabezpieczenia przed psuciem układu */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden; /* Bezwzględna blokada scrolla poziomego */
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Poppins', sans-serif;
    
    /* 9. Kursor domyślny */
    cursor: default; 
    
    /* Blokady touch & select */
    touch-action: pan-y;
    -webkit-user-select: none;
    user-select: none;
}

/* Odblokowanie zaznaczania tekstu */
p, h1, h2, h3, span { -webkit-user-select: text; user-select: text; }

/* 9. Kursory interaktywne */
a, button, .btn { cursor: pointer; }
.dropdown { cursor: help; }

/* Custom Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-color); }
::-webkit-scrollbar-thumb { background: #333; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* Czarna skrzynka (Błędy) */
.black-box {
    position: fixed; top: 0; left: 0; width: 100vw; background: var(--error-red);
    color: #fff; padding: 15px; z-index: 10000; font-family: monospace; font-size: 14px;
    box-shadow: 0 4px 15px rgba(255, 59, 48, 0.4);
}
.hidden { display: none !important; }
/* Widoczne dla czytników ekranu, niewidoczne wizualnie - do nagłówków sekcji, które porządkują
   strukturę strony, ale nie mają być pokazane (projekt nie przewiduje tam podpisu). */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Nagłówek i Logo */
.main-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 5%; background: var(--bg-color);
    border-bottom: 1px solid var(--card-border);
    position: sticky; top: 0; z-index: 100;
}
.logo-area { display: flex; align-items: center; gap: 30px; }
.logo-text { display: flex; flex-direction: column; line-height: 1; }
.logo-k, .logo-divider, .logo-m { font-size: 32px; font-weight: 400; }
.logo-m { color: var(--accent); font-weight: 600; }
.logo-sub { font-size: 10px; font-weight: 600; color: var(--accent); letter-spacing: 1px; margin-top: 4px; }
.brands-switch { color: var(--text-muted); font-size: 13px; border: 1px solid #333; padding: 4px 10px; border-radius: 20px; }

/* Sekcja Hero */
.content-wrapper { max-width: 1400px; margin: 0 auto; padding: 0 5% 120px; }
.hero-section {
    display: flex; justify-content: space-between; align-items: center;
    min-height: 60vh; padding: 60px 0; position: relative;
}
.hero-content h1 { font-size: clamp(48px, 6vw, 96px); font-weight: 800; line-height: 1.1; margin-bottom: 20px; }
.text-accent { color: var(--accent); }
.hero-subtitle { font-size: 18px; color: var(--text-muted); max-width: 500px; margin-bottom: 40px; line-height: 1.6; }

/* Przyciski */
.btn {
    display: inline-flex; justify-content: center; align-items: center;
    padding: 14px 28px; border-radius: 4px; font-weight: 600; font-family: inherit;
    border: none; transition: all 0.3s ease; text-decoration: none; font-size: 14px;
}
.primary-btn { background: var(--accent); color: #000; text-transform: uppercase; }
.primary-btn:hover { background: #e59a1f; transform: translateY(-2px); }
.outline-btn { background: transparent; border: 1px solid var(--accent); color: var(--accent); }

/* Bento Grid: Kategorie ze zrzutu ekranu */
.category-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1px;
    background: var(--card-border); border: 1px solid var(--card-border); margin-bottom: 80px;
}
.category-card {
    background: var(--card-bg); padding: 40px 30px; display: flex; flex-direction: column;
    position: relative; overflow: hidden; transition: background 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.category-card:hover { background: #1a1a1d; transform: translateY(-4px); }
.cat-icon { font-size: 32px; margin-bottom: 20px; }
.cat-info h3 { font-size: 18px; margin-bottom: 10px; text-transform: uppercase; }
.cat-info p { color: var(--text-muted); font-size: 14px; }
.cat-arrow { position: absolute; bottom: 30px; right: 30px; color: var(--accent); font-weight: bold; opacity: 0; transform: translateX(-10px); transition: all 0.3s; }
.category-card:hover .cat-arrow { opacity: 1; transform: translateX(0); }

/* Główny Bento Grid (Prowadzący, AI, Oferta) */
.bento-grid { display: flex; flex-direction: column; gap: 60px; }
.sticky-title {
    position: sticky; top: 90px; background: rgba(13, 13, 13, 0.9); backdrop-filter: blur(10px);
    padding: 15px 0; z-index: 10; font-size: 24px; font-weight: 600;
    text-transform: none; /* Wymóg: Poprawne nagłówki (Sentence case) */
}
.bento-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }

/* Karty i TL;DR */
.bento-card {
    background: var(--card-bg); border-radius: 12px; overflow: hidden;
    position: relative; border: 1px solid transparent; transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.bento-card:hover { border-color: var(--accent); transform: scale(1.02); }
.image-wrapper { height: 350px; background: #111; display: flex; align-items: center; justify-content: center; }
.image-wrapper img { width: 100%; height: 100%; object-fit: cover; }
.card-content { padding: 25px; }
.card-content h3 { font-size: 42px; color: var(--accent); margin-bottom: 5px; }

/* Animowany dymek (TL;DR) */
.tldr-summary {
    position: absolute; bottom: 0; left: 0; width: 100%;
    background: rgba(249, 168, 38, 0.98); color: #000; padding: 20px;
    font-weight: 600; font-size: 14px;
    transform: translateY(100%); transition: transform 0.3s ease;
}
.bento-card:hover .tldr-summary { transform: translateY(0); }

/* Placeholder dla AI */
.ai-placeholder-card {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    height: 300px; border: 1px dashed var(--card-border); background: transparent; color: var(--text-muted);
}

/* Oferta */
.offer-card { padding: 50px; text-align: center; background: linear-gradient(135deg, #1a1a1e 0%, #0d0d0d 100%); border: 1px solid var(--card-border); }
.offer-card h2 { font-size: 32px; margin-bottom: 15px; }
.offer-card p { color: var(--text-muted); margin-bottom: 30px; font-size: 18px; }

/* Elementy pływające */
.floating-sidebar {
    position: fixed; right: 20px; top: 50%; transform: translateY(-50%);
    display: flex; flex-direction: column; gap: 15px; z-index: 50;
}
.icon-link {
    width: 40px; height: 40px; border-radius: 50%; background: var(--card-bg); border: 1px solid var(--card-border);
    display: flex; justify-content: center; align-items: center; color: #fff; font-size: 12px; font-weight: bold;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease;
}
.icon-link:hover { transform: scale(1.1); border-color: var(--accent); }
.tooltip-wrapper { position: relative; }
.tooltip {
    position: absolute; right: 50px; top: 50%; transform: translateY(-50%) translateX(10px);
    background: var(--accent); color: #000; padding: 6px 12px; border-radius: 4px; font-size: 12px;
    font-weight: bold; white-space: nowrap; opacity: 0; pointer-events: none; transition: all 0.3s;
}
.tooltip-wrapper:hover .tooltip { opacity: 1; transform: translateY(-50%) translateX(0); }

.floating-bottom-bar {
    position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%);
    background: rgba(20, 20, 22, 0.85); backdrop-filter: blur(12px); border: 1px solid var(--card-border);
    padding: 12px 20px 12px 30px; border-radius: 50px; display: flex; align-items: center; gap: 20px;
    z-index: 50; box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.floating-bottom-bar a.btn { text-decoration: none; }

/* Nawigacja (main-nav) */
.main-nav ul { list-style: none; display: flex; gap: 8px; }
.main-nav a {
    display: inline-block; color: var(--text-muted); text-decoration: none;
    font-size: 14px; font-weight: 600; padding: 8px 16px; border-radius: 20px;
    transition: all 0.3s ease;
}
.main-nav a:hover { color: var(--text-primary); background: rgba(255,255,255,0.06); }
.main-nav a.active { color: #000; background: var(--accent); }

/* ============================================================
   Styl "pływający": miękkie, rozmyte plamy w tle sekcji
   ============================================================ */
.floating-blobs { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.blob {
    position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.35;
    animation: blob-float 16s ease-in-out infinite;
}
.blob-accent { background: var(--accent); }
.blob-1 { width: 380px; height: 380px; top: -120px; right: -80px; animation-delay: 0s; }
.blob-2 { width: 300px; height: 300px; bottom: -100px; left: -60px; background: #5b8cff; animation-delay: -6s; }
.blob-3 { width: 260px; height: 260px; top: 40%; left: 50%; background: #f9a826; animation-delay: -11s; opacity: 0.18; }
@keyframes blob-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -40px) scale(1.08); }
    66% { transform: translate(-25px, 25px) scale(0.94); }
}
@media (prefers-reduced-motion: reduce) { .blob { animation: none; } }

.page-hero { position: relative; padding: 70px 0 40px; overflow: hidden; }
.page-hero .page-hero-inner { position: relative; z-index: 1; }
.eyebrow {
    display: inline-block; color: var(--accent); font-size: 12px; font-weight: 700;
    letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 14px;
}
.page-hero h1 { font-size: clamp(36px, 5vw, 64px); font-weight: 800; line-height: 1.1; margin-bottom: 16px; }
.page-hero p { color: var(--text-muted); font-size: 17px; max-width: 620px; line-height: 1.6; }

/* Pigułki filtrów - pływające, przyklejone przy scrollu */
.pill-filters {
    display: flex; flex-wrap: wrap; gap: 10px; position: sticky; top: 90px; z-index: 20;
    background: rgba(13, 13, 13, 0.85); backdrop-filter: blur(10px);
    padding: 14px 0 20px;
}
.pill-btn {
    background: var(--card-bg); border: 1px solid var(--card-border); color: var(--text-muted);
    padding: 10px 20px; border-radius: 30px; font-size: 13px; font-weight: 600;
    cursor: pointer; transition: all 0.25s ease;
}
.pill-btn:hover { border-color: var(--accent); color: var(--text-primary); }
.pill-btn.active { background: var(--accent); border-color: var(--accent); color: #000; }

/* ============================================================
   Materiały: sekcje serii + karty odcinków
   ============================================================ */
.series-section { margin: 70px 0; }
.series-header { display: flex; align-items: center; gap: 24px; margin-bottom: 30px; flex-wrap: wrap; }
.series-cover {
    width: 96px; height: 96px; border-radius: 16px; overflow: hidden; flex-shrink: 0;
    background: linear-gradient(135deg, #1a1a1e 0%, #0d0d0d 100%); border: 1px solid var(--card-border);
}
.series-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.series-header h2 { font-size: 26px; font-weight: 700; margin-bottom: 6px; }
.series-header p { color: var(--text-muted); font-size: 14px; max-width: 560px; }

.episode-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; }
.episode-card {
    background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 14px;
    overflow: hidden; display: flex; flex-direction: column; transition: all 0.35s cubic-bezier(0.16,1,0.3,1);
}
.episode-card:hover { transform: translateY(-4px); border-color: var(--accent); }
.episode-thumb { position: relative; height: 180px; background: #111; }
.episode-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.episode-duration {
    position: absolute; bottom: 10px; right: 10px; background: rgba(0,0,0,0.75); color: #fff;
    font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 6px;
}
.episode-body { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex-grow: 1; }
.episode-date { color: var(--text-muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
.episode-body h3 { font-size: 17px; line-height: 1.35; }
.episode-body p { color: var(--text-muted); font-size: 13.5px; line-height: 1.55; flex-grow: 1; }
.episode-actions { display: flex; gap: 10px; margin-top: 6px; }
.format-btn {
    flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 12px; border-radius: 8px; font-size: 12.5px; font-weight: 700;
    text-decoration: none; transition: all 0.25s ease; border: 1px solid var(--card-border);
}
.format-btn.yt { background: rgba(255,59,48,0.1); color: #ff6259; border-color: rgba(255,59,48,0.3); }
.format-btn.yt:hover { background: #ff3b30; color: #fff; transform: translateY(-2px); }
.format-btn.audio { background: rgba(249,168,38,0.1); color: var(--accent); border-color: rgba(249,168,38,0.3); }
.format-btn.audio:hover { background: var(--accent); color: #000; transform: translateY(-2px); }

/* ============================================================
   Kontakt
   ============================================================ */
.contact-layout {
    display: grid; grid-template-columns: 1fr 1.1fr; gap: 60px; align-items: start; margin-top: 40px;
}
.contact-visual {
    position: relative; border-radius: 20px; overflow: hidden; min-height: 420px;
    background: linear-gradient(160deg, #1a1a1e 0%, #0d0d0d 70%);
    border: 1px solid var(--card-border); display: flex; align-items: flex-end;
}
.contact-visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.9; }
.contact-visual .visual-caption {
    position: relative; z-index: 1; padding: 26px; background: linear-gradient(0deg, rgba(0,0,0,0.75), transparent);
    width: 100%; font-size: 14px; color: var(--text-muted);
}
.contact-info-list { display: flex; flex-direction: column; gap: 16px; margin-top: 24px; }
.contact-info-item { display: flex; align-items: center; gap: 14px; color: var(--text-muted); font-size: 14px; }
.contact-info-item .ci-icon {
    width: 38px; height: 38px; border-radius: 50%; background: var(--card-bg); border: 1px solid var(--card-border);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--accent);
}
.contact-form-card {
    background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 18px; padding: 36px;
}
.contact-form-card h2 { font-size: 22px; margin-bottom: 22px; }

/* Przestylowanie wspólnego, międzymarkowego formularza (files/elements/element_contact.php)
   pod ciemny motyw Kilka Myśli - bez ingerencji w sam komponent, tylko przez jego zmienne --cf-*. */
.shared-contact-form {
    --cf-accent: var(--accent);
    --cf-bg: var(--card-bg);
    --cf-input-bg: #0d0d0d;
    --cf-border: var(--card-border);
    --cf-text: var(--text-primary);
    --cf-muted: #6b6b6f;
    --cf-radius: 8px;
    --cf-success-bg: rgba(52,199,89,0.12); --cf-success-text: var(--success-green); --cf-success-border: rgba(52,199,89,0.3);
    --cf-error-bg: rgba(255,59,48,0.12); --cf-error-text: var(--error-red); --cf-error-border: rgba(255,59,48,0.3);
}
.shared-contact-form .cf-submit { color: #000; }
.form-group { margin-bottom: 16px; }
.form-control {
    width: 100%; padding: 13px 16px; background: #0d0d0d; border: 1px solid var(--card-border);
    border-radius: 8px; color: var(--text-primary); font-family: inherit; font-size: 14.5px;
    transition: border-color 0.25s ease; box-sizing: border-box;
}
.form-control::placeholder { color: #6b6b6f; }
.form-control:focus { outline: none; border-color: var(--accent); }
textarea.form-control { resize: vertical; min-height: 130px; }
.submit-btn { width: 100%; border: none; cursor: pointer; }
.submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.form-alert { padding: 13px 16px; border-radius: 8px; margin-bottom: 18px; font-size: 13.5px; font-weight: 600; }
.form-alert.success { background: rgba(52,199,89,0.12); color: var(--success-green); border: 1px solid rgba(52,199,89,0.3); }
.form-alert.error { background: rgba(255,59,48,0.12); color: var(--error-red); border: 1px solid rgba(255,59,48,0.3); }

@media (max-width: 900px) {
    .contact-layout { grid-template-columns: 1fr; gap: 30px; }
    .pill-filters { top: 0; }
}

/* ============================================================
   Wynajem studia
   ============================================================ */
.studio-rental-section { margin-top: 40px; }
.studio-layout { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: start; }
.studio-slots-picker h3 { font-size: 18px; margin-bottom: 18px; }
.studio-empty { color: var(--text-muted); font-size: 14px; line-height: 1.6; }

.studio-days { display: flex; flex-direction: column; gap: 20px; max-height: 560px; overflow-y: auto; padding-right: 6px; }
.studio-day { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 12px; padding: 16px 18px; }
.studio-day-label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 10px; color: var(--text-primary); }
.studio-day-slots { display: flex; flex-wrap: wrap; gap: 8px; }

.slot-pill {
    background: transparent; border: 1px solid var(--card-border); color: var(--text-muted);
    padding: 8px 14px; border-radius: 20px; font-size: 13px; font-weight: 600;
    cursor: pointer; font-family: inherit; transition: all 0.2s ease;
}
.slot-pill:hover { border-color: var(--accent); color: var(--text-primary); transform: translateY(-2px); }
.slot-pill.active { background: var(--accent); border-color: var(--accent); color: #000; transform: scale(1.04); }

.studio-selected-info {
    display: flex; align-items: center; gap: 10px; justify-content: space-between;
    background: rgba(249,168,38,0.1); border: 1px solid rgba(249,168,38,0.3); color: var(--accent);
    padding: 10px 16px; border-radius: 8px; font-size: 13.5px; margin-bottom: 16px;
}
.studio-clear-btn { background: none; border: none; color: var(--accent); text-decoration: underline; font-size: 12.5px; cursor: pointer; font-family: inherit; }

@media (max-width: 900px) {
    .studio-layout { grid-template-columns: 1fr; }
    .studio-days { max-height: none; }
}

/* ============================================================
   Panel: budowniczy nieregularnych terminów (wiele dni, wspólne godziny)
   ============================================================ */
.date-chip-builder { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.date-chip-builder input[type="date"] { flex: 1; }
.date-chip-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; min-height: 20px; }
.date-chip {
    display: flex; align-items: center; gap: 8px; background: rgba(249,168,38,0.12); color: var(--accent);
    border: 1px solid rgba(249,168,38,0.3); padding: 6px 10px 6px 12px; border-radius: 20px; font-size: 12.5px; font-weight: 600;
}
.date-chip button { background: none; border: none; color: var(--accent); cursor: pointer; font-size: 14px; line-height: 1; padding: 0; }
.time-range-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: end; margin-bottom: 10px; }
.time-range-row button { background: rgba(255,59,48,0.12); color: #ff6259; border: none; border-radius: 8px; padding: 11px 12px; cursor: pointer; }
.add-range-btn { background: transparent; border: 1px dashed var(--card-border); color: var(--text-muted); border-radius: 8px; padding: 9px 14px; font-size: 12.5px; cursor: pointer; font-family: inherit; width: 100%; margin-bottom: 6px; }
.add-range-btn:hover { border-color: var(--accent); color: var(--accent); }

.termin-row { display: flex; align-items: center; gap: 14px; background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 10px; padding: 12px 16px; transition: transform 0.25s ease, border-color 0.25s ease; }
.termin-row:hover { transform: translateY(-2px); border-color: var(--accent); }
.termin-row .t-date { font-weight: 700; font-size: 13.5px; min-width: 90px; }
.termin-row .t-range { color: var(--text-muted); font-size: 13px; flex-grow: 1; }
.termin-groups { display: flex; flex-direction: column; gap: 10px; }

/* ============================================================
   Delikatne przejścia: wejście strony, ujawnianie przy scrollu,
   płynne przejście między podstronami.
   ============================================================ */
@keyframes km-fade-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}
body { animation: km-fade-in 0.5s ease both; }
body.page-leaving { opacity: 0; transition: opacity 0.2s ease; }

.reveal-pending {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-pending.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
    body { animation: none; }
    body.page-leaving { opacity: 1; transition: none; }
    .reveal-pending { opacity: 1; transform: none; transition: none; }
}