h1, h2, h3, h4 {
  font-family: 'Times New Roman', Times, serif;
}

body, p, a, button, input, textarea {
  font-family: 'Calibri', 'Trebuchet MS', sans-serif;
}

/* ===================================
   GLOBAL BACKGROUND FIX
   =================================== */
html, body {
  background: #000000;
  margin: 0;
  padding: 0;
  min-height: 100%;
}

/* ===================================
   FOTOGALERIE - GENERAL
   =================================== */

.page-fotogalerie {
  padding-top: 0;
}

/* ===================================
   HERO SEKCE
   =================================== */

.page-fotogalerie .page-hero {
  background: black;
  padding: 80px 20px 20px;
  text-align: center;
  color: #ffffff;
}

.page-fotogalerie .page-hero h1 {
  font-size: 3.5rem;
  font-weight: 900;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 3px;
}

.page-fotogalerie .hero-subtitle {
  font-size: 1.4rem;
  opacity: 0.9;
  max-width: 700px;
  margin: 0 auto;
}

/* ===================================
   GALERIE SEKCE
   =================================== */

.galerie-section {
  padding: 20px 20px;
  background: #000000;
  color: #ffffff;
  min-height: 600px;
}

.galerie-section h2 {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 15px;
}

.galerie-section .section-subtitle {
  color: #ffffff;
  opacity: 0.8;
  text-align: center;
  font-size: 1.2rem;
  max-width: 700px;
  margin: 0 auto 8px;
}

/* ===================================
   MENU TLAČÍTEK
   =================================== */

.galerie-menu {
  text-align: center;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  max-width: 1000px;
  margin: 0 auto 30px;
}

.galerie-btn {
  padding: 14px 15px;
  border-radius: 30px;
  border: 2px solid #ffffff;
  background: transparent;
  color: #ffffff;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.25s ease-in-out;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-align: center;
  overflow: hidden;
  white-space: nowrap;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.galerie-btn:hover {
  background: #ffffff;
  color: #1a1a1a;
  transform: scale(1.05);
}

.galerie-btn.active {
  background: #ffffff;
  color: #1a1a1a;
  border-color: #ffffff;
}

/* ===================================
   GRID FOTEK
   =================================== */

.galerie-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.galerie-tab {
  display: none;
}

.galerie-tab.active {
  display: grid;
}

.galerie-item {
  border-radius: 15px;
  overflow: hidden;
  aspect-ratio: 4/3;
  cursor: pointer;
  transition: transform 0.3s ease;
}

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

.galerie-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ===================================
   LIGHTBOX
   =================================== */

.lightbox {
  position: fixed;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background: rgba(0, 0, 0, 0.97);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999999 !important;
  transform: none !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box;
}

.lightbox.active {
  display: flex;
}

.lightbox-img {
  display: block;
  position: absolute;
  top: calc(50% - 30px); /* posunout mírně nahoru, aby byl prostor pro counter */
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: calc(100% - 200px);
  max-height: calc(100% - 160px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.8);
}

.lightbox-close {
  position: absolute;
  top: 30px;
  right: 40px;
  font-size: 50px;
  color: white;
  cursor: pointer;
  font-weight: bold;
  transition: transform 0.2s ease;
  z-index: 100000;
}

.lightbox-close:hover {
  transform: scale(1.2);
  color: #ff4444;
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  font-size: 60px;
  color: white;
  cursor: pointer;
  user-select: none;
  padding: 20px;
  transform: translateY(-50%);
  transition: all 0.2s ease;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
  left: 30px;
}

.lightbox-next {
  right: 30px;
}

.lightbox-counter {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 20px;
  font-weight: bold;
  background: rgba(0, 0, 0, 0.6);
  padding: 8px 22px;
  border-radius: 30px;
  white-space: nowrap;
}

/* ===================================
   RESPONSIVE - TABLET
   =================================== */

@media (max-width: 1024px) {
  .galerie-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .page-fotogalerie .page-hero {
    padding: 60px 20px 20px;
  }
  
  .page-fotogalerie .page-hero h1 {
    font-size: 2.5rem;
  }
}

/* ===================================
   RESPONSIVE - MOBIL
   =================================== */

@media (max-width: 768px) {
  .galerie-section {
    padding: 15px 15px;
  }
  
  .page-fotogalerie .page-hero {
    padding: 50px 20px 15px;
  }
  
  .page-fotogalerie .page-hero h1 {
    font-size: 2rem;
  }
  
  .page-fotogalerie .hero-subtitle {
    font-size: 1.1rem;
  }
  
  .galerie-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  
  .galerie-menu {
    grid-template-columns: 1fr;
  }
  
  .lightbox-prev,
  .lightbox-next {
    font-size: 40px;
    width: 60px;
    height: 60px;
    padding: 10px;
  }
  
  .lightbox-prev {
    left: 10px;
  }
  
  .lightbox-next {
    right: 10px;
  }
  
  .lightbox-counter {
    font-size: 18px;
    bottom: 20px;
    padding: 8px 20px;
  }
  
  .lightbox-close {
    top: 20px;
    right: 20px;
    font-size: 40px;
  }
}

@media (max-width: 480px) {
  .page-fotogalerie .page-hero h1 {
    font-size: 1.6rem;
    letter-spacing: 1px;
  }
  
  .galerie-grid {
    grid-template-columns: 1fr;
  }
  
  .lightbox-img {
    max-width: calc(100vw - 100px);
    max-height: calc(100vh - 100px);
  }
}