/* Styly pro galerie.html. Poradi pravidel zachovava puvodni kaskadu. */

:root {
  --maxw: 75rem;
}

.content {
  width: min(100% - 2rem, var(--maxw));
  margin: 0 auto;
  background-color: white;
}

.menu-header {
  background-color: #fff;
  border-bottom: 6px solid #1499db;
  padding: 10px 0;
}

.menu-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.menu-list {
  list-style: none;
  display: flex;
  justify-content: space-around;
  padding: 0;
  margin: 0;
}

.menu-item {
  text-align: center;
  transition: all 0.3s ease;
}

.menu-item:hover {
  transform: translateY(-5px);
}

.menu-link {
  display: block;
  text-decoration: none;
  color: #333;
  font-weight: bold;
  padding: 10px;
  transition: color 0.3s ease;
}

.menu-link:hover {
  color: #e74c3c;
}

.menu-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 5px;
  transition: transform 0.3s ease;
}

.menu-item:hover .menu-icon {
  transform: scale(1.2);
}

.menu-label {
  font-size: 0.9rem;
  text-transform: uppercase;
}

body {
  margin: 0;
  background-color: #FFCC00;
  font-family: Arial, sans-serif;
}

main {
  margin: 0 auto;
  padding: 0;
}

.footer-container {
  margin: 0 auto;
  padding: 40px 20px;
  background-color: #333;
  color: white;
  text-align: center;
  border-radius: 0;
}

.footer-table {
  width: 100%;
  margin: 0 auto;
  border-collapse: collapse;
}

.footer-table td {
  padding: 10px 15px;
  border-bottom: 1px solid #555;
}

.footer-table td:first-child {
  text-align: right;
  font-weight: bold;
  width: 40%;
  padding-right: 20px;
}

.footer-table td:last-child {
  text-align: left;
  width: 60%;
  padding-left: 20px;
}

.uvodni-banner-obsah {
  position: relative;
  z-index: 2;
  text-align: center;
  color: white;
}

.uvodni-banner-obsah h1 {
  font-size: 2.4rem;
  margin-bottom: 0.5rem;
}

.uvodni-banner-obsah p {
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.uvodni-banner-obsah h1,
.uvodni-banner-obsah p {
  text-shadow: 0 3px 12px rgba(0,0,0,0.35);
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

.kopirovani-zprava {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #333;
  color: #fff;
  padding: 8px 16px;
  border-radius: 6px;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  z-index: 1000;
}

.kopirovani-zprava.show {
  opacity: 1;
}

.galerie {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  width: min(100% - 2rem, 980px);
  margin: 0 auto 25px;
}

.galerie img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 14px;
  cursor: pointer;
  transition: transform 0.25s ease;
}

.gallery-header {
  width: min(100% - 2rem, 980px);
  margin: 20px auto 10px;
  padding: 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, #1499db, #0d6aad);
  color: white;
  text-align: center;
}

.gallery-header span {
  font-size: 32px;
  cursor: pointer;
  user-select: none;
}

.gallery-header p {
  margin: 0;
  font-weight: bold;
  font-size: 1.2rem;
}

.galerie img:hover {
  transform: scale(1.05);
}

.sipka {
  font-size: 18px;
  color: #555;
}

.lightbox {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  justify-content: center;
  align-items: center;
  flex-direction: column;
  text-align: center;
}

.lightbox {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  overflow: hidden;
}

.lightbox-slide {
  display: none;
  max-width: 80%;
  max-height: 80%;
  margin: 0 auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.lightbox-caption {
  color: #fff;
  font-size: 1.1rem;
  margin-top: 15px;
  max-width: 80%;
  line-height: 1.4;
  opacity: 0.9;
}

.prev,
.next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  font-size: 2.5rem;
  padding: 10px;
  cursor: pointer;
  z-index: 1001;
  background-color: rgba(0, 0, 0, 0.3);
  user-select: none;
}

.prev {
  left: 5%;
}

.next {
  right: 5%;
}

.close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 35px;
  color: white;
  cursor: pointer;
  z-index: 1002;
}

.search-bar {
  margin: 20px auto;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.search-bar input {
  width: 100%;
  max-width: 400px;
  padding: 10px 15px;
  font-size: 16px;
  border: 2px solid #ccc;
  border-radius: 8px;
  outline: none;
  transition: 0.3s;
}

.search-bar input:focus {
  border-color: #1499db;
  box-shadow: 0 0 8px rgba(20, 153, 219, 0.4);
}

.search-bar button {
  padding: 10px 15px;
  background: #1499db;
  color: white;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.3s;
}

.search-bar button:hover {
  background: #0d6aad;
}

.galerie-banner {
  position: relative;
  aspect-ratio: 16 / 5;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.galerie-banner-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.galerie-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.42);
  z-index: 1;
}

.galerie-banner .uvodni-banner-obsah {
  position: relative;
  z-index: 2;
  width: min(92%, 900px);
  text-align: center;
  color: #fff;
}

.galerie-banner .uvodni-banner-obsah h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(2rem, 5vw, 3.3rem);
  line-height: 1.08;
  text-shadow: 0 4px 14px rgba(0,0,0,0.45);
}

.galerie-banner .uvodni-banner-obsah p {
  margin: 0;
  font-size: clamp(1rem, 2.2vw, 1.35rem);
  line-height: 1.4;
  text-shadow: 0 3px 10px rgba(0,0,0,0.4);
}

.galerie-banner h1 {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.galerie-banner p {
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.galerie-banner .sipka {
  font-size: 48px;
  animation: bounce 2s infinite;
  color: white;
}

@media (max-width: 768px) {
  .galerie-banner {
    aspect-ratio: auto;
    min-height: 300px;
    margin-bottom: 1rem;
  }

  .galerie-banner .uvodni-banner-obsah {
    width: min(92%, 520px);
    padding: 0 8px;
  }

  .galerie-banner .uvodni-banner-obsah h1 {
    font-size: 2rem;
    line-height: 1.08;
    margin-bottom: 0.6rem;
  }

  .galerie-banner .uvodni-banner-obsah p {
    font-size: 1.05rem;
    line-height: 1.35;
  }

  .galerie-banner .sipka {
    font-size: 38px;
    margin-top: 10px;
    color: #fff;
  }
}

.menu-logo {
  display: none;
}

@media (max-width: 768px) {
  .menu-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 0 6px;
  }

  .menu-logo img {
    height: 40px;
    width: auto;
  }

  .menu-header {
    padding: 8px 0;
  }

  .menu-wrapper {
    max-width: 100%;
    padding: 0 8px;
  }

  .menu-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px;
    margin: 0;
  }

  .menu-item {
    width: 100%;
    transform: none !important;
  }

  .menu-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    text-decoration: none;
    transition: all 0.2s ease;
  }

  .menu-link:hover {
    background: #f3f8ff;
    border-color: #1499db;
  }

  .menu-icon {
    width: 22px;
    height: 22px;
    margin: 0;
    flex-shrink: 0;
    transform: none !important;
  }

  .menu-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #111;
    text-align: left;
    line-height: 1.2;
  }

  .menu-item:hover,
  .menu-item:hover .menu-icon {
    transform: none !important;
  }

  .galerie-slider {
    position: relative;
    display: block;
    width: 100%;
    overflow: hidden;
    touch-action: pan-y;
    user-select: none;
  }

  .galerie-slider img {
    display: none;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer;
  }

  .galerie-slider img.active {
    display: block;
  }

  .galerie-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: white;
    font-size: 24px;
    cursor: pointer;
    z-index: 5;
    -webkit-tap-highlight-color: transparent;
  }

  .galerie-arrow-left {
    left: 10px;
  }

  .galerie-arrow-right {
    right: 10px;
  }

  .galerie-arrow:active {
    transform: translateY(-50%) scale(0.96);
  }

  .galerie.galerie-slider {
    display: block;
    grid-template-columns: none;
    gap: 0;
  }

  .lightbox-slide {
    max-width: 94%;
    max-height: 72vh;
  }

  .prev,
  .next {
    font-size: 2rem;
    padding: 8px;
  }

  .close {
    top: 14px;
    right: 18px;
    font-size: 30px;
  }
}

@media (max-width: 430px) {
  .menu-link {
    padding: 10px 12px;
    gap: 10px;
  }

  .menu-icon {
    width: 20px;
    height: 20px;
  }

  .menu-label {
    font-size: 0.82rem;
  }

  .galerie-arrow {
    width: 38px;
    height: 38px;
    font-size: 22px;
  }

  .galerie-arrow-left {
    left: 8px;
  }

  .galerie-arrow-right {
    right: 8px;
  }
}

.galerie-arrow {
  display: none;
}

.galerie.galerie-slider {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}

@media (max-width: 768px) {
  .galerie.galerie-slider {
    position: relative;
    display: block;
    width: calc(100% - 1rem);
    max-width: calc(100% - 1rem);
    margin: 0 auto 22px;
    overflow: hidden;
    box-sizing: border-box;
  }

  .galerie.galerie-slider img {
    display: none;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 16px;
    box-sizing: border-box;
  }

  .galerie.galerie-slider img.active {
    display: block;
  }

  .galerie-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: white;
    font-size: 24px;
    cursor: pointer;
    z-index: 5;
    -webkit-tap-highlight-color: transparent;
  }

  .galerie-arrow-left {
    left: 10px;
  }

  .galerie-arrow-right {
    right: 10px;
  }
}
