:root{
  --green-900: rgb(255, 255, 255);
  --green-700: rgb(25, 25, 25);
  --gray-100: #f5f5f5;
  --gray-300: #cfcfcf;
  --muted: #a3a3a3;
}

.cardo-regular {
  font-family: "Cardo", serif;
  font-weight: 400;
  font-style: normal;
}

.cardo-bold {
  font-family: "Cardo", serif;
  font-weight: 700;
  font-style: normal;
}

.cardo-regular-italic {
  font-family: "Cardo", serif;
  font-weight: 400;
  font-style: italic;
}

*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%}
body{
  font-family: "Cardo", serif;
  font-style: italic;
  color:var(--gray-100);
  background:rgb(25, 25, 25);
}

body{
  margin: 0;
}

.container{max-width:1100px;margin:0 auto;padding:1.4rem}

.bg{
  position:fixed;top:0;left:0;width:100%;height:100%;z-index:-1;
  background-image: url('images/background.jpg');
  background-size: cover;
  background-position: center center;
  background-attachment: fixed;
  filter: grayscale(35%) contrast(85%) brightness(55%);
}

.site-header{background: linear-gradient(90deg, rgba(25, 25, 25,0.8), rgba(25, 25, 25,0.6));border-bottom:1px solid rgba(255,255,255,0.03);position:sticky;top:0;z-index:10}
.header-inner{display:flex;align-items:center;justify-content:space-between;padding:0.6rem 0}
.brand{display:flex;align-items:center;gap:0.8rem}
.logo{height:56px;width:auto;display:block}
.site-title{font-weight:700;color:var(--gray-100);font-size:1.05rem}

.main-nav a{color:var(--gray-100);text-decoration:none;margin-left:1rem;padding:0.4rem 0.6rem;border-radius:6px}
.main-nav a.active, .main-nav a:hover{background: rgba(255,255,255,0.04);}

.lead{background: linear-gradient(180deg, rgba(25, 25, 25,0.55), rgba(25, 25, 25,0.55));padding:1.1rem;border-radius:8px;margin-top:1rem}
.lead h1{color:var(--green-900);margin-bottom:0.5rem}
.lead p{line-height:1.5;color:var(--gray-100);margin-bottom:0.8rem}

.news{margin-top:1rem}
.news h2{color:var(--green-700);margin-bottom:0.5rem}
.news-list{list-style:disc;padding-left:1.2rem;color:var(--muted)}

.gallery{margin-top:1rem}
.gallery-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:10px}
.gallery-grid img{width:100%;height:140px;object-fit:cover;border-radius:6px;border:2px solid rgba(255,255,255,0.03)}

.card{background: rgba(25,25,25,0.55);padding:1rem;border-radius:8px;margin-top:1rem;color:var(--gray-100)}
.contact-card address{font-style:normal}
.contact-card ol{padding-left:1.1rem;color:var(--muted)}

.site-footer{padding:1rem 0;margin-top:1.6rem;border-top:1px solid rgba(255,255,255,0.03);text-align:center;color:var(--muted)}

@media (max-width:700px){
  .header-inner{flex-direction:column;gap:0.6rem}
  .logo{height:48px}
  .gallery-grid img{height:110px}
}

button, .btn{background:var(--green-700);color:#fff;border:none;padding:0.5rem 0.8rem;border-radius:6px}

a:focus{outline:3px solid rgba(0, 0, 0,0.25);outline-offset:3px}

.gallery-grid img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  object-position: center;
}

.gallery-grid img.top-focus {
  object-position: top;
}

#stowarzyszenie ul {
  list-style-type: none;
  list-style-position: inside;
  padding-left: 1.2rem;
  margin-left: 0;
}

.lead {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  min-height: 400px;
  background: linear-gradient(180deg, rgba(25, 25, 25,0.55), rgba(25, 25, 25,0.55));
  padding: 1.1rem;
  border-radius: 8px;
  margin-top: 1rem;
}

#stowarzyszenie .card {
  font-size: 25px;
  width: 100%;
  max-width: 100%;
  text-align: center;
}

.bg {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url("images/background.jpg") no-repeat center center/cover;
  z-index: -1;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}
.gallery-img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  object-fit: cover;
  cursor: zoom-in;
  transition: transform 0.2s ease;
}
.gallery-img:hover {
  transform: scale(1.03);
}

.lightbox {
  display: none;
  position: fixed;
  z-index: 9999;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.8);
  justify-content: center;
  align-items: center;
  cursor: pointer;
}
.lightbox.active {
  display: flex;
}
.lightbox img {
  max-width: 90%;
  max-height: 90%;
  box-shadow: 0 0 20px white;
  border-radius: 4px;
}
.lightbox .close-btn {
  position: fixed;
  top: 20px;
  right: 30px;
  font-size: 30px;
  color: white;
  font-weight: bold;
  cursor: pointer;
  user-select: none;
}

.contact-card {
  text-align: center;
  font-size: 2.8em;
  line-height: 1.8;
}
.contact-card a {
  color: white;
  font-weight: bold;
  text-decoration: none;
}
.contact-card a:hover {
  text-decoration: underline;
}

@media (max-width: 600px) {
  .main-logo {
    max-width: 250px;
  }
  .contact-card {
    font-size: 1.2em;
  }
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(2, auto);
  gap: 15px;
  justify-items: center;
}

.gallery-img {
  width: 100%;
  height: auto;
  max-width: 180px;
  border-radius: 6px;
  object-fit: cover;
  cursor: zoom-in;
  transition: transform 0.2s ease;
}

.page {
  min-height: calc(100vh - 160px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: left;
}

.page h2 {
  margin-bottom: 20px;
}

.page .card,
.page .lead {
  max-width: 800px;
  width: 100%;
}

#stowarzyszenie .card,
#kontakt .card {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: 0;
  right: 0;
  margin: 0 auto;
  max-width: 800px;
}

.gallery h2 {
  text-align: center;
  width: 100%;
  margin-bottom: 20px;
}

#onas .lead {
position: relative;
margin: 1px auto 60px;
max-width: 800px;
text-align: center;
}

#onas .lead p:last-child {
margin-bottom: 0;
}

@media (max-width: 700px) {

  .main-nav {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 0.5rem;
  }

  .main-nav a {
    display: block;
    margin-left: 0;
    padding: 0.6rem 1rem;
    text-align: center;
  }

  #stowarzyszenie .card,
  #kontakt .card {
    position: relative;
    top: auto;
    transform: none;
    margin: 1rem auto;
    width: 95%;
    max-width: 100%;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
  }

  .contact-card {
    font-size: 1.2em;
    line-height: 1.5;
  }
}

html, body {
  height: 100%;
  margin: 0;
  overflow: hidden;
}

.facebook-icon {
  width: 80px;
  height: auto;
  transition: transform 0.2s ease;
}
.facebook-icon:hover {
  transform: scale(1.1);
}

.site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  text-align: center;
  color: var(--muted);
  padding: 0.8rem 0;
  border-top: none;
  z-index: 1000;
}

.page {
  min-height: calc(100vh - 110px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: left;
}

#galeria {
  height: calc(100vh - 110px);
  width: 100%;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 10px;
  padding: 10px;
  box-sizing: border-box;
}

#galeria .gallery-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#galeria .gallery-grid img:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(255,255,255,0.5);
}

#home img {
  margin-top: -50px;
}

#home {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  top: -30px;
}

#galeria {
  transform: translateY(-30px);
}

@media (max-width: 700px) {

  html, body {
    overflow: auto;
    height: auto;
  }

  .main-nav a {
    padding: 0.8rem 1rem;
    font-size: 1rem;
  }

  #stowarzyszenie .card,
  #kontakt .card {
    position: relative;
    top: auto;
    transform: none;
    margin: 1rem auto;
    width: 95%;
    max-width: 100%;
  }

  #onas .lead {
    min-height: auto;
    padding: 1rem;
  }

  #galeria {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(5, 1fr);
    gap: 4px;
    height: auto;
    padding: 4px;
    transform: none;
  }

  #galeria .gallery-grid img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
  }

  #home img {
    max-width: 100%;
    height: auto;
    margin-top: 0;
    display: block;
  }

  .site-footer {
    padding: 0.5rem 0;
    font-size: 0.9em;
  }

  #kontakt {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1rem;
  }

  .contact-card {
    font-size: 1.2em;
    line-height: 1.5;
    text-align: center;
    margin: 0.5rem 0;
  }

  .facebook-icon {
    width: 50px;
  }

  .site-footer {
    display: none;
  }
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.8rem;
  color: var(--gray-100);
  cursor: pointer;
}

@media (max-width: 700px) {
  .menu-toggle {
    display: block;
  }
  .main-nav {
    display: none;
    flex-direction: column;
    width: 100%;
    gap: 0.5rem;
    margin-top: 0.5rem;
  }
  .main-nav.active {
    display: flex;
  }
}