/* Headerbild des Tour-Managers */

.tour-manager-header {
    --tm-header-height-desktop: 320px;
    --tm-header-height-mobile: 180px;

    position: relative;
    isolation: isolate;
    width: 100%;
    height: var(--tm-header-height-desktop);
    margin: 0;
    overflow: hidden;
    background: #14243b;
}

/* Direktes Tourbild und Bildelemente aus dem Headerbereich */

.tour-manager-header__image {
    display: block;
    width: 100%;
    height: 100%;
}

/* Zwischencontainer des normalen TYPO3-Bildelements */
.tour-manager-header__image .frame,
.tour-manager-header__image .ce-image,
.tour-manager-header__image .ce-textpic,
.tour-manager-header__image .ce-textmedia,
.tour-manager-header__image .ce-gallery,
.tour-manager-header__image .ce-outer,
.tour-manager-header__image .ce-inner,
.tour-manager-header__image .ce-row,
.tour-manager-header__image .ce-column,
.tour-manager-header__image figure,
.tour-manager-header__image .image,
.tour-manager-header__image picture,
.tour-manager-header__image a {
    display: block;
    box-sizing: border-box;
    float: none;
    width: 100%;
    max-width: none;
    height: 100%;
    margin: 0;
    padding: 0;
}

/* Zentrierungsversatz und Bezugspunkte für Bildunterschriften aufheben */
.tour-manager-header__image .ce-gallery,
.tour-manager-header__image .ce-outer,
.tour-manager-header__image .ce-inner,
.tour-manager-header__image figure {
    position: static;
    left: auto;
    right: auto;
}

.tour-manager-header__image img {
    display: block;
    width: 100%;
    max-width: none;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border: 0;
    border-radius: 0;
}
/* Titel im Bild */

.tour-manager-header__title {
    position: absolute;
    z-index: 1;
    top: 50%;
	left: 1.5rem;
	transform: translateY(var(--tm-header-title-y, -50%));

    box-sizing: border-box;
    max-width: calc(100% - 2rem);
    margin: 0;
    padding: .75rem 1.25rem;

    border: 1px solid rgb(255 255 255 / 35%);
    border-radius: 10px;
    background: rgb(15 28 47 / 85%);
    color: #fff;

    font-family: inherit;
    font-size: clamp(1.5rem, 3vw, 3rem);
    font-weight: 600;
    line-height: 1.2;
    text-wrap: balance;
    overflow-wrap: anywhere;

    box-shadow: 0 4px 16px rgb(0 0 0 / 15%);
}

/* Titelposition */

/* Horizontale Position innerhalb des Bildes */

.tour-manager-header--title-left .tour-manager-header__title {
    left: 1.5rem;
    right: auto;
    text-align: left;
}

.tour-manager-header--title-center .tour-manager-header__title {
    left: 50%;
    right: auto;
    transform: translate(-50%, var(--tm-header-title-y, -50%));
    text-align: center;
}

.tour-manager-header--title-right .tour-manager-header__title {
    left: auto;
    right: 1.5rem;
    text-align: right;
}

/* Hintergrund des Titelbalkens */

.tour-manager-header--style-transparent .tour-manager-header__title {
    background: rgb(15 28 47 / 75%);
}

.tour-manager-header--style-solid .tour-manager-header__title {
    background: #14243b;
}

/* Schriftwahl ohne externe Schriftdateien */

.tour-manager-header--font-site .tour-manager-header__title {
    font-family: inherit;
}

.tour-manager-header--font-sans .tour-manager-header__title {
    font-family: Arial, Helvetica, sans-serif;
}

.tour-manager-header--font-serif .tour-manager-header__title {
    font-family: Georgia, "Times New Roman", serif;
}

/* Bildbeschreibung am unteren Bildrand */

.tour-manager-header__description,
.tour-manager-header__image figcaption {
    position: absolute;
    z-index: 2;
    right: 0;
    bottom: 0;
    left: 0;

    box-sizing: border-box;
    margin: 0;
    padding: .55rem max(
        1rem,
        calc((100% - 1400px) / 2 + 1.25rem)
    );

    background: rgb(15 28 47 / 88%);
    color: #fff;
    font-size: .875rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

/* Beschreibungen aus dem Inhaltselement nur bei aktivierter Option zeigen */
.tour-manager-header:not(.tour-manager-header--show-description)
    .tour-manager-header__image figcaption {
    display: none;
}

/* Vertikale Position */

.tour-manager-header--vertical-top {
    --tm-header-title-y: 0%;
}

.tour-manager-header--vertical-top .tour-manager-header__title {
    top: 1rem;
    bottom: auto;
}

.tour-manager-header--vertical-center {
    --tm-header-title-y: -50%;
}

.tour-manager-header--vertical-center .tour-manager-header__title {
    top: 50%;
    bottom: auto;
}

.tour-manager-header--vertical-bottom {
    --tm-header-title-y: 0%;
}

.tour-manager-header--vertical-bottom .tour-manager-header__title {
    top: auto;
    bottom: 1rem;
}

/* Platz für eine eingeblendete Bildbeschreibung */
.tour-manager-header--vertical-bottom.tour-manager-header--show-description
    .tour-manager-header__title {
    bottom: 4.5rem;
}

/* Mobile Darstellung */

@media (max-width: 700px) {
    .tour-manager-header {
        height: var(--tm-header-height-mobile);
    }

    .tour-manager-header__title {
        left: 1rem;
        max-width: calc(100% - 2rem);
        padding: .6rem .85rem;
        font-size: clamp(1.25rem, 5vw, 1.75rem);
    }

	.tour-manager-header--title-center .tour-manager-header__title {
		left: 50%;
		right: auto;
	}

	.tour-manager-header--title-right .tour-manager-header__title {
		left: auto;
		right: 1rem;
	}	
	
	.tour-manager-header__description,
	.tour-manager-header__image figcaption {
		padding: .4rem 1rem;
		font-size: .75rem;
}
}


/* Logozeile und Suche: vormals header-search.css. */
.tm-search { position: relative; box-sizing: border-box; max-width: 100%; min-height: 44px; color: #14243b; }
.tm-search--always { width: 24rem; }
.tm-search--toggle { width: 44px; border: 0; background: transparent; }
.tm-search--toggle[open] { width: 24rem; }
.tm-search__toggle {
    position: absolute; top: 0; right: 0; display: flex;
    align-items: center; justify-content: center; box-sizing: border-box;
    width: 44px; height: 44px; border: 1px solid #aeb9c7; border-radius: 10px;
    background: linear-gradient(180deg, #fff, #dce3eb); color: #14243b;
    cursor: pointer; list-style: none;
}
.tm-search__toggle::-webkit-details-marker { display: none; }
.tm-search__toggle:focus-visible { outline: 3px solid #14243b; outline-offset: 3px; }
.tm-search__panel { padding-right: 3.25rem; }
.tm-search__label { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.tm-search form, .tm-search .search { box-sizing: border-box; width: 100%; max-width: 100%; margin: 0; }
.tm-search input[type="search"], .tm-search input[type="text"] {
    box-sizing: border-box; width: 100%; max-width: 100%; min-height: 44px;
    padding: .6rem .8rem; border: 1px solid #71849d; border-radius: 10px;
    background: #fff; color: #14243b; font: inherit;
}
.tm-logo-row { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.tm-logo-tools { display: flex; align-items: center; justify-content: flex-end; gap: .75rem; min-width: 0; }
.tm-menu-row { display: flex; align-items: center; flex-wrap: wrap; }
.tm-menu-search { flex: 0 1 auto; min-width: 0; max-width: 100%; padding: .5rem 1rem; margin-left: auto; }
.tour-manager-header__search { position: absolute; right: 1rem; bottom: 1rem; z-index: 3; max-width: calc(100% - 2rem); }
.tour-manager-header--show-description .tour-manager-header__search { bottom: 4.5rem; }
@media (max-width: 700px) {
    .tm-logo-row { flex-wrap: wrap; gap: .75rem; }
    .tm-logo-tools { flex-wrap: wrap; max-width: 100%; margin-left: auto; }
    .tm-search--always, .tm-search--toggle[open] { width: min(24rem, 70vw); }
    .tm-menu-search { max-width: 100%; }
    .tour-manager-header__search { right: .75rem; bottom: .75rem; max-width: calc(100% - 1.5rem); }
    .tour-manager-header--show-description .tour-manager-header__search { bottom: 4rem; }
}

/* Beide Kästchen als Gruppe positionieren: Zusatz bleibt im Header. */
.tour-manager-header .tour-manager-header__title--split {
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    gap:.5rem;
    padding:0;
    border:0;
    border-radius:0;
    background:transparent;
    box-shadow:none;
}
.tour-manager-header__title--split .tour-manager-header__title-main {
    display:block;
    box-sizing:border-box;
    max-width:100%;
    padding:.75rem 1.25rem;
    border:1px solid rgb(255 255 255 / 35%);
    border-radius:10px;
    background:rgb(15 28 47 / 85%);
    color:#fff;
    box-shadow:0 4px 16px rgb(0 0 0 / 15%);
}
.tour-manager-header--style-transparent .tour-manager-header__title--split .tour-manager-header__title-main {
    background:rgb(15 28 47 / 75%);
}
.tour-manager-header--style-solid .tour-manager-header__title--split .tour-manager-header__title-main {
    background:#14243b;
}
.tour-manager-header__title-addition {
    position:static;
    display:block;
    width:fit-content;
    max-width:100%;
    box-sizing:border-box;
    margin:0;
    padding:.35em .7em;
    border-radius:4px;
    background:#b51f32;
    color:#fff;
    font-family:inherit;
    font-size:.55em;
    font-weight:600;
    line-height:1.4;
    text-align:inherit;
    overflow-wrap:anywhere;
    box-shadow:0 2px 8px rgb(0 0 0 / 15%);
}
.tour-manager-header--title-center .tour-manager-header__title--split { align-items:center; }
.tour-manager-header--title-right .tour-manager-header__title--split { align-items:flex-end; }
@media(max-width:700px) {
    .tour-manager-header__title--split .tour-manager-header__title-main { padding:.6rem .85rem; }
}
