/* ===========================
   BASE STYLES
   =========================== */
body {
    margin: 0;
    padding: 0;
    font-family: Atkinson Hyperlegible, sans-serif;
    color: #1D1F21;
    background-color: var(--clr-background, #ffffff);
}

:root {
    --clr-background: #ffffff;
    --clr-text: #333333;
}

a {
    color: #1D1F21;
    text-decoration: none;
}
.container h1
{
	color:black;
}
h1, h4, h5 {
    font-family: Apparel, serif;
	margin:20px 0;
}
h2 {
    font-family: Apparel, serif;
	margin:16px 0;
}

h1 {
    font-size: 40px;
    flex-grow: 1; /* Nimmt den verfügbaren Platz ein */
}

/* Fußzeile */
footer {
    text-align: center;
    background-color: white;
    padding: 10px;
    margin: 0 10% 75px 10%;
}

/* Trennlinie */
hr {
    width: 80%;
	margin:0;
    border-top: 1px solid #121212;
}
.container h1:hover
{
	color:black;
}

/* ===========================
   FONTS
   =========================== */
@font-face {
    font-family: "Apparel";
    src: url("serif_font.otf");
}

.atkinson-hyperlegible-regular {
    font-family: "Atkinson Hyperlegible", sans-serif;
    font-weight: 400;
    font-style: normal;
}

.atkinson-hyperlegible-bold {
    font-family: "Atkinson Hyperlegible", sans-serif;
    font-weight: 700;
}

.atkinson-hyperlegible-regular-italic {
    font-family: "Atkinson Hyperlegible", sans-serif;
    font-weight: 400;
    font-style: italic;
}

.atkinson-hyperlegible-bold-italic {
    font-family: "Atkinson Hyperlegible", sans-serif;
    font-weight: 700;
    font-style: italic;
}

/* ===========================
   DROPDOWN
   =========================== */
.dropdown_container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    padding: 15px 0;
}

.dropdown_container h1 {
    flex-grow: 1;
    font-size: 30px;
    padding-right: 40px;
    z-index: 2;
}

.toggle-button {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10;
}

.dropdown_icon {
    width: 20px;
    height: 20px;
    fill: black;
    transition: transform 0.2s ease-in-out;
}

/* Rotationsklasse */
.dropdown_icon.rotated {
    transform: rotate(180deg);
}

/* ===========================
   CONTENT
   =========================== */
.content_container {
    padding: 0 20% 50px 20%;
	width:60%;
}
h1:hover {
  background: linear-gradient(90deg, rgba(0,212,255,1) 0%, rgba(0,0,255,1) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  cursor:pointer;
}
.content_container p {
    text-align: justify;
    word-spacing: -1px;
    hyphens: auto;
}

.content_container p:last-of-type::after {
    content: " ◼︎";
    display: inline-block;
    margin-left: 0.3em; /* Abstand zum Text */
}
.article_img {
	margin-top:20px;
}
.collapsible-content img{
	max-width:100%;
}
.preview-text{
	text-align:justify;
	word-spacing: -1px;
    hyphens: auto;
}
.preview_container
{
	width:80%;
}
.yt_player
{
	width:100%;
}
.hidden {
    max-height: 0 !important;
    overflow: hidden;
}

.main_navigation_container
{
	height:100%;
}
.main_chapter
{
	padding-left:20%;
}
span{
	padding:0;
	margin:0;
}
.login_mask_container
{
	width:100%;
	height:100vh;
	position:fixed;
	top:0;
	left:0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color:white;
	visibility: visibile;
}
.login_input{
	border-radius: 8px;
	padding:20px;
}



/* Wichtig: macht den span zu einem Block-Element, damit transform funktioniert */
.chapter_dropdown_icon {
    display: inline-block;
    cursor: pointer; /* Zeigt, dass es klickbar ist */
    transition: transform 0.3s ease;
}

.chapter_dropdown_icon.rotated {
    transform: rotate(180deg);
}
.dropdown_icon {
    transition: transform 0.3s ease;
}

.dropdown_icon.rotated {
    transform: rotate(180deg);
}
/* Container für den gesamten Slider */
.image_slider_container {
  display: flex;
  overflow-x: auto; /* horizontal scrollbar, falls nötig */
  gap: 10px;        /* Abstand zwischen den Slides */
  /*padding-top: 10px;	wenn du  das brauchst bist du ein HURENSOHN!*/
  scroll-snap-type: x mandatory; /* optional: für schnappende Slides beim Scrollen */
}

/* Jede Slide */
.image_slider {
  flex: 0 0 auto;       /* Slide behält eigene Breite */
  overflow: hidden;     /* Bild nicht über Container hinaus */
}
.image_slider img
{
	height:350px;
	width:100%;
}
.image_slider_bangkok_
{
	height:350px;
}
/* Bilder innerhalb der Slides */
.slider_image {
  max-height: 350px;
  display: block;
}
/*LIGHTBOX*/
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.90);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}
.lightbox img {
    width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: white;
    cursor: pointer;
    user-select: none;
    transition: 0.2s;
}

.lightbox-close:hover {
    transform: scale(1.2);
    color: #ddd;
}
.image_slider_container.scroller-container {
	overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;       /* Firefox */
    scrollbar-color: auto auto;  /* Firefox Standardfarben */
}
/*custom scrollbar*/
/* Chrome, Safari, Edge */
.image_slider_container.scroller-container::-webkit-scrollbar {
	height: 4px; /* dünner Strich */
}

.image_slider_container.scroller-container::-webkit-scrollbar-track {
    background: transparent; /* keine Box/Track sichtbar */
}

.image_slider_container.scroller-container::-webkit-scrollbar-thumb {
    background: #888;        /* schlichter Griff */
    border-radius: 2px;      /* leicht abgerundet */
}

.image_slider_container.scroller-container::-webkit-scrollbar-thumb:hover {
    background: #555;        /* optional: dunkler beim Hover */
}
.image_slider_wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.image_slider_container.scroller-container {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scrollbar-width: thin;       
    scrollbar-color: auto auto;  
}

.image_slider_container.scroller-container::-webkit-scrollbar {
    height: 4px; 
}
.image_slider_container.scroller-container::-webkit-scrollbar-track {
    background: transparent;
}
.image_slider_container.scroller-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 2px;
}
.image_slider_container.scroller-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}
/*PFEILE*/
.slider_arrow {
    background: transparent; /* kein runder Hintergrund */
    border: none;
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    padding: 4px; /* minimaler Klickbereich */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.slider_arrow:hover {
    transform: translateY(-50%) scale(1.2); /* leichtes Vergrößern beim Hover */
}

.slider_arrow.left {
    left: 5px;
}

.slider_arrow.right {
    right: 5px;
}

/* SVG Größe */
.slider_arrow {
    pointer-events: auto; /* Buttons reagieren auf Klicks */
}

.image_slider_wrapper {
    pointer-events: none; /* Wrapper blockt nichts */
}

.image_slider_container.scroller-container,
.image_slider_container.scroller-container img {
    pointer-events: auto; /* Slider und Bilder reagieren normal */
}
/* CONTAINER UND WICKELUNG */
.image_slider_wrapper {
    /* WICHTIG: Erlaubt absolute Positionierung der Pfeile relativ zu diesem Element */
    position: relative; 
    width: 100%; /* Beispielbreite, anpassen nach Bedarf */
    margin: 0; /* Zentrierung */
    overflow: hidden; /* Verhindert das Herausragen von Inhalten */
}

/* LIGHTBOX OVERLAY */
.lightbox {
    /* Startzustand: Unsichtbar und über dem gesamten Viewport */
    display: none; /* WIRD SPÄTER MIT JAVASCRIPT AUF 'block' gesetzt */
    position: fixed; /* Bleibt beim Scrollen an Ort und Stelle */
    z-index: 9999; /* Stellt sicher, dass es über allem liegt */
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%;
    /* Hintergrund: leicht transparentes Schwarz */
    background-color: rgba(0, 0, 0, 0.9); 
    /* Für Zentrierung des Bildes (Flexbox ist oft am besten) */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* LIGHTBOX BILD */
.lightbox-image {
    /* Stellt sicher, dass das Bild in den Viewport passt */
    max-width: 90%; 
    max-height: 90%;
    /* Stellt sicher, dass das Bild auch beim Klick auf das Overlay nicht überlagert */
    pointer-events: none; 
    /* Sanfter Übergang beim Laden/Öffnen */
    transition: transform 0.3s ease-out; 
}

/* SCHLIESSEN-BUTTON */
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    /* Stellt sicher, dass das X über dem Hintergrund und dem Bild liegt */
    z-index: 10000; 
    pointer-events: auto; /* Muss auf Klicks reagieren */
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: #bbb;
    text-decoration: none;
}
/* LIGHTBOX OVERLAY MUSS INITIALL IMMER VERSTECKT SEIN */
.lightbox {
    position: fixed;
    z-index: 9999; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9); 
    
    /* Standardmäßig verstecken */
    display: none; 
    /* Wenn die Lightbox per JS geöffnet wird, wird es auf 'display: flex;' gesetzt */
}
/*TEST TEST*/
.slider_arrow.right.hd{
	right:30px;
}
.slider_arrow.left.hd{
	left:30px;
}
/* ===========================
   LANGUAGE TOGGLE
   =========================== */
.language-toggle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    position: fixed;
    right: 20px;
    top: calc(20px + 48px + 15px);
    z-index: 1000;
    border: 1px solid rgba(0,0,0,0.1);
    background-size: 105%;
    background-position: center;
    background-repeat: no-repeat;
    cursor: pointer;
    transition: background-color 0.3s, box-shadow 0.3s;
}
/* ===========================
   PROGRESS BAR
   =========================== */
#reading-progress-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 8px;
    background-color: #44afdb;
    z-index: 1000;
    transition: width 0.1s linear;
}

.progress-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 10px;
    background: linear-gradient(90deg, rgba(0,212,255,1) 0%, rgba(0,0,255,1) 100%);
    z-index: 1000;
    transition: width 0.1s ease-out;
}

#progress-bar-spacer {
    background-color: white;
    height: 40px;
    position: fixed;
    bottom: 0;
    z-index: 9;
    width: 100%;
}

/* ===========================
   DARK MODE
   =========================== */
body.dark-theme {
    --clr-background: #121212;
    --clr-text: #eaeaea;
    background-color: var(--clr-background);
    color: var(--clr-text);
}

body.dark-theme a {
    color: white;
}

body.dark-theme .theme-toggle {
    background-color: #1D1F21;
    color: #ffffff;
    box-shadow: 0 4px 8px rgba(255,255,255,0.1);
}

body.dark-theme .dropdown_container,
body.dark-theme .preview-text,
body.dark-theme #progress-bar-spacer {
    background-color: var(--clr-background);
}

body.dark-theme .dropdown_icon {
    fill: white;
}

body.dark-theme footer {
    background-color: var(--clr-background);
    color: var(--clr-text);
}

body.dark-theme #reading-progress-bar,
body.dark-theme .progress-bar {
    background-color: #44afdb;
}

/* ===========================
   THEME TOGGLE BUTTON
   =========================== */
.theme-toggle {
    border: none;
    cursor: pointer;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    background-color: var(--clr-background);
    color: var(--clr-text);
    transition: background-color 0.3s, color 0.3s, box-shadow 0.3s;
}

.theme-toggle .icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    transition: opacity 0.3s, transform 0.3s;
}

.theme-toggle .sun {
    opacity: 1;
}

.theme-toggle .moon {
    opacity: 0;
}

body.dark-theme .theme-toggle .sun {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(-90deg);
}

body.dark-theme .theme-toggle .moon {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(0deg);
}

/* ===========================
   BACK LINK
   =========================== */
.back-link-container {
    margin: 40px auto;
    padding: 20px 0;
    max-width: 900px;
    text-align: left;
}

.back-link {
    display: inline-flex;
    align-items: center;
    font-size: 1.2em;
    font-weight: bold;
    color: #007bff;
    text-decoration: none;
    padding: 10px 15px;
    border: 2px solid #007bff;
    border-radius: 5px;
    transition: background-color 0.3s, color 0.3s;
}

.arrow-icon {
    font-size: 1.5em;
    margin-right: 10px;
    line-height: 1;
}

.back-link:hover {
    background-color: #007bff;
    color: white;
}

/* ===========================
   DESTINATION LIST
   =========================== */
.destination-list {
    display: flex;
    align-items: center;
    gap: 10px;
}

.destination-list a {
    position: relative;
    font-size: 1.1rem;
    font-weight: 600;
    color: inherit;
    text-decoration: none;
    padding-bottom: 3px;
	white-space: nowrap;
}

.destination-list a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 20px;
    width: 0%;
    height: 2.5px;
    background: linear-gradient(90deg, rgba(0,212,255,1) 0%, rgba(0,0,255,1) 100%);
    transition: width 0.35s ease;
}

.destination-list a:hover::after {
    width: 100%;
}

.arrow {
    opacity: 0.6;
    font-size: 1.2rem;
}

/* ===========================
   LANGUAGE TOGGLE
   =========================== */
.language-toggle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    position: fixed;
    right: 20px;
    top: calc(20px + 48px + 15px);
    z-index: 1000;
    border: 1px solid rgba(0,0,0,0.1);
    background-size: 105%;
    background-position: center;
    background-repeat: no-repeat;
    cursor: pointer;
    transition: background-color 0.3s, box-shadow 0.3s;
}
@media (max-width: 399px){
  .preview_container
  {
	  width:90%;
  }
  hr {
    width: 100%;
  }
  .content_container{
	  width:80%;
	  padding:0 10%;
  }
  .article_img{
	  width:100%;
  }
  .image_slider img
  {
	  Width:100%;
	  height: 20vh;
  }
  .destination-list{
	  overflow-x:scroll;
  }
  .language-toggle
  {
	right:10px;
	top:70px;
	width:40px;
	height:40px;
  }
  .theme-toggle
  {
	  top:10px;
	  right:7px;
  }
  .main_chapter
  {
	padding-left:10%;  
  }
}
