/* Projekt-eigene Ergänzungen (ersetzt frühere Inline-Styles). */

/* Sichtbar-Zustand für das Scroll-Reveal; site.js schaltet .is-visible.
   Die Ausgangs- und Übergangswerte kommen aus den Tailwind-Utilities
   (opacity-0, translate-y-*, transition-all, duration-700). */
.is-visible {
    opacity: 1 !important;
    transform: none !important;
}

/* Gestaffelte Einblend-Verzögerung (ersetzt style="transition-delay: …"). */
.reveal-delay-80  { transition-delay: 80ms; }
.reveal-delay-100 { transition-delay: 100ms; }
.reveal-delay-160 { transition-delay: 160ms; }
.reveal-delay-200 { transition-delay: 200ms; }
.reveal-delay-240 { transition-delay: 240ms; }
.reveal-delay-300 { transition-delay: 300ms; }
.reveal-delay-320 { transition-delay: 320ms; }
.reveal-delay-400 { transition-delay: 400ms; }
.reveal-delay-480 { transition-delay: 480ms; }
.reveal-delay-500 { transition-delay: 500ms; }
.reveal-delay-560 { transition-delay: 560ms; }

/* Karten-iframe ohne Rahmen (ersetzt style="border: 0"). */
.map-frame {
    border: 0;
}

/* Platzhalter für die fixierte Navigation: reserviert die Nav-Höhe
   (h-16 / md:h-20), damit der Inhalt beim Fixieren nicht springt. */
.nav-spacer {
    height: 0;
}

.nav-spacer.is-active {
    height: 4rem;
}

@media (min-width: 768px) {
    .nav-spacer.is-active {
        height: 5rem;
    }
}

/* Header-CTA „Buchungsanfrage“ (eigenständig, unabhängig vom Utility-Build).
   Etwas Abstand zu den Navigationspunkten, damit er nicht am Preise-Link klebt. */
.header-cta {
    display: inline-flex;
    align-items: center;
    gap: .375rem;
    margin-left: 1.25rem;
    padding: .5rem 1rem;
    border-radius: .375rem;
    font-size: .875rem;
    font-weight: 600;
    white-space: nowrap;
    color: #fff;
    background: oklch(var(--primary-500));
    transition: background-color .2s ease;
}
.header-cta:hover,
.header-cta.is-active { background: oklch(var(--primary-600)); }
.header-cta--block {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-left: 0;
    margin-top: .5rem;
}

/* Scroll-Ziel Buchungsformular: Offset für die fixierte Navigation. */
#buchung { scroll-margin-top: 6rem; }

/* -------------------- Bildergalerie: Kategorie-Filter -------------------- */
.gallery-filter__btn {
    display: inline-flex;
    align-items: center;
    padding: .5rem 1.125rem;
    border: 1px solid rgba(0, 0, 0, .1);
    border-radius: 9999px;
    font-size: .8125rem;
    font-weight: 500;
    color: oklch(var(--foreground-600));
    background: oklch(var(--background-50));
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.gallery-filter__btn:hover {
    background: oklch(var(--background-100));
}
.gallery-filter__btn.is-active {
    border-color: oklch(var(--primary-500));
    color: #fff;
    background: oklch(var(--primary-500));
}

/* -------------------- Bildergalerie -------------------- */
/* Masonry via CSS-Spalten: Hoch- und Querformat behalten ihr echtes
   Seitenverhältnis, statt in eine feste Kachelhöhe geschnitten zu werden. */
.gallery-grid {
    column-count: 1;
    column-gap: 1rem;
}
@media (min-width: 640px)  { .gallery-grid { column-count: 2; } }
@media (min-width: 1024px) { .gallery-grid { column-count: 3; column-gap: 1.25rem; } }

.gallery-cell {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    margin: 0 0 1rem;
    /* Kachel nicht über einen Spaltenumbruch zerreißen. */
    -webkit-column-break-inside: avoid;
    break-inside: avoid;
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: .5rem;
    overflow: hidden;
    cursor: pointer;
    background: none;
    font: inherit;
}
@media (min-width: 1024px) { .gallery-cell { margin-bottom: 1.25rem; } }
/* Gleiche Spezifität wie .gallery-cell (display: block) + spätere Ladereihenfolge
   als das Tailwind-Reset würden das [hidden]-Attribut sonst wirkungslos machen. */
.gallery-cell[hidden] {
    display: none;
}
/* Vorschaubild: volle Breite, natürliche Höhe – jedes Bild wird komplett
   und unverzerrt in seinem echten Seitenverhältnis gezeigt. */
.gallery-thumb-img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform .5s ease;
}
.gallery-cell:hover .gallery-thumb-img { transform: scale(1.05); }

.gallery-cell__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    background: linear-gradient(to top, rgba(0, 0, 0, .6), transparent 60%);
    opacity: 0;
    transition: opacity .3s ease;
}
.gallery-cell:hover .gallery-cell__overlay,
.gallery-cell:focus-visible .gallery-cell__overlay { opacity: 1; }
.gallery-cell__caption {
    padding: 1rem;
    color: #fff;
    font-size: .875rem;
    font-weight: 500;
    text-align: left;
}
.gallery-cell__zoom {
    position: absolute;
    top: .75rem;
    right: .75rem;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    background: rgba(0, 0, 0, .35);
    color: #fff;
    opacity: 0;
    transition: opacity .3s ease;
}
.gallery-cell:hover .gallery-cell__zoom,
.gallery-cell:focus-visible .gallery-cell__zoom { opacity: 1; }

/* -------------------- Lightbox / Bildmodal -------------------- */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .9);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox__figure {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .75rem;
    padding: 1rem;
    max-width: 92vw;
}
.lightbox__img {
    max-width: 92vw;
    max-height: 80vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: .5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .5);
    background: #000;
}
.lightbox__caption {
    color: #f5f5f5;
    font-size: .9rem;
    text-align: center;
    max-width: 40rem;
}
.lightbox__btn {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border: none;
    border-radius: 9999px;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    font-size: 1.75rem;
    cursor: pointer;
    transition: background-color .2s ease;
}
.lightbox__btn:hover { background: rgba(255, 255, 255, .25); }
.lightbox__close { top: 1rem; right: 1rem; width: 2.75rem; height: 2.75rem; font-size: 1.5rem; }
.lightbox__prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 1rem; top: 50%; transform: translateY(-50%); }
@media (max-width: 640px) {
    .lightbox__btn { width: 2.5rem; height: 2.5rem; font-size: 1.4rem; }
    .lightbox__prev { left: .5rem; }
    .lightbox__next { right: .5rem; }
}

/* Agentur-Credit (PIVASOFT): dezent wie das Copyright, nur minimal kleiner.
   Farbe/Ausrichtung kommen aus den Utility-Klassen (text-background-400,
   text-center); der Link erbt die Farbe und ist nicht hervorgehoben. */
.site-credit {
    margin-top: .25rem;
    font-size: .68rem; /* eine Spur kleiner als text-xs (.75rem) */
}
.site-credit a {
    color: inherit;
    font-weight: 400;
    text-decoration: none;
}
.site-credit a:hover { text-decoration: underline; }

/* Frei pflegbarer Fließtext (Impressum/Datenschutz, aus dem Backend). */
.prose-cms {
    font-size: .95rem;
    line-height: 1.75;
    color: oklch(var(--foreground-700));
}
.prose-cms > :first-child { margin-top: 0; }
.prose-cms h2 {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.35rem;
    color: oklch(var(--foreground-900));
    margin: 1.75rem 0 .6rem;
}
.prose-cms h3 {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.1rem;
    color: oklch(var(--foreground-900));
    margin: 1.4rem 0 .4rem;
}
.prose-cms p { margin: 0 0 1rem; }
.prose-cms a { color: oklch(var(--primary-600)); text-decoration: underline; }
.prose-cms ul, .prose-cms ol { margin: 0 0 1rem 1.4rem; }
.prose-cms li { margin: .3rem 0; }
.prose-cms strong { color: oklch(var(--foreground-900)); font-weight: 600; }
