/* Ferienhaus Eberharter – Laufzeit-Styles (Zustände, Lightbox, Bewegungs-Präferenzen) */

html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body.fue-menu-open { overflow: hidden; }
::selection { background: #c6a45e; color: #14110d; }
:focus-visible { outline: 2px solid #c6a45e; outline-offset: 3px; }
a, button, summary { -webkit-tap-highlight-color: transparent; }

/* Header-Zustände */
.fue-header.is-scrolled, .fue-header.is-solid { padding-top: 14px; padding-bottom: 14px; background: rgba(20, 17, 13, 0.9); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: 0 1px 0 rgba(198, 164, 94, 0.2); }
body.fue-menu-open .fue-header { background: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
body.fue-menu-open .fue-drawer { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
body.fue-menu-open .fue-burger-line--a { top: 23px; transform: rotate(45deg); }
body.fue-menu-open .fue-burger-line--b { top: 23px; transform: rotate(-45deg); }
.fue-mbar.is-visible { transform: translateY(0); }
body.fue-menu-open .fue-mbar { transform: translateY(120%); }
.fue-nav-link.is-active { color: #dcc189; }
.fue-nav-link.is-active::after { transform: scaleX(1); }

/* Reveal-Ausgangszustände (nur mit JS und ohne Fehler) */
.fue-js:not(.fue-fail) [data-reveal] { opacity: 0; }

/* Hero-Intro (rein CSS, unabhängig von JS – wichtig für schnelle Darstellung) */
.fue-hero-media { animation: fue-kenburns 3.4s cubic-bezier(0.16, 1, 0.3, 1) both; }
.fue-hero-inner > * { animation: fue-rise 1.2s cubic-bezier(0.16, 1, 0.3, 1) both; }
.fue-hero-inner > :nth-child(1) { animation-delay: 0.1s; }
.fue-hero-inner > :nth-child(2) { animation-delay: 0.25s; }
.fue-hero-inner > :nth-child(3) { animation-delay: 0.45s; }
.fue-hero-inner > :nth-child(4) { animation-delay: 0.6s; }
.fue-hero-inner > :nth-child(5) { animation-delay: 0.75s; }
@keyframes fue-kenburns { from { transform: scale(1.14); } to { transform: scale(1); } }
@keyframes fue-rise { from { opacity: 0; transform: translateY(32px); } to { opacity: 1; transform: none; } }

/* Galerie: echte Buttons für Tastatur & Screenreader */
.fue-gshot-btn { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: transparent; cursor: zoom-in; }
.fue-gshot-btn:focus-visible { outline: 2px solid #c6a45e; outline-offset: -8px; }

/* Scrollytelling */
.fue-story-img.is-active { opacity: 1; transform: scale(1); }
.fue-story-dot.is-active { background: #c6a45e; transform: scale(1.5); }
@media (min-width: 1024px) {
  .fue-js:not(.fue-fail) .fue-chapter { opacity: 0.22; transition: opacity 0.9s cubic-bezier(0.22, 0.61, 0.36, 1); }
  .fue-js:not(.fue-fail) .fue-chapter.is-active { opacity: 1; }
}

/* Galerie & Zimmer: Drag-Scrollen */
.fue-gallery-track, .fue-rooms-track { cursor: grab; }
.fue-gallery-track.is-dragging, .fue-rooms-track.is-dragging { cursor: grabbing; scroll-snap-type: none; scroll-behavior: auto; }
.fue-gallery-track.is-dragging *, .fue-rooms-track.is-dragging * { pointer-events: none; user-select: none; }
.fue-gallery-track.is-hscroll { overflow: visible; scroll-snap-type: none; cursor: default; width: max-content; }
.fue-rooms-arrow { display: inline-flex; align-items: center; justify-content: center; font-family: inherit; }
.fue-gshot-img, .fue-room-img { -webkit-user-drag: none; user-select: none; }

.fue-gallery.is-pin { display: flex; flex-direction: column; justify-content: center; min-height: 100vh; min-height: 100svh; padding: 96px 0 36px; }
.fue-gallery.is-pin .fue-gallery-head { width: 100%; margin-bottom: 28px; }
.fue-gallery.is-pin .fue-gallery-hint { width: 100%; }
.fue-gallery.is-pin .fue-gshot { height: min(54vh, 520px); }

/* Smoobu */
.fue-book-card .calendarContent:empty::before, .fue-book-card #apartmentIframeAll:empty::before { content: "Wird geladen …"; display: block; padding: 40px 0; font-size: 0.9rem; letter-spacing: 0.12em; text-transform: uppercase; color: #675e52; }
.fue-book-card iframe { max-width: 100%; border: 0; }
.fue-book-card #apartmentIframeAll { min-height: 360px; }
.fue-book-card .calendarWidget { max-width: 100%; overflow-x: auto; }

/* Lightbox */
.fue-lb { position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center; background: rgba(14, 12, 9, 0.96); opacity: 0; visibility: hidden; transition: opacity 0.4s ease, visibility 0s linear 0.4s; touch-action: pan-y; }
.fue-lb.is-open { opacity: 1; visibility: visible; transition-delay: 0s; }
.fue-lb-fig { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 16px; max-width: 94vw; }
.fue-lb-img { display: block; max-width: 94vw; max-height: 80vh; object-fit: contain; box-shadow: 0 40px 100px -30px #000; transition: opacity 0.35s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1); }
.fue-lb-img.is-swap { opacity: 0; transform: scale(0.97); }
.fue-lb-cap { font-family: 'FUE Sans', sans-serif; font-size: 0.78rem; letter-spacing: 0.22em; text-transform: uppercase; color: rgba(246, 241, 231, 0.85); text-align: center; }
.fue-lb-btn { position: absolute; display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; padding: 0; border: 1px solid rgba(246, 241, 231, 0.35); border-radius: 50%; background: rgba(20, 17, 13, 0.4); color: #f6f1e7; font-size: 1.3rem; line-height: 1; cursor: pointer; transition: background 0.3s, color 0.3s; }
.fue-lb-btn:hover { background: #c6a45e; color: #14110d; border-color: #c6a45e; }
.fue-lb-close { top: calc(16px + env(safe-area-inset-top, 0px)); right: 16px; }
.fue-lb-prev { left: 16px; top: 50%; margin-top: -26px; }
.fue-lb-next { right: 16px; top: 50%; margin-top: -26px; }
.fue-lb-count { position: absolute; left: 20px; top: calc(28px + env(safe-area-inset-top, 0px)); font-family: 'FUE Sans', sans-serif; font-size: 0.78rem; letter-spacing: 0.2em; color: #c6a45e; }
@media (max-width: 767px) {
  .fue-lb-prev, .fue-lb-next { top: auto; bottom: calc(22px + env(safe-area-inset-bottom, 0px)); margin-top: 0; }
  .fue-lb-prev { left: calc(50% - 64px); }
  .fue-lb-next { right: calc(50% - 64px); }
  .fue-lb-img { max-height: 72vh; }
}

/* Hero-Canvas */
.fue-hero-canvas canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; display: block; opacity: 0; transition: opacity 2s ease; }
.fue-hero-canvas.is-ready canvas { opacity: 1; }

/* Breakdance-Free-Badge nicht unter die Mobile-Leiste legen */
@media (max-width: 1023px) { body.fue-mbar-on .breakdance-built-with-badge { bottom: calc(84px + env(safe-area-inset-bottom, 0px)) !important; right: 12px !important; } }

/* Weniger Bewegung */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fue-js [data-reveal], .fue-js .fue-chapter { opacity: 1 !important; transform: none !important; }
  .fue-hero-media, .fue-hero-inner > * { animation: none !important; }
  .fue-scrollcue-line::after { animation: none; }
  * { transition-duration: 0.01ms !important; }
}
@media print {
  .fue-header, .fue-mbar, .fue-drawer, .fue-scrollcue, .fue-hero-canvas { display: none !important; }
}

.fue-gm-nav-link.is-active { background: #14110d; border-color: #14110d; color: #f6f1e7; }
