/* ========================
   Schriftart
======================== */
@font-face {
  font-family: "Futura";
  src: url("../fonts/futura-book-webfont.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "Montserrat-regular";
  src: url("../fonts/Montserrat-Regular.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "Montserrat-medium";
  src: url("../fonts/Montserrat-Medium.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "Montserrat-bold";
  src: url("../fonts/Montserrat-Bold.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "Montserrat-extrabold";
  src: url("../fonts/Montserrat-ExtraBold.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
}

.container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0px 0px 0px 0px;
  width: 100%;
  /*padding: 0 0px; /* optional für Abstand */  
}

body {
  /*font-family: 'Futura', sans-serif;*/
  font-family: "Montserrat-medium", sans-serif;
  margin: 0;
  padding: 0;
  padding-top: 80px; /* Platz für Navbar machen */
}

.abschnitt {
  margin-left: 20px;
  margin-right: 20px;
}

.abschnittsueberschrift {
  margin-left: 20px;
  margin-right: 20px;
  font-family: "Montserrat-bold", sans-serif;
}

.abschnittsueberschrift_white {
  margin-left: 20px;
  margin-right: 20px;
  font-family: "Montserrat-bold", sans-serif;
  color: white;
}

/* ========================
   Navbar
======================== */
.navbar {
  display: flex;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  justify-content: space-between;
  align-items: center;
  background-color: #734741;
  padding: 10px 0px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  transition: transform 0.3s ease;
  z-index: 1000;
  box-shadow: 0 0px 50px rgba(0, 0, 0, 0.5);
}

.navbar.hidden {
  transform: translateY(-100%);
}

.navbar-inner {
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;

  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-img {
  /*width: 60px;
  height: 60px;*/
  height: 5dvw;
  min-height: 40px;
  max-height: 60px;
  /*max-width: 60px;*/
}

.navbar-title {
  /*font-size: 1.8rem;*/
  font-size: clamp(1rem, 4vw, 1.8rem);
  font-weight: 500;
  color: #fff;
}

/* Navigation Links */
.nav-links {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links li {
  margin-left: 20px;
  position: relative;
}

.nav-links a {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  color: white;
  font-weight: bold;
  text-decoration: none;
  border-radius: 4px;
  transition: background 0.3s;
}

.nav-links a:hover {
  background-color: #d3d3d3;
  color: black;
  text-decoration: none;
}

/* Dropdown */
.nav-links li.dropdown .dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: white;
  min-width: 180px;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  padding: 0;
  list-style: none;
  margin: 0;
}

.nav-links li.dropdown .dropdown-menu li a {
  color: black;
  padding: 10px 15px;
  display: block;
}

.nav-links li.dropdown .dropdown-menu li a:hover {
  background-color: #d3d3d3;
}

/* Öffnen per JS-Klasse (Sidebar/Mobile und generell) */
.nav-links li.dropdown.open > .dropdown-menu {
  display: block;
}

/* Dropdown Pfeil */
.nav-links li.dropdown > a {
  display: flex;
  align-items: center;
  gap: 5px;
}

.nav-links .dropdown > a {
  position: relative;
  padding-right: 14px;
}

.nav-links .dropdown > a::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid currentColor;
  transform: translateY(-50%) rotate(0deg);
  transition: transform 0.6s ease; /* Sanfte Animation */
}

/* Pfeil drehen, wenn per Klick geöffnet */
.nav-links li.dropdown.open > a::after {
  transform: translateY(-50%) rotate(180deg);
}

/* Hover nur im echten Desktop-Modus (ab 980px) UND nur auf echten Hover-Geräten */
@media screen and (min-width: 980px) and (hover: hover) and (pointer: fine) {
  .nav-links li.dropdown:hover > .dropdown-menu {
    display: block;
  }

  .nav-links .dropdown:hover > a::after {
    transform: translateY(-50%) rotate(180deg);
  }
}

/* Burger-Menü */
.burger {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.burger div {
  width: 25px;
  height: 3px;
  background-color: white;
  margin: 4px 0;
  transition: all 0.3s ease;
}

/* ========================
   Main / Artikel-Container
======================== */
main {
  padding: 0px;
}

header {
  /*display: flex;*/
  justify-content: center;
  /*margin: 0 auto;*/
}

section {
  /*margin-bottom: 40px;*/
  margin-bottom: 0px;
}

article {
  border-bottom: 1px solid #ccc;
  padding: 10px 0;
}

#highlight-news,
#highlight-termine {
  background-color: #8c9ba4;
  padding-top: 5px;
}

#highlight-termine {
  background-color: #b2bcc2;
  padding-top: 5px;
}

#news-container,
#termine-container {
  /*background-image: url("/assets/images/gondershausen_besen.jpg");
  background-clip: border-box;
  background-size: contain;*/
  margin-top: 15px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
  margin: 0px 15px 20px 15px;
}

#news-container article,
#termine-container article {
  /*background-color: #f9f9f9;*/
  background-color: #c6cebd;
  /*background-color: #e2e6de;*/
  /*background-color: white;*/
  color: black;
  border-radius: 8px;
  padding: 15px 20px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

#news-container article:hover,
#termine-container article:hover {
  background-color: #aab69d;
  transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

#news-container article h3 a,
#termine-container article h3 a {
  color: black;
  text-decoration: none;
  transition: color 0.2s;
}

#news-container article h3 a:hover,
#termine-container article h3 a:hover {
  color: #a2685d;
  text-decoration: underline;
}

#news-container article small,
#termine-container article small {
  display: block;
  margin-top: 8px;
  color: black;
  font-size: 0.85em;
}

.news-img,
.termin-img {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 10px;
}

/*
#news-detail, #termin-detail {
  
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
}*/

.news-image-wrapper img,
.termin-image-wrapper img {
  max-width: 100%;
  max-height: 800px;
  height: auto;
  display: block;
}

/*.news-image-wrapper img:hover, .termin-image-wrapper img:hover{
  transform: scale(1.03);
}*/

#news-detail-container,
#termin-detail-container {
  background-color: #c6cebd;
  border-radius: 8px;
  margin: 20px 5px 20px 5px;
  padding: 20px;
}

.news-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin-top: 15px;
}

.news-gallery-image {
  width: 100%;
  /*height: 300px;*/
  height: auto;
  object-fit: contain;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.news-gallery-image:hover {
  transform: scale(1.03);
}

.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.lightbox img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 10px;
}

.lightbox.active {
  display: flex;
}

/* ========================
   Title Card
======================== */
.title-section {
  display: flex;
  justify-content: center;
  /*padding: 10px 20px;*/
  /*background-image: url("/assets/images/gondershausen_title.jpg");
  background-clip: border-box;
  background-size: contain;*/
}

.title-section-mobile {
  display: none;
  padding: 0px 0px 0px 0px;
}

.title-card {
  background: white;
  display: flex;
  gap: 0px;
  padding: 0px;
  border-radius: 0px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  transition:
    transform 0.3s,
    box-shadow 0.3s;
}

.title-card-mobile {
  display: flex;
  border-radius: 0px;
  background-color: lightgray;
  padding: 0px 20px 0px 20px;
}

.title-image {
  flex: 1;
  display: flex;
  align-items: stretch;
  justify-content: center;
  position: relative;
}
.title-image img {
  width: 100%;
  object-fit: cover;
  border-radius: 0px;
}

.overlay-text1 {
  font-family: "Montserrat-extrabold", sans-serif;
  position: absolute;
  top: 5%;
  left: 4%;
  right: 40%;
  color: white;
  /*font-size: clamp(1.5rem, 2.5vw, 3rem);*/
  font-size: clamp(1.5rem, 4vw, 4rem);
  font-weight: bold;
  text-align: left;
  /*padding: 0 1rem;*/
}

.overlay-text2 {
  position: absolute;
  top: 70%;
  left: 4%;
  right: 30%;
  color: white;
  /*font-size: clamp(0.6rem, 1vw, 1.2rem);*/
  font-size: clamp(0.8rem, 1vw, 1rem);
  font-weight: bold;
  text-align: left;
  padding: 0 1rem;
}

.overlay-wappen {
  position: absolute;
  top: 20%;
  left: 75%;
  max-width: 10%;


  opacity: 0;
  transform: scale(0.9);
  animation: fadeInWappen 2s ease-out forwards;
}

@keyframes fadeInWappen {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ========================
   Welcome Card
======================== */
.welcome-section {
  display: flex;
  justify-content: center;
  /*padding: 10px 20px;*/
}

.welcome-card {
  background-color: #734741;
  display: flex;
  gap: 30px;
  padding: 0%;
  border-radius: 0px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.welcome-text {
  flex: 1;
  color: white;
  padding: 2% 2% 2% 5%;
}
.welcome-text h2 {
  margin-top: 0;
  margin-bottom: 0px;
  font-size: 1.6rem;
}
.welcome-text p {
  line-height: 1.6;
  margin-bottom: 10px;
}
.bold {
  font-family: "Montserrat-bold", sans-serif;
}

.welcome-image {
  flex: 1;
  display: flex;
  align-items: stretch;
  justify-content: center;
}
.welcome-image img {
  width: 100%;
  object-fit: cover;
  border-radius: 0px;
  padding: 20px 20px 20px 20px;
}

/* ========================
   Veranstaltungen und Termine Card
======================== */
.veranstaltungen-und-termine-section {
  display: flex;
  justify-content: center;
}

.veranstaltungen-und-termine-card {
  background: white;
  display: flex;
  gap: 0px;
  padding: 0px;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  transition:
    transform 0.3s,
    box-shadow 0.3s;
}

.overlay-text3 {
  position: absolute;
  top: 12%;
  left: 10%;
  color: white;
  font-size: clamp(1.2rem, 3vw, 2em);
  font-weight: bold;
  text-align: left;
  padding: 0 1rem;
}

.overlay-text4 {
  position: absolute;
  top: 16%;
  left: 10%;
  color: white;
  font-size: clamp(1.2rem, 3vw, 2rem);
  font-weight: bold;
  text-align: left;
  padding: 0 1rem;
}

/* Buttons */
.more-button {
  text-align: center;
  padding: 15px 0 15px 0;
}

.more-button a {
  display: inline-block;
  background-color: #c6cebd;
  color: black;
  padding: 10px 20px;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.more-button a:hover {
  background-color: #aab69d;
  transform: translateY(-2px);
}

/* ========================
   Good to Know Card
======================== */
.gtk-section {
  flex-direction: column; /* wichtig, damit Überschrift oben bleibt */
  /*padding: 0px;*/
  background-color: #dcd1cf;
  /*background-color: #734741;*/
  padding: 5px 0px 20px 0px;
}

/* Grid für die 4 Quadrate */
.gtk-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding-left: 20px;
  padding-right: 20px;
  align-items: start;
}

/* Einzelne Quadrate */
.gtk-item {
  background-color: white;
  border-radius: 10px;
  /*aspect-ratio: 1 / 1; /* macht perfekte Quadrate */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 15px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.gtk-item h2 {
  margin: 0 0 10px 0;
}

.gtk-item p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.4;
}

.notfall-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.notfall-list li {
  display: grid;
  grid-template-columns: 1fr auto; /* links flexibel, rechts kompakt */
  gap: 10px;
  padding: 4px 0;
  border-bottom: 1px solid #eee;
}

.notfall-list li span:last-child {
  /*font-weight: bold;*/
  white-space: nowrap;
}

/* ========================
   Vereine und Gruppen
======================== */
.vereine-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 Spalten */
  gap: 20px;
  padding: 0px 10px 0px 10px;
  /*padding-bottom: 20px;*/
  color: black;
}

.verein-card {
  background: #b2bcc2;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.verein-card:nth-child(even) {
  background: #d9dee0;
}

.verein-card img {
  width: 200px;
  height: 200px;
  object-fit: contain;
  margin: 0 auto 10px auto;
  display: block;
}

.verein-card h3 {
  margin: 10px 0 5px;
}

.verein-card p {
  font-size: 16px;
  color: black;
}

/* Tablet */
@media (max-width: 1200px) {
  .vereine-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Smartphone */
@media (max-width: 768px) {
  .vereine-container {
    grid-template-columns: 1fr;
  }
}

/* ========================
   Footer
======================== */
.footer {
  max-width: 1440px;
  width: 100%;
  margin: 0px auto;
  /*justify-content: space-between;*/
  /*align-items: center;*/
  background-color: #734741;
  padding: 10px 0px;
  /*margin-left: 30px;*/
  /*margin-right: 30px;*/
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  text-align: center;
  color: white;
}

.footer a {
  color: white;
}

.footer a:visited {
  color: white;
}

.back-btn {
  background: white;
  color: #333;
  border: 1px solid #ddd;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  cursor: pointer;
  transition: 0.2s;  
}

.back-btn:hover {
  background: #f5f5f5;
  border-color: #bbb;
}

/* ========================
   Responsive
======================== */
@media screen and (max-width: 979px) {
  .overlay-text2 {
    display: none;
  }

  .title-section-mobile {
    display: block;
  }

  /* Navbar Mobile / Sidebar */
  .nav-links {
    position: fixed;
    right: 0;
    top: 60px;
    /*height: 100vh;*/
    height: calc(100dvh - 100px);
    width: 250px;
    background-color: white;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    padding-top: 20px;
    z-index: 999;

    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .nav-links.nav-active {
    transform: translateX(0);
  }

  .nav-links li {
    margin: 6px 0;
  }

  .nav-links a {
    padding: 8px 15px;
    color: black;
  }

  .burger {
    display: flex;
  }

  .burger.toggle div:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 10px);
  }
  .burger.toggle div:nth-child(2) {
    opacity: 0;
  }
  .burger.toggle div:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -10px);
  }

  /* Welcome Card Mobile */
  .welcome-card {
    flex-direction: column;
  }
  .welcome-image img {
    max-height: 220px;
  }

  /* Artikel Container Mobile */
  #news-container,
  #termine-container {
    grid-template-columns: 1fr;
  }

  /* Optional: Dropdown-Menü in Sidebar weniger "floating" wirken lassen */
  .nav-links li.dropdown .dropdown-menu {
    position: static; /* statt absolute */
    box-shadow: none;
    background-color: white;
    min-width: 0;
    border-radius: 0;
  }

  .nav-links li.dropdown .dropdown-menu li a {
    color: black; /* passt zur Sidebar */
    padding: 10px 40px;
  }

  .nav-links li.dropdown .dropdown-menu li a:hover {
    /*background-color: rgba(255,255,255,0.25);*/
    background-color: rgba(0, 0, 0, 0.25);
  }
}

@media (min-width: 1px) {
  .gtk-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 768px) {
  #news-container,
  #termine-container {
    grid-template-columns: 1fr 1fr;
  }
  .gtk-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 979px) {
  .gtk-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

@media (min-width: 1200px) {
  #news-container,
  #termine-container {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .gtk-grid {
    grid-template-columns: 1fr 1fr 1fr 1fr;
  }
}
