/********** Template CSS **********/
:root {
    --primary: #86B817;
    --secondary: #FE8800;
    --light: #F5F5F5;
    --dark: #14141F;
}

/*** Raum-Galerie (index.php) ***/
/* Hauptbild: statisch sichtbar (Crossfade laeuft ueber die zweite Ebene).
   Der Container (raum-rahmen) hat fuer ALLE Karten dieselbe feste Hoehe, normiert
   auf das maximale Hochformat (2:3) - dadurch liegen Thumbnails und Texte aller
   Karten auf einer Hoehe. Das Bild wird unverzerrt eingesetzt:
   - Hochformat (2:3): fuellt den Rahmen komplett (cover)
   - Querformat: vollstaendig sichtbar, automatisch vertikal mittig (contain) -
     OHNE Transform, damit beim Crossfade nichts schweben/zacken kann */
.raum-hauptbild {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: zoom-in;
}

/* Querformat-Bild im festen Hochformat-Rahmen: vollstaendig sichtbar,
   vom Browser automatisch vertikal mittig zentriert (contain, kein Transform) */
.raum-hauptbild.querformat {
    object-fit: contain;
}

/* Zweite Bildebene fuer Crossfade: liegt ueber dem Hauptbild, blendet beim Wechsel ein.
   WICHTIG: Das Template animiert via .team-item img ALLE Eigenschaften ueber .5s -
   die hoehere Spezifitaet hier (+ !important) haelt den Crossfade schnell (opacity .3s)
   und laesst nur den Hover-Zoom (transform .5s) synchron zum Hauptbild laufen. */
.raum-fadebild,
.team-item .raum-fadebild {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease-in-out, transform .5s !important;
}

/* Querformat auf der Fade-Ebene identisch mittig (contain, deckungsgleich zum Hauptbild) */
.raum-fadebild.querformat {
    object-fit: contain;
}

.raum-fadebild.sichtbar {
    opacity: 1;
}

/* Vergrößerungs-Badge oben rechts im Hauptbild */
.raum-bildwechsel-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(20, 20, 31, .65);
    color: #FFFFFF;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    pointer-events: none;
    opacity: 0;
    transition: opacity .3s;
}

.team-item:hover .raum-bildwechsel-badge {
    opacity: 1;
}

/* Thumbnail-Leiste unter dem Hauptbild */
/* Zentrierung ueber automatische Raender am ersten/letzten Thumb:
   - Bei Platz: Reihe sitzt zentriert (Raender teilen den Freiraum)
   - Bei Ueberlauf: Raender fallen auf 0, Slider bleibt vollstaendig erreichbar (kein Abschneiden) */
.raum-thumbs {
    padding-left: .5rem;
    padding-right: .5rem;
    overflow-x: auto;
    overflow-y: hidden; /* kein vertikaler Slider (Hover-Skalierung ragt sonst minimal ueber) */
    align-items: center;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    /* Feste Hoehe inkl. Platz fuer die horizontale Scrollleiste: Raeume mit Slider
       (z.B. 5 Thumbs) und ohne bekommen denselben Textbeginn (8px Unterschied sonst) */
    height: 60px;
}

.raum-thumb {
    width: 56px;
    height: 44px;
    object-fit: cover;
    border: 2px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    opacity: .65;
    transition: opacity .3s, border-color .3s, transform .3s;
    flex: 0 0 auto;
}

.raum-thumb:first-child {
    margin-left: auto;
}

.raum-thumb:last-child {
    margin-right: auto;
}

.raum-thumb:hover {
    opacity: 1;
    transform: scale(1.06);
}

.raum-thumb.aktiv {
    border-color: var(--primary);
    opacity: 1;
}

/* Lightbox (Großansicht) */
#raumLightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1060;
    background: rgba(0, 0, 0, .88);
    align-items: center;
    justify-content: center;
}

#raumLightbox.offen {
    display: flex;
    animation: lbEinblenden .3s ease-out;
}

#raumLightbox img {
    max-width: 92vw;
    max-height: 88vh;
    box-shadow: 0 0 40px rgba(0, 0, 0, .6);
    animation: lbEinblenden .35s ease-out;
}

/* Zweite Bildebene fuer Crossfade in der Lightbox: deckungsgleich ueber dem Basisbild,
   identische Groessenbeschraenkung -> beide rendern gleich gross und exakt mittig */
#raumLightbox .lb-fadebild {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 92vw;
    max-height: 88vh;
    box-shadow: 0 0 40px rgba(0, 0, 0, .6);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease-in-out;
}

#raumLightbox .lb-fadebild.sichtbar {
    opacity: 1;
}

#raumLightbox .lb-btn {
    position: absolute;
    background: rgba(20, 20, 31, .55);
    color: #FFFFFF;
    border: none;
    border-radius: 50%;
    width: 46px;
    height: 46px;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .3s;
}

#raumLightbox .lb-btn:hover {
    background: var(--primary);
}

#raumLightbox .lb-schliessen {
    top: 18px;
    right: 22px;
    font-size: 28px;
}

#raumLightbox .lb-vorher {
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
}

#raumLightbox .lb-naechster {
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
}

#raumLightboxZaehler {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    color: #FFFFFF;
    background: rgba(20, 20, 31, .55);
    border-radius: 20px;
    padding: 4px 16px;
    font-size: 14px;
}

@keyframes lbEinblenden {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Lightbox auf kleinen Screens: Pfeile kleiner */
@media (max-width: 576px) {
    #raumLightbox .lb-btn {
        width: 38px;
        height: 38px;
        font-size: 16px;
    }
}

.fw-medium {
    font-weight: 600 !important;
}

.fw-semi-bold {
    font-weight: 700 !important;
}

.back-to-top {
    width: 45px !important; /* Feste Breite für den Pfeil-Button */
    height: 45px !important;
    display: flex;
    align-items: center;
    justify-content: center;
}


/*** Spinner ***/
#spinner {
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease-out, visibility 0s linear .5s;
    z-index: 99999;
}

#spinner.show {
    transition: opacity .5s ease-out, visibility 0s linear 0s;
    visibility: visible;
    opacity: 1;
}


/*** Button ***/
.btn {
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    transition: .5s;
}

.btn.btn-primary,
.btn.btn-secondary {
    color: #FFFFFF;
}

.btn-square {
    width: 38px;
    height: 38px;
}

.btn-sm-square {
    width: 32px;
    height: 32px;
}

.btn-lg-square {
    width: 48px;
    height: 48px;
}

.btn-square,
.btn-sm-square,
.btn-lg-square {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: normal;
    border-radius: 0px;
}


/*** Navbar ***/
.navbar-light .navbar-nav .nav-link {
    font-family: 'Nunito', sans-serif;
    position: relative;
    margin-right: 25px;
    padding: 35px 0;
    color: #FFFFFF !important;
    font-size: 18px;
    font-weight: 600;
    outline: none;
    transition: .5s;
}

.sticky-top.navbar-light .navbar-nav .nav-link {
    padding: 20px 0;
    color: var(--dark) !important;
}

.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link.active {
    color: var(--primary) !important;
}

.navbar-light .navbar-brand img {
    max-height: 60px;
    transition: .5s;
}

.sticky-top.navbar-light .navbar-brand img {
    max-height: 45px;
}

@media (max-width: 991.98px) {
    .sticky-top.navbar-light {
        position: relative;
        background: #FFFFFF;
    }

    .navbar-light .navbar-collapse {
        margin-top: 15px;
        border-top: 1px solid #DDDDDD;
    }

    .navbar-light .navbar-nav .nav-link,
    .sticky-top.navbar-light .navbar-nav .nav-link {
        padding: 10px 0;
        margin-left: 0;
        color: var(--dark) !important;
    }

    .navbar-light .navbar-brand img {
        max-height: 45px;
    }
}

@media (min-width: 992px) {
    .navbar-light {
        position: absolute;
        width: 100%;
        top: 0;
        left: 0;
        border-bottom: 1px solid rgba(256, 256, 256, .1);
        z-index: 999;
    }
    
    .sticky-top.navbar-light {
        position: fixed;
        background: #FFFFFF;
    }

    .navbar-light .navbar-nav .nav-link::before {
        position: absolute;
        content: "";
        width: 0;
        height: 2px;
        bottom: -1px;
        left: 50%;
        background: var(--primary);
        transition: .5s;
    }

    .navbar-light .navbar-nav .nav-link:hover::before,
    .navbar-light .navbar-nav .nav-link.active::before {
        width: calc(100% - 2px);
        left: 1px;
    }

    .navbar-light .navbar-nav .nav-link.nav-contact::before {
        display: none;
    }
}


/*** Hero Header ***/
.hero-header {
    background: linear-gradient(rgba(20, 20, 31, .7), rgba(20, 20, 31, .7)), url(../img/bg-hero.jpg);
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, .5);
}


/*** Section Title ***/
.section-title {
    position: relative;
    display: inline-block;
    text-transform: uppercase;
}

.section-title::before {
    position: absolute;
    content: "";
    width: calc(100% + 80px);
    height: 2px;
    top: 4px;
    left: -40px;
    background: var(--primary);
    z-index: -1;
}

.section-title::after {
    position: absolute;
    content: "";
    width: calc(100% + 120px);
    height: 2px;
    bottom: 5px;
    left: -60px;
    background: var(--primary);
    z-index: -1;
}

.section-title.text-start::before {
    width: calc(100% + 40px);
    left: 0;
}

.section-title.text-start::after {
    width: calc(100% + 60px);
    left: 0;
}


/*** Service ***/
.service-item {
    box-shadow: 0 0 45px rgba(0, 0, 0, .08);
    transition: .5s;
}

.service-item:hover {
    background: var(--primary);
}

.service-item * {
    transition: .5s;
}

.service-item:hover * {
    color: var(--light) !important;
}


/*** Destination ***/
.destination img {
    transition: .5s;
}

.destination a:hover img {
    transform: scale(1.1);
}


/*** Package ***/
.package-item {
    box-shadow: 0 0 45px rgba(0, 0, 0, .08);
}

.package-item img {
    transition: .5s;
}

.package-item:hover img {
    transform: scale(1.1);
}


/*** Booking ***/
.booking {
    background: linear-gradient(rgba(15, 23, 43, .7), rgba(15, 23, 43, .7)), url(../img/booking.jpg);
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
}


/*** Team ***/
.team-item {
    box-shadow: 0 0 45px rgba(0, 0, 0, .08);
    height: 100%; /* Karte fuellt die Spalte: alle Karten einer Reihe gleich hoch */
    display: flex;
    flex-direction: column;
}

/* Fester Bildrahmen: fuer alle Karten identisch, normiert auf das maximale
   Hochformat (2:3) -> Bildoberkanten, Thumbnails und Texte auf einer Hoehe */
.raum-rahmen {
    aspect-ratio: 2 / 3;
    flex: 0 0 auto;
}

.team-item img {
    transition: .5s;
}

.team-item:hover img {
    transform: scale(1.1);
}

/* (Kein Override mehr noetig: Die contain-Zentrierung im festen Rahmen bleibt
   beim Hover-Zoom erhalten - scale skaliert symmetrisch um die Bildmitte) */

/* Bestimmungen-Bild (512x512, quadratisch, keine Galerie): immer vollstaendig
   und klein in Originalgroesse mittig im Rahmen zeigen - nie beschnitten/vergroessert.
   Eigenstaendige Klasse OHNE raum-hauptbild -> kein Lightbox-Klick, kein Hover-Zoom */
img.bestimmungen {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Auch beim Hover klein bleiben (Ausnahme-Karte ohne Galerie) */
.team-item:hover img.bestimmungen {
    transform: none;
}

/* Bestimmungen-Karte: Bild und Titel verlinken auf buchungsbedingungen.php */
a.bestimmungen-link {
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

/* Bild-Link fuellt den gesamten Kartenrahmen (klickbare Fläche = Bildfläche) */
.raum-rahmen a.bestimmungen-link {
    position: absolute;
    inset: 0;
    z-index: 1;
}

a.bestimmungen-link:hover {
    opacity: 0.85;
}

h5 a.bestimmungen-link:hover {
    color: var(--primary);
}

/* Hinweis-Link unter der Bestimmungen-Liste */
.bestimmungen-hinweis {
    display: inline-block;
    margin-top: 8px;
    font-size: 0.85rem;
    font-weight: bold;
    color: var(--primary);
    text-decoration: none;
}

.bestimmungen-hinweis:hover {
    text-decoration: underline;
    color: var(--primary);
}

.team-item .btn {
    background: #FFFFFF;
    color: var(--primary);
    border-radius: 20px;
    border-bottom: 1px solid var(--primary);
}

.team-item .btn:hover {
    background: var(--primary);
    color: #FFFFFF;
}

/*** Raum-Karten: Reihenabstand ***/
/* Zwischen den beiden Kartenreihen Platz schaffen, damit die weichen
   Kartenschatten nicht mehr ineinanderlaufen (Wirkung von Ueberlappung) */
.row.g-4.gy-5 > .col-lg-3 {
    margin-bottom: 0; /* gy-5 regelt den Zeilenabstand, kein Zusatz noetig */
}


/*** Testimonial ***/
.testimonial-carousel::before {
    position: absolute;
    content: "";
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(to right, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%);
    z-index: 1;
}

.testimonial-carousel::after {
    position: absolute;
    content: "";
    top: 0;
    right: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(to left, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%);
    z-index: 1;
}

@media (min-width: 768px) {
    .testimonial-carousel::before,
    .testimonial-carousel::after {
        width: 200px;
    }
}

@media (min-width: 992px) {
    .testimonial-carousel::before,
    .testimonial-carousel::after {
        width: 300px;
    }
}

.testimonial-carousel .owl-item .testimonial-item,
.testimonial-carousel .owl-item.center .testimonial-item * {
    transition: .5s;
}

.testimonial-carousel .owl-item.center .testimonial-item {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
}

.testimonial-carousel .owl-item.center .testimonial-item * {
    color: #FFFFFF !important;
}

.testimonial-carousel .owl-dots {
    margin-top: 24px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.testimonial-carousel .owl-dot {
    position: relative;
    display: inline-block;
    margin: 0 5px;
    width: 15px;
    height: 15px;
    border: 1px solid #CCCCCC;
    border-radius: 15px;
    transition: .5s;
}

.testimonial-carousel .owl-dot.active {
    background: var(--primary);
    border-color: var(--primary);
}


/*** Footer ***/
.footer .btn.btn-social {
    margin-right: 5px;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light);
    font-weight: normal;
    border: 1px solid #FFFFFF;
    border-radius: 35px;
    transition: .3s;
}

.footer .btn.btn-social:hover {
    color: var(--primary);
}

.footer .btn.btn-link {
    display: block;
    margin-bottom: 5px;
    padding: 0;
    text-align: left;
    color: #FFFFFF;
    font-size: 15px;
    font-weight: normal;
    text-transform: capitalize;
    transition: .3s;
}

.footer .btn.btn-link::before {
    position: relative;
    content: "\f105";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 10px;
}

.footer .btn.btn-link:hover {
    letter-spacing: 1px;
    box-shadow: none;
}

.footer .copyright {
    padding: 25px 0;
    font-size: 15px;
    border-top: 1px solid rgba(256, 256, 256, .1);
}

.footer .copyright a {
    color: var(--light);
}

.footer .footer-menu a {
    margin-right: 15px;
    padding-right: 15px;
    border-right: 1px solid rgba(255, 255, 255, .1);
}

.footer .footer-menu a:last-child {
    margin-right: 0;
    padding-right: 0;
    border-right: none;
}

.button-container {
    position: fixed;
    right: 30px;
    bottom: 30px;
    z-index: 99;
    display: flex;
    flex-direction: column;
    gap: 20px; /* Erhöhter Abstand zwischen den Buttons */
    align-items: center; /* Buttons horizontal zentrieren */
}

.book-now {
    width: 120px !important; /* Feste Breite für den Buchungs-Button */
    padding: 12px 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
}

.book-now:hover {
    opacity: 1;
}

/* Spezifische Styles für region.php Buttons */
.region-buttons {
    position: fixed;
    right: 30px;
    bottom: 30px;
    z-index: 99;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    opacity: 1 !important; /* Immer sichtbar */
}

.region-buttons .back-to-top {
    width: 45px !important;
    height: 45px !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.region-buttons .book-now {
    width: 120px !important;
    padding: 12px 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
}

/*** Kompakter Ablauf-Stepper (booking.php) ***/
.ablauf-stepper {
    --ablauf-kreis: 64px;
}

.ablauf-schritt {
    text-align: center;
    position: relative;
}

.ablauf-kreis {
    position: relative;
    width: var(--ablauf-kreis);
    height: var(--ablauf-kreis);
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--primary);
    box-shadow: 0 0 0 4px rgba(134, 184, 23, 0.15);
}

.ablauf-kreis i {
    font-size: 24px;
    color: var(--primary);
}

.ablauf-nummer {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-weight: bold;
    font-size: 12px;
}

.ablauf-titel {
    font-weight: bold;
    color: #333;
    margin-bottom: 4px;
}

.ablauf-text {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 0;
}

/* Verbindungslinie zwischen den Kreisen (nur Desktop) */
@media (min-width: 768px) {
    .ablauf-schritt:not(:last-child)::after {
        content: '';
        position: absolute;
        top: calc(var(--ablauf-kreis) / 2);
        right: -50%;
        width: 100%;
        height: 2px;
        background: var(--primary);
        opacity: 0.35;
        z-index: -1;
    }
}

/* Mobil: Schritte untereinander, Icon links + Text rechts */
@media (max-width: 767.98px) {
    .ablauf-schritt {
        display: flex;
        align-items: flex-start;
        text-align: left;
        gap: 14px;
    }
    .ablauf-kreis {
        margin: 0;
        flex-shrink: 0;
        width: 56px;
        height: 56px;
    }
    .ablauf-kreis i {
        font-size: 20px;
    }
    .ablauf-text {
        font-size: 0.85rem;
    }
}