html {
  scroll-behavior: smooth;
}

/* Wider content cap on large monitors (nav, sections, footer all use .container).
   .container.container = specificity (0,2,0) so it beats Tailwind's .container
   regardless of stylesheet order, no !important needed. */
@media (min-width: 1536px) {
  .container.container {
    max-width: 1800px;
  }
}

/* Animated hamburger -> X */
.hamburger {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
}

.hamburger-bar {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 9999px;
  background-color: currentColor;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

#menu-toggle.is-open .hamburger-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

#menu-toggle.is-open .hamburger-bar:nth-child(2) {
  opacity: 0;
}

#menu-toggle.is-open .hamburger-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Ceník dropdown (desktop) */
.cenik-dropdown {
  position: relative;
}
.cenik-menu {
  position: absolute;
  right: 0;
  top: 100%;
  min-width: 260px;
  background: #ffffff;
  color: #111111;
  border-radius: 0 0 0.5rem 0.5rem;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 60;
  overflow: hidden;
}
.cenik-dropdown:hover .cenik-menu,
.cenik-dropdown:focus-within .cenik-menu,
.cenik-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.cenik-menu a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.1rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: #111111;
  border-bottom: 1px solid #e2e2e2;
  transition: background 0.15s ease, color 0.15s ease;
}
.cenik-menu a:last-child {
  border-bottom: none;
}
.cenik-menu a:hover {
  background: #f2f2f2;
  color: #8b221c;
}

/* Ikony služeb – externí SVG přes mask, barva se řídí currentColor (funguje hover) */
.svg-icon {
  display: inline-block;
  vertical-align: middle;
  background-color: currentColor;
  -webkit-mask-image: var(--icon);
  mask-image: var(--icon);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

#dock-nav {
  position: fixed;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px 0;
  pointer-events: none;
  max-height: calc(100vh - 240px);
  overflow: hidden;
  width: 220px;
}

.dock-item {
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  color: #555;
  text-align: center;
  transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
  white-space: nowrap;
  pointer-events: auto;
  padding: 8px 20px;
  border-radius: 9999px;
  opacity: 0.6;
  transform-origin: center;
  font-size: 1rem;
  display: block;
  width: 100%;
  box-sizing: border-box;
}

.dock-item:hover {
  color: #8b221c;
  opacity: 1;
  transform: scale(1.2);
}

.dock-item.active {
  color: #8b221c;
  font-weight: 700;
  opacity: 1;
  transform: scale(1.3);
}

@media (max-width: 1450px) {
  #dock-nav { display: none; }
  section.pt-24.pb-32.lg\:pl-32 {
    padding-left: 0 !important;
  }
}

@media (min-width: 1450px) {
  footer .grid {
    gap: 2rem;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 1450px) {
  footer .grid {
    gap: 1.5rem;
  }
}

/* Sortiment – galerie (miniatury) + lightbox */
.pg-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.pg-thumb {
  width: 68px;
  height: 52px;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid transparent;
  padding: 0;
  cursor: pointer;
  background: #fff;
  flex: 0 0 auto;
}
.pg-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pg-thumb.is-vykres img {
  object-fit: contain;
  background: #fff;
  padding: 2px;
}
.pg-thumb:hover,
.pg-thumb.is-active {
  border-color: #8b221c;
}

#lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
}
#lightbox.open {
  display: flex;
}
#lb-stage {
  max-width: 92vw;
  max-height: 86vh;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
#lb-img {
  max-width: 92vw;
  max-height: 86vh;
  object-fit: contain;
  background: #fff;
  border-radius: 4px;
  cursor: zoom-in;
}
#lb-img.zoomed {
  max-width: none;
  max-height: none;
  cursor: zoom-out;
}
.lb-btn {
  position: fixed;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 9999px;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 101;
}
.lb-btn:hover {
  background: #8b221c;
}
#lb-prev {
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
}
#lb-next {
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
}
#lb-close {
  top: 16px;
  right: 16px;
}
#lb-counter {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 14px;
  background: rgba(0, 0, 0, 0.45);
  padding: 4px 14px;
  border-radius: 9999px;
  z-index: 101;
}
#lb-caption {
  position: fixed;
  bottom: 52px;
  left: 50%;
  transform: translateX(-50%);
  color: #eee;
  font-size: 14px;
  text-align: center;
  max-width: 90vw;
  z-index: 101;
}

/* Lightbox – mobilní zobrazení: přepínací šipky vycentrované pod obrázkem */
@media (max-width: 640px) {
  #lb-stage, #lb-img { max-height: 64vh; }
  .lb-btn { width: 44px; height: 44px; font-size: 24px; }
  /* prev/next jako vycentrovaná dvojice přímo pod obrázkem */
  #lb-prev { left: 50%; right: auto; top: auto; bottom: 20px; transform: translateX(-56px); }
  #lb-next { left: 50%; right: auto; top: auto; bottom: 20px; transform: translateX(12px); }
  #lb-close { top: 10px; right: 10px; }
  #lb-counter { bottom: 82px; }
  #lb-caption { bottom: 112px; font-size: 13px; max-width: 82vw; }
}

/* Sortiment – mobil: jednotná šířka obsahu (fotky, texty i tabulky) */
@media (max-width: 767px) {
  section.pt-24.pb-32.lg\:pl-32 .grid > * {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
  section.pt-24.pb-32.lg\:pl-32 [data-gallery],
  section.pt-24.pb-32.lg\:pl-32 .pg-main,
  section.pt-24.pb-32.lg\:pl-32 .overflow-x-auto,
  section.pt-24.pb-32.lg\:pl-32 table {
    width: 100%;
    max-width: 100%;
  }
}
