* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, sans-serif;
  color: #111;
  background: #fff;
}

a {
  color: #0044cc;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

#keret {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
}

#fejlec {
  display: flex;
  align-items: stretch;
}

#fejlec .fejlecBal,
#fejlec .fejlecJobb {
  width: 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 10px;
  text-align: center;
}

#fejlec .fejlecBal img {
  max-width: 80%;
  height: auto;
  margin: 0 auto;
  display: block;
}

#fejlec h1 {
  font-size: clamp(18px, 2vw, 28px);
  line-height: 1.15;
  margin-bottom: 4px;
}

#fejlec .fejlec-sor,
#fejlec .elerhetosegek p {
  font-size: clamp(14px, 1.6vw, 24px);
  line-height: 1.2;
  margin-bottom: 2px;
}

#fejlec .elerhetosegek {
  font-style: normal;
}

#fejlec .logo-link {
  display: block;
}

.blokk {
  width: 100%;
  margin-top: 10px;
  padding: 10px;
  background-color: rgba(0, 0, 255, 0.1);
}

.blokk h1 {
  margin-bottom: 8px;
  text-align: center;
  line-height: 1.2;
}

.blokk p {
  margin-bottom: 3px;
  padding: 0 5px;
  line-height: 1.3;
}

.blokk .center {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-start;
  width: 100%;
}

.blokk .megjegyzes {
  text-align: center;
  font-weight: bold;
}

.blokk .termek {
  flex: 0 0 calc((100% - 30px) / 4);
  max-width: calc((100% - 30px) / 4);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px;
  border: 1px solid rgba(0, 0, 255, 0.2);
  background-color: rgba(0, 0, 255, 0.05);
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
}

.blokk .termek .kepkeret {
  width: 100%;
  aspect-ratio: 1 / 1;
  position: relative;
  overflow: hidden;
}

.blokk .termek .kepkeret video,
.blokk .termek .kepkeret img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border: none;
}

.blokk .termek .kepkeret img:hover {
  cursor: zoom-in;
}

.blokk .termek figcaption {
  width: 100%;
  margin-top: 6px;
  padding: 4px 2px;
  text-align: center;
  font-size: 18px;
  line-height: 1.3;
  overflow-wrap: break-word;
}

.fullscreen-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding: 0 2vh;
  z-index: 1000;
  cursor: zoom-out;
  animation: fadeIn 0.2s ease-in-out;
  touch-action: none;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.fullscreen-overlay img {
  width: 100%;
  max-width: calc(100vw - 8vw);
  height: 70vh;
  padding: 5vh 0 1vh 0;
  object-fit: contain;
  image-rendering: auto;
  z-index: 1000;
}

.fullscreen-overlay .arrow-left,
.fullscreen-overlay .arrow-right {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  padding: 2vh 2vw;
  background-color: rgba(0, 0, 0, 0.25);
  position: absolute;
  cursor: pointer;
  user-select: none;
  color: white;
  z-index: 1001;
  transition: background-color 0.2s ease;
}

.fullscreen-overlay .arrow-left:hover,
.fullscreen-overlay .arrow-right:hover {
  background-color: rgba(0, 0, 0, 0.4);
}

.fullscreen-overlay .arrow-left {
  left: 0;
}

.fullscreen-overlay .arrow-right {
  right: 0;
}

.fullscreen-overlay .close-button {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1002;
  padding: 8px 14px;
  border: none;
  border-radius: 8px;
  background-color: rgba(0, 0, 0, 0.45);
  color: white;
  font-family: Arial, sans-serif;
  font-size: 18px;
  cursor: pointer;
  user-select: none;
}

.fullscreen-overlay .close-button:hover {
  background-color: rgba(0, 0, 0, 0.65);
}

.fullscreen-overlay .image-caption {
  margin: 0 auto 10vh auto;
  color: white;
  font-size: clamp(22px, 4vw, 40px);
  text-align: center;
  max-width: 90vw;
  padding: 2vh 2vw;
  line-height: 1.4;
}

@media (max-width: 1024px) {
  .blokk .termek {
    flex: 0 0 calc((100% - 20px) / 3);
    max-width: calc((100% - 20px) / 3);
  }
}

@media (max-width: 768px) {
  #fejlec {
    flex-direction: column;
  }

  #fejlec .fejlecBal,
  #fejlec .fejlecJobb {
    width: 100%;
    justify-content: flex-start;
  }

  #fejlec .fejlecBal img {
    max-width: 50%;
  }

  .blokk .termek {
    flex: 0 0 calc((100% - 10px) / 2);
    max-width: calc((100% - 10px) / 2);
  }
}

@media (max-width: 480px) {
  .blokk {
    padding: 8px;
  }

  .blokk p {
    padding: 0;
  }

  .blokk .center {
    gap: 2px;
  }

  .blokk .termek {
    flex: 0 0 49%;
    max-width: 49%;
  }

  .blokk .termek figcaption {
    font-size: 16px;
  }

  .fullscreen-overlay img {
    max-width: 96vw;
    height: 65vh;
    padding-top: 4vh;
  }

  .fullscreen-overlay .arrow-left,
  .fullscreen-overlay .arrow-right {
    font-size: 3rem;
    padding: 2vh 3vw;
  }

  .fullscreen-overlay .close-button {
    top: 8px;
    right: 8px;
    padding: 7px 11px;
    font-size: 15px;
  }
}
