/* ===========================
   Grundlayout – Mobile First
   =========================== */

/* inter-tight-regular - latin */
@font-face {
  font-display: swap; 
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  src: url('fonts/inter-light.woff2') format('woff2');
}

:root {
  --color-red: rgb(154,32,43);
  --color-darkred: rgb(122,18,29);
  --color-grey: rgb(94,104,110);
  --color-light-grey: rgb(245,247,248);
  --color-white: #fff;
  --color-black: #000;
  --color-middle-grey: #e0e0e0;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding-top: 5rem;
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  background-color: var(--color-white);
}

h2.red {
  color: var(--color-red) !important;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

section,
.logo-above {
  width: 100%;
  background-color: inherit;
  padding: 2rem 0;
}

/* ===========================
   Header fixieren
   =========================== */
header.sticky {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--color-white);
  z-index: 1000;
  padding: 0.5rem 0;
  box-sizing: border-box;
}

section[id] {
  scroll-margin-top: 4rem;
}

/* ===========================
   Logo-Bereich
   =========================== */
.logo-above {
  position: relative;
  padding: 3rem 1rem 1rem;
  background-color: var(--color-white);
  display: flex;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
}

.logo {
  max-width: 300px;
  height: auto;
}

/* ===========================
   Titel & Slogan
   =========================== */
.header-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  padding-inline: clamp(1rem, 4vw, 2rem); /* gleichmäßiger Abstand von links/rechts */
}

.title {
  font-size: 3rem;
  text-align: center;
  margin-bottom: 0.5rem;
  max-width: 90vw;
  margin-inline: auto;
}

.title .grey {
  color: var(--color-grey);
}

.title .red {
  color: var(--color-red);
}

.subtitle {
  font-size: 1.5rem;
  text-align: center;
  margin-bottom: 2rem;
  max-width: 80vw;
  margin-inline: auto;
}

.slogan {
  text-align: center;
  max-width: 90vw;
  margin-inline: auto;
}

/* ===========================
   Responsive: Mobile Ansicht
   =========================== */
@media (max-width: 480px) {
  .title {
    font-size: 1.6rem;
    line-height: 1.3;
  }

  .subtitle {
    font-size: 1.1rem;
    line-height: 1.4;
  }
}

/* ===========================
   Navigation – Mobile First
   =========================== */
.main-nav {
  position: absolute;
  top: 60px;
  left: 0;
  right: 0;
  width: 100%;
  background: var(--color-white);
  transform: translateY(-100%);
  transition: transform 0.3s ease-out;
  z-index: 1000;
  padding-top: 0.3rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.main-nav.open {
  transform: translateY(0);
}

.main-nav ul {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: 1.5rem;
  list-style: none;
  padding: 0 1rem;
  margin: 0.2rem 0 0 0;
  height: 5rem;
  align-items: center;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.main-nav ul::-webkit-scrollbar {
  display: none; /* Chrome/Safari: Scrollbar ausblenden */
}

.main-nav a {
  color: var(--color-grey);
  position: relative;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  white-space: nowrap;
  display: inline-flex;
  padding: 0.8rem 0;
  line-height: 1.2rem;
  align-items: center;
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: -0.5px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--color-red);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s;
}

.main-nav a:hover {
  color: var(--color-red);
}

.main-nav a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.main-nav a.active {
  color: var(--color-red);
}

.main-nav a.active::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* ===========================
   Responsive Navigation – Desktop
   =========================== */
@media (min-width: 768px) {
  .main-nav {
    position: static;
    transform: none;
    background: transparent;
    box-shadow: none;
  }

  .main-nav ul {
    justify-content: center;
    margin: 0;
    gap: 2rem;
  }

}

/* ===========================
   Reveal Animationen
   =========================== */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* ===========================
   Betreuerbereich – Layout & Portrait
   =========================== */
.white-section {
  background-color: var(--color-light-grey);
}

.betreuer {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: flex-start;
  justify-content: center;
}

.left,
.right {
  flex: 1 1 100%;
  max-width: 100%;
}

.portrait {
  flex: 1 1 300px;
  max-width: 400px;
  width: 100%;
  height: auto;
  border-radius: 1rem;
  object-fit: cover;
}

.rounded {
  border-radius: 1rem;
}

.info {
  flex: 1;
  max-width: 100%;
  padding: 1rem;
}

.info h2 {
  color: var(--color-red);
  text-transform: uppercase;
  margin-top: 0;
  text-align: left;
}

.kontaktbox p:first-of-type {
  margin-top: 3rem;
}

/* ===========================
   Betreuerbereich – Desktop
   =========================== */
@media (min-width: 768px) {
  .betreuer {
    gap: 4rem;
    justify-content: flex-start;
  }

  .left,
  .right {
    flex: 1 1 300px;
    max-width: 400px;
  }

  .info {
    max-width: 600px;
  }

  .info h2 {
    text-align: left;
  }
}

/* ===========================
   Kontaktbereich – Mobile First
   =========================== */
#kontakt {
  background-color: var(--color-white);
  padding: 2rem 0;
}

#kontakt .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.kontakt-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 3rem;
  justify-content: flex-start;
  align-items: stretch;
  width: 100%;
}

/* Karten-Spalte */
.karte {
  flex: 1 1 300px;
  max-width: 600px;
  border-radius: 1rem;
  overflow: hidden;
}

.karte img {
  width: 100%;
  height: auto;
  display: block;
}

/* Info-Spalte */
.kontakt-infos {
  flex: 1 1 300px;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  justify-content: stretch;
  height: auto;
  gap: 1rem;
}

.kontakt-infos .info-box {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  background-color: var(--color-light-grey);
  padding: 1rem;
  border-radius: 6px;
  font-size: 1.1rem;
}

.kontakt-infos .info-box:nth-of-type(1) {
  flex-grow: 1;
}

.kontakt-infos .info-box:nth-of-type(2) {
  flex-grow: 1.2;
}

.kontakt-infos .info-box:nth-of-type(3) {
  flex-grow: 2;
}

.kontakt-infos .info-box p {
  margin: 0.3rem 0;
}

.kontakt-infos .info-box p:first-child {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.kontakt-infos .info-box p i {
  flex-shrink: 0;
  margin-top: 0.2rem;
}

.kontakt-infos .info-box p:nth-child(n+2) {
  margin-left: 1.6rem;
}

/* ===========================
   FAQ Bereich
   =========================== */
#faq h2 {
  text-align: center;
}

.faq-list {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  border: 1px solid var(--color-grey);
  border-radius: 6px;
  overflow: hidden;
}

/* Fragezeile */
.faq-question {
  background-color: var(--color-light-grey);
  padding: 1rem;
  cursor: pointer;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.3s;
}

.faq-text {
  flex-grow: 1;
  margin-right: 1rem;
}

/* Iconwechsel bei geöffnetem Akkordeon */
.faq-icon::before {
  content: "？"; /* Fullwidth Fragezeichen */
  font-size: 1.4rem;
  color: var(--color-red);
  transition: content 0.3s ease;
}

.faq-item.open .faq-icon::before {
  content: "！"; /* Fullwidth Ausrufezeichen */
}

/* Antwortbereich */
.faq-answer {
  height: 0;
  overflow: hidden;
  opacity: 0;
  transition: height 0.4s ease, opacity 0.4s ease;
  padding: 0 1rem;
}

.faq-item.open .faq-answer {
  opacity: 1;
  padding: 1rem;
}


/* ===========================
   Footer – Mobile First
   =========================== */
.footer {
  background-color: var(--color-white);
  padding: 1rem 0;
}

.footer-grid {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-grid a {
  text-decoration: none;
  color: var(--color-grey);
}

.footer-grid a:hover {
  color: var(--color-red);
}

@media (min-width: 768px) {
  .footer-grid {
    gap: 2rem;
  }

  .footer-grid ul {
    flex-direction: row;
    gap: 1rem;
  }
}

/* ===========================
   Popup – INFORMATION
   =========================== */
.popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, 30px);
  width: 90%;
  max-width: 500px;
  background: var(--color-grey);
  color: var(--color-white);
  padding: 2rem 1.5rem;
  border-radius: 12px;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.3);
  z-index: 10001;
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.4s ease;
  text-align: center;
}

.popup-title {
  display: block;
  font-weight: bold;
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.popup-message {
  font-size: 1rem;
  line-height: 1.5;
  margin: 0;
}

.popup.show {
  opacity: 1;
  transform: translate(-50%, -50%);
}

.popup.hidden {
  display: none;
}

.popup button {
  position: absolute;
  top: 0.7rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--color-white);
  font-size: 1.4rem;
  cursor: pointer;
}

@media (max-width: 480px) {
  .popup {
    width: 90vw;
    font-size: 0.95rem;
    padding: 1.2rem 1rem;
  }
}

/* ===========================
   Unschärfe-Effekt – Blur-Schicht
   =========================== */
#blur-layer {
  position: fixed;
  inset: 0;
  backdrop-filter: blur(5px);
  background: rgba(0, 0, 0, 0.2);
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

#blur-layer.active {
  opacity: 1;
  pointer-events: auto;
}

/* ===========================
   Universeller Link-Hover-Effekt
   =========================== */
.hover-link {
  color: var(--color-black);
  position: relative;
  text-decoration: none;
  font-weight: 500;
  display: inline-block;
}

.hover-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--color-red);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

.hover-link:hover {
  color: var(--color-red);
}

.hover-link:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Blocksatz für Impressum & Datenschutz */
.legalbox p {
  text-align: justify;
}

/* Farbdefinition für Links */
.legalbox a:not(.hover-link) {
  color: var(--color-red);
  text-decoration: none;
  font-weight: 500;
}


html, body {
  overflow-x: hidden;
}