@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Mono&family=Sono:wght@300&display=swap');

* {
    margin: 0;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
    box-sizing: border-box;
}

@keyframes body-gradient {
    0% { background-position: 0 0; }
    100% { background-position: 9999999px 0; }
}

html {
    scroll-behavior: smooth;
}

/* Domyślnie jasne tło dla całej strony */
body {
    background-color: #ffffff;
    transition: background-color 0.3s ease;
}

/* Ciemny motyw włączany klasą theme-dark z animacją */
body.theme-dark {
    background-image: linear-gradient(to right, black, rgb(44, 44, 44), black);
    animation: 99999s body-gradient linear infinite;
}

/* ANIMACJE TYTUŁU GŁÓWNEGO */
@keyframes main-title-h1 {
    0% { opacity: 1; }
    25% { opacity: 0.6; }
    50% { opacity: 1; }
    75% { opacity: 1; }
    100% { opacity: 1; }
}

@keyframes main-title-h1-after-effect {
    0% { bottom: 0; left: 0; width: 20%; height: 5%; background-color: red; }
    25% { bottom: 0; left: 71%; width: 30%; height: 5%; background-color: red; }
    50% { bottom: 0; left: 0; width: 40%; height: 5%; background-color: white; }
    75% { bottom: 0; left: 71%; width: 30%; height: 5%; background-color: white; }
    100% { bottom: 0; left: 0; width: 20%; height: 5%; background-color: red; }
}

.container {
    width: 99%;
    min-height: 98vh;
    display: flex;
    align-items: center;
    flex-direction: column;
    margin: 1vh 0.5%;
    padding-bottom: 5vh;
    background-color: #ffffff;
    border-radius: 5px;
    transition: background-color 0.5s ease-in-out;
}

/* KONTENER NAGŁÓWKA */
.header {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px 20px 10px;
    gap: 1rem;
}

.header-controls {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

/* Przycisk Spis treści */
.hamburger-menu {
    width: auto;
    min-width: 130px;
    height: 42px;
    padding: 0 16px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    background: rgba(240, 240, 240, 0.9);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Noto Sans Mono', monospace;
    font-size: 0.95rem;
    font-weight: 600;
    color: #111111;
    cursor: pointer;
    z-index: 40;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.hamburger-menu:hover {
    background-color: rgba(220, 220, 220, 1);
    transform: scale(1.02);
}

.hamburger-menu.is-open {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* PRZYCISK ZMIANY KONTRASTU / MOTYWU */
.change_contrast {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contrast_href {
    width: 100%;
    height: 100%;
    background-color: black;
    border-radius: 100%;
    transition: 0.8s ease-in-out;
    border: 1px solid black;
    transform: rotateZ(240deg);
}

.contrast_href:hover {
    box-shadow: black 0 0 15px;
    transform: rotateZ(-120deg);
}

.catch_contrast_image {
    width: auto;
    height: 100%;
    border-radius: 100%;
    background-color: black;
}

/* DZIAŁ TYTUŁU GŁÓWNEGO */
.main-title-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0.5rem 0;
}

.main-title-option {
    font-family: 'Sono', sans-serif;
    width: max-content;
    height: fit-content;
    text-shadow: black 0 0 5px, black 0 0 4px, black 0 0 6px;
}

.main-title-h1 {
    color: white;
    font-size: clamp(1.5rem, 3.5vw, 2.5rem);
    background-size: 0 3%;
    background-repeat: no-repeat;
    position: relative;
    animation: 2s main-title-h1 infinite;
    text-align: center;
}

.main-title-h1::after {
    content: '';
    border-radius: 5px;
    position: absolute;
    top: 120%;
    left: 0;
    animation: 7s main-title-h1-after-effect ease-in-out infinite;
}

.main-title-h1-span-first-title {
    color: red;
}

/* LINK PRZEJŚCIA NA STRONĘ GŁÓWNĄ ZSCL */
.menu {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.powrot_do_zscl {
    display: flex;
    align-items: center;
    justify-content: center;
}

.powrot_do_zscl a {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    text-decoration: none;
    color: black;
    background-image: linear-gradient(to right, black, black);
    background-repeat: no-repeat;
    background-size: 0 2px;
    background-position: bottom center;
    transition: 0.3s ease-out;
    padding-bottom: 5px;
    font-family: 'Noto Sans Mono', monospace;
}

.powrot_do_zscl a:hover {
    background-size: 80% 2px;
    color: red;
    transform: translateY(-3px);
}

/* SIDE MENU */
.side-menu {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(310px, 78vw);
    background: rgba(255, 255, 255, 0.98);
    border-right: 1px solid rgba(0, 0, 0, 0.12);
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.15);
    transform: translateX(-103%);
    transition: transform 0.35s ease, background-color 0.3s ease, border-color 0.3s ease;
    z-index: 50;
    display: flex;
    flex-direction: column;
}

.side-menu.is-open {
    transform: translateX(0);
}

.side-menu__header {
    padding: 1.2rem 1rem;
    font-size: clamp(1.1rem, 1.6vmax, 1.3rem);
    font-family: 'Noto Sans Mono', monospace;
    color: #111111;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.side-menu__close {
    background: transparent;
    border: none;
    font-size: 2rem;
    line-height: 1;
    color: inherit;
    cursor: pointer;
    padding: 0 0.5rem;
    transition: color 0.2s ease;
}

.side-menu__close:hover {
    color: red;
}

.side-menu__nav {
    flex: 1;
    padding: 1.15rem 1rem 1.5rem;
    overflow-y: auto;
}

/* SEKCJA GAZETKI */
.gazetka-content-div {
    min-height: 40vh;
    max-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    position: relative;
    padding-top: 2vh;
    padding-bottom: 2vh;
    margin-top: 2.5rem; /* <--- ZWIĘKSZ LUB ZMNIEJSZ TĘ WARTOŚĆ (np. 2rem, 3rem, 20px) */
}

.div_container {
    height: auto;
    position: relative;
    padding-top: 3vh;
    padding-bottom: 3vh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

@keyframes opacity_changer {
    from { opacity: 0; }
    to { opacity: 1; }
}

.image_source {
    max-width: 95vw;
    width: auto;
    max-height: 80vh;
    height: auto;
    opacity: 0;
}

@keyframes top-image-move {
    0% { background-position-x: 0; }
    100% { background-position-x: 99999px; }
}

@keyframes bottom-image-move {
    0% { background-position-x: 0; }
    100% { background-position-x: 99999px; }
}

.top-image {
    width: 100%;
    height: 3vh;
    position: absolute;
    top: 0;
    left: 0;
    animation: 24000s top-image-move linear infinite;
    background-position-y: bottom !important;
    background-size: contain;
    background-repeat: repeat-x;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
}

.bottom-image {
    width: 100%;
    height: 3vh;
    position: absolute;
    bottom: 0;
    left: 0;
    animation: 24000s bottom-image-move linear infinite;
    background-position-y: bottom !important;
    background-size: contain;
    background-repeat: repeat-x;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
    transform: rotateZ(-180deg);
}

.opacity_changer {
    animation: 750ms opacity_changer ease-in-out;
    opacity: 1;
    box-shadow: black 0 0 15px;
}

/* LISTA ZE STRZAŁKAMI */
/* ORYGINALNA LISTA ZE STRZAŁKAMI */
ul {
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.li_hidden {
    display: none;
}

.li_show {
    width: 50px;
    height: 125px;
    list-style: none;
    padding-left: 5px;
    padding-right: 5px;
    display: flex;
    align-content: center;
    justify-content: center;
}

.arrow_left {
    width: auto;
    height: 100%;
    cursor: pointer;
    transform: rotateZ(90deg);
}

.arrow_right {
    width: auto;
    height: 100%;
    cursor: pointer;
    transform: rotateZ(-90deg);
}

/* PRZYCISKI SPISU TREŚCI INSDIE SIDE-MENU */
.change_buttons {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    display: flex;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0.6rem;
    flex-direction: column;
}

.buttons {
    color: #111111;
    background-color: #ffffff;
    width: 100%;
    padding: 0.7rem 0.9rem;
    text-align: center;
    text-decoration: none;
    border: 1px solid #111111;
    transition: all 150ms ease-in-out;
    font-family: 'Noto Sans Mono', monospace;
    border-radius: 4px;
    display: block;
    white-space: normal;
    word-break: break-word;
}

.buttons:hover {
    color: #0056b3;
    background-color: #f0f0f0;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
    transform: translateY(-3px);
}

.btn-clicked {
    color: #ffffff;
    background-color: #111111;
    border-color: #111111;
    transform: translateY(-3px);
}

/* LEPSZE POZYCJONOWANIE DESKTOP */
@media only screen and (min-width: 801px) {
    .header {
        position: relative;
        min-height: 80px;
        padding-top: 25px;
    }

    .header-controls {
        position: absolute;
        top: 20px;
        left: 0;
        right: 0;
        width: 100%;
        padding: 0 20px;
        pointer-events: none;
    }

    .hamburger-menu, .change_contrast {
        pointer-events: auto;
    }
}

/* REAGOWANIE NA EKRAMY MOBILNE (np. Pixel 10) */
@media only screen and (max-width: 800px) {
    .header {
        padding: 10px 10px 5px;
        gap: 0.8rem;
    }

    .main-title-h1 {
        font-size: 1.4rem;
    }

    .image_source {
        max-width: 98vw;
    }
}

@media only screen and (max-width: 500px) {
    .top-image, .bottom-image {
        height: 2vh !important;
    }
    .div_container {
        padding-top: 2vh !important;
        padding-bottom: 2vh !important;
    }
}