* {
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  margin: 0;
  background-color: #f5f5f5;
  color: #333;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #fff;
  color: #000;
  padding: 1em;
  flex-wrap: wrap;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.logo img {
  height: 60px;
}

.header-text {
  text-align: right;
}

.header-text a {
  color: #007bff;
  text-decoration: none;
}

main {
  padding: 2em 1em;
}

section {
  margin-bottom: 3em;
}

.gallery,
.videos {
  display: grid;
  gap: 2em; /* väčšia medzera */
  margin-top: 1em;
}

.gallery {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.gallery img,
.videos video {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 4px;
  transition: transform 0.3s ease;
  cursor: pointer;
}

.gallery img:hover,
.videos video:hover {
  transform: scale(1.05);
}

.videos {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.subsection {
  margin-top: 2em;
}

footer {
  text-align: center;
  padding: 1.5em;
  background-color: #222;
  color: white;
}

footer a {
  color: #4caf50;
  text-decoration: underline;
}

/* Lightbox */
#lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

#lightbox-content {
  display: flex;
  align-items: center;
  justify-content: center;
}

#lightbox-content img,
#lightbox-content video {
  max-width: 100%;
  max-height: 90vh; /* Pridané: obmedzi výšku podľa viewportu */
  border-radius: 8px;
  object-fit: contain;
}

#lightbox-overlay.show {
  display: flex;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

#theme-toggle {
  margin-left: auto;
  background: none;
  border: none;
  font-size: 1.5em;
  cursor: pointer;
  color: #666;
}

body.dark #theme-toggle {
  color: #ddd;
}

#lightbox-prev,
#lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.7);
  color: #000;
  border: none;
  font-size: 2em;
  padding: 0.2em 0.5em;
  cursor: pointer;
  z-index: 10000;
  border-radius: 4px;
}

#lightbox-prev:hover,
#lightbox-next:hover {
  background: rgba(255, 255, 255, 0.9);
}

#lightbox-prev {
  left: 20px;
}

#lightbox-next {
  right: 20px;
}


body.dark {
  background-color: #121212;
  color: #e0e0e0;
}

body.dark header {
  background-color: #1f1f1f;
  color: #fff;
}

body.dark .header-text a {
  color: #90caf9;
}

body.dark footer {
  background-color: #000;
  color: #aaa;
}

body.dark footer a {
  color: #80cbc4;
}

body.dark #lightbox-overlay {
  background: rgba(0, 0, 0, 0.9);
}

body.dark #lightbox-prev,
body.dark #lightbox-next {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

body.dark #lightbox-prev:hover,
body.dark #lightbox-next:hover {
  background: rgba(255, 255, 255, 0.3);
}

#theme-toggle {
  margin-left: auto;
  background: none;
  border: none;
  font-size: 1.5em;
  cursor: pointer;
  color: #666;
}

body.dark #theme-toggle {
  color: #ddd;
}
