/* --- FUNDAMENT --- */
:root {
    --primary-red: #e44424;
    --dark-bg: #1a202c;
    --light-bg: #ffffff;
    --text-dark: #333;
    --text-light: #fff;
    --card-white: rgba(255, 255, 255, 0.94);
    --a11y-toolbar-height: 0px;
    --header-height-current: 145px;
}

body.high-contrast {
    --primary-red: #ffff00;
    --dark-bg: #000;
    --light-bg: #000;
    --text-dark: #ffff00;
    --text-light: #ffff00;
    --card-white: #000;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}
body { font-family: 'Montserrat', sans-serif; color: var(--text-dark); background: var(--light-bg); line-height: 1.5; }
a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--primary-red);
    outline-offset: 4px;
}

/* --- HEADER I SHRINK EFFECT --- */
header {
    background: var(--light-bg); position: fixed; top: var(--a11y-toolbar-height); left: 0; width: 100%; z-index: 2000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05); transition: all 0.4s ease; height: 145px; display: flex; align-items: center;
}
header.scrolled { height: 75px; background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(8px); }

.header-wrapper { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; transition: all 0.4s ease; }
header.scrolled .header-wrapper { flex-direction: row; align-items: center; justify-content: space-between; padding: 0 20px; }

.container { width: min(100%, 1200px); margin: 0 auto; }
.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;
}

.logo { display: flex; align-items: center; justify-content: center; }
.logo img { max-width: 300px; height: auto; transition: all 0.4s ease; }
header.scrolled .logo img { max-width: 180px; }

.nav-menu ul { display: none; list-style: none; }
.menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border: 0;
    background: transparent;
    cursor: pointer;
}
.hamburger,
.hamburger::before,
.hamburger::after {
    display: block;
    width: 28px;
    height: 3px;
    border-radius: 999px;
    background: #000;
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.hamburger {
    position: relative;
}
.hamburger::before,
.hamburger::after {
    content: "";
    position: absolute;
    left: 0;
}
.hamburger::before { top: -8px; }
.hamburger::after { top: 8px; }
.menu-toggle[aria-expanded="true"] .hamburger { background: transparent; }
.menu-toggle[aria-expanded="true"] .hamburger::before { transform: translateY(8px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .hamburger::after { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 979px) {
    header {
        height: 145px;
        min-height: 145px;
        align-items: center;
        overflow: visible;
    }
    header.scrolled {
        height: 75px;
        min-height: 75px;
    }
    .header-wrapper {
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 16px;
        width: 100%;
        padding: 18px 20px 16px;
    }
    header.scrolled .header-wrapper {
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 16px;
        width: 100%;
        padding: 12px 20px 14px;
    }
    .logo {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
    .logo a {
        display: inline-flex;
        margin: 0 auto;
    }
    .logo img {
        max-width: 220px;
    }
    header.scrolled .logo img {
        max-width: 170px;
    }
    .menu-toggle {
        position: absolute;
        top: 50%;
        right: 20px;
        transform: translateY(-50%);
        z-index: 2;
    }
    .nav-menu.open ~ .menu-toggle {
        opacity: 0;
        pointer-events: none;
    }
    .nav-menu {
        display: none;
        position: absolute;
        top: calc(100% + 18px);
        left: 50%;
        transform: translateX(-50%);
        width: min(calc(100vw - 32px), 92%);
        margin-inline: auto;
        z-index: 4;
    }
    .nav-menu.open {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
    .nav-menu ul {
        flex-direction: column;
        gap: 0;
        width: 100%;
        margin-top: 0;
        padding: 18px 0;
        background: rgba(255, 255, 255, 0.86);
        border-radius: 16px;
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
        backdrop-filter: blur(10px);
        text-align: center;
    }
    .nav-menu li + li::before {
        content: "";
        display: block;
        width: 75%;
        margin: 0 auto;
        border-top: 1px solid rgba(26, 32, 44, 0.16);
    }
    .nav-menu.open ul {
        display: flex;
    }
    .nav-menu a {
        display: block;
        text-decoration: none;
        color: var(--text-dark);
        font-weight: 700;
        font-size: 1.05rem;
        padding: 14px 22px;
        text-transform: uppercase;
        text-align: center;
    }
}

@media (min-width: 980px) {
    .menu-toggle { display: none; }
    .nav-menu ul { display: flex; gap: 30px; }
    .nav-menu a {
        position: relative;
        display: inline-flex;
        padding-bottom: 12px;
        text-decoration: none;
        color: var(--text-dark);
        font-weight: 700;
        font-size: 0.85rem;
        text-transform: uppercase;
        transition: color 0.25s ease;
    }
    .nav-menu a::after {
        content: "";
        position: absolute;
        left: 0;
        bottom: 0;
        width: 100%;
        height: 2px;
        background: currentColor;
        transform: scaleX(0);
        transform-origin: center;
        transition: transform 0.25s ease;
    }
    .nav-menu a:hover::after,
    .nav-menu a:focus-visible::after,
    .nav-menu a.active::after,
    .nav-menu a[aria-current="page"]::after {
        transform: scaleX(1);
    }
    header.scrolled .header-wrapper { justify-content: center; gap: 36px; padding: 0 40px; }
    header.scrolled .nav-menu ul { align-items: center; }
}
main { padding-top: calc(145px + var(--a11y-toolbar-height)); }

/* --- SKALOWANIE KART (Zgodnie z Twoją prośbą) --- */
.content-card, .preamble-card {
    background: var(--card-white); border-radius: 15px; text-align: center;
    margin-left: auto; margin-right: auto; box-shadow: 0 15px 45px rgba(0,0,0,0.1);
}

@media (min-width: 1200px) { .content-card, .preamble-card, .quote-box { width: 1100px; } }
@media (max-width: 1199px) and (min-width: 980px) { .content-card, .preamble-card, .quote-box { width: 940px; } }
@media (max-width: 979px) { .content-card, .preamble-card, .quote-box { width: 92%; } }

/* --- FORMATOWANIE TEKSTU HERO (POWIĘKSZONE) --- */
.hero-parallax {
    --hero-bg-shift: 0px;
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    isolation: isolate;
}
.hero-parallax-bg {
    position: absolute;
    inset: -5%;
    background-image: url('Graphics/jaskinia.jpg');
    background-size: cover;
    background-position: center;
    transform: translate3d(0, 0, 0) scale(1.02);
    will-change: transform;
    z-index: -2;
}
.hero-parallax-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to bottom, rgba(16, 22, 30, 0.18), rgba(16, 22, 30, 0.08) 28%, rgba(16, 22, 30, 0.2)),
        radial-gradient(circle at top, rgba(255, 255, 255, 0.1), transparent 44%);
    z-index: -1;
}

.hero-overlay { width: 100%; padding: 40px 0; }

.content-card {
    padding: 60px 40px;
    margin-top: 50px;
    margin-bottom: 50px;
}

.line-1 { font-size: clamp(1.2rem, 0.95rem + 1.2vw, 1.8rem); font-weight: 400; margin-bottom: 5px; }
.line-2 { font-size: clamp(1.75rem, 1.1rem + 3vw, 4rem); font-weight: 800; color: var(--text-dark); margin-bottom: 30px; line-height: 1.1; }
.hero-intro {
    position: relative;
    margin: 0 auto 12px;
    max-width: 920px;
    padding: 20px 0;
}
.hero-intro::before,
.hero-intro::after {
    content: "";
    display: block;
    width: 75%;
    margin: 0 auto;
    border-top: 1px solid rgba(0, 0, 0, 0.22);
}
.hero-intro::before {
    margin-bottom: 16px;
}
.hero-intro::after {
    margin-top: 16px;
}
.hero-intro p { font-size: clamp(1rem, 0.85rem + 0.75vw, 1.4rem); line-height: 1.7; margin-bottom: 12px; }
.hero-intro p:last-child { margin-bottom: 0; }
.mobile-only-break { display: none; }
.hero-details { margin-top: 0; }
.hero-details p { font-size: clamp(1rem, 0.85rem + 0.75vw, 1.4rem); margin-bottom: 8px; }
.highlight-days { font-weight: 800; font-size: clamp(1.15rem, 0.95rem + 1vw, 1.6rem) !important; color: var(--text-dark); margin: 15px 0 !important; }
.highlight-time { font-weight: 800; font-size: clamp(1.25rem, 1rem + 1.15vw, 1.8rem) !important; color: var(--text-dark); }
.hero-timezone-note {
    font-size: clamp(0.72rem, 0.66rem + 0.2vw, 0.86rem) !important;
    line-height: 1.4;
    opacity: 0.82;
    margin-top: -2px !important;
    margin-bottom: 12px !important;
}
.zoom-note { font-weight: 700; font-size: clamp(1rem, 0.85rem + 0.75vw, 1.4rem); margin-top: 20px !important; }

/* Kafelki */
.schedule-list { display: flex; flex-direction: column; gap: 15px; margin: 45px 0; }
.schedule-box {
    background: var(--dark-bg);
    color: var(--text-light);
    padding: 28px 35px;
    border: 2px solid transparent;
    border-radius: 10px;
    width: 100%;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}
.schedule-box h2 { font-size: clamp(1.05rem, 0.85rem + 0.9vw, 1.6rem); margin-bottom: 8px; font-weight: 800; }
.schedule-box p { font-size: clamp(0.95rem, 0.82rem + 0.55vw, 1.2rem); }
.schedule-description {
    margin-bottom: 10px;
}
.schedule-text-with-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45em;
    flex-wrap: wrap;
}
.schedule-inline-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35em;
    height: 1.35em;
    flex: 0 0 auto;
    line-height: 1;
    vertical-align: middle;
}
.schedule-inline-icon-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: brightness(0) invert(1);
}
.schedule-box.is-today .schedule-inline-icon-img {
    filter: brightness(0) invert(0.12);
}
.schedule-box.is-today {
    position: relative;
    background: rgba(255, 248, 240, 0.96);
    color: #1a202c;
    border-color: var(--primary-red);
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.14);
    transform: translateY(-2px);
}
.schedule-box.is-today:hover,
.schedule-box.is-today:focus-within {
    box-shadow: 0 20px 34px rgba(0, 0, 0, 0.18);
    transform: translateY(-4px);
}
.schedule-box.is-joinable {
    cursor: pointer;
}
.schedule-box.is-today h2,
.schedule-box.is-today p {
    color: inherit;
}
.schedule-box-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    text-align: center;
    flex-wrap: wrap;
}
.schedule-day-label {
    display: inline-block;
}
.schedule-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--primary-red);
    color: var(--text-light);
    font-size: clamp(0.64rem, 0.58rem + 0.18vw, 0.72rem);
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.schedule-timezone-note {
    margin-top: 8px;
    font-size: clamp(0.68rem, 0.64rem + 0.16vw, 0.8rem) !important;
    line-height: 1.45;
    opacity: 0.82;
    height: 2.95em;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    transition: color 0.25s ease, opacity 0.25s ease;
}
.schedule-box.show-countdown .schedule-timezone-note {
    font-weight: 700;
    opacity: 1;
}
.schedule-timezone-note .schedule-note-line {
    display: block;
}
.schedule-timezone-note .schedule-note-value {
    white-space: nowrap;
}

.cta-wrapper {
    display: flex;
    justify-content: center;
}
.btn-main-zoom {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--primary-red); color: var(--text-light); text-decoration: none;
    padding: 24px 22px; width: 100%; max-width: 600px; border-radius: 10px; font-weight: 800; font-size: 1.6rem; text-transform: uppercase;
    border: 2px solid transparent;
    text-align: center;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}
.btn-main-zoom-label {
    display: block;
    line-height: 1.1;
}
.btn-main-zoom-note {
    display: block;
    font-size: clamp(0.68rem, 0.64rem + 0.18vw, 0.84rem);
    font-weight: 500;
    line-height: 1.4;
    text-transform: none;
    letter-spacing: 0;
    max-width: 34ch;
    margin: 0 auto;
    opacity: 0.88;
}
.btn-main-zoom:hover,
.btn-main-zoom:focus-visible {
    background: rgba(255, 248, 240, 0.96);
    color: #1a202c;
    border-color: var(--primary-red);
    box-shadow: 0 20px 34px rgba(0, 0, 0, 0.18);
    transform: translateY(-4px);
}
.btn-main-zoom.is-disabled {
    background: var(--primary-red);
    color: var(--text-light);
    border-color: transparent;
    box-shadow: none;
    transform: none;
    cursor: not-allowed;
}
.btn-main-zoom.is-disabled:hover,
.btn-main-zoom.is-disabled:focus-visible {
    background: var(--primary-red);
    color: var(--text-light);
    border-color: transparent;
    box-shadow: none;
    transform: none;
}
.nav-menu a.is-disabled {
    opacity: 0.55;
    cursor: not-allowed;
}
.nav-menu a.is-disabled::after,
.nav-menu a.is-disabled:hover::after,
.nav-menu a.is-disabled:focus-visible::after {
    transform: scaleX(0);
}

/* --- CYTAT --- */
.quote-section {
    padding: 72px 20px;
    background-image: url('Graphics/bgsection.jpg');
    background-size: cover;
    background-position: center;
    text-align: center;
}
.quote-box {
    max-width: 1100px;
    margin: 0 auto;
    padding: clamp(28px, 4vw, 42px) 2%;
    background:
        linear-gradient(rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.78)),
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.35), transparent 38%),
        radial-gradient(circle at 80% 30%, rgba(255, 255, 255, 0.28), transparent 34%);
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 8px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(4px);
}
blockquote {
    font-size: clamp(1rem, 0.8rem + 1.1vw, 1.45rem);
    font-weight: 400;
    color: var(--text-dark);
    max-width: none;
    width: 100%;
    margin: 0 auto 12px;
    line-height: 1.45;
    text-wrap: wrap;
}
figcaption {
    font-weight: 500;
    font-size: clamp(0.68rem, 0.64rem + 0.22vw, 0.82rem);
    color: rgba(44, 44, 44, 0.72);
    letter-spacing: 0.04em;
}

/* --- WIDEO I PREAMBUŁA (NAPRAWA OVERFLOW) --- */
.video-section { position: relative; min-height: 750px; display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 80px 0; }
.bg-video { position: absolute; top: 50%; left: 50%; min-width: 100%; min-height: 100%; transform: translate(-50%, -50%); object-fit: cover; z-index: -1; }

.preamble-card { background: rgba(26, 32, 44, 0.88); padding: 70px; color: var(--text-light); font-size: 1.5rem; line-height: 1.7; }
.preamble-text {
    margin: 0;
}
.preamble-final-line {
    display: block;
    margin-top: 0;
}
.preamble-source {
    margin-top: 26px;
    font-size: clamp(0.82rem, 0.74rem + 0.25vw, 0.96rem);
    line-height: 1.4;
    opacity: 0.88;
}

@media (max-width: 980px) {
    .preamble-card { font-size: 1.1rem; padding: 40px; }
    .video-section { min-height: 600px; }
    .hero-parallax-bg {
        inset: -4%;
        transform: translate3d(0, 0, 0) scale(1.02);
    }
    .hero-parallax-shade {
        background: linear-gradient(to bottom, rgba(16, 22, 30, 0.14), rgba(16, 22, 30, 0.1));
    }
    .content-card {
        transform: none;
    }
}

@media (max-width: 600px) {
    .content-card {
        padding: 52px 28px;
    }
    .mobile-only-break {
        display: block;
    }
    .line-2 {
        font-size: min(7vw, 2rem);
        letter-spacing: -0.03em;
        white-space: nowrap;
    }
    .highlight-days {
        font-size: 1.42rem !important;
        line-height: 1.35;
        max-width: 22ch;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    .highlight-time {
        font-size: 1.58rem !important;
        line-height: 1.3;
    }
}

@media (max-width: 430px) {
    .content-card {
        padding: 48px 22px;
    }
    .line-2 {
        font-size: min(6.6vw, 1.7rem) !important;
        letter-spacing: -0.04em;
        white-space: nowrap;
    }
    .highlight-days {
        font-size: 1.34rem !important;
        max-width: 21ch;
    }
    .highlight-time {
        font-size: 1.48rem !important;
    }
    blockquote {
        font-size: 0.92rem;
        line-height: 1.4;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-parallax-bg { transform: none; will-change: auto; }
}

/* --- DOSTĘPNOŚĆ (LEWA STRONA) --- */
.a11y-widget-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: max(79px, var(--a11y-toolbar-height));
    z-index: 4000;
    pointer-events: none;
}
.a11y-button {
    position: fixed;
    top: calc(var(--a11y-toolbar-height) + (var(--header-height-current) / 2) - 27.5px);
    left: 12px;
    width: 55px; height: 55px; border-radius: 50%; background: #0056b3; border: 2px solid #fff;
    cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 15px rgba(0,0,0,0.25);
    pointer-events: auto;
    z-index: 2;
}
.a11y-icon-img { width: 32px; height: auto; filter: brightness(0) invert(1); }

.a11y-panel {
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    backdrop-filter: blur(10px);
    pointer-events: auto;
}
.a11y-panel-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 78px;
    padding: 12px 84px;
    flex-wrap: wrap;
}
.a11y-panel-title {
    width: 100%;
    text-align: center;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-dark);
}
.a11y-panel button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    min-width: 170px;
    padding: 10px 22px;
    cursor: pointer;
    font-weight: 700;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: var(--dark-bg);
    border-radius: 999px;
    font-size: 0.98rem;
}
.a11y-panel button[aria-pressed="true"] {
    background: var(--primary-red);
    color: var(--dark-bg);
    border-color: var(--primary-red);
}

footer { background: #1a202c; color: #aaa; padding: 80px 20px; text-align: center; }
.footer-dots { margin-top: 30px; font-size: 2rem; letter-spacing: 10px; color: #333; }
.skip-link { position: absolute; top: -100px; left: 0; background: var(--primary-red); color: white; padding: 10px; z-index: 5000; }
.skip-link:focus { top: 0; }

body.high-contrast .btn-main-zoom {
    background: var(--dark-bg);
    color: var(--text-light);
    border: 2px solid var(--text-light);
}

body.high-contrast .schedule-badge {
    color: var(--dark-bg);
    border: 1px solid var(--dark-bg);
}

body.high-contrast header,
body.high-contrast header.scrolled {
    background: var(--light-bg);
    border-bottom: 1px solid var(--text-light);
    box-shadow: none;
    backdrop-filter: none;
}

body.high-contrast .nav-menu a {
    color: var(--text-dark);
}

body.high-contrast .nav-menu ul {
    background: var(--light-bg);
    border: 0;
    box-shadow: none;
}

body.high-contrast .a11y-panel {
    background: var(--light-bg);
    border-bottom-color: var(--text-light);
    box-shadow: none;
    backdrop-filter: none;
}

body.high-contrast .a11y-panel-title {
    color: var(--text-dark);
}

body.high-contrast .a11y-panel button {
    background: var(--dark-bg);
    color: var(--text-light);
    border-color: var(--text-light);
}

body.high-contrast .a11y-panel button[aria-pressed="true"] {
    background: var(--text-light);
    color: var(--dark-bg);
    border-color: var(--text-light);
}

body.high-contrast .quote-box {
    background: var(--card-white);
    border-color: var(--text-light);
    box-shadow: none;
    backdrop-filter: none;
}

body.high-contrast blockquote,
body.high-contrast figcaption {
    color: var(--text-light);
}

body.high-contrast .preamble-card {
    background: var(--dark-bg);
    color: var(--text-light);
    border: 2px solid var(--text-light);
}

@media (max-width: 979px) {
    main { padding-top: calc(145px + var(--a11y-toolbar-height)); }
    .a11y-panel-inner {
        align-items: stretch;
        justify-content: center;
        padding: 80px 20px 18px;
    }
    .a11y-panel-title {
        width: 100%;
        text-align: center;
    }
    .a11y-panel button {
        flex: 1 1 calc(50% - 12px);
        min-width: 0;
    }
    .a11y-button {
        top: calc(var(--a11y-toolbar-height) + (var(--header-height-current) / 2) - 27.5px);
        left: 12px;
    }
}
