/*
Theme Name: Warszawskie Forum Doktorantów
Version: 5.3
*/

/* ============================================================
   FONT — Fractul (Pangram Pangram, licencja własna)
   Pliki woff2 wgraj do: /wp-content/themes/wfd/fonts/
   ============================================================ */
@font-face {
    font-family: 'Fractul';
    src: url('fonts/Fractul-Regular.woff2') format('woff2');
    font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Fractul';
    src: url('fonts/Fractul-Bold.woff2') format('woff2');
    font-weight: 700; font-style: normal; font-display: swap;
}

/* ============================================================
   ZMIENNE — TRYB DZIENNY (Szkło i Stal)
   ============================================================ */
:root {
    --c-nav-bg:        #1A2332;
    --c-nav-border:    #B8902A;
    --c-logo:          #B8902A;
    --c-link:          rgba(255,255,255,.72);
    --c-link-hover:    #8BAFC4;
    --c-toggle-border: #8BAFC4;

    --c-bg:            #E8EDF2;
    --c-bg-alt:        #DCE3EA;

    --c-card-bg:       #F2F5F8;
    --c-card-border:   #8BAFC4;
    --c-date:          #4E6070;
    --c-card-title:    #1A2332;

    --c-text:          #1A2332;
    --c-muted:         #4E6070;

    --c-tag:           #4E6070;
    --c-section-title: #1A2332;

    --c-hero-bg:       #1A2332;
    --c-hero-overlay:  rgba(26,35,50,.38);
    --c-hero-title:    #F2F5F8;
    --c-hero-accent:   #8BAFC4;

    --c-btn:           #B8902A;

    --c-footer-bg:     #1A2332;
    --c-footer-border: #B8902A;
    --c-footer-text:   rgba(255,255,255,.45);
}

/* ============================================================
   RESET I PODSTAWA
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
    height: 100%;
    background: var(--c-bg);
    font-family: 'Source Sans 3', sans-serif;
    color: var(--c-text);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background .55s, color .4s;
}

/* ============================================================
   NAWIGACJA
   ============================================================ */
.nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    background: var(--c-nav-bg);
    height: 80px;
    border-bottom: 2px solid var(--c-nav-border);
    display: flex; align-items: center;
    transition: background .55s, border-color .55s, box-shadow .55s;
}
.nav-container {
    width: 100%; max-width: 1200px; margin: 0 auto;
    padding: 0 20px;
    display: flex; justify-content: space-between; align-items: center;
}
.nav-brand {
    display: flex; align-items: center; gap: 15px;
    text-decoration: none !important; outline: none; border: none;
}
.nav-logo-img {
    height: 60px !important; width: auto !important;
    filter: brightness(0) invert(1); display: block;
}
.nav-title {
    font-family: 'Fractul', 'Playfair Display', serif;
    color: var(--c-logo) !important;
    font-size: 1.5rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 1px;
    text-decoration: none !important;
    transition: color .4s, text-shadow .5s;
}
.nav-links { list-style: none; display: flex; gap: 20px; align-items: center; }
.nav-links a {
    color: var(--c-link);
    text-decoration: none !important;
    font-size: 0.85rem; font-weight: 600;
    text-transform: uppercase;
    transition: color .3s, text-shadow .3s;
}
.nav-links a:hover { color: var(--c-link-hover); }

#theme-toggle {
    background: transparent;
    border: 1.5px solid var(--c-toggle-border);
    border-radius: 20px;
    padding: 5px 14px;
    cursor: pointer;
    font-size: 15px; line-height: 1;
    color: inherit;
    transition: border-color .4s, box-shadow .4s, color .4s;
}
#theme-toggle:hover { border-color: var(--c-btn); }

.nav-hamburger {
    display: none;
    flex-direction: column; justify-content: center; gap: 5px;
    background: transparent; border: none;
    cursor: pointer; padding: 6px;
}
.nav-hamburger span {
    display: block; width: 24px; height: 2px;
    background: rgba(255,255,255,.75); border-radius: 2px;
    transition: background .4s;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
    margin-top: 80px; height: 70vh; height: 70svh;
    position: relative; background: var(--c-hero-bg);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    transition: background .55s;
}
.hero-bg {
    position: absolute; inset: 0;
    background-size: cover; background-position: center;
    z-index: 1;
    /* Tło ustawiane w CSS, nie w JS: przeglądarka zaczyna pobieranie
       od razu po sparsowaniu arkusza, a nie po wykonaniu logic.js.
       Klasa .night jest na <html> zanim CSS zadziała (skrypt inline w header.php). */
    background-image: url('https://wfd.org.pl/wp-content/uploads/2026/04/image_0.png');
}
html.night .hero-bg {
    background-image: url('https://wfd.org.pl/wp-content/uploads/2026/04/image_2.png');
}
.hero::after {
    content: ''; position: absolute; inset: 0;
    background: var(--c-hero-overlay);
    z-index: 2; transition: background .55s;
}
.hero-scanlines {
    position: absolute; inset: 0; z-index: 3; pointer-events: none;
    overflow: hidden;
    opacity: 0; transition: opacity .7s;
}
/* Wzór na ::before wystaje 120px w górę i jest przesuwany przez transform,
   co idzie na GPU. Animacja background-position wymuszała repaint
   całego hero w każdej klatce. */
.hero-scanlines::before {
    content: ''; position: absolute;
    left: 0; right: 0; top: -120px; bottom: 0;
    background: repeating-linear-gradient(
        180deg, transparent, transparent 1px,
        rgba(0,238,255,.04) 1px, rgba(0,238,255,.04) 2px
    );
}
.hero-text {
    position: relative; z-index: 4;
    text-align: center; width: 90%;
}
.hero-text h1 {
    color: var(--c-hero-title) !important;
    font-family: 'Fractul', 'Playfair Display', serif;
    font-size: 3.8rem; font-weight: 700;
    text-shadow: 0 4px 15px rgba(0,0,0,.5);
    transition: color .4s, text-shadow .5s;
}
.hero-text h1 span {
    color: var(--c-hero-accent) !important;
    transition: color .4s, text-shadow .5s;
}

/* ============================================================
   SEKCJE
   ============================================================ */
.section { padding: 90px 0; position: relative; transition: background .55s; }
.alt-bg   { background: var(--c-bg-alt); }
.container { max-width: 1000px; margin: 0 auto; padding: 0 20px; }

.section-tag {
    color: var(--c-tag);
    text-transform: uppercase; letter-spacing: 2px;
    font-size: 0.75rem; font-weight: 700;
    display: block; margin-bottom: 12px;
    transition: color .4s;
}
.section-title {
    font-family: 'Fractul', 'Playfair Display', serif;
    font-size: 2.4rem; color: var(--c-section-title);
    margin-bottom: 45px;
    transition: color .4s, text-shadow .5s;
}

/* ============================================================
   BELKI (slot-item)
   ============================================================ */
.slots-list { margin-top: 10px; }

.slot-item {
    background: var(--c-card-bg) !important;
    margin-bottom: 20px; padding: 30px 35px;
    border-radius: 4px;
    border-left: 4px solid var(--c-card-border);
    display: flex; align-items: center; gap: 25px;
    box-shadow: 0 4px 14px rgba(26,35,50,.07);
    transition: background .55s, border-color .55s, box-shadow .55s;
}
.slot-item:hover { box-shadow: 0 6px 22px rgba(26,35,50,.12); }

.slot-date {
    font-weight: 700; color: var(--c-date); min-width: 100px;
    transition: color .4s, text-shadow .5s;
}
.slot-icon { font-size: 1.4rem; }
.slot-content { flex: 1; }

.slot-title {
    font-family: 'Fractul', 'Playfair Display', serif;
    font-size: 1.4rem; color: var(--c-card-title);
    transition: color .4s;
}
.slot-excerpt { color: var(--c-muted); font-size: 0.9rem; margin-top: 4px; }

.slot-btn {
    background: transparent;
    color: var(--c-btn) !important;
    border: 1.5px solid var(--c-btn);
    text-decoration: none; padding: 11px 24px; border-radius: 4px;
    font-weight: 600; text-transform: uppercase; font-size: 0.8rem;
    white-space: nowrap;
    transition: background .35s, color .35s, border-color .4s, box-shadow .4s, text-shadow .4s;
}
.slot-btn:hover {
    background: var(--c-btn);
    color: var(--c-card-bg) !important;
}

/* ============================================================
   PAGINACJA I KOMUNIKATY
   ============================================================ */
.pagination {
    margin-top: 40px; text-align: center;
}
.pagination a, .pagination span {
    display: inline-block;
    padding: 8px 14px; margin: 0 3px;
    border: 1.5px solid var(--c-card-border);
    border-radius: 4px;
    color: var(--c-card-title);
    text-decoration: none; font-size: 0.85rem; font-weight: 600;
    transition: border-color .3s, color .3s, background .3s;
}
.pagination .current {
    background: var(--c-btn);
    border-color: var(--c-btn);
    color: var(--c-card-bg);
}
.pagination a:hover {
    border-color: var(--c-btn);
    color: var(--c-btn);
}
.section-empty {
    color: var(--c-muted); font-style: italic;
    transition: color .4s;
}

/* ============================================================
   KONTAKT
   ============================================================ */
.contact-card {
    background: var(--c-card-bg);
    padding: 50px; border-radius: 4px;
    border-left: 4px solid var(--c-card-border);
    box-shadow: 0 8px 30px rgba(0,0,0,.07);
    display: grid; grid-template-columns: 1fr 1fr; gap: 50px;
    transition: background .55s, border-color .55s, box-shadow .55s;
}

/* ============================================================
   PODSTRONY — OGÓLNE
   ============================================================ */
.page-main {
    margin-top: 80px; padding: 60px 0;
    min-height: calc(100vh - 80px - 160px);
}
.page-content {
    background: var(--c-card-bg);
    padding: 60px; border-radius: 4px;
    border-top: 5px solid var(--c-card-border);
    box-shadow: 0 4px 20px rgba(0,0,0,.05);
    transition: background .55s, border-color .55s, box-shadow .55s;
}
.page-title {
    font-family: 'Fractul', 'Playfair Display', serif;
    font-size: 2.2rem; color: var(--c-card-title);
    margin-bottom: 30px;
    transition: color .4s, text-shadow .5s;
}
.page-body { color: var(--c-text); line-height: 1.8; }

.page-meta {
    font-size: 0.85rem; font-weight: 700;
    color: var(--c-date);
    margin-bottom: 30px; padding-bottom: 20px;
    border-bottom: 1px solid var(--c-card-border);
    transition: color .4s, border-color .55s;
}
.page-back {
    margin-top: 50px; padding-top: 30px;
    border-top: 1px solid var(--c-card-border);
    transition: border-color .55s;
}

/* ============================================================
   PODSTRONA O NAS
   ============================================================ */
.onas-section { margin-bottom: 60px; }

.onas-heading {
    font-family: 'Fractul', 'Playfair Display', serif;
    font-size: 1.6rem; font-weight: 700;
    color: var(--c-card-title);
    margin-bottom: 24px; padding-bottom: 12px;
    border-bottom: 2px solid var(--c-card-border);
    transition: color .4s, border-color .55s;
}
.onas-lead {
    color: var(--c-muted); margin-bottom: 20px;
    font-size: 0.95rem; transition: color .4s;
}

.member-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}
.member-card {
    background: var(--c-card-bg);
    border-left: 4px solid var(--c-card-border);
    border-radius: 4px; padding: 24px 28px;
    box-shadow: 0 4px 14px rgba(26,35,50,.07);
    transition: background .55s, border-color .55s, box-shadow .55s;
}
.member-card:hover { box-shadow: 0 6px 22px rgba(26,35,50,.12); }

.member-role {
    font-size: 0.72rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 1.5px;
    color: var(--c-date); margin-bottom: 8px;
    transition: color .4s, text-shadow .5s;
}
.member-name {
    font-family: 'Fractul', 'Playfair Display', serif;
    font-size: 1.15rem; font-weight: 700;
    color: var(--c-card-title); margin-bottom: 6px;
    transition: color .4s;
}
.member-uni {
    font-size: 0.82rem; color: var(--c-muted);
    line-height: 1.5; transition: color .4s;
}

.uni-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}
.uni-tile {
    background: var(--c-card-bg);
    border: 1.5px solid var(--c-card-border);
    border-radius: 4px; padding: 16px 18px;
    font-size: 0.875rem; font-weight: 600;
    color: var(--c-card-title); line-height: 1.4;
    transition: background .55s, border-color .55s, color .4s, box-shadow .4s;
}
.uni-tile:hover { box-shadow: 0 4px 14px rgba(26,35,50,.1); }

/* ============================================================
   STOPKA
   ============================================================ */
.footer {
    background: var(--c-footer-bg);
    border-top: 2px solid var(--c-footer-border);
    padding: 40px 20px;
    position: relative; clear: both;
    transition: background .55s, border-color .55s, box-shadow .55s;
}
.footer-container {
    max-width: 1000px; margin: 0 auto;
    display: flex; align-items: center;
    justify-content: space-between; gap: 30px;
    flex-wrap: wrap;
}
.footer-brand { flex: 1; min-width: 180px; }
.footer-title {
    font-family: 'Fractul', 'Playfair Display', serif;
    font-size: 1rem; font-weight: 700;
    color: var(--c-logo);
    display: block; margin-bottom: 4px;
    transition: color .4s, text-shadow .5s;
}
.footer-tagline {
    font-size: 0.75rem; font-style: italic;
    color: var(--c-footer-text);
    transition: color .4s;
}
.footer-social {
    display: flex; gap: 16px; align-items: center;
}
.footer-social a {
    color: var(--c-footer-text);
    display: flex; align-items: center;
    transition: color .4s, text-shadow .4s;
}
.footer-social a:hover { color: var(--c-logo); }
.footer-meta {
    text-align: right; flex: 1; min-width: 180px;
}
.footer-meta p {
    font-size: 0.8rem; color: var(--c-footer-text);
    margin-bottom: 4px; transition: color .4s;
}
.footer-meta a {
    color: var(--c-logo); text-decoration: none;
    transition: color .4s;
}
.footer-meta a:hover { color: var(--c-link-hover); }

/* ============================================================
   RESPONSYWNOŚĆ
   ============================================================ */
@media (max-width: 900px) {
    .contact-card { grid-template-columns: 1fr; }
    .hero-text h1 { font-size: 2.5rem; }
    .slot-item { flex-wrap: wrap; }
    .footer-container { flex-direction: column; text-align: center; }
    .footer-brand, .footer-meta { text-align: center; }
    .footer-social { justify-content: center; }
}

@media (max-width: 768px) {
    .nav-hamburger { display: flex; }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute; top: 80px; left: 0; right: 0;
        background: var(--c-nav-bg);
        border-bottom: 2px solid var(--c-nav-border);
        padding: 20px; gap: 16px;
        transition: background .55s, border-color .55s;
        z-index: 999;
    }
    .nav-links.open { display: flex; }
    .nav-links li { width: 100%; }
    .nav-links a { font-size: 1rem; }
    #theme-toggle { width: 100%; text-align: center; padding: 10px; }

    .page-content { padding: 30px 20px; }
    .hero-text h1 { font-size: 2rem; }
    .member-grid { grid-template-columns: 1fr; }
    .uni-grid { grid-template-columns: 1fr 1fr; }
    .slot-item { padding: 20px; }
}

@media (max-width: 480px) {
    .uni-grid { grid-template-columns: 1fr; }
    .hero-text h1 { font-size: 1.6rem; }
}

/* ============================================================
   ANIMACJE NEONOWE
   ============================================================ */

@keyframes neon-flicker {
    0%, 18%, 22%, 25%, 53%, 57%, 100% {
        text-shadow:
            0 0 2px #fff,
            0 0 8px #FFE44D,
            0 0 18px #FFE44D,
            0 0 40px #FFE44D,
            0 0 80px rgba(255,228,77,.8),
            0 0 140px rgba(255,228,77,.5);
    }
    20%, 24%, 55% {
        text-shadow: none;
        opacity: .75;
    }
}

@keyframes scanlines-drift {
    from { transform: translateY(0); }
    to   { transform: translateY(120px); }
}

/* Wspólny puls przez opacity (kompozytor GPU) zamiast animowania
   box-shadow / text-shadow, które repaintuje element co klatkę. */
@keyframes glow-fade {
    0%, 100% { opacity: 0; }
    50%      { opacity: 1; }
}

/* ============================================================
   ░░░  TRYB NOCNY — BLADE RUNNER  ░░░
   3 neony: CYAN (#00EEFF) | RÓŻOWY (#FF4DC8) | ZIELONY (#39FF14)
   ============================================================ */

body.night {
    /* Nawigacja */
    --c-nav-bg:        #010306;
    --c-nav-border:    #00EEFF;
    --c-logo:          #FFE44D;
    --c-link:          rgba(0,238,255,.6);
    --c-link-hover:    #00EEFF;
    --c-toggle-border: #00EEFF;

    /* Tło — głęboka czerń */
    --c-bg:            #020509;
    --c-bg-alt:        #05090F;

    /* Karty */
    --c-card-bg:       #040A16;
    --c-card-border:   #00EEFF;
    --c-date:          #00EEFF;
    --c-card-title:    #EEF8FF;

    /* Tekst */
    --c-text:          #C8E4F8;
    --c-muted:         #A8D4EC;   /* podniesione z #3A6A8A — czytelność drobnego tekstu */

    /* Sekcje */
    --c-tag:           #39FF14;
    --c-section-title: #EEF8FF;

    /* Hero */
    --c-hero-bg:       #010306;
    --c-hero-overlay:  rgba(1,3,6,.6);
    --c-hero-title:    #EEF8FF;
    --c-hero-accent:   #00EEFF;

    /* Przyciski */
    --c-btn:           #FF4DC8;

    /* Stopka */
    --c-footer-bg:     #010306;
    --c-footer-border: #00EEFF;
    --c-footer-text:   rgba(190,235,255,.88);   /* podniesione z rgba(0,238,255,.6) */

    /* Tlo ustawione na <html>, body zostaje przezroczysty (patrz dalej),
       zeby siatka 3D z .grid-floor byla widoczna. */
}

/* ── NAV ── */
body.night .nav {
    box-shadow:
        0 0 0 1px #00EEFF,
        0 2px 15px #00EEFF,
        0 4px 40px rgba(0,238,255,.6),
        0 8px 100px rgba(0,238,255,.25);
}
body.night .nav-title {
    animation: neon-flicker 6s infinite;
}
body.night .nav-links a {
    text-shadow: 0 0 6px rgba(0,238,255,.4);
}
body.night .nav-links a:hover {
    text-shadow:
        0 0 2px #fff,
        0 0 8px #00EEFF,
        0 0 20px #00EEFF,
        0 0 45px rgba(0,238,255,.8);
}
body.night .nav-hamburger span {
    background: #00EEFF;
    box-shadow: 0 0 6px #00EEFF, 0 0 18px rgba(0,238,255,.8);
}
body.night #theme-toggle {
    color: #00EEFF;
    box-shadow:
        0 0 5px #00EEFF,
        0 0 15px rgba(0,238,255,.7),
        0 0 35px rgba(0,238,255,.4),
        0 0 70px rgba(0,238,255,.2);
    text-shadow:
        0 0 4px #fff,
        0 0 10px #00EEFF,
        0 0 25px #00EEFF;
}
body.night #theme-toggle:hover {
    box-shadow:
        0 0 8px #00EEFF,
        0 0 22px rgba(0,238,255,.9),
        0 0 55px rgba(0,238,255,.6),
        0 0 110px rgba(0,238,255,.35);
}

/* ── HERO ── */
body.night .hero-scanlines { opacity: 1; }
@media (min-width: 769px) {
    body.night .hero-scanlines::before {
        animation: scanlines-drift 10s linear infinite;
        will-change: transform;
    }
}
body.night .hero-text h1 {
    text-shadow:
        0 0 5px rgba(0,238,255,.4),
        0 0 20px rgba(0,238,255,.25),
        0 0 60px rgba(0,238,255,.12);
}
body.night .hero-text h1 span {
    text-shadow:
        0 0 2px #fff,
        0 0 8px #00EEFF,
        0 0 20px #00EEFF,
        0 0 45px rgba(0,238,255,.85),
        0 0 90px rgba(0,238,255,.5);
}

/* ── SEKCJE ── */
body.night .section-tag {
    text-shadow:
        0 0 2px #fff,
        0 0 8px #39FF14,
        0 0 18px #39FF14,
        0 0 40px rgba(57,255,20,.8),
        0 0 80px rgba(57,255,20,.5);
}
body.night .section-title {
    text-shadow:
        0 0 2px #fff,
        0 0 8px #00EEFF,
        0 0 20px #00EEFF,
        0 0 45px rgba(0,238,255,.85),
        0 0 90px rgba(0,238,255,.5);
}

/* ── KARTY / BELKI ── */
body.night .slot-item {
    position: relative;
    box-shadow:
        0 0 0 1px #00EEFF,
        0 0 12px rgba(0,238,255,.6),
        0 0 35px rgba(0,238,255,.3),
        0 0 80px rgba(0,238,255,.12),
        inset 0 0 30px rgba(0,238,255,.06);
}
body.night .slot-item::after {
    content: ''; position: absolute; inset: 0;
    border-radius: 4px; pointer-events: none; opacity: 0;
    box-shadow:
        0 0 18px rgba(0,238,255,.85),
        0 0 55px rgba(0,238,255,.5),
        0 0 110px rgba(0,238,255,.22);
}
@media (min-width: 769px) {
    body.night .slot-item::after { animation: glow-fade 4s ease-in-out infinite; }
}
body.night .slot-item:hover::after { animation: none; opacity: 0; }
body.night .slot-item:hover {
    box-shadow:
        0 0 0 1px #00EEFF,
        0 0 20px #00EEFF,
        0 0 50px rgba(0,238,255,.7),
        0 0 100px rgba(0,238,255,.4),
        0 0 180px rgba(0,238,255,.2),
        inset 0 0 50px rgba(0,238,255,.12);
}
body.night .slot-date {
    text-shadow:
        0 0 2px #fff,
        0 0 8px #00EEFF,
        0 0 18px #00EEFF,
        0 0 40px rgba(0,238,255,.9),
        0 0 80px rgba(0,238,255,.6);
}
body.night .slot-title {
    text-shadow:
        0 0 6px rgba(0,238,255,.5),
        0 0 18px rgba(0,238,255,.25),
        0 0 40px rgba(0,238,255,.1);
}
body.night .slot-btn {
    position: relative;
    box-shadow:
        0 0 6px #FF4DC8,
        0 0 15px #FF4DC8,
        0 0 35px rgba(255,77,200,.8),
        0 0 70px rgba(255,77,200,.5);
    text-shadow:
        0 0 2px #fff,
        0 0 8px #FF4DC8,
        0 0 20px #FF4DC8,
        0 0 45px rgba(255,77,200,.8);
}
body.night .slot-btn::after {
    content: ''; position: absolute; inset: 0;
    border-radius: 4px; pointer-events: none; opacity: 0;
    box-shadow:
        0 0 8px #FF4DC8,
        0 0 22px #FF4DC8,
        0 0 50px rgba(255,77,200,.9),
        0 0 100px rgba(255,77,200,.6);
}
@media (min-width: 769px) {
    body.night .slot-btn::after { animation: glow-fade 3s ease-in-out infinite; }
}
body.night .slot-btn:hover::after { animation: none; opacity: 0; }
body.night .slot-btn:hover {
    color: #010306 !important;
    background: #FF4DC8;
    box-shadow:
        0 0 10px #FF4DC8,
        0 0 25px #FF4DC8,
        0 0 60px rgba(255,77,200,.9),
        0 0 120px rgba(255,77,200,.6),
        0 0 200px rgba(255,77,200,.3);
    text-shadow: none;
}

/* ── PODSTRONY ── */
body.night .page-title {
    text-shadow:
        0 0 5px rgba(0,238,255,.6),
        0 0 15px rgba(0,238,255,.4),
        0 0 40px rgba(0,238,255,.2),
        0 0 80px rgba(0,238,255,.1);
}
body.night .page-content {
    box-shadow:
        0 0 0 1px rgba(0,238,255,.3),
        0 0 20px rgba(0,238,255,.2),
        0 0 60px rgba(0,238,255,.08),
        inset 0 0 60px rgba(0,238,255,.05);
}
body.night .page-meta {
    text-shadow:
        0 0 2px #fff,
        0 0 8px #00EEFF,
        0 0 20px rgba(0,238,255,.8);
}
body.night .onas-heading {
    text-shadow:
        0 0 5px rgba(0,238,255,.6),
        0 0 18px rgba(0,238,255,.35),
        0 0 45px rgba(0,238,255,.15);
}

/* ── O NAS ── */
body.night .member-card {
    position: relative;
    box-shadow:
        0 0 0 1px #00EEFF,
        0 0 12px rgba(0,238,255,.6),
        0 0 35px rgba(0,238,255,.3),
        0 0 80px rgba(0,238,255,.12),
        inset 0 0 30px rgba(0,238,255,.06);
}
body.night .member-card::after {
    content: ''; position: absolute; inset: 0;
    border-radius: 4px; pointer-events: none; opacity: 0;
    box-shadow:
        0 0 18px rgba(0,238,255,.85),
        0 0 55px rgba(0,238,255,.5),
        0 0 110px rgba(0,238,255,.22);
}
@media (min-width: 769px) {
    body.night .member-card::after { animation: glow-fade 5s ease-in-out infinite; }
}
body.night .member-card:hover::after { animation: none; opacity: 0; }
body.night .member-card:hover {
    box-shadow:
        0 0 0 1px #00EEFF,
        0 0 18px rgba(0,238,255,.7),
        0 0 50px rgba(0,238,255,.4),
        0 0 100px rgba(0,238,255,.2),
        inset 0 0 40px rgba(0,238,255,.08);
}
body.night .member-role {
    text-shadow:
        0 0 2px #fff,
        0 0 8px #39FF14,
        0 0 20px #39FF14,
        0 0 45px rgba(57,255,20,.8),
        0 0 90px rgba(57,255,20,.5);
}
body.night .member-name {
    text-shadow:
        0 0 6px rgba(0,238,255,.6),
        0 0 18px rgba(0,238,255,.3),
        0 0 40px rgba(0,238,255,.12);
}
body.night .uni-tile {
    box-shadow:
        0 0 0 1px rgba(0,238,255,.25),
        0 0 8px rgba(0,238,255,.15),
        0 0 20px rgba(0,238,255,.07);
    text-shadow: 0 0 6px rgba(0,238,255,.4);
}
body.night .uni-tile:hover {
    box-shadow:
        0 0 0 1px #00EEFF,
        0 0 15px rgba(0,238,255,.6),
        0 0 40px rgba(0,238,255,.3),
        0 0 80px rgba(0,238,255,.15);
    text-shadow:
        0 0 2px #fff,
        0 0 8px #00EEFF,
        0 0 20px rgba(0,238,255,.8);
}

/* ── STOPKA ── */
body.night .footer {
    box-shadow:
        0 0 0 1px #00EEFF,
        0 -3px 15px #00EEFF,
        0 -6px 40px rgba(0,238,255,.6),
        0 -12px 100px rgba(0,238,255,.25);
}
body.night .footer-title {
    animation: neon-flicker 8s infinite 2s;
}
body.night .footer-social a:hover {
    color: #39FF14;
    text-shadow:
        0 0 2px #fff,
        0 0 8px #39FF14,
        0 0 20px #39FF14,
        0 0 45px rgba(57,255,20,.8);
}
body.night .footer-meta a {
    text-shadow:
        0 0 6px rgba(0,238,255,.5),
        0 0 15px rgba(0,238,255,.3);
}

/* ── PAGINACJA ── */
body.night .pagination a,
body.night .pagination span {
    text-shadow: 0 0 6px rgba(0,238,255,.5);
    box-shadow: 0 0 8px rgba(0,238,255,.2);
}
body.night .pagination .current {
    box-shadow:
        0 0 8px #FF4DC8,
        0 0 20px rgba(255,77,200,.7),
        0 0 45px rgba(255,77,200,.4);
    text-shadow: none;
}
body.night .pagination a:hover {
    text-shadow:
        0 0 2px #fff,
        0 0 8px #FF4DC8,
        0 0 20px rgba(255,77,200,.8);
    box-shadow:
        0 0 10px rgba(255,77,200,.5),
        0 0 25px rgba(255,77,200,.3);
}

/* ── DROBNY TEKST — czytelność + delikatny neon ── */
body.night .slot-excerpt,
body.night .member-uni,
body.night .onas-lead,
body.night .section-empty,
body.night .footer-tagline,
body.night .footer-meta p {
    text-shadow:
        0 0 4px rgba(0,238,255,.35),
        0 0 12px rgba(0,238,255,.15);
}

/* ============================================================
   ░░░  SIATKA 3D — RETRO SYNTHWAVE  ░░░
   Tlo globalne zyje na <html>, siatka na div .grid-floor (header.php),
   <body> jest przezroczysty, zeby je przepuszczac.
   ============================================================ */

html.night {
    background-color: #020509;
}

/* Siatka przeniesiona z html::before na div .grid-floor (header.php).
   Powod: animacja background-position wymuszala repaint warstwy
   150% szerokosci x 75vh w kazdej klatce (glowne zrodlo lagow).
   Teraz porusza sie ::before przez transform (kompozytor GPU),
   a maska mgly zostaje na nieruchomym rodzicu, wiec nie skacze. */
.grid-floor { display: none; }

html.night .grid-floor {
    display: block;
    position: fixed;
    left: -25%; right: -25%; bottom: 0;
    height: 75vh;
    pointer-events: none;
    z-index: -1;
    -webkit-mask-image: linear-gradient(to top, #000 18%, transparent 95%);
            mask-image: linear-gradient(to top, #000 18%, transparent 95%);
}
html.night .grid-floor::before {
    content: '';
    position: absolute;
    left: 0; right: 0; top: -60px; bottom: 0;
    background-image:
        linear-gradient(rgba(0,238,255,.6) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,238,255,.6) 1px, transparent 1px);
    background-size: 60px 60px;
    transform: perspective(500px) rotateX(60deg);
    transform-origin: 50% 100%;
}
@media (min-width: 769px) {
    html.night .grid-floor::before {
        animation: grid-flow 3.2s linear infinite;
        will-change: transform;
    }
}
@keyframes grid-flow {
    from { transform: perspective(500px) rotateX(60deg) translateY(0); }
    to   { transform: perspective(500px) rotateX(60deg) translateY(60px); }
}

/* Body w nocy = przezroczysty, zeby siatka z .grid-floor byla widoczna.
   Sekcje alt-bg też muszą puścić tło, w przeciwnym razie zasłaniają siatkę.
   Karty (.slot-item, .page-content, .member-card) zostają nieprzezroczyste —
   to "wyspy" treści unoszące się nad siatką. */
body.night {
    background: transparent;
}
body.night .alt-bg {
    background: transparent;
}

/* Mobile: nizsza, statyczna siatka (bez animacji) i gestsze linie */
@media (max-width: 768px) {
    html.night .grid-floor { height: 55vh; }
    html.night .grid-floor::before {
        top: -40px;
        background-size: 40px 40px;
        transform: perspective(350px) rotateX(62deg);
    }
}

/* Wieksze cele dotykowe w menu mobilnym */
@media (max-width: 768px) {
    .nav-links a { display: block; padding: 10px 0; }
}

/* Poszanowanie systemowego ograniczenia animacji */
@media (prefers-reduced-motion: reduce) {
    html.night .grid-floor::before,
    body.night .hero-scanlines::before,
    body.night .slot-item::after,
    body.night .member-card::after,
    body.night .slot-btn::after,
    body.night .nav-title,
    body.night .footer-title {
        animation: none !important;
    }
}