* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Amiri', serif;
    background-color: #041412;
    color: #fff;
    height: 100vh;
    overflow: hidden;
}

.container {
    display: flex;
    height: 100vh;
    transition: all 0.3s ease;
}

::selection {
    background: #1a7a6e;
    color: #ffffff;
}

::-moz-selection {
    background: #1a7a6e;
    color: #ffffff;
}

/* ===========================
   LEWA KOLUMNA — ZWÓJ Z LOGO I MENU
=========================== */
.left-column {
    width: 460px;
    min-width: 460px;
    background-image:
        linear-gradient(180deg, rgba(3, 18, 16, 0.12) 0%, rgba(3, 14, 13, 0.28) 100%),
        url('../assets/img/background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-color: #041412;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
    padding: 20px 0;
}

.left-content {
    width: 100%;
    max-width: 420px;
    padding: 10px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    gap: 18px;
}

/* .menu-bg zawiera już wtopione logo "XenoxMT2 - Letnie Wydanie" u góry */
.menu {
    width: 100%;
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.menu-bg {
    position: relative;
    width: 100%;
    max-width: 300px;
    aspect-ratio: 682 / 1894;
    background-image: url('../assets/img/menu_background.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.5));
}

.menu-bg-img {
    display: none;
}

.menu-list {
    position: absolute;
    top: 25%;
    left: 12%;
    width: 76%;
    height: 63%;
    list-style: none;
    padding: 4px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    overflow-y: auto;
    max-height: 63%;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.menu-list::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.menu-item {
    width: 100%;
    margin: 0 auto;
    position: relative;
    flex-shrink: 0;
}

.menu-link {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    width: 100%;
    aspect-ratio: 224 / 44;
    background-image: url('../assets/img/button.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    color: #0c2e28;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    transition: all 0.25s ease;
    cursor: pointer;
    text-align: center;
    padding: 0 10px;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
    filter: brightness(1) saturate(1);
}

.menu-link:hover,
.menu-link.active {
    filter: brightness(1.18) saturate(1.25);
    transform: scale(1.04);
    color: #3a2400;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55), 0 0 10px rgba(240, 201, 106, 0.6);
}

.social-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    width: 100%;
    max-width: 280px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    aspect-ratio: 224 / 44;
    background-image: url('../assets/img/button.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    color: #0c2e28;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
    transition: all 0.25s ease;
}

.social-btn:hover {
    filter: brightness(1.18) saturate(1.25);
    transform: scale(1.04);
}

.social-btn i {
    font-size: 14px;
}

/* ===========================
   ŚRODKOWA KOLUMNA — PLAŻOWE TŘO
=========================== */
.center-column {
    flex: 1;
    min-width: 300px;
    background-image:
        linear-gradient(180deg, rgba(3, 18, 16, 0.12) 0%, rgba(3, 14, 13, 0.28) 100%),
        url('../assets/img/background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-color: #041412;
    padding: 24px 40px;
    display: flex;
    align-items: stretch;
    justify-content: center;
    overflow-y: auto;
    transition: all 0.3s ease;
}

/* ===========================
   POJEDYNCZY KONTENER (content_background.png) —
   cala prezentacja jest w srodku scrollowana,
   rozciagniety na pelna wysokosc strony
=========================== */
.content-frame {
    position: relative;
    width: 100%;
    max-width: 880px;
    background-image: url('../assets/img/content_background.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    padding: 25px 25px;
}

.content-area {
    position: relative;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    padding: 50px 60px;
    scrollbar-width: thin;
    scrollbar-color: #b3803a rgba(0, 0, 0, 0.1);
}

.content-area::-webkit-scrollbar {
    width: 8px;
}

.content-area::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.08);
    border-radius: 8px;
}

.content-area::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #d4a848, #8a5c1e);
    border-radius: 8px;
}

.content-area::-webkit-scrollbar-thumb:hover {
    background: #f0c96a;
}

/* Naglowek kategorii — header.png w stalym rozmiarze, proporcja 301:93,
   NIGDY sie nie rozciaga (overflow:hidden + aspect-ratio na blokowym
   elemencie = wysokosc jest definitywna, tresc jej nie moze rozepchac).
   Tekst jest pozycjonowany przez position:absolute z inset-ami w %,
   bo TO jedyny mechanizm CSS liczacy procenty wzgledem WLASNEGO
   kontenera w obu osiach (zwykly padding-procentowy zawsze liczy sie
   wzgledem SZEROKOSCI RODZICA - nawet dla top/bottom - i dawal tu
   bledne, przeskalowane wciecia). Wartosci 14.6/85/46.2/74.2%
   to zmierzone piksele granic turkusowego pola w header.png. */
.content-header-container {
    position: relative;
    width: 301px;
    max-width: 90%;
    aspect-ratio: 301 / 93;
    overflow: hidden;
    background-image: url('../assets/img/header.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    margin: 26px auto 30px auto;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35));
}

.category-title {
    position: absolute;
    top: 46.2%;
    bottom: 25.8%;
    left: 14.6%;
    right: 15%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    line-height: 1;
    color: #fff8ea;
    background: none;
    -webkit-text-fill-color: initial;
    margin: 0;
    padding: 0;
    text-align: center;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    white-space: nowrap;
    overflow: hidden;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.category-section {
    margin: 0 auto 15px auto;
    padding-bottom: 30px;
    width: 100%;
    max-width: 800px;
    scroll-margin-top: 20px;
}

.content-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
}

.content-item {
    width: 100%;
    max-width: 640px;
    padding: 0;
    transition: all 0.3s ease;
    text-align: center;
    background: none;
    border: none;
}

/* Naglowek elementu — ten sam mechanizm i ten sam staly rozmiar 301x93
   co .content-header-container (patrz komentarz wyzej) */
.content-title-container {
    position: relative;
    width: 301px;
    max-width: 90%;
    aspect-ratio: 301 / 93;
    overflow: hidden;
    background-image: url('../assets/img/header.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    margin: 10px auto 20px auto;
    filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.3));
}

.content-title {
    position: absolute;
    top: 46.2%;
    bottom: 25.8%;
    left: 14.6%;
    right: 15%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff8ea;
    background: none;
    -webkit-text-fill-color: initial;
    font-size: 11px;
    line-height: 1;
    margin: 0;
    font-weight: bold;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0;
    white-space: nowrap;
    overflow: hidden;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.content-meta {
    color: #6b5636;
    font-size: 14px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-style: italic;
}

.content-text {
    line-height: 1.8;
    font-size: 17px;
    color: #2a1f10;
    text-align: left;
    margin: 0 auto;
    max-width: 640px;
    padding: 6px 14px;
}

/* efekty.css (wczytywany PO tym pliku) definiuje .gradient-zloty / .gradient-czerwony
   jako jasny gradient na tekscie — czytelny na ciemnym tle, ale nieczytelny na jasnym
   pergaminie. Wymuszamy tu ciemne, kontrastowe kolory z !important, zeby wygrac
   niezaleznie od kolejnosci wczytywania arkuszy. */
.wyswietlana-tresc .gradient-zloty,
.wysiwyg-editor .gradient-zloty,
.content-text .gradient-zloty {
    background: none !important;
    -webkit-text-fill-color: initial !important;
    color: #6b3f14 !important;
    font-weight: 600;
}

.wyswietlana-tresc .gradient-czerwony,
.wysiwyg-editor .gradient-czerwony,
.content-text .gradient-czerwony {
    background: none !important;
    -webkit-text-fill-color: initial !important;
    color: #8a2f22 !important;
    font-weight: 700;
}

.no-content {
    color: #6b3f14;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 30px;
    text-align: center;
    width: 100%;
}

.loading-content {
    text-align: center;
    font-size: 20px;
    color: #6b3f14;
    padding: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

/* ===========================
   PRAWA KOLUMNA — LICZNIK ODWIEDZIN
=========================== */
.right-column {
    width: 460px;
    min-width: 460px;
    background-image:
        linear-gradient(180deg, rgba(3, 18, 16, 0.12) 0%, rgba(3, 14, 13, 0.28) 100%),
        url('../assets/img/background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-color: #041412;
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    transition: all 0.3s ease;
    padding: 24px;
}

.page-counter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Amiri', serif;
    font-size: 0.82rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(212, 168, 72, 0.75);
    padding: 8px 16px;
    border: 1px solid rgba(212, 168, 72, 0.3);
    border-radius: 999px;
    background: rgba(4, 20, 18, 0.55);
    backdrop-filter: blur(4px);
    user-select: none;
    transition: color 0.3s, border-color 0.3s;
    float: right;
}

.page-counter:hover {
    color: rgba(240, 201, 106, 1);
    border-color: rgba(240, 201, 106, 0.6);
}

.page-counter i {
    font-size: 0.75rem;
    opacity: 0.8;
}

.page-counter .counter-value {
    color: #f0c96a;
    font-weight: 700;
    font-size: 0.95rem;
    text-shadow: 0 0 8px rgba(240, 201, 106, 0.5);
}

.admin-login-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #145850;
    color: #f0c96a;
    padding: 10px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-login-btn:hover {
    background: #1a7a6e;
    transform: scale(1.05);
}

/* ===========================
   BREAKPOINTY
=========================== */
@media (max-width: 1800px) {
    .left-column { width: 400px; min-width: 400px; }
    .center-column { margin-left: 400px; margin-right: 400px; }
    .right-column { width: 400px; min-width: 400px; }
}

@media (max-width: 1600px) {
    .right-column { display: none; }
    .center-column { margin-right: 0; }
    .left-column { width: 360px; min-width: 360px; }
    .center-column { margin-left: 360px; }
    .menu-bg { max-width: 270px; }
    .category-section { max-width: 700px; }
    .content-item { max-width: 600px; }
}

@media (max-width: 1400px) {
    .left-column { width: 320px; min-width: 320px; }
    .center-column { margin-left: 320px; }
    .menu-bg { max-width: 250px; }
    .menu-link { font-size: 11px; }
    .category-section { max-width: 650px; }
    .content-item { max-width: 560px; }
}

@media (max-width: 1200px) {
    .container { flex-direction: column; }
    .left-column {
        position: relative;
        width: 100%;
        min-width: 100%;
        min-height: auto;
    }
    .center-column {
        margin-left: 0;
        margin-right: 0;
        min-height: calc(100vh - 400px);
    }
    .category-section { max-width: 800px; }
    .content-item { max-width: 640px; }
}

@media (max-width: 900px) {
    .content-area { padding: 36px 30px; }
    .category-section { max-width: 600px; }
    .content-item { max-width: 100%; }
}

@media (max-width: 768px) {
    .center-column { padding: 16px 12px; }
    .category-title { font-size: 11px; }
    .content-title { font-size: 10px; }
    .content-area { padding: 30px 24px; }
    .content-text { font-size: 16px; padding: 4px 6px; }
    .category-section { max-width: 500px; }
}

@media (max-width: 480px) {
    .center-column { padding: 8px 6px; }
    .category-title { font-size: 10px; }
    .content-title { font-size: 9px; }
    .content-area { padding: 20px 14px; }
    .content-text { font-size: 15px; }
    .category-section { max-width: 100%; }
}

/* ===========================
   HAMBURGER (MENU MOBILNE)
=========================== */
.hamburger-btn {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10001;
    width: 50px;
    height: 50px;
    background: rgba(20, 88, 80, 0.95);
    border: 2px solid #d4a848;
    border-radius: 8px;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    padding: 0;
}

.hamburger-btn:hover {
    background: rgba(212, 168, 72, 0.95);
    transform: scale(1.05);
}

.hamburger-btn span {
    display: block;
    width: 30px;
    height: 3px;
    background: #fff;
    border-radius: 3px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.hamburger-btn.active {
    background: rgba(212, 168, 72, 0.95);
}

.hamburger-btn.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.hamburger-btn.active span:nth-child(2) { opacity: 0; transform: scale(0); }
.hamburger-btn.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

.left-column.mobile-menu-ready {
    position: fixed !important;
    top: 0;
    right: 0;
    left: auto;
    width: 100% !important;
    max-width: 400px !important;
    min-width: 0 !important;
    height: 100vh;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
    z-index: 10000;
    overflow-y: auto;
    overflow-x: hidden;
    background: linear-gradient(180deg, #06231f 0%, #031412 100%);
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.5);
    border-left: 2px solid rgba(212, 168, 72, 0.3);
}

.left-column.mobile-menu-active { transform: translateX(0); }

.left-column.mobile-menu-ready .left-content {
    padding: 30px 15px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    gap: 20px;
}

.left-column.mobile-menu-ready .menu {
    flex: 1 1 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-height: 72vh;
}

.left-column.mobile-menu-ready .menu-bg {
    max-width: 260px;
}

.left-column.mobile-menu-ready .social-buttons {
    flex: 0 0 auto;
    width: 100%;
    max-width: 260px;
}

body.menu-open::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    animation: fadeIn 0.3s ease;
    backdrop-filter: blur(3px);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (max-width: 1200px) {
    .left-column:not(.mobile-menu-ready) { display: none !important; }
    .hamburger-btn { display: flex; }
    .center-column { margin-left: 0 !important; }
}

@media (max-width: 768px) {
    .hamburger-btn { top: 15px; right: 15px; width: 45px; height: 45px; }
    .hamburger-btn span { width: 25px; height: 2.5px; }
    .left-column.mobile-menu-ready { width: 90% !important; }
}

@media (max-width: 480px) {
    .hamburger-btn { top: 10px; right: 10px; width: 40px; height: 40px; }
    .hamburger-btn span { width: 22px; height: 2px; }
    .left-column.mobile-menu-ready { width: 95% !important; max-width: 320px !important; }
    .left-column.mobile-menu-ready .menu-bg { max-width: 230px; }
}

/* ===========================
   SPARKI / EFEKTY TŘA
=========================== */
#sparks-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
    overflow: hidden;
}

.spark {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transition: opacity 0.3s ease;
}

@media (prefers-reduced-motion: reduce) {
    #sparks-container { display: none; }
}

@media (max-width: 768px) {
    #sparks-container { opacity: 0.6; }
}

@media (max-width: 480px) {
    #sparks-container { opacity: 0.4; }
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    background:
        radial-gradient(circle at 20% 30%, rgba(212, 168, 72, 0.04) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(26, 122, 110, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(212, 168, 72, 0.03) 0%, transparent 50%);
    animation: backgroundSparkle 30s infinite alternate ease-in-out;
}

@keyframes backgroundSparkle {
    0% { opacity: 0.1; transform: translateY(0) rotate(0deg); }
    50% { opacity: 0.2; transform: translateY(-20px) rotate(0.5deg); }
    100% { opacity: 0.15; transform: translateY(10px) rotate(-0.5deg); }
}

/* Obrazki wewnątrz tresci */
.wyswietlana-tresc img,
.wysiwyg-editor img {
    max-width: 100% !important;
    height: auto !important;
    margin: 18px auto !important;
    display: block !important;
}

.wyswietlana-tresc iframe[src*="youtube"],
.wyswietlana-tresc iframe[src*="youtu.be"],
.wysiwyg-editor iframe[src*="youtube"],
.wysiwyg-editor iframe[src*="youtu.be"] {
    width: 100% !important;
    max-width: 800px !important;
    height: 450px !important;
    display: block !important;
    margin: 20px auto !important;
    border: 2px solid #d4a848 !important;
    border-radius: 10px !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5) !important;
    background: #000 !important;
}

.youtube-video-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 20px auto;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 2px solid #d4a848;
    background: #000;
    padding-bottom: 56.25%;
    height: 0;
}

.youtube-video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

@media (max-width: 768px) {
    .wyswietlana-tresc iframe[src*="youtube"],
    .wysiwyg-editor iframe[src*="youtube"] {
        width: 100% !important;
        height: 56.25vw !important;
        min-height: 200px !important;
        max-height: 450px !important;
    }
}
