/* Gatscherhof final interaction, mobile image and natural scroll hardening */

/* Language switcher: always clickable, including Italian flag on desktop and mobile */
.language-switcher,
.mobile-language-switcher,
.language-switcher .lang-item,
.mobile-language-switcher .lang-item,
.language-switcher .lang-item *,
.mobile-language-switcher .lang-item * {
  pointer-events: auto !important;
}

.language-switcher,
.mobile-language-switcher {
  position: relative !important;
  z-index: 5000 !important;
  isolation: isolate;
}

.language-switcher .lang-item,
.mobile-language-switcher .lang-item {
  cursor: pointer !important;
  touch-action: manipulation !important;
  -webkit-tap-highlight-color: transparent;
}

header .nav-logo,
header .mobile-header,
header .mobile-header .gh-mobile-sidebar,
header .mobile-header .sidebar {
  pointer-events: auto !important;
}

@media (max-width: 991.98px) {
  header.home-header .mobile-header .gh-mobile-sidebar .mobile-language-switcher,
  header.header-inner_pages .mobile-header .gh-mobile-sidebar .mobile-language-switcher,
  header.home-header .mobile-header .sidebar .mobile-language-switcher,
  header.header-inner_pages .mobile-header .sidebar .mobile-language-switcher {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    overflow: visible !important;
  }

  header.home-header .mobile-header .gh-mobile-sidebar .mobile-language-switcher .lang-item,
  header.header-inner_pages .mobile-header .gh-mobile-sidebar .mobile-language-switcher .lang-item,
  header.home-header .mobile-header .sidebar .mobile-language-switcher .lang-item,
  header.header-inner_pages .mobile-header .sidebar .mobile-language-switcher .lang-item {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    flex: 0 0 auto !important;
    z-index: 2 !important;
  }
}

/* Natural scrolling: remove ScrollSmoother/pinning side effects that feel like blockers */
html {
  overflow-x: hidden !important;
  overflow-y: auto !important;
  height: auto !important;
  overscroll-behavior-y: auto !important;
}

body {
  overflow-x: hidden !important;
  height: auto !important;
}

body:not(.gh-mobile-menu-open):not(.modal-open):not(.gh-modal-open):not(.gallery-lightbox-open) {
  overflow-y: auto !important;
  overscroll-behavior-y: auto !important;
  touch-action: pan-y pinch-zoom !important;
  position: static !important;
  inset: auto !important;
}

body.gh-mobile-menu-open,
body.modal-open,
body.gh-modal-open,
body.gallery-lightbox-open {
  overflow: hidden !important;
}

#smooth-wrapper,
#smooth-content,
.scroll-content {
  position: relative !important;
  overflow: visible !important;
  height: auto !important;
  min-height: 0 !important;
  transform: none !important;
  will-change: auto !important;
}

.pin-spacer {
  height: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  transform: none !important;
}

.pin-spacer > * {
  position: relative !important;
  inset: auto !important;
  transform: none !important;
}

/* Mobile/responsive image reliability */
img {
  max-width: 100%;
  height: auto;
}

.gatscherhof-gallery-page img,
.gatscherhof-gallery-grid img,
.gallery img,
.suite-room img,
.room-slider img,
.gh-panorama-gallery img,
.gh-apartment-gallery img,
.hero-banner img,
.footer img,
header img {
  display: block;
}

.gatscherhof-gallery-page .gallery-media,
.gatscherhof-gallery-page .gatscherhof-folder-card,
.gallery .image-container,
.gallery .gallery-img,
.gh-panorama-gallery .gh-panorama-media {
  background-color: #f6f1ea;
}

@media (max-width: 767.98px) {
  .gatscherhof-gallery-page .gatscherhof-gallery-grid,
  .gatscherhof-gallery-grid {
    grid-template-columns: 1fr !important;
  }

  .gatscherhof-gallery-page .gallery-media img,
  .gatscherhof-gallery-grid img,
  .gallery img,
  .suite-room img,
  .room-slider img,
  .gh-panorama-gallery img {
    width: 100% !important;
    min-height: 1px;
    object-fit: cover;
  }
}


/* JPEG fallback for very old mobile browsers without WebP support */
html.no-webp .gatscherhof-gallery-title-banner {
  background:
    linear-gradient(120deg, rgba(16, 16, 18, 0.68) 0%, rgba(16, 16, 18, 0.42) 34%, rgba(16, 16, 18, 0.14) 68%, rgba(16, 16, 18, 0.08) 100%),
    url("../media/gallery/sonstiges/1.jpg") center/cover no-repeat !important;
}

html.no-webp .gatscherhof-banner-fw1 .content {
  background-image: url('../media/gallery/ferienwohnung-1/1.jpg') !important;
}

html.no-webp .gatscherhof-banner-fw2 .content {
  background-image: url('../media/gallery/ferienwohnung-2/1.jpg') !important;
}

html.no-webp .gatscherhof-banner-anfrage .content {
  background-image: url('../media/gallery/sonstiges/23.jpg') !important;
}

html.no-webp .gatscherhof-banner-lage .content {
  background-image:
    linear-gradient(115deg, rgba(24, 20, 19, 0.18), rgba(24, 20, 19, 0.05)),
    url('../media/gallery/sonstiges/29.jpg') !important;
}

html.no-webp .gatscherhof-banner-kontakt .content {
  background-image:
    linear-gradient(115deg, rgba(18, 15, 12, 0.14) 0%, rgba(18, 15, 12, 0.04) 42%, rgba(18, 15, 12, 0.00) 100%),
    url('../media/hero/gatscherhof-hero-2.jpg') !important;
}


/* GH 2026-05 gallery language/mobile image hardening */
.gatscherhof-gallery-page img,
.gatscherhof-gallery-modal img,
.gh-panorama-gallery img,
.gh-gallery-modal img {
  opacity: 1 !important;
  visibility: visible !important;
}
@media (max-width: 767px) {
  .gatscherhof-gallery-grid,
  .gatscherhof-gallery-link .gallery-media,
  .gh-panorama-viewport,
  .gh-panorama-track,
  .gh-panorama-slide,
  .gh-panorama-slide__button,
  .gh-gallery-modal__image-wrap {
    min-height: 220px;
  }
  .gatscherhof-gallery-link img,
  .gh-panorama-slide img,
  .gh-panorama-thumb img,
  .gh-gallery-modal__image,
  .gatscherhof-gallery-modal img {
    display: block !important;
    width: 100% !important;
    object-fit: cover;
  }
  .gh-panorama-slide img,
  .gh-gallery-modal__image,
  .gatscherhof-gallery-modal img {
    height: auto;
    min-height: 220px;
  }
}
