html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    background: white;
}

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

.dekko-regular {
    font-family: "Dekko", cursive;
    font-weight: 400;
    font-style: normal;
}

.quicksand-regular {
    font-family: "Quicksand", sans-serif;
    font-optical-sizing: auto;
    font-weight: 300;
    font-style: normal;
}

.grid-container {
    display: grid;
    justify-content: center;  /* Center horizontally */
    align-items: center;      /* Center vertically */
}

.grid-item {
    color: white;
    padding: 20px;
    border-radius: 5px;
    text-align: center;
    font-size: 25px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    flex: 1;
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.grid-item:hover {
    color: white;
    background-color: black;
}

.scroll-watcher {
    height: 10px;
    position: fixed;
    top: 0;
    z-index: 1000;
    background-color: black;
    width: 100%;
    scale: 0 1;
    transform-origin: center;
    animation: scroll-watcher linear;
    animation-timeline: scroll();
}

@keyframes scroll-watcher {
    to { scale: 1 1; }
}

header {
    width: 100%;
    height: auto;
    overflow: hidden;
    position: relative;
}

.header-image {
    width: 100%;
    height: 100vh;
    background-position: center;
    background-size: cover;
    color: black;
    display: block;
    transform-origin: bottom;
    animation: header-image-animation linear forwards; 
    animation-timeline: view();
    animation-range: exit -200px ;
}

@keyframes header-image-animation {
    0% {
        opacity: 1; /* Image is fully visible */
    }
    75%, 100% {
        opacity: 0.5; 
        scale: 2; 
    }
}

nav {
    width: 100%;
    max-width: 100vw; /* Zapobiega wychodzeniu za ekran */
    padding: 30px 5vw;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 999;
    transition: 0.6s;
    box-sizing: border-box;
}


nav ul {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    margin: 0;
    width: 100%;
    gap: 5vw;
    box-sizing: border-box;
}

nav ul li {
    flex: 1;
    list-style: none;
    text-align: center;
}

nav ul li img {
    display: block;
    margin: 0 auto;
    height: 5vw;
    max-width: 100%;
}

nav ul li a {
    text-decoration: none;
    color: white;
    font-size: 2vw;
    font-family: "Dekko", cursive;
    padding: 10px 20px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

nav ul li.nav-title-container img {
    width: auto;
    height: auto; /* Używamy jednostki względnej do ustawienia wysokości obrazu */
    max-width: 200px; /* Można również ustawić maksymalną wysokość, aby uniknąć zbyt dużego obrazu */
    flex-shrink: 0;
}

#LogoNapis{
    height: 2vw;
    filter: invert(1) contrast(180%);
}

nav.sticky {
    padding: 15px 5vw;
    top: 0;
    width: 100%;
    background-color: white;
    color: black;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

nav.sticky ul li a {
    color: #000;
}

nav.sticky #LogoNapis{
    filter: invert(0) contrast(100%);
}

#o-nas {
    height: auto;
    background: rgb(248, 248, 248);
    text-align: center;
    font-family: "Dekko", cursive;
}

#o-nas h2 {
    padding: 20px;
}

#o-nas img {
    width: 1000px;
    padding: 30px;
}

#o-nas > img {
    animation: fade-in linear;
    animation-timeline: view();
    animation-range-start: 30px;
    animation-range-end: 700px;
}

@keyframes fade-in {
    from {
        scale: .8; 
        opacity: .6;
    }
    to {
        scale: 1; 
        opacity: 1;
    }
}

#opis-h {
    vertical-align: middle;
    font-family: "Dekko", cursive;
    font-size: 10vw;
    font-weight: normal;
    width: auto;
    text-align: center;
    color: white;
    position: absolute;
    bottom: 15vh;
    left: 3vw;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5); 
    animation: fade-out linear;
    animation-timeline: view();
    animation-range: exit -400px;
}

@keyframes fade-out {
    to { opacity: 0; }
}

#opis-p {
    font-family: "Quicksand", sans-serif;
    font-size: 4vw;
    width: auto;
    text-align: center;
    color: white;
    position: absolute;
    bottom: 10vh;
    left: 3vw;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    animation: fade-out linear;
    animation-timeline: view();
    animation-range: exit -400px;
}

#h-onas {
    font-family: "Dekko", sans-serif;
    font-size: 3vw;
    width: auto;
    text-align: center;
    color: black;
}

#p-onas {
    font-family: "Quicksand", sans-serif;
    font-size: 15px;
    width: auto;
    text-align: center;
    color: black;
    vertical-align: auto;
    padding-bottom: 20px;
    padding-left: 70px;
    padding-right: 70px;
    font-weight: 800;
}

#wydarzenia-container {
    padding-top: 50px;
    max-width: 96%;
    margin: 0 auto;
    text-align: center;
}

#wydarzenia {
    font-size: 5vh;
    padding: 30px;
    font-family: "Dekko", cursive;
    border-radius: 20px;
    color: black;
}

#calendar-container {
    display: flex;
    align-items: center;
    overflow: hidden;
    position: relative;
    width: 100%;
    margin-top: 30px;
}

.calendar-tiles {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    scroll-behavior: smooth;
    transition: transform 0.3s ease;
    width: 100%;
    padding: 30px;
    scrollbar-width: none;
}

/* Kafelki */
.tile {
    word-wrap: break-word; /* Zawija długie słowa */
    word-break: break-word; /* Zawija w momencie, gdy nie ma miejsca na słowo */
    white-space: normal; /* Zezwala na łamanie wierszy */
    overflow-wrap: break-word; /* Alternatywne rozwiązanie na zawijanie słów */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-size: 30px;
    border: 4px solid #ffffff;
    border-radius: 20px;
    font-family: "Dekko", cursive;
    text-shadow: 1px 1px 2px black;
    background-color: #ddd;
    color: #fff;
    height: auto;
    box-sizing: border-box; /* Include padding and borders in the element's total width and height */
    overflow: hidden; /* Hide overflow content */
    text-align: center; /* Center align text */
    flex: 0 0 calc(100% / 3); /* Ensure 3 tiles fit in one row */
    max-width: calc(100% / 3); /* Maintain the same width on larger screens */
}

.tile-content {
    font-family:"Quicksand", cursive ;
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Wyrównaj do lewej strony */
    justify-content: flex-start; /* Ustaw elementy od góry do dołu */
    width: 100%;
    height: 100%;
    gap: 10px; /* Odstęp między elementami */
    padding: 10px; /* Dodatkowy padding */
    text-shadow: 1px 1px 2px black;
}

/* Wygląd nagłówka (nazwa miesiąca) w kafelkach */
.tile .title {
    font-weight: bold;
    font-size: 20px; /* Adjust font size as needed */
    text-align: left; /* Wyrównaj tekst do lewej strony */
    width: 100%; /* Ustaw pełną szerokość */
}

/* Wyrównanie daty i opisu do lewej strony */
.tile  .date,
.tile  .description {
    font-size: 15px; /* Adjust font size as needed */
    text-align: left; /* Tekst wyrównany do lewej strony */
}

.tile .date-description {
    font-size: 15px; /* Adjust font size as needed */
    text-align: left; /* Tekst wyrównany do lewej strony */
}

.tile-content.past-event {
    opacity: 0.5;
}

.tile-content.future-event {
    color: white; /* Kolor tekstu dla przyszłych wydarzeń */
}

#prevButton, #nextButton {
    padding: 10px 20px;
    width: 50px;
    height: auto;
    margin-left: 15px;
    border: none;
    background-color: #ff3131;
    color: white;
    border-radius: 7px;
    cursor: pointer;
}

#prevButton:hover, #nextButton:hover {
    background-color: #004aad;
    transition: 0.3s;
}

#Styczeń {
    background-color: #5e97b4;
    background-image: url(Kolorki/1-styczen.svg);
    background-size: 50%;
    background-repeat: no-repeat;
    background-position: right 20px center;
}

#Styczeń .tile .tile-content.past-event{
    color: acccdb;
}

#Luty {
    background-color: #5e6cb3;
    background-image: url(Kolorki/2-luty.svg);
    background-size: 50%;
    background-repeat: no-repeat;
    background-position: right;
}

#Marzec {
    background-color: #7a5eb3;
    background-image: url(Kolorki/3-marzec.svg);
    background-size: 50%;
    background-repeat: no-repeat;
    background-position: center;
}

#Kwiecień {
    background-color: #a65eb4;
    background-image: url(Kolorki/4-kwiecien.svg);
    background-size: 50%;
    background-repeat: no-repeat;
    background-position: center;
}

#Maj {
    background-color: #b35e97;
    background-image: url(Kolorki/5-maj.svg);
    background-size: 50%;
    background-repeat: no-repeat;
    background-position: center;
}

#Czerwiec {
    background-color: #b25e6d;
    background-image: url(Kolorki/6-czerwiec.svg);
    background-size: 50%;
    background-repeat: no-repeat;
    background-position: center;
}

#Lipiec {
    background-color: #b37a5d;
    background-image: url(Kolorki/7-lipiec.svg);
    background-size: 50%;
    background-repeat: no-repeat;
    background-position: right;
}

#Sierpień {
    background-color: #b3a55e;
    background-image: url(Kolorki/8-sierpien.svg);
    background-size: 50%;
    background-repeat: no-repeat;
    background-position: center;
}

#Wrzesień {
    background-color: #97b35e;
    background-image: url(Kolorki/9-wrzesien.svg);
    background-size: 50%;
    background-repeat: no-repeat;
    background-position: right;
}


#Październik {
    background-color: #6bb35d;
    background-image: url(Kolorki/10-pazdziernik.svg);
    background-size: 50%;
    background-repeat: no-repeat;
    background-position: right 20px center;
}

#Listopad {
    background-color: #5eb37a;
    background-image: url(Kolorki/11-listopad.svg);
    background-size: 50%;
    background-repeat: no-repeat;
    background-position: right 20px center;
}

#Grudzień {
    background-color: #5fb3a4;
    background-image: url(Kolorki/12-grudzien.svg);
    background-size: 50%;
    background-repeat: no-repeat;
    background-position: center;
}

#stowarzyszenie {
    vertical-align: middle;
    width: auto;
    height: 100vh;
    background-size: 600px auto;
    background: white;
}

#stowarzyszenie-h {
    vertical-align: middle;
    margin-top: 10vh;
    padding-top: 8vh;
    font-family: "Dekko", cursive;
    font-size: 4vw;
    font-weight: normal;
    width: auto;
    text-align: center;
}

#stowarzyszenie-p {
    vertical-align: auto;
    margin-top: 5vh;
    font-family: "Quicksand", sans-serif;
    font-size: 15px;
    width: auto;
    text-align: center;
    font-weight: 800;
}

#stowarzyszenie-p > a {
    color: black;
}

.button {
    padding: 1em 2em;
    background: var(--clr-primary-400);
    border: 0;
    background-color: black;
    color: white;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 2rem;
    transition: transform 1000ms;
    margin-top: 50px;
    font-family: "Dekko", cursive;
}

.button-admin {
    border: 0;
    color: black;
    background-color: white;
    font-size: 1rem;
    text-decoration: underline;
    margin-top: 50px;
    margin-bottom: 50px;
    font-family: "Dekko", cursive;
}

.button:hover,
.button:focus-visible {
    transform: translateY(-1.5rem);
    transition: transform 500ms;
}

#tekst {
    overflow: hidden;
    position: relative;
}

.rysunek {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.2;
    width: 90%;
}

#obrazekGrupowy {
    max-width: 100%;
}

#baner {
    max-width: 100%;
}

/* Mobile (max-width: 600px) */
@media only screen and (max-width: 600px) {
    html, body {
        overflow-x: hidden; /* Zablokowanie scrollowania poziomego */
    }
    
    .tile {
        flex: 0 0 100%; /* 1 kafelek */
        max-width: 100%;
    }

    .header-image{
        width: 200%;
        height: 700px;
    }

    .grid-item {
        color: white;
        font-size: 2.5vh;
        padding: 2px;
    }

    .grid-item:hover {
        color: white;
    }

    #LogoNapis{
        height: 35px;
        padding-top: 10px;
    }

    nav.sticky ul {
        display: block;
    }

    nav.sticky {
        padding: 15px 1vw;
        transition: 1s;
        transform: 15s 10s;
    }

    nav.sticky .nav-logo-container img {
        display: flex;
        align-items: center;
        justify-content: flex-start;
    }

    nav.sticky .nav-logo-container img {
        height: 40px;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        transition: 0.5s;
    }

    nav.sticky #LogoNapis{
        height: 15px;
        padding-top: 0px;
        display: none;
    }

    nav.sticky .grid-item {
        display: none;
    }

    nav ul {
        flex-direction: column; /* Ustawienie elementów w poziomie */
        text-align: center;
        flex-wrap: wrap; /* Umożliwienie zawijania elementów w nawigacji */
    }

    nav ul li {
        list-style: none;
        margin: 0 10px; /* Spacing between items */
    }

    nav ul li img {
        height: 40px; /* Zmniejszenie obrazów na mniejszych ekranach */
    }
    
    nav ul li.nav-title-container img {
        padding-top: 5px;
        height: 6vw; /* Zmniejszamy wysokość obrazu na mniejszych ekranach */
        max-height: 80px; /* Dostosowanie maksymalnej wysokości */
    }
    nav ul li a {
        font-size: 16vh; /* Mniejszy tekst w nawigacji */
    }

    #opis-h {
        font-size: 15vw; /* Zwiększ rozmiar czcionki na telefonach */
        bottom: 25vh; /* Można dostosować położenie, jeśli jest to potrzebne */
        left: 5vw; /* Można dostosować położenie, jeśli jest to potrzebne */
        text-align: left;
    }

    #opis-p {
        font-size: 8vw; /* Dostosowanie rozmiaru czcionki dla dodatkowego tekstu */
        text-align: left;
    }

    #stowarzyszenie {
        height: 60vh;
    }

    #stowarzyszenie-h {
        font-size: 6vw;
    }

    #stowarzyszenie-p {
        font-size: 3vw;
    }

    .button {
        font-size: 0.8rem;
    }

    #prevButton, #nextButton {
        display: none; /* Ukryj przyciski na małych ekranach */
    }
}

/* Tablet (min-width: 601px and max-width: 900px) */
@media only screen and (min-width: 601px) and (max-width: 900px) {
    .tile {
        flex: 0 0 50%; /* 2 kafelki */
        max-width: 50%;
    }

    .grid-item {
        color: white;
        font-size: 1.5vh;
    }

    nav ul {
        flex-direction: row; /* Ustawienie elementów w poziomie */
        gap: 0vh;
        padding: 0px;
    }

    nav ul li {
        list-style: none;
        margin: 0;
        padding: 10px;
    }

    nav ul li img {
        height: 50px; /* Zmniejszenie obrazów na tabletach */
    }

    nav ul li a {
        font-size: 18px; /* Mniejszy tekst w nawigacji */
        padding: 0;
        margin: 0;
    }

    #opis-h {
        font-size: 12vw;
    }

    #opis-p {
        font-size: 5vw;
    }

    #stowarzyszenie-h {
        font-size: 5vw;
    }

    #stowarzyszenie-p {
        font-size: 2.5vw;
    }
}

/* Laptop (min-width: 901px and max-width: 1200px) */
@media only screen and (min-width: 901px) and (max-width: 1200px) {
    .tile {
        flex: 0 0 calc(100% / 3); /* 3 kafelki */
        max-width: calc(100% / 3);
    }

    nav ul {
        flex-direction: row; /* Ustawienie elementów w poziomie */
        gap: 15px; /* Utrzymanie większych odstępów między elementami */
    }

    nav ul li img {
        height: 60px; /* Zmniejszenie obrazów na laptopach */
    }

    nav ul li a {
        font-size: 20px; /* Utrzymanie większego tekstu w nawigacji */
    }

    #opis-h {
        font-size: 5vw;
    }

    #opis-p {
        font-size: 3vw;
    }
}

/* PC (min-width: 1600px) */
@media only screen and (min-width: 1600px) {
    #stowarzyszenie-p {
        font-size: 1.3vw;
    }
}

