html, body {
  height: 100%;
  min-height: 100%;
}

body {
  font-family: "Lato", sans-serif;
  transition: background-color .5s, color .5s;
  background-color: #f8f9fa;
  color: #222;
  margin: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
}


.banner {
  transition: margin-left .5s;
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
  padding: 24px 20px 12px 20px;
  display: flex;
  align-items: center;
  gap: 24px;
  position: sticky;
  top: 0;
  z-index: 2;
}

.banner h1 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: 1px;
}
.theme-toggle-btn {
  position: absolute;
  right: 24px;
  top: 15px;
  background: #fff;
  color: #222;
  border: 2px solid #222;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1.3rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  z-index: 20;
}
.theme-toggle-btn:hover {
  background: #222;
  color: #fff;
}
#main {
  transition: margin-left .5s;
  padding: 32px 20px 32px 20px;
  max-width: 900px;
  margin: 0 auto;
  margin-top: 20px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.03);
  min-height: 60vh;
}

#main2 {
  transition: margin-left .5s;
  padding: 32px 20px 32px 20px;
  max-width: 1000px;
  margin: 0 auto;
  margin-top: 20px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.03);
   min-height: calc(60vh - 40px);
}

.footer {
  background: #fff;
  border-top: 1px solid #e5e5e5;
  text-align: center;
  padding: 18px 0;
  color: #888;
  font-size: 0.95rem;
  position: static;
  bottom: 0;
  left: 0;
  width: 100%;
}

h1, h2 {
  margin-top: 0;
  font-weight: 600;
  color: #222;
}

.sidenav {
  height: 100%;
  width: 0;
  position: fixed;
  z-index: 10;
  top: 0;
  left: 0;
  background-color: #222;
  overflow-x: hidden;
  transition: 0.4s;
  padding-top: 60px;
}

.sidenav a {
  padding: 12px 32px 12px 24px;
  text-decoration: none;
  font-size: 1.1rem;
  color: #aaa;
  display: block;
  transition: 0.2s;
}

.sidenav .closebtn {
  position: absolute;
  top: 12px;
  right: 18px;
  font-size: 2rem;
  margin-left: 50px;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
}


button {
  margin: 10px 0;
  background: #222;
  color: #fff;
  border: none;
  padding: 10px 24px;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}

button:hover {
  background: #444;
}

input, textarea {
  width: 100%;
  padding: 10px;
  margin: 5px 0 15px 0;
  box-sizing: border-box;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  background: #fafbfc;
  font-size: 1rem;
  color: #222;
}

.gallery img {
  width: 100%;
  max-width: 300px;
  margin: 10px;
  cursor: pointer;
  border: 1.5px solid #e5e5e5;
  border-radius: 8px;
  transition: transform 0.3s, border 0.2s;
  background: #fff;
}

.gallery img:hover {
  transform: scale(1.04);
  border: 1.5px solid #222;
}

.gallery-slider-section {
  box-sizing: border-box;
  width: 100%;
  max-width: 1080px;
  margin: auto;
  padding: 32px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: transparent;
  box-shadow: none;
  overflow-x: hidden;
}


.gallery-slider {
  width: 100%;
  max-width: 950px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.main-image {
  width: 100%;
  max-width: 700px;
  height: 400px;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 4px 32px rgba(0,0,0,0.10);
  background: #fff;
  transition: transform 0.3s;
}
.thumbs-row {
  display: flex;
  gap: 18px;
  justify-content: center;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  flex-wrap: wrap;
  box-sizing: border-box;
}

.thumb {
  width: 130px;
  height: 90px;
  object-fit: cover;
  border-radius: 10px;
  border: 2px solid #e5e5e5;
  background: #fff;
  transition: border 0.2s, transform 0.2s;
  cursor: pointer;
  min-width: 0;
  box-sizing: border-box;
}

.thumb:hover {
  border: 2px solid #222;
  transform: scale(1.07);
}

.section {
  margin-bottom: 32px;
}
.section h2 {
  font-size: 1.5rem;
  margin-bottom: 16px;
  color: #222;
}
#message {
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 20px;
  height: 270px;
  resize: none;
  border: 1px solid #d1e7dd;
}

.center-block {
  background: rgba(255,255,255,0.85);
  border-radius: 16px;
  box-shadow: 0 4px 32px rgba(0,0,0,0.10);
  max-width: 480px;
  margin: 80px auto 0 auto;
  padding: 40px 32px;
  text-align: center;
}

.center-block h2 {
  margin-top: 0;
  font-size: 2rem;
  font-weight: 700;
}

#bgVideo {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  z-index: -1;
  opacity: 0.45;
  pointer-events: none; 
  user-select: none;
}
.main-image-wrapper {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: center;
  gap: 32px;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto 32px auto;
  flex-wrap: wrap;
}
.image-description {
  flex: 1;
  max-width: 300px;
  font-size: 1.1rem;
  line-height: 1.5;
  background: rgba(255, 255, 255, 0.8);
  padding: 12px 16px;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.center-block button {
  background: #fff;
  color: #222;
  border: 2px solid #222;
  margin-top: 24px;
  font-weight: 600;
  transition: background 0.2s, color 0.2s, width 0.4s, border 0.2s;
  width: 120px;
  min-height: 44px;
  border-radius: 8px;
}

.center-block button:hover {
  background: #222;
  color: #fff;
}
#wyslij{
  background: #fff;
  color: #222;
  border: 2px solid #222;
  margin-top: 24px;
  font-weight: 600;
  transition: background 0.2s, color 0.2s, width 0.4s, border 0.2s;
  width: 120px;
  min-height: 44px;
  border-radius: 8px;
}
#wyslij:hover{
  background: #222;
  color: #fff;
}
body.dark-mode {
  background: #181818;
  color: #eee;
}
body.dark-mode .banner,
body.dark-mode #main,
body.dark-mode #main2,
body.dark-mode .center-block,
body.dark-mode .footer,
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode .footerg,
body.dark-mode #footerin {
  background: #232323;
  color: #eee;
  border-color: #333;
}
body.dark-mode .main-image,
body.dark-mode .thumb,
body.dark-mode .gallery img {
  background: #232323;
  border-color: #333;
}
body.dark-mode .image-description {
  background: rgba(30,30,30,0.92);
  color: #eee;
}
body.dark-mode button,
body.dark-mode #wyslij {
  background: #232323;
  color: #fff;
  border: 2px solid #eee;
}
body.dark-mode button:hover,
body.dark-mode #wyslij:hover {
  background: #fff;
  color: #232323;
}
.footerg {
  background: #fff;
  border-top: 1px solid #e5e5e5;
  text-align: center;
  padding: 18px 0;
  color: #888;
  font-size: 0.95rem;
  position: static;
  bottom: 0;
  left: 0;
  width: 100%;
}
#footerin {
  background: #fff;
  border-top: 1px solid #e5e5e5;
  text-align: center;
  padding: 18px 0;
  color: #888;
  font-size: 0.95rem;
  position: static;
  bottom: 0;
  left: 0;
  width: 100%;
}
@media (max-width: 700px) {
  .gallery-slider-section {
    width: 100vw;
    max-width: 100vw;
    padding: 16px 0;
  }
  .gallery-slider {
    max-width: 100vw;
    padding: 0 4vw;
  }
  .main-image {
    max-width: 98vw;
    height: 38vw;
    min-height: 180px;
    border-radius: 10px;
  }
  .thumbs-row {
    gap: 8px;
    max-width: 100vw;
    padding: 0 2vw 80px 2vw;
  }
  .thumb {
    width: 70px;
    height: 48px;
    border-radius: 6px;
  }
  .main-image-wrapper {
    flex-direction: column;
    gap: 16px;
    max-width: 100vw;
    margin: 0 auto 16px auto;
  }
  .image-description {
    max-width: 98vw;
    font-size: 1rem;
    padding: 8px 8px;
  }
}

@media print {
  body {
    background: #fff !important;
    color: #000 !important;
  }
  .nawigacja,
  .sidenav,
  .banner,
  #filmik,
  #bgVideo,
  video,
  .footer {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    width: 0 !important;
    position: static !important;
  }
  main, #main, #main2, .gallery-slider-section, .center-block, .blok {
    background: #fff !important;
    color: #000 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
  }
  .main-image, .thumb, .gallery img {
    box-shadow: none !important;
    border: 1px solid #888 !important;
    background: #fff !important;
  }
  a {
    color: #000 !important;
    text-decoration: underline !important;
  }
  html, body {
    margin: 0 !important;
    padding: 0 !important;
  }
}

main, #main, #main2 {
  width: 100%;
}
#main2 {
  flex: 1 0 auto;
  width: 100%;
  display: block;
}
.gallery-slider-section,
.thumbs-row {
  margin-bottom: 32px;
}

@media (max-width: 1100px) {
  .gallery-slider-section {
    width: 98vw;
    max-width: 98vw;
    padding: 16px 0;
  }
  .gallery-slider {
    max-width: 98vw;
    padding: 0 1vw;
  }
  .main-image {
    max-width: 96vw;
    height: 36vw;
    min-height: 160px;
    border-radius: 10px;
  }
  .thumbs-row {
    gap: 8px;
    max-width: 98vw;
    padding: 0 1vw 40px 1vw;
  }
  .thumb {
    width: 18vw;
    max-width: 110px;
    height: 12vw;
    max-height: 70px;
    min-width: 60px;
    min-height: 40px;
  }
  .main-image-wrapper {
    flex-direction: column;
    gap: 16px;
    max-width: 98vw;
    margin: 0 auto 16px auto;
  }
  .image-description {
    max-width: 96vw;
    font-size: 1rem;
    padding: 8px 8px;
  }
}

@media (max-width: 1400px) {
  .main-image-wrapper {
    flex-direction: column;
    align-items: center;
    gap: 20px;
    max-width: 98vw;
    margin: 0 auto 24px auto;
  }
  .main-image {
    max-width: 98vw;
    height: auto;
    min-height: 180px;
  }
  .image-description {
    max-width: 98vw;
    margin: 0 auto;
  }
}

.footer, .footerg, #footerin {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  z-index: 10;
}

.footer, .footerg, #footerin {
  position: static;
  width: 100%;
  margin-top: 40px;
}