/* Výkonnostní doplněk – načítání galerie a videí na vyžádání */

.deferred-gallery-image {
  opacity: 0;
}

.deferred-gallery-image:not([data-src]) {
  opacity: 1;
  transition: opacity 0.2s ease;
}

.youtube-facade {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: #000;
  cursor: pointer;
  overflow: hidden;
}

.youtube-facade::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.12);
  transition: background 0.2s ease;
}

.youtube-facade:hover::after,
.youtube-facade:focus-visible::after {
  background: rgba(0, 0, 0, 0.25);
}

.youtube-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.youtube-play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 54px;
  color: #fff;
  background: #ff0000;
  border-radius: 14px;
  transform: translate(-50%, -50%);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

.youtube-play-button i {
  margin-left: 3px;
  font-size: 38px;
  line-height: 1;
}

.youtube-facade.is-loading .youtube-play-button {
  opacity: 0.55;
}

@media (max-width: 767px) {
  [data-aos] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .portfolio .isotope-item {
    transition: none !important;
  }

  .portfolio .portfolio-content img {
    transition: none;
  }

  .portfolio .portfolio-content:hover img {
    transform: none;
  }
}

/* Performance 2026-08: preloader už není potřeba.
   Pravidlo zůstává jako pojistka při staré cache HTML. */
#preloader {
  display: none !important;
}

/* Semantické tlačítko mobilního menu bez výchozího vzhledu buttonu. */
button.header-toggle {
  border: 0;
  padding: 0;
  font-family: inherit;
}

/* Odkazy na SEO podstránky na homepage bez nutnosti načítat celý seo-phase2.css. */
.index-page .seo2-home-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
  margin-top: 12px;
}

.index-page .seo2-home-links a {
  font-size: 12px;
  color: color-mix(in srgb, var(--default-color), transparent 35%);
  text-decoration: none;
}

.index-page .seo2-home-links a:hover,
.index-page .seo2-home-links a:focus-visible {
  color: var(--accent-color);
}

/* Na mobilu není nutné layoutovat vzdálené sekce při prvním paintu. */
@media (max-width: 767px) {
  .index-page #about,
  .index-page #portfolio,
  .index-page #services,
  .index-page #pricing,
  .index-page #testimonials,
  .index-page #contact,
  .index-page #footer {
    content-visibility: auto;
    contain-intrinsic-size: 1px 900px;
  }
}

