*, *::before, *::after {
  box-sizing: border-box;
}

body {
    margin:0;
}

.container { 
  display: grid;
  height:100vh; 
  grid-template-rows: 15vh 5vh 75vh 5vh;
  grid-template-columns: 100%; 
  grid-template-areas:  
    "header" 
    "nav" 
    "main" 
    "footer" 
  ; 
}

.nav-links {
  display: flex;
  justify-content: center;
  gap: 15px;
  padding-top: 1vh;
  width: 100%;
  font-size: clamp(0.75rem, 0.525rem + 0.6vi, 1.125rem);
  font-family: "Arial", sans-serif;
}

.nav-links a {
    color: white;
} 

.nav-item {
  position: relative;
}

.sub-nav {
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  display: none;
  background-color: rgba(66, 66, 66, 0.8); 
  box-shadow: 0px 4px 10px rgba(0,0,0,0.1);
  padding: 10px;
  list-style: none;
  min-width: 120px;
  z-index: 100;
}

.sub-nav li {
  display: block;
  white-space: nowrap;
  padding: 5px 10px;
}

.nav-item:hover .sub-nav {
  display: block;
}

.burger-button, .menu-checkbox {
  display: none;
}

.texttitel1 h1 {
    font: italic small-caps bold clamp(1rem, 0.4167rem + 2.3333vw, 2.75rem) cursive;
    font-family: "Arial", sans-serif;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-block-end: 0px;
    margin-block-start: -10px;
}

.texttitel2 h2 {
    font: italic small-caps clamp(0.7rem, 0.3333rem + 1.6667vw, 2.2rem) cursive;
    font-family: "Arial", sans-serif;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-block-end: 20px;
    margin-block-start: -1px;
}

.texttitel3 h3 {
    font: clamp(0.6rem, 0.3333rem + 1.6667vw, 2rem) sans-serif;
    font-family: "Arial";
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-block-end: 20px;
    margin-block-start: -1px;
    padding-top: 4cqh;
}

header {
    display: grid;
    background-color: #444444; 
    grid-area: header; 
    place-items: center;
    padding-top: 2cqh;
    box-sizing: border-box;
}

main {
    display: grid;
    background-color: #444444; 
    grid-area: main;
    justify-items: center;
    align-items: center;
    overflow-y: auto;
}

nav {
    background: #666666;
    grid-area: nav;
}

.main-nav {
    grid-area: nav;
    position: relative;
}

footer {
    background: #666666;
    grid-area: footer; 
    align-items: center;
}

.footer-text {
  display: flex;
  justify-content: center;
  padding-top: 1.5vh;
  width: 100%;
  font: italic clamp() cursive;
  font-family: "Arial", sans-serif;
  color: white;
}

.title-photo-area {
  grid-area: main;
  width: 100%;
  /* overflow: hidden; */
  background-color: #444444;
  position: relative;
}

.title-photo-area img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.title-photo-area figcaption {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.3);
  color: white;
  padding: 5px 10px;
  border-radius: 4px;
  pointer-events: none;
}

.impr {
  font: normal clamp(16px, 1vw, 20px) sans-serif;
  font-family: "Arial";
  color: white;
  line-height: 1.5em;
  text-align: center;
  overflow-y: auto;
  max-height: 100%;
/*  scroll-behavior: smooth;
  scroll-padding-block: 12px; */
}

/* .impr:focus-visible {
  outline: 2px solid #005fcc;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px #ff00ff;
}

.impr:focus {
  outline: none;
} */

.impr a {
    color: white;
} 

.impr p {
    line-height: 1.66em;
    margin: 30px;
    text-align: left;
    font-size: 16px;
}

tcopy { font-size: clamp(12px, 1vw, 16px); }

.impr ul {
  margin-left: 40px; 
}

li { text-align: left; }

@media screen and (max-width: 60.001em) {
  .container {
    grid-template-rows: 10vh 5vh 80vh 5vh;
    grid-template-columns: 100%; 
    grid-template-areas:  
      "header"
      "nav"
      "main" 
      "footer" 
    ;
  }
}

@media screen and (max-width: 40.001em) {
  .container {
    grid-template-rows: 10vh 7vh 78vh 5vh;
    grid-template-columns: 100%; 
    grid-template-areas:  
      "header"
      "nav"
      "main" 
      "footer" 
    ;
  }

  .nav-links {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding-top: 1vh;
    width: 100%;
    font-size: 14px;
    font-family: "Arial", sans-serif;
  }
  
  .texttitel3 h3 {
    padding-top: 35px;
    font-size: 18px;
    font-family: "Arial";
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-block-end: 20px;
    margin-block-start: -1px;
  }

/* Das Abdunklungs-Overlay im Grundzustand (unsichtbar) */
  .menu-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5); /* Schwarz mit 50% Transparenz */
    z-index: 900;                         /* Unter den Links (999), aber über den Fotos */
    opacity: 0;
    pointer-events: none;                 /* Klicks gehen im geschlossenen Zustand durch */
    transition: opacity 0.3s ease;        /* Sanftes Einblenden */
  }

  /* Zentriert das Burger-Icon mathematisch in der Nav-Row */
  .main-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #666666;
    z-index: 1000;
  }

  /* Burger-Button einblenden */
  .burger-button {
    display: flex;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px; 
  }
  
  .burger-button span {
    width: 30px;
    height: 3px;
    background-color: white;
    transition: 0.3s;
  }

  /* Checkbox bleibt unsichtbar im Hintergrund */
  .menu-checkbox {
    display: none;
  }

  .nav-links {
    flex-direction: column;
    display: none;
    position: absolute;
    top: 100%;
    left: 25%;
    width: 50%;
    padding: 0;
    gap: 0;
    background-color: rgba(33, 33, 33, 0.8); 
    z-index: 1001;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1); 
  }

  .nav-item {
    position: relative; 
    width: 100%;
    border-bottom: 2px solid black;
    box-sizing: border-box;
  }

  .nav-item:last-child {
    border-bottom: none; 
  }

  .nav-links a {
    display: block;
    padding-bottom: 5px;
    padding-top: 5px;
    text-align: center;
    width: 100%;
    text-decoration: none;
    font-size: 1.0rem;
    line-height: 1.2;  
    box-sizing: border-box; 

  }

  .sub-nav {
    position: absolute; /* Für Mausgeräte */
    top: 0;            
    left: 100%;        
    width: 80%;        
    display: none;     
    background-color: rgba(66, 66, 66, 0.66); 
    box-shadow: 10px 10px 15px rgba(0, 0, 0, 0.1);
    padding: 0;
    list-style: none; 
/*      position: static; /* Mobil touch: Bleibt im Textfluss und schiebt Inhalt nach unten */
/*  display: none;
  background-color: rgba(0, 0, 0, 0.2);
  padding: 0;
  list-style: none; */
  }
  
  .nav-item:hover .sub-nav {
    display: block;
  }
  
  .sub-nav a {
    font-size: 0.9rem;  
    text-align: center;
    width: 100%;
    text-decoration: none;
    line-height: 0.6;  
    box-sizing: border-box;
  }

  .sub-nav li {
    padding-left: 20px;
  }

  .sub-nav.is-open {
    display: block;
  }


  .texttitel3 h3 {
    padding-top: 25px;
    font-size: 16px;
    font-family: "Arial";
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-block-end: 20px;
    margin-block-start: -1px;
  }
  
  .impr p {
    line-height: 1.66em;
    margin: 20px;
    text-align: left;
    font-size: 14px;
  }
  
  .impr ul { margin-left: 10px; }

  /* ========================================== */
  /* 3. INTERAKTIONS-LOGIK (NUR MOBIL)          */
  /* ========================================== */
  
/* Schaltet das Overlay auf sichtbar, sobald gecheckt */
  .menu-checkbox:checked ~ .nav-links {
      display: flex;
  }

 .menu-checkbox:checked ~ .menu-backdrop {
    opacity: 1;
    pointer-events: auto;                 /* Blockiert Klicks auf den Content dahinter */
  }

  /* Burger-Icon Animation zum "X" */
  .menu-checkbox:checked ~ .burger-button span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .menu-checkbox:checked ~ .burger-button span:nth-child(2) {
    opacity: 0;
  }
  .menu-checkbox:checked ~ .burger-button span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
  }
}
