/* Zmienne i Reset */
:root{
  --bg: url("obrazy/tapeta07.jpg");
  --card: #ffffff;
  --primary: #2c3e50;
  --accent: #c49a3f;
  --muted: #6b7280;
  --glass: rgba(255,255,255,0.7);
  --radius: 12px;
  --shadow: 0 8px 24px rgba(16,24,40,0.06);
  --max-width: 1100px;
  --gap: 1.25rem;
  --text: #333;
}
/* Reset - Usuń kropki i odstępy w podmenu */
.nav-list,
.submenu {
  list-style: none;
  margin: 0;
  padding: 0;
}
* {
    box-sizing:border-box;
}
html,body{
    height:100%;
    overflow-x: hidden;
    touch-action: pan-y;
}
body{
  margin:0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  background:var(--bg) no-repeat center center fixed;
  background-size: cover;
  background-position: center;
  color:var(--primary);
  line-height:1.5;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  
}



/* Layot globalny */

/* Container */
.container{
  max-width:var(--max-width);
  margin:0 auto;
  padding:0.25rem 0.75rem;
}

/* Sections */
.section{
    padding:2rem 0;
    }
.section.alt{
    background:transparent;
    }
.section-title{
    display:flex;
    align-items:center;
    gap:.6rem;
    font-size:1.15rem;
    margin:0 0 1rem;
    color: white;
    }
.section-title::before{
    content:"";
    width:6px;
    height:28px;
    border-radius:999px;
    background:var(--accent);
    display:inline-block;
    }
.submenu-target {
  scroll-margin-top: 50px; /* dopasuj do wysokości nagłówka */
}



/* Two columns (ogłoszenia/intencje/contact) */
.two-columns{
    display:grid;
    grid-template-columns: 1fr 1fr;
    gap:1rem;
    align-items: stretch; /* <<< rozciąganie kolumn równomiernie */
}
.two-columns .card {
    height: 100%; /* <<< rozciąganie kolumn równomiernie */
}
.small{
    font-size:1rem
}
.bullet-list{
    list-style:disc;
    margin:0;
    padding-left:1.1rem;
    color:var(--muted);
}


/* Sekcja dotacji */
#dotacje {
  padding: 30px 0;
}

.funding-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  text-align: center;
}

.funding-item img {
  height: 230px;        /* mniejsze grafiki na telefon */
  margin-bottom: 10px;
}

.funding-item h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.funding-item p {
  font-size: 0.9rem;
  color: #555;
}



/* Cards grid (news) */
.cards-grid{
    display:grid;
    gap:1rem;
    }
.news-grid{
    grid-template-columns:repeat(3,1fr);
    display:grid;
    }
.card{
    background:rgba(255, 255, 255, 0.9);
    padding:1rem;
    border-radius:var(--radius);
    box-shadow:var(--shadow);
    }
.news-card h3{
    margin:0 0 .4rem;
    font-size:1.05rem;
    }
.muted{
    color:var(--muted);
    font-size:.9rem;
    margin-bottom:.6rem;
    }
.link-more{
    color:var(--accent);
    text-decoration:none;
    font-weight:600;
    }


/* Galleria - Desktop */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px;
}

.thumb {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  cursor: pointer;
  transition: transform .3s ease;
  
}

.thumb img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover; /* wypełnia kafelek, nie rozciąga */
  transition: transform .4s ease;
}

.thumb:hover img {
  transform: scale(1.08);
}

.thumb figcaption {
  text-align: center;
  padding: 8px 0;
  font-size: 0.9rem;
  color: white;
}

/* Loader – kółeczko na rozpoczęcie galeri */
.loader {
  width: 50px;
  height: 50px;
  border: 5px solid #ccc;
  border-top-color: #333;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 40px auto;
  display: none;
}


/* Wrapper galerii */
.gallery-wrapper {
  position: relative;
  min-height: 150px; /* żeby loader miał miejsce */
}

/* Gdy ładuje – ukryj galerię, pokaż loader */
.gallery-wrapper.loading .gallery-grid {
  opacity: 0;
  pointer-events: none;
}

.gallery-wrapper.loading .loader {
  display: block;
}

.lightbox-loader {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 60px;
  height: 60px;
  margin-left: -30px;
  margin-top: -30px;
  border: 6px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  z-index: 99999;
  display: none;
}

.lightbox-loader.hidden {
  display: none;
}

.lightbox-loader.show {
  display: block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}



/* Video grid */
.video-grid{
    display:grid;
    grid-template-columns: repeat(3, 1fr); /* 3 kolumny */
    gap: 1rem; /* odstępy między nagraniami */
}

.video-card h3{
    margin:0 0 .5rem
    }

.video-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Iframe wrapper */
.iframe-wrap{
    aspect-ratio: 16 / 9; /* wymusza wysokość odpowiadającą szerokości */
    width: 100%;
    background:var(--card);
    border-radius:12px;
    overflow:hidden;
    box-shadow:var(--shadow)
    
}
.iframe-wrap iframe{
    width:100%;
    height: 100%;
    border:0;
    display:block
    }




/* Ustawienia obrazki wnętrza sanktuarium */
.wnetrze-image {
  display: block;
  margin: 0 auto;     /* wyśrodkowanie obrazka */
  max-width: 100%;    /* responsywność */
  height: auto;
  margin-top: 50px;
}



/* Ustawienia obrazka dekretu */
.decret-image {
  display: block;
  margin: 0 auto;     /* wyśrodkowanie obrazka */
  max-width: 100%;    /* responsywność */
  height: auto;
  margin-top: 50px;
}


/* Ustawienia obrazka w podstronie aktualności */
.article-image {
  float: left;
  width: 400px; /* ustaw szerokość obrazka */
  margin: 0 1rem 1rem 0; /* odstęp od tekstu */
  border-radius: 12px;
  box-shadow: var(--shadow);
}

/* Ustawienia tekstu artukułu podstrony aktualności*/
.article-content {
  max-width: 1000px;          /* wygodna szerokość dla czytania */
  line-height: 1.7;          /* lepsza czytelność tekstu */
  font-size: 1.05rem;        /* delikatnie większy tekst */
  color: var(--text);        /* używa Twojej zmiennej kolorów */
  margin-bottom: 2rem;       /* odstęp od kolejnych sekcji */
  text-align: justify;
  background-color: rgba(255, 255, 255, 0.9);/* lekko przeźroczyste tło */
  border-radius: 10px; /* zaokrąglenie */
  padding: 10px;
}

.article-content p {
  margin-bottom: 1rem;       /* odstęp między akapitami */
  text-indent: 1.5rem;   /* wcięcie pierwszej linii akapitu */
}
.article-content p:first-of-type {
  text-indent: 0;
}

.article-content h2,
.article-content h3 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--primary);
}
/* Ustawienia linku a podstrony aktualności*/
.article-content p a {
  color: #c49a3f;          /* kolor a*/
  font-weight: 500;     /* mocne pogrubienie */
  text-decoration: none; /* bez podkreślenia */
}
.article-content p a:hover {
  opacity: 0.7;
}

/* Header i Nawigacja */

/* Header */
.site-header{
  position:sticky;
  top:0;
  z-index:60;
  background:linear-gradient(180deg, rgba(255,255,255,0.9), rgba(255,255,255,0.85));
  backdrop-filter: blur(6px);
  border-bottom:1px solid #eee;
}
.header-inner{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap: 1rem;
}
.brand{
  display:inline-block;
  font-weight:700;
  color:var(--primary);
  text-decoration:none;
  letter-spacing:0.02em;
  font-size:1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;          /* odstęp między ikoną a tekstem */
}
/* ikonka jako koło */
.brand-logo {
  width: 60px;          /* możesz zmienić na mniejszą/większą */
  height: 60px;
  border-radius: 50%;   /* robi z obrazka koło */
  object-fit: cover;    /* przycina obrazek do koła */
  
  border: 1px solid #fff;
  box-shadow: 0 0 4px rgba(0,0,0,0.35);
}


/* Navigation - Menu Główne*/

.nav-list{
    display:flex;
    gap:0.75rem;
    margin:0;
    padding:0;
    align-items:center;
    }
.nav-list a{
  display:inline-block;
  padding:0.5rem 0.9rem;
  border-radius:999px;
  color:var(--primary);
  text-decoration:none;
  font-weight:600;
  font-size:0.95rem;
  transition:background .22s ease;
}
/* hover: only background changes, text color unchanged */
.nav-list a:hover{
    background:var(--glass);
}

/* Podświetlanie 1 poziom nawigacji desktop */
/* Główne linki i przyciski w menu */
.nav-list > li > a,
.nav-list > li > .submenu-btn {
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  transition: background 0.2s ease, color 0.2s ease;
}

/* Efekt hover */
.nav-list > li > a:hover,
.nav-list > li > .submenu-btn:hover {
  background: rgba(0, 0, 0, 0.08);
  color: var(--primary);
}

/* --- Podmenu (desktop + mobile-friendly) --- */
.has-submenu { 
    position: relative; 
    }

/* ukryte podmenu (desktop) */
.submenu {
  position: absolute;
  top: calc(100% + 1px);
  left: 0;
  min-width: 220px;
  background: var(--card, #fff);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(16,24,40,0.08);
  padding: .4rem;
  display: none;
  flex-direction: column;
  gap: .15rem;
  z-index: 999;
}
/* Powinno być? */
.submenu.open {
    display: flex;
}

/* Podświetlanie podmenu 2 poziom nawigacji desktop */

/* elementy w podmenu */
.submenu a {
  display: block;
  padding: .5rem .8rem;
  border-radius: 8px;
  color: var(--primary);
  text-decoration: none;
  font-weight:500;
  transition: background .18s;
}
/* Hover: tylko tło, bez zmiany koloru tekstu */
.submenu a:hover {
  background: var(--glass);
  color: var(--primary);
}

/* przycisk wywołujący podmenu (wygląda jak link) */
.submenu-btn {
  background: none;
  border: none;
  padding: 0.9rem 1rem;
  display: block;
  width: 100%;
  text-align: left;
  font: inherit;
  color: var(--primary);
  cursor: pointer;
  font-weight: 600;
  line-height: 1.4;
}

/* chevron - strzałka */
.submenu-btn .chev { 
    font-size: .85rem; 
    color: var(--muted); 
}

.submenu-btn:hover {
  background: rgba(0,0,0,0.08);
}

/* Kolory ikon menu */

.fa-images { color: #d4af37; } /* galeria */
.fa-book-open { color: #d4af37; } /* komentarz */
.fa-video { color: #d4af37; } /* video */
.fa-book-bible { color: #d4af37; } /* złoty parafia*/
.fa-cross { color: #d4af37; } /* złoty fara - intencje w query */
.fa-church { color: #d4af37; } /* złoty sanktuarium */
.fa-envelope { color: #d4af37; } /* złoty kontakt query */
.fa-list { color: #d4af37; } /* złoty ogłoszenia query */




/* Mobilne Menu */

/* --- Hamburger widoczny tylko na mobile --- */
.hamburger {
    display: none;
    cursor: pointer;
    background: #fff;              /* białe tło */
    border: 0;                     /* brak ramki */
    border-radius: 14px;           /* zaokrąglone rogi */
    padding: 8px 12px;             /* przestrzeń wokół */
    flex-direction: column;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12); /* delikatny cień – opcjonalnie */
}


.hamburger span {
    display: block;
    height: 3px;
    width: 28px;
    background: #d4af37;
    border-radius: 3px;
    transition: transform .25s ease, opacity .25s ease;
}

/* napis MENU */
.hamburger em {
    font-size: 11px;
    font-style: normal;
    color: var(--primary);
    margin-top: 2px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-weight: 600;
}



/* Hero Sekcje Karty Galerie */

/* HERO */
.hero{
    padding:2rem 0;
    }
.hero-grid{
    display:grid;
    grid-template-columns:1fr;
    gap:1.25rem;
    align-items:center;
    }
.hero-text h1{
    font-size:clamp(1.4rem,2.6vw,2.2rem);
    margin:0 0 .5rem;
    color:white;
    }
.hero-text h2{
    font-size:clamp(1.0rem,2.0vw,1.0rem);
    margin:0 0 .5rem;
    color:white;
    }
.lead{
    color:white;
    margin-bottom:.5rem;
    }
.meta{
    color: var(--muted);
    font-size:.95rem;
    margin-bottom:1rem;
    }
.dodano{
    color: white;
    font-size:.95rem;
    margin-bottom:1rem;
    padding-left: 15px;
}  
    
.hero-media img{
    width:100%;
    height:100%;
    object-fit:cover;
    border-radius:12px;
    box-shadow:var(--shadow);
    }


/* Formularze */

/* Contact form */
.contact-card{
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px; /* zaokrąglenie */
    padding:10px;
    margin-top:40px;
}
.contact-form{
    display:flex;
    flex-direction:column;
    gap:.6rem;
}
.contact-form label{
    display:flex;
    flex-direction:column;
    font-size:.95rem;
    color:white;
}
.contact-form input,.contact-form textarea{
    padding:.6rem;
    border-radius:8px;
    border:1px solid #e6e6e6;
    font:inherit;
}
.form-actions{
    display:flex;
    gap:.6rem;
    margin-top:.5rem;
}
.btn{
    background:var(--primary);
    color:#fff;
    padding:.55rem .9rem;
    border-radius:999px;
    border:0;
    cursor:pointer
}
.btn-ghost{
    background:transparent;
    border:1px solid #ddd;
    color:var(--primary);
    padding:.45rem .8rem;
    border-radius:999px;
}

/* Footer - Stopka, dół strony */
.site-footer{
    padding:1rem 0;
    background:transparent;
    color:white;
    border-top:1px solid #f0f0f0;
}
.footer-inner{
    text-align:center;
    }
    
/* Kontener slidera */
.loop-slider {
  overflow: hidden;
  width: 100%;
  padding: 20px 0;
}

.loop-slider-track {
  display: flex;
  gap: 30px;
}

.loop-slider img {
  height: 43px;
  width: auto;
  border-radius: 6px;
  display: block;
}

/* Domyślnie ukrywamy menu na komputerach */
.bottom-nav {
  display: none;
}




    

/* Media queries - dopasowuwanie strony */

/* Responsive */
@media (max-width:1000px){
  .hero-grid{
    grid-template-columns:1fr 320px;
    }
  .gallery-grid{
    grid-template-columns:repeat(3,1fr);
    }
  .news-grid{
    grid-template-columns:repeat(2,1fr);
    }
  .two-columns{
    grid-template-columns:1fr 1fr;
    }
}

@media (max-width:760px){
  .nav-list{display:none}
  .hamburger{display:flex}
  .hero-grid{grid-template-columns:1fr}
  .gallery-grid{
    grid-template-columns:repeat(2,1fr);
    gap: 8px;
    }
  .news-grid{grid-template-columns:1fr}
  .two-columns{
    grid-template-columns:1fr;
    }
  .two-columns > div:first-child {
    margin-bottom: 3.5rem;
  }
  .video-grid{grid-template-columns:1fr}
  .iframe-wrap iframe{height:100%}
  .article-image {
    float: none;
    display: block;
    margin: 0 auto 1rem;
    width: 100%;
  }
  img {
    max-width: 100%;
    height: auto;
    display: block;
    
  }
  .intencje{
  padding-top: 70px;
  
  }

/* podmenu w mobile: ukryte dopóki nie ma .open */
  .submenu { 
    display: none;
    position: static;
    box-shadow: none;
    list-style: none;
    margin: 0;
    padding: 0.25rem 0;
}
  .submenu.open { 
    display: flex; 
    flex-direction: column; 
    padding-left: 0.5rem; 
}


  .submenu-btn { 
    width: 100%; 
    text-align: left; 
    display: block;
    padding: 0.9rem 1rem;
    position: relative;
    z-index: 10;
}
/* Mobile layout: ukryj normalne nav, pokaż hamburger */
  .hamburger { 
    display: flex;
    flex-direction: column; /* pionowy układ kresek */
    justify-content: center;
    align-items: center;
    position: relative; /* konieczne! */
    z-index: 220; 
}

  /* main-nav jako panel wysuwany z prawej (domyślnie ukryty) */
  .main-nav {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 70%;
    max-width: 250px;
    transform: translateX(100%);
    transition: transform .28s ease;
    background: var(--card, #fff);
    box-shadow: 0 20px 60px rgba(0,0,0,0.12);
    z-index: 200;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* gdy skrypt doda .open — pokaż panel */
  .main-nav.open { 
    transform: translateX(0);
    position:fixed;
    inset:0;
    background:linear-gradient(180deg,rgba(255,255,255,0.98),#fff);
    display:flex;
    align-items:flex-start;
    padding-top:4.5rem;
    z-index:110;
    }

/* Stan otwartego menu mobilnego (klasa przełączana przez JavaScript) */

.main-nav.open .nav-list{
    display:flex;
    flex-direction:column;
    gap:1rem;
    padding:1.25rem;
    }
.main-nav.open .nav-list a{
    padding:0.9rem 1rem;
    font-size:1.05rem;
    }
  /* lista w panelu jako kolumna */
  .nav-list { 
    display: flex; 
    flex-direction: column; 
    gap: 0.25rem; 
    padding: 1.25rem; 
    margin: 0; 
    align-items: flex-start;
}
  .nav-list a { 
    display: block; 
   
    border-radius: 8px; 
    }
  /* upewnij się, że overlay/kliknięcia działają */
  body.no-scroll { overflow: hidden; }

/* Dolne menu */
body {
    padding-bottom: 70px; /* miejsce na menu */
    background-attachment: scroll !important;
  }

.bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 65px;
    background: #fff;
    border-top: 1px solid #ddd;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 999;
  }

.nav-item {
    text-decoration: none;
    color: #777;
    font-size: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

.nav-item i {
    font-size: 22px;
    margin-bottom: 3px;
  }

.nav-item.active {
    color: #007bff;
  }
.brand-logo {
    width: 50px;
    height: 50px;
  }
/* Responsywność - partnerzy */
.loop-slider img {
    height: 40px;
    width: auto;     /* zachowuje proporcje */
    max-width: none; /* NIE ściska obrazka */
  }
  
  #dotacje {
    margin-bottom: 60px; /* aby nie nachodziło na bottom-nav */
  }

}


/* Zabezpieczenie desktopowe: niech .main-nav nie zasłania layoutu */
@media (min-width: 761px){

/* submenu na hover */
  .has-submenu:hover > .submenu,
  .has-submenu:focus-within > .submenu {
    display: flex;
  }
  
/* nawigacja desktopowa */
  .main-nav { 
    display: block;
    position: static; 
    transform: none; 
    height: auto; 
    width: auto; 
    box-shadow: none; 
    }
  .nav-list { 
    display: flex; 
    flex-direction: row; 
    gap: 0.75rem; }
}