/************************************
*
*  Vorbereitung
*
************************************/

/* Verhindert, dass iOS eine Hintergrundfarbe für die Safe-Area einblendet */
html {
    background-color: transparent !important;
}


/* --- 1. SYSTEM-FIX FÜR IPHONE (GRAUE BALKEN) --- */
html, body {
    height: 100dvh !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    /* Verhindert graue Balken durch Safari-Systemfarben */
    background-color: #000 !important; 
    overflow: hidden !important;
}

/* --- 2. VOLLBILD-KARTE IN ALLE ECKEN ZWINGEN --- */
div[id^="ltsmap_"] {
    position: fixed !important;
    /* Nutzt Safe-Area-Variablen, um hinter Notch und Home-Balken zu gehen */
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100dvh !important;
    min-height: -webkit-fill-available !important;
    z-index: 1 !important;
}


/* --- 3. TWENTY SEVENTEEN ELEMENTE RADIKAL ENTFERNEN --- */
/* Verhindert, dass Header/Footer Platz reservieren oder grau schimmern */
#masthead, 
.site-header, 
.custom-header, 
.navigation-top, 
#colophon, 
.site-footer,
.site-branding {
    display: none !important;
    visibility: hidden !important;
}

/* Alle Container transparent machen */
#page, .site-content-contain, .site-content, .wrap, article {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}


/* Content für Klicks durchlässig machen */
.site-content-contain {
    pointer-events: none !important;
}


/* Dashboard-Korrektur */
body.logged-in button.menu-toggle {
    top: calc(env(safe-area-inset-top, 20px) + 32px) !important;
}


/* Erzwungener Fix für den unteren iPhone-Rand */
div[id^="ltsmap_"] {
    bottom: 0 !important;
    height: 100dvh !important;
    /* Deaktiviert den Sicherheitsabstand unten für dieses Element */
    margin-bottom: -env(safe-area-inset-bottom, 0) !important; 
    padding-bottom: 0 !important;
}

/* Twenty Seventeen Container auf absolute Null setzen */
#page, .site-content-contain, .site-footer {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    height: 100dvh !important;
}




/************************************
*
*   Karte 
*
************************************/


/*******   Infobox oben */

.ltsinfo-container {
	background: rgba(0,0,0, 0.7);
	z-index: 800;
	position: relative;
	width: 100%;
	max-width: 100%;
	text-align: center;
}

.ltsinfo {
	z-index: 900;
	margin-left: 50px;
	margin-right: 20px;
	color: #ccc;
}

/*******   Marker- und Kartenelemente */

.leaflet-top {
    margin-top: 25px; /* Verschiebt Zoom und Layer-Control nach unten */
}


.back-btn, .leaflet-control-custom a {
  display: flex;          /* Aktiviert Flexbox */
  align-items: center;    /* Zentriert vertikal */
  justify-content: center; /* Zentriert horizontal */
  width: 30px !important;  
  height: 30px !important;           /* Festgelegte Höhe hilft bei der Zentrierung */
  line-height: 1;         /* Verhindert extra Abstände durch Zeilenhöhe */
  padding: 0 10px;        /* Nur seitlicher Abstand */
  text-decoration: none;  /* Entfernt Unterstreichung bei <a> */
  background: rgba(40, 40, 40, 0.7) !important;
  color: #cccccc;
  font-weight: bold !important;
  font-size: 16px !important;
  
}

 .leaflet-control-layers-expanded {
  background: rgba(40, 40, 40, 0.7) !important;
  color: #cccccc;
  font-weight: normal !important;
  background-image: none !important;
}


.leaflet-control-layers-toggle {
  width: 30px !important;  
  height: 30px !important;           /* Festgelegte Höhe hilft bei der Zentrierung */
	
}

.leaflet-control-zoom-in,
.leaflet-control-zoom-out {
    color: #cccccc !important; /* Helles Grau */
}

.leaflet-control-zoom-in:hover,
.leaflet-control-zoom-out:hover {
    color: #ffffff !important; /* Etwas dunkler beim Drüberfahren */
}

.leaflet-control-layers {
    background-color: rgba(40, 40, 40, 0.7) !important;
	color: #cccccc;

}

/* Verhindert, dass die einzelnen Buttons weiß bleiben */
.leaflet-bar a {
    background: rgba(40, 40, 40, 0.7) !important;
}


/* Den Marker-Container rund machen */
.leaflet-popup-content, .leaflet-popup-content-wrapper, .leaflet-marker-icon {
    border-radius: 50% !important;
    border: 2px solid white !important; /* Weißer Rand zur Abhebung */
    object-fit: cover !important;       /* Verhindert Verzerrung des Vorschaubilds */
    box-shadow: 0 2px 5px rgba(0,0,0,0.4) !important;
}

.doticon {
	z-index: 100 !important;
}

.ltspic > .leaflet-popup-content-wrapper > .leaflet-popup-content {
	margin: 0;
}

.ltspic > .leaflet-popup-content-wrapper {
	padding: 0;
	border-bottom-left-radius: 0;
	border-bottom-right-radius: 0;
	text-align: center;
}

.ltspic:hover {
	#display: none;
}



/************************************
*
*   Contentstreifen
*
************************************/

/* übersicht */
/* 1. Der Basis-Container für deinen Content-Streifen */
.site-content-contain {
    position: fixed !important;
    /* background: rgba(0, 0, 0, 0) !important;  Durchscheinend Schwarz */
    /* backdrop-filter: blur(5px); Optional: Glas-Effekt */
    z-index: 10;
    display: flex;
    overflow-y: auto;
    pointer-events: auto !important; /* Streifen soll klickbar sein */
}


/* 4. Text-Anpassung, damit er im dunklen Streifen lesbar ist */
.site-content-contain, .entry-title, .entry-content p {
    color: #ffffff !important;
    padding: 15px;
}

.title-description  {
	
    display: flex;
    flex-direction: column;
    flex-shrink: 0; /* Verhindert das Zusammenquetschen */
    margin: 2px !important;  /* Minimale Lücke zwischen den Kacheln */
    overflow: hidden;
	padding: 4px !important;
}

.site-content-contain .page-header {
	border-radius: 15px;
	background: rgba(40, 40, 40, 0.7) !important;
}

/* Grund-Design der Kachel */

.tour-tile {
    border-radius: 15px; /* Hier den gewünschten Radius einstellen */
    overflow: hidden;    /* WICHTIG: Schneidet den Inhalt (Bild/Overlay) an den Ecken ab */
    background: #fff;    /* Falls du einen Hintergrund hast */
    transition: transform 0.3s ease; /* Optional: kleiner Effekt beim Hover */
}

article {
	/*background: #1a1a1a !important;*/
    display: flex;
    flex-direction: column;
    flex-shrink: 0; /* Verhindert das Zusammenquetschen */
    background: rgba(40, 40, 40, 0.7) !important;
    margin: 2px !important;  /* Minimale Lücke zwischen den Kacheln */
    border: 10px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    position: relative;
	padding: 0px !important;
}


.tile-image img {
    width: 100%;
    height: 120px; /* Feste Höhe für die Kompaktheit */
    object-fit: cover;
    display: block;
}

.tile-content {
    padding: 5px;
}

.tile-date {
    font-size: 10px;
    color: #ccc;
    display: block;
	align: right;
}

.tile-title {
	background: rgba(40, 40, 40, 0.1) !important;
    overflow: hidden;
	font-size: 14px !important;
    margin: 0 !important;
    color: #fff;
	padding: 0;
    font-size: 1.0rem;
    line-height: 1.1;       /* Definiert die Zeilenhöhe */
    height: 2.2rem;         /* 2 Zeilen x 1.4 line-height = 2.8rem */
    
    /* Der "Line-Clamp" Trick */
    display: -webkit-box;
    -webkit-line-clamp: 2;  /* Maximale Anzahl der Zeilen */
    -webkit-box-orient: vertical;  
    overflow: hidden;       /* Schneidet alles darüber hinaus ab */
    text-overflow: ellipsis; /* Fügt die "..." hinzu */
}



/************************************
*
*   Contentstreifen - Portrait
*
************************************/

/* HOCHFORMAT: Streifen unten (Horizontal scrollen) */
@media (orientation: portrait) {
	/* Den inneren Wrap von Twenty Seventeen zähmen */
	.site-content-contain .site-content, 
	.site-content-contain .site-main, 
	.site-content-contain #primary {
        max-width: none !important;
		padding: 0 !important;
		margin: 0 !important;
		width: 100% !important;
		height: 100% !important;
		display: flex !important; /* Wichtig für die Anordnung */
	}

	.site-content-contain .wrap {
        max-width: none !important;
		padding: 5px !important;
		margin: 0 0 0 0 !important;
		width: 100% !important;
		height: 100% !important;
		display: flex !important; /* Wichtig für die Anordnung */
		flex-direction: row !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
		-webkit-overflow-scrolling: touch;
	}

	
	.site-content-contain {
		position: fixed !important;
		background: none !important;
		/* backdrop-filter: blur(8px);
		-webkit-backdrop-filter: blur(8px); */
		z-index: 10;
		pointer-events: auto !important;
		transition: all 0.3s ease;
        bottom: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        height: 220px !important; /* Kompakte Höhe */
		    }

	.site-main {
		margin-right: 50vw !important;
	}


    .tour-tile {
        width: 220px !important;
        /* height: calc(100% - 10px) !important; */
        /* height: 180px !important; */
    }
	
	.page-header {
		flex-shrink:0;
		width: 45vw;
		height:100%;
		padding: 0;
	}
}

/************************************
*
*   Contentstreifen - Landscape
*
************************************/

/* 3. QUERFORMAT (Handy quer / Laptop): Streifen rechts senkrecht */
@media (orientation: landscape) {
    .site-content-contain {
        top: 0 !important;
        right: 0 !important;
 		width: 225px !important;
        height: 100dvh !important; /* Nutzt die dynamische Viewport-Höhe (sehr stabil) */
        flex-direction: column !important;
        overflow-y: auto !important; /* Zwingend notwendig für den Observer! */
        overflow-x: hidden !important;
        border-left: 1px solid rgba(255,255,255,0.2);
        display: flex !important; /* Stellt sicher, dass die Spalte berechnet wird */
    }

    .tour-tile {
        width: calc(100% - 4px); /* Volle Breite im Seitenstreifen */
        margin-bottom: 4px;
    }

    .site-content-contain article {
        width: 100% !important;
        margin-bottom: 4px !important;
        flex: 0 0 auto !important;
    }
	
	.site-content-contain,
	.site-content-contain .site-content,
	.site-content-contain .site-main,
	.primary.content-area, .tile-title {
		padding: 0 5px 0 0  !important;
		margin: 0px !important;
	}

	.wrap {
		padding: 0 5px 0 0  !important;
		margin:  0 0 50vh 0 !important;
	}


	.site-content-contain .entry-header {
		width: 100% !important;
		max-width: 100% !important;
		flex: 0 0 50% !important; /* Verhindert das Schrumpfen im Flex-Layout */
		margin: 0 !important;
	}

	.site-content-contain .page-header {
		margin: 20px 0 0 0 !important;
		width: 100% !important;
		max-width: 100% !important;
		flex: 0 0 50% !important; /* Verhindert das Schrumpfen im Flex-Layout */
	}

	/* Twenty Seventeen spezifischer Fix für die Spaltenaufteilung */
	.has-sidebar:not(.error404) #primary {
		float: none !important;
		width: 100% !important;
	}
	
	.page-header {
		height: 45vh;
		width:100%;
	}
	
	/* 2. Die Container, die oben kleben bleiben sollen */

	.title-description {
		position: -webkit-sticky; /* Support für Safari */
		position: sticky;
		top: 20px; /* Bleibt direkt am oberen Browserrand haften */
		width: 100%;
		/* Optional: Falls sie untereinander kleben sollen, 
		   muss der zweite einen top-Wert in Höhe des ersten haben */
		z-index: 10;

	}
		
}

/************************************
*
*   Contentstreifen - anderes
*
************************************/


/* 2. Abstände innerhalb der Kachel (Header & Titel) */
.site-content-contain article .entry-header {
    padding: 4px 8px !important; /* Minimaler Puffer seitlich */
	margin: 0 !important;
}

/* 3. Titel extrem kompakt machen */
.site-content-contain article .entry-title {
    font-size: 13px !important;
    line-height: 1.1 !important;
    margin: 0 !important;
    padding: 2px 0 !important;
}

/* 4. Datum (Entry-Meta) direkt unter den Titel rücken */
.site-content-contain article .entry-meta {
    font-size: 10px !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
    color: #888 !important;
}

/* 5. Bilder ohne Rand oben einpassen */
.site-content-contain article .post-thumbnail,
.site-content-contain article img {
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
}

/* Falls Twenty Seventeen Trennstriche (Border) anzeigt */
.site-content-contain article {
    border-bottom: none !important;
}

/* Den Standard-Abstand nach dem Content-Bereich im Theme entfernen */
.site-content-contain .entry-content {
    display: none !important; /* Wir wollen ja nur Bild, Titel, Datum */
}







/* In dein CSS */
.site-content-contain article, 
.site-content-contain article a, 
.site-content-contain article img {
    pointer-events: auto !important;
}

.site-content-contain article a:active {
    outline: 5px solid red !important;
}





/* scrollbar*/

/* --- SCROLLBAR-TUNING (Laptop & Desktop) --- */

/* 1. Den Scroll-Bereich im schwarzen Streifen und im Popup ansprechen */
.site-content-contain,  {
    scrollbar-width: thin; /* Firefox: Schmale Scrollbar */
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent; /* Firefox: Farbe */
}

/* 2. Webkit-Browser (Chrome, Safari, Edge) */

/* Die Breite der Scrollbar */
.site-content-contain::-webkit-scrollbar,
#gtm-modal::-webkit-scrollbar,
#gtm-modal-iframe::-webkit-scrollbar,
body::-webkit-scrollbar {
    width: 6px;  /* Sehr schmal für vertikales Scrollen */
    height: 6px; /* Sehr schmal für horizontales Scrollen (Handy-Streifen) */
}

/* Der Hintergrund der Schiene (Track) */
.site-content-contain::-webkit-scrollbar-track,
#gtm-modal::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1); 
    border-radius: 10px;
}

/* Der bewegliche Griff (Thumb) */
.site-content-contain::-webkit-scrollbar-thumb,
#gtm-modal::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2); /* Dezent weißlich-transparent */
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.1); /* Kleiner Kontrast-Rand */
}

/* Hover-Effekt: Wenn man mit der Maus drüberfährt, wird sie sichtbarer */
.site-content-contain::-webkit-scrollbar-thumb:hover,
#gtm-modal::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* 3. Spezial-Fix für das iPhone (Portrait-Modus) */
@media (orientation: portrait) {
    /* Hier verstecken wir sie oft ganz, da das Wischen intuitiv ist */
    .site-content-contain::-webkit-scrollbar {
        display: none; 
    }
}

/* observer In dein Zusätzliches CSS */
/* Sicherer Fix für springende Marker */
.active-marker-pulse {
    /* Wir nutzen z-index, um ihn nach vorne zu holen */
    z-index: 1000 !important;
    /* Wir nutzen filter statt transform, um die Position nicht zu brechen */
    filter: drop-shadow(0 0 10px #ffcc00) brightness(1.2) !important;
    transition: filter 0.3s ease !important;
	 z-index: 9999 !important;
}

/* Falls du unbedingt eine Vergrößerung willst, nutze diesen Trick: */
.active-marker-pulse img {
    transform: scale(1.4) !important; /* Skaliert nur das Bild im Marker, nicht den Marker-Container selbst */
    transition: transform 0.3s ease-in-out !important;
    border: 2px solid #ffcc00 !important;
}



.active-marker-pulse img, 
.active-marker-pulse div {
    /* Wir vergrößern nur das INNERE des Markers */
    box-shadow: 0 0 15px 5px rgba(255, 204, 0, 0.7) !important;
    border: 3px solid #ffcc00 !important;
    transform: scale(1.2) !important;
    transition: all 0.3s ease-in-out !important;
}



/************************************
*
*   Das iframe für das POPUP  
*
************************************/
/*Der Article selber wird im Popup formatiert */

#gtm-modal {
    display: none; /* Standardmäßig unsichtbar */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100vw;
    height: 85vh;
    background: #222;
    z-index: 10000;
    box-shadow: 0 0 50px rgba(0,0,0,0.4);
    border-radius: 8px;
    overflow: hidden;
	
}


/* Der dunkle Hintergrund (Overlay) */
#gtm-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
}

/* iframe füllt das Modal aus */
#gtm-modal iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Schließen-Button */
#gtm-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 30px;
    cursor: pointer;
    z-index: 10001;
    color: #444;
	background: rgba(0,0,0,0);
}

#gtm-modal, 
#gtm-modal-iframe {
    scrollbar-width: thin; /* Firefox: Schmale Scrollbar */
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent; /* Firefox: Farbe */
}