@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
  border: none;
  outline: none;
  scroll-behavior: smooth;
  font-family: "Poppins", sans-serif;
}

:root {
  --bg-color: #ffffff;
  --second-bg-color: #797e81;
  --text-color: #333333;
  --main-color: #333333; /* rgb(25, 190, 230) */
  --header-height: 6rem; /* Höhe der Navigation */
}

html {
  font-size: 62.5%;
  overflow-x: hidden;
}

body {
  background: var(--bg-color);
  color: var(--text-color);
}

.header {
  display: flex;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
  height: 70px;
  background-color: rgba(255, 255, 255, 0.121);
  backdrop-filter: blur(5px);
  box-shadow: 0 0 15px #72a1dea2;
  z-index: 999;
}

.header .social-icons {
  display: flex;
  justify-content: flex-start;
  gap: 0.5rem; /* Abstand zwischen den Social-Media-Icons */
}

.header .social-icons a {
  position: relative;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 30px;
  height: 30px;
  background: transparent;
  border: 0.2rem solid var(--main-color);
  border-radius: 50%;
  font-size: 20px;
  color: var(--main-color);
  z-index: 1;
  overflow: hidden;
  transition: 0.5s;
}

.header .social-icons a:hover {
  color: var(--bg-color);
}

.header .social-icons a::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: var(--main-color);
  z-index: -1;
  transition: 0.5s;
}

.header .social-icons a:hover::before {
  width: 100%;
}

.header.sticky {
  background: var(--bg-color); /* Füge hier eine feste Hintergrundfarbe hinzu */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Optional: Schatteneffekt */
}

.logo {
  position: relative;
  left: 5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 60px; /* feste Höhe */
  margin-left: 20px;
  padding-top: 0; /* ggf. anpassen */
}

.logo-link {
  text-decoration: none;
  color: var(--text-color);
}

.logo-link h1 {
  font-size: 3rem;
  font-weight: bold;
  margin: 0;
  color: inherit; /* übernimmt die Farbe vom Link */
}

.logo-link:hover h1 {
  color: var(--text-color); /* z. B. beim Hover */
}

.lang-dropdown {
  position: relative;
  display: inline-block;
  margin-left: -4rem;
}

.lang-btn {
  background: transparent;
  border: 2px solid var(--main-color);
  border-radius: 50%;
  padding: 4px;
  width: 30px;
  height: 30px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lang-btn img {
  width: 18px;
  height: 18px;
  border-radius: 50%;
}

.lang-menu {
  position: absolute;
  top: 36px; /* reduziert die Lücke */
  right: 0;
  display: none;
  flex-direction: column;
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
  padding: 0.5rem;
  z-index: 1000;
}

/* ❗️Das ist die entscheidende Regel */
.lang-dropdown:hover .lang-menu {
  display: flex;
}

.lang-menu a {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.5rem;
  border-radius: 8px;
  transition: 0.3s;
}

.lang-menu a:hover {
  background-color: rgba(114, 161, 222, 0.1);
}

.lang-menu img {
  width: 20px;
  height: 20px;
  display: block;
}

.lang-menu {
  top: 30px; /* oder 32px statt 40px */
  transition: opacity 0.2s ease;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 30px; /* oder 64px je nach Größe der Flaggen */
  min-width: 30px; /* optional, für Sicherheit */
}

.lang-dropdown:hover .lang-menu {
  opacity: 1;
  pointer-events: auto;
}

.navbar {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.25rem 3.5rem;
  gap: 4rem;
  border-radius: 60px;
  background: rgba(130, 146, 186, 0.2);
  backdrop-filter: blur(20px);
  box-shadow: 0 0 20px rgba(94, 116, 145, 0.3);
}

.navbar.scrolled {
  background: var(--bg-color); /* Hintergrundfarbe bei Scrollen */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Optional: Schatten */
}

.navbar a {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-color);
  transition: 0.3s;
}

.navbar a.active {
  color: var(--main-color);
  text-decoration: none;
}

.navbar a:hover {
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
  transform: translateY(-2px);
  color: var(--main-color);
  text-decoration: underline;
}

#menu-icon {
  position: relative;
  font-size: 3.6rem;
  color: var(--text-color);
  cursor: pointer;
  display: none;
}

.heading {
  position: relative;
  font-size: 5rem;
  margin-bottom: 3rem;
  text-align: center;
}

span {
  color: var(--main-color);
}

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  padding: 2rem 9%;
  background: var(--bg-color);
}

.footer-text p {
  font-size: 1.6rem;
}

.footer-iconTop a {
  position: relative;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 0.8rem;
  background: var(--main-color);
  border: 0.2rem solid var(--main-color);
  border-radius: 0.6rem;
  z-index: 1;
  overflow: hidden;
}

.footer-iconTop a::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: var(--second-bg-color);
  z-index: -1;
  transition: 0.5s;
}

.footer-iconTop a:hover::before {
  width: 100%;
}

.footer-iconTop a i {
  font-size: 2.4rem;
  color: var(--bg-color);
  transition: 0.5s;
}

.footer-iconTop a:hover i {
  color: var(--main-color);
}

/* ANIMATION RELOAD AND SCROLL */
.animate {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-color);
  z-index: 98;
}

.animate.home-img {
  width: 50%;
}

.logo .animate,
.navbar .animate,
#menu-icon .animate,
.home.show-animate .animate {
  animation: showRight 1s ease forwards;
  animation-delay: calc(0.3s * var(--i));
}

.animate.scroll {
  transition: 1s ease;
  transition-delay: calc(0.3s / var(--i));
  animation: scroll;
}

section:nth-child(odd) .animate.scroll {
  background: var(--second-bg-color);
}

.about.home.show-animate .animate.scroll {
  transition-delay: calc(0.3s * var(--i));
  width: 0;
}

#menu-icon {
  font-size: 3rem;
  cursor: pointer;
  display: none;
  border: 2px solid var(--main-color); /* Rahmen */
  padding: 0.5rem;
  border-radius: 0.5rem;
}

.navbar.active .lang-dropdown {
  margin-left: auto;
  margin-right: 2rem; /* oder was optisch passt */
}


.bx-x {
  color: var(--main-color);
}


/* BREAKPOINTS */
@media (max-width: 1200px) {
  html {
    font-size: 55%;
  }
}

@media (max-width: 991px) {
  .header {
    padding: 2rem 4%;
  }

  section {
    padding: 10rem 4% 2rem;
  }

  .home {
    padding: 0 4%;
  }

  .footer {
    padding: 2rem 4%;
  }
}

@media (max-width: 850px) {
  .animate.home-img {
    width: 55%;
  }
}

@media (max-width: 768px) {
  /* Verstecke Social Icons im Header */
  .header .social-icons {
    display: none;
  }

  /* Menü-Icon ganz nach rechts schieben */
  #menu-icon {
    margin-left: auto;
    margin-right: 0;
    order: 3; /* stellt sicher, dass es ganz rechts ist */
  }

  .header {
    justify-content: flex-start;
    gap: 1rem;
  }

  .logo {
    margin-left: 0;
    order: 1;
  }

  .navbar {
    order: 2;
  }
}

/* ======================== */
/* 📱 MAX-WIDTH: 768px     */
/* iPad & große Smartphones */
/* ======================== */
@media (max-width: 768px) {
  html {
    font-size: 55%;
  }

  /* Header */
  .header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 1rem;
    padding: 0 2rem;
    background: var(--bg-color);
  }

  .logo {
    margin-left: 0;
    order: 1;
  }

  .header .social-icons {
    display: none;
  }

  #menu-icon {
    display: block;
    margin-left: auto;
    order: 3;
    font-size: 3.2rem;
    border: 2px solid var(--main-color);
    padding: 0.5rem;
    border-radius: 0.5rem;
    color: var(--main-color);
    cursor: pointer;
  }

  .navbar {
    order: 2;
    position: absolute;
    top: 100%;
    left: -100%;
    width: 100%;
    padding: 2rem;
    background: white;
    flex-direction: column;
    align-items: flex-start;
    transition: left 0.3s ease;
    z-index: 999;
  }

  .navbar.active {
    left: 0;
  }

  .navbar a {
    margin: 1.5rem 0;
    font-size: 2rem;
  }

  /* Sonstige Layout-Anpassungen */
  .home-imgHover {
    pointer-events: none;
    background: var(--bg-color);
    opacity: 0.6;
  }

  .vision-mission-container {
    flex-direction: column;
  }

  .vision,
  .values,
  .mission {
    flex: none;
    width: 100%;
  }

  .about_me-content {
    flex-direction: column;
    align-items: center;
  }

  .about_me-img {
    margin-bottom: 2rem;
  }

  .about_me-content p {
    text-align: center;
  }
}

/* ======================== */
/* 📱 MAX-WIDTH: 520px     */
/* Kleine Smartphones        */
/* ======================== */
@media (max-width: 520px) {
  html {
    font-size: 50%;
  }

  .home-content h1 {
    display: flex;
    flex-direction: column;
  }

  .home-sci {
    width: 160px;
  }

  .home-sci a {
    width: 38px;
    height: 38px;
  }

  .flip-container {
    width: 100%;
    height: auto;
    min-height: 280px;
  }

  .flip-front h3,
  .flip-front p,
  .flip-back p,
  .flip-back a {
    font-size: 1.4rem;
  }

  .flip-back a {
    padding: 0.6rem 1rem;
  }

  .detail-card {
    padding: 1.5rem;
  }

  .detail-card h3 {
    font-size: 2rem;
  }

  .detail-card p,
  .detail-card ul {
    font-size: 1.3rem;
  }

  .detail-card ul {
    margin-left: 2rem;
  }
}

/* ======================== */
/* 📱 MAX-WIDTH: 462px     */
/* Sehr kleine Phones        */
/* ======================== */
@media (max-width: 462px) {
  .home-content h1 {
    font-size: 5.2rem;
  }

  .education {
    padding: 10rem 4% 5rem 5%;
  }

  .contact form .input-box .input-field {
    width: 100%;
  }

  .footer {
    flex-direction: column-reverse;
  }

  .footer p {
    margin-top: 2rem;
    text-align: center;
  }
}

/* ======================== */
/* 📱 MAX-WIDTH: 371px     */
/* Ultrakompakte Screens     */
/* ======================== */
@media (max-width: 371px) {
  .home {
    justify-content: center;
  }

  .home-content {
    display: flex;
    align-items: center;
    flex-direction: column;
    text-align: center;
  }

  .home-content h1 {
    font-size: 5rem;
  }
}


/* KEYFRAMES */
@keyframes homeBgText {
  0%,
  10%,
  100% {
    background-position: -33rem 0;
  }

  65%,
  85% {
    background-position: 0 0;
  }
}

@keyframes homeCursorText {
  0%,
  10%,
  100% {
    width: 0;
  }

  65%,
  78%,
  85% {
    width: 100%;
    opacity: 1;
  }

  75%,
  81% {
    opacity: 0;
  }
}

@keyframes aboutSpinner {
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@keyframes showRight {
  100% {
    width: 0;
  }
}