/* Copied from bastei.css and bastei_mobile_inline.css */

.topbar {
    box-sizing: border-box;
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 94%;
    padding: 0.5rem 2rem;
    background-color: rgba(0, 0, 0, 0.4);
    border-bottom-left-radius: 2vw;
    border-bottom-right-radius: 2vw;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s ease;
}

.topbar.collapsed {
    padding: 0.3rem 2rem;
}

.topbar-first-line {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    width: 100%;
    flex-wrap: nowrap;
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}

.topbar.collapsed .topbar-first-line {
    max-height: 0;
    opacity: 0;
    margin: 0;
    padding: 0;
}

.topbar-first-line .back-button {
    margin-left: auto;
    padding: 0.5vw 1vw;
    font-size: clamp(1rem, 2.6vh, 3.8rem);
    color: var(--grün);
    background-color: rgba(0, 0, 0, 0.3);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    border-radius: 2vw;
    text-decoration: none;
    display: flex;
    align-items: center;
    white-space: nowrap;
    transition: 0.5s;
    font-weight: bold;
}

.topbar-first-line .back-button:hover {
    color: var(--orange);
    transform: scale(1.05);
}

/* ===== Logo Styles (From Main Site & Bastei) ===== */
.logo {
    display: flex;
    align-items: center;
    background-color: transparent;
}

/* Shutter Click Animation */
@keyframes shutterClick {
    0% {
        transform: scale(1);
        filter: brightness(1) drop-shadow(0 0 0 transparent);
    }

    30% {
        transform: scale(0.9) rotate(-3deg);
        filter: brightness(0.8);
    }

    45% {
        transform: scale(0.95) rotate(-3deg);
        filter: brightness(2) drop-shadow(0 0 15px white);
    }

    60% {
        transform: scale(1.05) rotate(1deg);
        filter: brightness(1.1);
    }

    80% {
        transform: scale(0.98) rotate(0);
    }

    100% {
        transform: scale(1);
        filter: brightness(1);
    }
}

.logo img {
    height: 6vh;
    background-color: transparent;
    display: block;
}

.logo>img:hover {
    animation: shutterClick 0.6s ease-in-out forwards;
}

.logo-text-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    margin-left: 10px;
}

.logo-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 145px;
}

.logo-images {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: auto;
    height: 1.8rem;
    position: relative;
    margin-left: -1px;
    margin-bottom: -1px;
}

.logo-images img {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0.33;
    animation: fadeInCycle 9s infinite;
    height: 100%;
    width: auto;
}

.logo-images img:nth-child(1) {
    animation-delay: 0s;
}

.logo-images img:nth-child(2) {
    animation-delay: 3s;
}

.logo-images img:nth-child(3) {
    animation-delay: 6s;
}

@keyframes fadeInCycle {
    0% {
        opacity: 0;
    }

    33% {
        opacity: 1;
    }

    66% {
        opacity: 0;
    }

    100% {
        opacity: 0;
    }
}

.logo-text {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--grün);
    line-height: 1;
    text-align: left;
}

.logo-slogan {
    font-size: 1rem;
    color: var(--weiß);
    margin-top: 4px;
    margin-right: 40px;
    text-align: left;
}

/* Responsive Adjustments (From Bastei) */
@media screen and (max-width: 768px) {

    /* 1. Stack Logo and Buttons */
    .topbar-first-line {
        flex-direction: column;
        align-items: center;
    }

    /* 2. Scale 0.75 like main site */
    .logo {
        transform: scale(0.75);
        transform-origin: center top;
        margin-bottom: -20px;
        flex-shrink: 0;
    }

    /* 3. Text Stability */
    .logo-text,
    .logo-slogan {
        white-space: nowrap;
    }

    /* 4. Fix Back Button Wrapping & Clipping */
    .topbar-first-line {
        overflow: visible;
        /* Fix clipping */
        padding-bottom: 10px;
        /* Give space for button */
    }

    .topbar-first-line .back-button {
        position: static;
        margin-top: 10px;
        /* Generic styling fixes */
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
        z-index: 10;
        margin-bottom: 5px;
        /* Extra breathing room */
    }

    .topbar-metric-spacer {
        /* Not present in workflow logic but kept for safety if needed later? No, skipping unknowns */
    }
}

/* Back-Button Mobile Optimierungen (From bastei_mobile_inline.css) */
@media screen and (max-width: 768px) {
    .topbar-first-line .back-button {
        font-size: clamp(0.7rem, 1.5vh, 0.8rem) !important;
        padding: 0.4rem 0.6rem !important;
        border-radius: 0.8rem !important;
        margin-right: 0.2rem !important;
    }
}

@media screen and (max-width: 480px) {
    .topbar-first-line .back-button {
        font-size: clamp(0.6rem, 1.2vh, 0.7rem) !important;
        padding: 0.3rem 0.5rem !important;
        margin-right: 0.3rem !important;
        border-radius: 0.6rem !important;
    }
}

@media screen and (max-width: 360px) {
    .topbar-first-line .back-button {
        font-size: clamp(0.55rem, 1vh, 0.65rem) !important;
        padding: 0.25rem 0.4rem !important;
        border-radius: 0.5rem !important;
        margin-right: 0.4rem !important;
    }
}