* {
    margin: 0;
    font-family: "DM Sans", sans-serif;
    font-size: 122%;
    box-sizing: border-box;
    scroll-behavior: smooth;
    padding: 0;
}

body.no-scroll {
    overflow: hidden;
}

.main {
    width: 100%;
    display: grid;
    justify-content: center;
}

.pasek {
    margin-top: -5px;
    border: 25px solid #84c0fc;
    width: 100vw;
}

.podzial {
    text-align: left;
    margin-top: 100px;
    margin-bottom: 50px;
}

.odstep {
    height: 20px;
}

.podstrony {
    margin: 0 10px;
}

.podzial h1 {
    font-size: 200%;
    padding-left: 30px;
    margin-bottom: 100px;
    border-left: 14px solid #84c0fc;
}

.wydarzenia {
    background-color: whitesmoke;
    width: 400px;
    border-radius: 10px;
    box-shadow: 2px 4px 8px rgba(0, 0, 0, 0.2);
    margin: auto;
    border: 1px solid rgb(230, 230, 230);
    height: 100%;
}

.dataWyd {
    padding-left: 15px;
}

.wydarzenia:last-child {
    margin-bottom: 120px!important;
}

/* ==========================================================================
   STYLE RESPONSIVE (DLA TELEFONÓW I TABLETÓW - Ekrany poniżej 1024px)
   ========================================================================== */
@media screen and (max-width: 1024px) {

    /* Przełączamy siatkę kafelków na elastyczną */
    .bloki2 {
        /* Zamiast sztywnych 3 kolumn: przeglądarka sama zdecyduje ile kolumn zmieścić, 
           byle pojedyncza miała minimum 280px. Na smartfonie da to automatycznie 1 kolumnę. */
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 25px; /* Zmniejszamy gigantyczny odstęp 75px na zgrabniejsze 25px */
        margin-top: 20px;
    }

    /* Kasujemy sztywne 400px z PC. Teraz kafelek rozszerzy się na 100% szerokości kolumny */
    .wydarzenia {
        width: 100%;
        margin: 0 auto;   /* Centrowanie kafelka w kolumnie */
    }

    /* Dopasowanie obrazka z ujemnym marginesem (efekt wystawania na boki) */
    .wydarzenia img {
        /* Ponieważ szerokość kafelka na telefonie się zmienia, 
           wyliczamy szerokość obrazka dynamicznie na bazie paddingu przycisku */
        width: calc(100% + 44px);
        left: -22px;
        height: 180px; /* Delikatnie niższe zdjęcia na telefonie dla lepszych proporcji */
    }

    /* Naprawa opisu: wyrzucamy sztywne 356px, żeby tekst nie rozpychał ekranu w bok */
    .opis {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* Zabezpieczenie dla długich tytułów (np. "Błogosławieństwo do posługi...") */
    .wydarzenia h2 {
        font-size: 19px;     /* Subtelnie mniejsza czcionka, by tekst nie łamał się potworkowato */
        line-height: 1.3;
        word-wrap: break-word; 
    }

    /* Dostosowanie marginesów drzewka dla mniejszych ekranów */
    .miesiac-wrapper {
        padding-left: 0; /* Zmniejszamy wcięcie z 20px, aby zyskać cenne miejsce na telefonie */
    }
    
    .rok-tytul {
        font-size: xl-large;
    }
    
    .miesiac-tytul {
        font-size: medium;
    }
}
/* ==========================================================================
   NOWOCZESNE SKALOWANIE W JEDNOSTKACH VW DLA TELEFONÓW (max-width: 1024px)
   ========================================================================== */
@media screen and (max-width: 1024px) {

    .hidden2 {
    display: none !important;
    opacity: 0 !important;
    }

    /* Kontenery dopasowują boczny margines do szerokości ekranu */
    .bloki, .bloki2 {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 8vw !important;         /* Odstęp między kafelkami to zawsze 6% szerokości ekranu */
        width: 100vw !important;     /* Kontener zajmuje pełną szerokość ekranu */
        box-sizing: border-box !important;
        padding: 2vw 0 !important; /* Elastyczne boczny margines (5% z każdej strony) */
    }

    /* Kafelek - teraz zajmuje 85% szerokości całego ekranu telefonu */
    .wydarzenia {
        width: 90vw !important;
        min-height: 50vw !important;
        display: block !important;
        background-color: whitesmoke !important;
        border-radius: 2.5vw !important; /* Zaokrąglenie rogów też skaluje się z ekranem */
        overflow: hidden !important;
    }

    /* Przycisk wewnętrzny - reset grida z PC */
    .button {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        justify-content: flex-start !important;
        width: 100% !important;
        height: auto !important;
        padding: 0 5vw 4vw 5vw !important; /* Wewnętrzne odstępy uzależnione od ekranu */
        box-sizing: border-box !important;
        grid-template-columns: none !important;
        gap: 0 !important;
    }

    /* OBRAZEK - Rozciągamy go za pomocą vw, aby idealnie zniwelować padding przycisku */
    .wydarzenia img {
        position: static !important; 
        width: calc(100% + 10vw) !important;      /* Dokładnie tyle samo co cały kafelek */
        margin: 0 -5vw 3vw -5vw !important; /* Ujemny margines 5vw idealnie maskuje padding boczny */
        height: 70vw !important;     /* Wysokość zdjęcia to zawsze 45% szerokości ekranu (zachowuje proporcje!) */
        object-fit: cover !important;
        border-top-left-radius: 2.5vw !important;
        border-top-right-radius: 2.5vw !important;
    }

    /* TYTUŁ - Wielkość czcionki reaguje na szerokość ekranu */
    .wydarzenia h2 {
        font-size: 5.5vw !important;  /* Dynamiczna wielkość tekstu (ok. 20-22px na standardowym telefonie) */
        line-height: 1.3 !important;
        margin: 2vw 0 1.5vw 0 !important;
        color: #000 !important;
        width: 100% !important;
        text-align: left !important;
    }

    /* OPIS - Tekst dopasowany do szerokości ekranu */
    .opis {
        display: block !important;
        position: static !important;
        width: 100% !important;
        margin: 0 0 3vw 0 !important;
        line-height: 1.4 !important;
        font-size: 4vw !important;   /* Tekst opisu dopasowuje się tak, by był idealnie czytelny */
        color: rgba(0, 0, 0, 0.8) !important;
    }
    
    .opis p {
        margin: 0 !important;
        padding: 0 !important;
    }

    /* DATA na samym dole */
    .wydarzenia small {
        position: static !important;
        display: block !important;
        margin-top: auto !important;
        font-size: 3.5vw !important; /* Mała, zgrabna data */
        color: #666 !important;
        text-align: left !important;
        width: 100% !important;
    }
    
    /* Poprawka dla drzewka rozwijanego */
    .miesiac-wrapper {
        padding-left: 0 !important;
        width: 100% !important;
    }
}

.wydarzenia img {
    width: calc(100% + 44px);
    left: -22px;
    height: 200px;
    object-fit: cover;
    position: relative;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.wydarzenia h2, summary {
    margin-top: 10px;
    text-align: left;
    align-self: first baseline;
}

.wydarzenia small {
    position: relative;
    bottom: -8px;
    padding-bottom: 3px;
    align-self: last baseline;
    font-size: small;
    text-align: left;
}

.button {
    cursor:pointer; 
    background-color: rgba(0,0,0,0); 
    border:0; 
    margin:0; 
    width:100%; 
    padding: 0 22px;
    padding-bottom: 20px;
    display: grid;
    gap: 5px;
    
}

.opis {
    top: -200px;
    margin-top: 14px;
    margin-bottom: 6px;
    line-height: 18px;
    font-size: 35px;
    display: block;
    position: relative;
    width: 356px;
    text-align: left;
    color: rgba(0, 0, 0, 0.7);
    margin-bottom: -150px;
}

.sekcja-rok {
    grid-column: 1/4;
}

/* Główne kontenery lat i miesięcy rozciągają się na pełną szerokość głównego grida */
.rok-wrapper, .miesiac-wrapper {
    grid-column: 1 / -1; 
    width: 100%;
}

/* Marginesy wewnętrzne dla struktury drzewka */
.miesiac-wrapper {
    margin-top: 10px;
}

/* Tytuły (summary) */
.rok-tytul {
    font-weight: bold;
    cursor: pointer;
    font-size: 100%;
}

.miesiac-tytul {
    cursor: pointer;
    text-transform: capitalize;
    font-size: 90%;
}

.bloki2 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 75px;
    margin-top: 30px;
    text-align: left;
}

.wiecej {
    display: flex;
    font-size: 125%;
    font-weight: 900;
    padding: 2vw 2vh;
    background-color: rgba(220, 220, 220, 0.5);
    border-radius: 5px;
    align-items: center;
    justify-content: center;
    margin: auto;
    transition: 0.3s ease;
    width: 90%;
}

.sakramenty {
    display: flex;
    gap: 35px;
    padding: 100px;
    text-align: center;
    background-color: rgba(128, 128, 128, 0.15);
}

@media screen and (max-width:1400px) {
    .sakramenty {
        display: grid;
        grid-template-columns: auto;
        gap: 100px;
        padding-left: 5%;
        padding-right: 5%;
    }
}

.blokSak {
    font-size: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #84c0fca4;
    width: 85%;
    padding: 100px;
    height: 100%;
    border-radius: 25px;
    box-shadow: 2px 4px 8px rgba(0, 0, 0, 0.2);
    margin: auto;
    transition: background-color 0.4s ease;
}

.blokSak img {
    width: 30%;
}

a {
    text-decoration: none;
    color: black;
}

@font-face {

    font-family: "DM Sans";
    src: url("../files/font-DM.ttf") format("truetype");
}

header {

    display: block;
    height: 200px;
    width: 100%;
    background-color: whitesmoke;
    justify-content: left;
    position: sticky;
    top: 0;
    z-index: 4;
    grid-template-columns: auto auto;
    clear: both;
    

}

#przycisk {
    width: 200px;
    height: 200px;
    float: right;
    z-index: 1;
    border: 0;
    background: none;
    display: grid;
    cursor: pointer;
}

.przycisk {
    width: 50%;
    height: 8px;
    z-index: 1;
    border: 0;
    border-radius: 12px;
    background-color: black;
    display: block;
    cursor: pointer;
    position: relative;
    margin: auto; 
    transition: all 0.3s ease-in-out;
}

.przycisk:before, .przycisk:after {
    display: block;
    content: "";
    width: 100px;
    height: 8px;
    background-color: black;
    position: absolute;
    border-radius: 12px;
    transition: all 0.3s ease-in-out;
}

.przyciskAktywny:before  {
    transition: all 0.3s ease-in-out;
    transform: rotate(-35deg);
    width: 116px;
    top: -6px !important;
    margin-left: -9.5px;
}

.przyciskAktywny:after{
    transition: all 0.3s ease-in-out;
    transform: rotate(35deg);
    width: 116px;
    bottom: -6px !important;
    margin-left: -9.5px;
}

.przycisk:before {
    top: 25px;
}

.przycisk:after {
    bottom: 25px;
}

.przyciskAktywny {
    background-color: transparent;
}

button img {

    width: 120px;
    height: 120px;
}

.bgNav {
    position: sticky;
    margin-top: -50px;
    height: calc(100vh - 100px);
    width: 100vw;
    background-color: whitesmoke;
    z-index: 21;
    text-align: center;
    padding: 50px;
    transition: all .5s ease-in-out;
}

.logoLink {

    height: 200px;
    width: 200px;
    margin-left: 10px;
    clear: right;
    z-index: 0;
}

h1 {

    border-left: 7px solid #84c0fc;
    padding-left: 7px;
    display: inline-block;
    width: auto;

}

span {
    font-size: 100%;
}

h4 {
    font-size: 100%;
}

li {
    list-style: none;
    font-size: 90%;
}

.panorama {
    background: url(../images/panorama-tel.jpg)!important;
    width: 100%;
    height: 543.75px;
    background-size: 100% 100%!important;
    position: relative;
    background-repeat: no-repeat!important;
}

.panorama img {

    width: 100%;
}

.nazwa {
    font-size: 300%;
    position: absolute;
    left: 12px;
    bottom: 5%;
    font-weight: bold;
    color: white;
    text-shadow: 5px 5px 8px rgba(0, 0, 0, 0.8);
    line-height: 110%;
}

.hidden {
    display: none;
    opacity: 0;
}

.visible {
    opacity: 1;
    
}

footer {
    padding-top: 20px;
    background-color: rgb(29, 29, 29);
    color: white;
    margin-top: 140px;
    display: flex;
    justify-content: center;
}

.stopka {
    padding-top: 20px;
    background-color: rgb(29, 29, 29);
    color: white;
    width: 100%;
    display: grid;
    justify-content: center;
    text-align: center;
    gap: 20px;
}

.stopka img {
    height: 10vw;
    margin-top: 30px;
    margin-bottom: 10px;
}

.wStopce {
    display: grid;    grid-template-columns: auto;    width: 100%;    justify-content: center;
}

/* .b1, .b2, .b3, .b4 {

} */

.listaNav span {
    display: none;
    overflow: hidden;
}

.nav li, .nav li a {
    font-size: 3vh!important;
}

/* informacje */

.informacje {
    display: grid;
    grid-template-columns: auto;
    width: 100%;
    justify-content: center;
    text-align: center;
    margin-top: -5px;
    padding: 40px 20px!important;

}

.info {
    border-bottom: 1px solid black;
    padding-bottom: 20px;
    margin-bottom: 50px;
}

.info h3 {
    font-weight: 900;
}

.info:nth-child(4) {
    border-bottom: none!important;
}

.wStopce {
    display: grid;
    grid-template-columns: auto;
}

footer {
    display: grid;
    margin-top: 20px;
    gap: 5vh;
}

.b1, .b2, .b3, .b4 {
    padding: 5px;
    width: 80vw;
    margin-top: 25px;
}

.stopka span {
    font-size: 130%;
    text-align: left;
    padding-top: 20px!important;
    padding-left: 0!important;
    padding-right: 0!important;
}

.mail, .tel {
    width: 40px;
    margin-right: 20px;
}

.ogloszenia {
    line-height: 1.5 !important;
    font-size: 4.5vw !important;
    padding-left: calc(3vh + 5px)!important;
    line-height: 1.5 !important;
    width: 98vw;
}

.ogloszenia li {
    list-style: disc!important;
    margin-top: 15px!important;
}

.zakonczenie h2 {
    margin-top: 20px;
}

.ogloszeniaData {
    color: #006000; 
    font-weight: 500;
    font-size: 125%;
    margin-bottom: 20px;
}

table{
    font-size: 85%;
    width: 100vw; 
    margin: 0 auto;
    border-collapse: collapse;
}

td {
    padding: 6px;
    font-size: 85% !important;
}