/* Sharp Typing Animation */
@keyframes sharpTyping {
  0% {
    opacity: 0;
    filter: blur(12px);
    transform: scale(1.3);
  }
  50% {
    opacity: 0.7;
    filter: blur(8px);
    transform: scale(1.1);
  }
  100% {
    opacity: 1;
    filter: blur(0);
    transform: scale(1);
  }
}

.typing-animation {
  display: inline-block;
  font-family: "Inter", sans-serif;
  position: relative;
  font-weight: 600;
}

.typing-animation span {
  display: inline-block;
  opacity: 0;
  animation: sharpTyping 0.7s ease-out forwards;
  color: inherit;
}

:root {
  --primary-color: #0071e3;
  --text-color: #1d1d1f;
  --light-gray: #f5f5f7;
  --border-color: #e6e6e6;
  --transition-time: 0.3s;
  --background-color: white;

  /* Neue Basis-Variablen */
  --base-font-size: 1.1rem; /* 10% größer */
  --section-spacing: 6rem; /* Vertikale Abstände */
  --content-padding: 5%; /* Seitenränder */
  --button-size: 3.5rem; /* Basis-Größe für runde Buttons */
  --button-spacing: 1rem; /* Abstand zwischen Buttons */
  --footer-safe-area: 1rem; /* Sicherheitsabstand zum Footer */
  --min-tap-size: 44px; /* Minimale Touch-Fläche */
}

:root.dark-mode {
  --text-color: #e0e0e0;
  --background-color: #1d1d1f;
  --primary-color: #5588ff;
  --border-color: #333;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: var(--text-color);
  background-color: var(--background-color);
  line-height: 1.6;
  overflow-x: hidden;
  font-size: var(--base-font-size);
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 5%;
  position: sticky;
  top: 0;
  background-color: var(--background-color);
  backdrop-filter: saturate(180%) blur(20px);
  z-index: 100;
  transition: background-color var(--transition-time);
}

/* Dark Mode Anpassungen für Header */
:root.dark-mode header {
  background-color: var(--background-color);
}

/* Neue Styles für den oberen Bereich */
.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background-color: var(--background-color);
  z-index: 1;
}

.hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background-color: var(--background-color);
  z-index: 1;
}

:root.dark-mode .hero::before,
:root.dark-mode .hero::after {
  background-color: var(--background-color);
}

.logo {
  flex-shrink: 0;
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: -0.5px;
  transition: color var(--transition-time);
  display: flex;
  align-items: center;
  gap: 10px;
  height: 60px; /* Feste Höhe für die Navbar */
}

#nav-logo {
  width: 64px; /* Doppelte Größe */
  height: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  display: block;
}

#nav-logo.visible {
  opacity: 1;
  visibility: visible;
}

/* Für mobile Ansicht */
@media (max-width: 768px) {
  #nav-logo {
    width: 48px; /* Doppelte Größe vom ursprünglichen mobilen Wert */
  }
}

nav {
  margin-left: auto;
  display: flex;
  justify-content: flex-end;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 30px;
  justify-content: flex-end;
}

nav ul li {
  position: relative;
  margin-left: 0;
}

nav ul li a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 400;
  font-size: 0.9rem;
  opacity: 0.8;
  transition: opacity var(--transition-time);
  position: relative;
  padding-bottom: 3px;
}

nav ul li a:hover {
  opacity: 1;
}

nav ul li a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--primary-color);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

nav ul li a:hover::after {
  transform: scaleX(1);
}

.hamburger-menu {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 24px;
  cursor: pointer;
  margin-left: auto;
  padding: 4px 0;
  z-index: 1000;
  position: relative;
}

.hamburger-menu .bar {
  width: 24px;
  height: 2px;
  background-color: var(--text-color);
  transition: transform 0.3s ease-in-out, opacity 0.2s ease-in-out;
  position: absolute;
  left: 0;
}

.hamburger-menu .bar:nth-child(1) {
  top: 4px;
  transform-origin: top left;
}

.hamburger-menu .bar:nth-child(2) {
  top: 11px;
  transform-origin: center;
}

.hamburger-menu .bar:nth-child(3) {
  bottom: 4px;
  transform-origin: bottom left;
}

.hamburger-menu.active .bar:nth-child(1) {
  transform: rotate(45deg) translate(1px, -2px);
}

.hamburger-menu.active .bar:nth-child(2) {
  opacity: 0;
  transform: translateX(-10px);
}

.hamburger-menu.active .bar:nth-child(3) {
  transform: rotate(-45deg) translate(1px, 2px);
}

@media (max-width: 768px) {
  nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    margin-left: 0;
    background-color: var(--background-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 20px 0;
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
  }

  nav.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
  }

  nav ul {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
  }

  nav ul li {
    margin: 0;
    width: 100%;
    text-align: center;
  }

  nav ul li a {
    display: block;
    padding: 10px 0;
    font-size: 1.1rem;
  }

  .hamburger-menu {
    display: flex;
    z-index: 100;
  }

  .desktop-bg {
    display: none !important; /* Video ausblenden */
  }

  .mobile-bg {
    display: block !important; /* Statisches Bild einblenden */
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}

.hero {
  min-height: 80vh;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 5%;
  background-image: none;
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-media::after {
  display: none;
}

.desktop-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  min-height: 100%;
  min-width: 100%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.mobile-bg {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 1rem;
}

.hero-logo {
  width: 180px;
  height: auto;
  margin-bottom: 2rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Dark mode Anpassung für das Logo */
:root.dark-mode .hero-logo {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4)) brightness(1.1);
}

/* Entfernen des alten Logo-Styles */
.section-logo {
  display: none;
}

.hero h1 {
  font-size: 4rem;
  font-weight: 600;
  letter-spacing: -1px;
  margin-bottom: 10px;
  line-height: 1.1;
  color: white;
}

.hero p {
  font-size: 1.25rem;
  font-weight: 300;
  max-width: 600px;
  margin-bottom: 30px;
  opacity: 0.9;
  color: white;
}

.btn {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-time);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  text-decoration: none;
}

.btn:hover {
  background-color: #004c99;
  color: #ffffff;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

section {
  padding: 80px 5%;
  border-bottom: 1px solid var(--border-color);
}

section h2 {
  font-size: 2.5rem;
  font-weight: 600;
  margin-bottom: 20px;
  text-align: center;
}

section h3 {
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 15px;
  margin-top: 30px;
  text-align: center;
}

section p {
  font-size: 1.1rem;
  max-width: 800px;
  margin: 0 auto 30px;
  opacity: 0.9;
}

.services-grid {
  display: grid;
  gap: 2rem;
  padding: 1rem;
  margin: 0 auto;
  max-width: 1400px;
  width: 100%;
}

/* Großer Desktop - 4 Spalten */
@media screen and (min-width: 1401px) {
  .services-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Desktop - 3 Spalten */
@media screen and (min-width: 1201px) and (max-width: 1400px) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Tablet - 2 Spalten */
@media screen and (min-width: 769px) and (max-width: 1200px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobil - 1 Spalte */
@media screen and (max-width: 768px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
}

.service-item {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 2rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.service-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
}

.service-item h3 {
  position: relative;
  display: inline-block;
  padding-bottom: 0.5rem;
  color: #0066cc;
  min-height: 4.5em; /* Reserviert Platz für 3 Zeilen Text */
  margin-top: 0;
  margin-bottom: 1rem;
  line-height: 1.5;
}

/* Mobile Anpassung für Überschriften */
@media screen and (max-width: 768px) {
  .service-item h3 {
    min-height: 3em; /* Reduziert auf 2 Zeilen für mobile Ansicht */
  }
}

.service-item h3::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--primary-color);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.service-item:hover h3::after {
  transform: scaleX(1);
}

/* Dark theme anpassungen */
[data-theme="dark"] .service-item {
  background: rgba(0, 0, 0, 0.2);
}

:root.dark-mode .service-item h3::after,
:root.dark-mode nav ul li a::after {
  background-color: var(--primary-color);
  opacity: 0.8;
}

.contact-info {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.contact-info p {
  font-size: 1.1rem;
  margin-bottom: 20px;
  margin: 2px 0;
}

.contact-phone,
.contact-email {
  font-size: 1.2em;
  color: #0066cc;
  text-decoration: underline;
  display: inline-block;
  margin-top: 2px;
  transition: opacity var(--transition-time);
}

.hamburger-menu.active {
  transform: rotate(0deg);
}

footer {
  text-align: center;
  padding: 40px 5%;
  background-color: var(--background-color);
  border-top: 1px solid var(--border-color);
  position: relative;
  z-index: 1;
  margin-bottom: 3rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 20px;
}

.footer-links {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: #333;
  text-decoration: none;
  margin: 0 10px;
}

.footer-links a:hover {
  text-decoration: underline;
  color: #0066cc;
}

.copyright {
  font-size: 0.9rem;
  opacity: 0.7;
  color: #333;
}

/* Dark theme specific styles */
[data-theme="dark"] .footer-links a {
  color: #fff;
}

[data-theme="dark"] .copyright {
  color: #fff;
}

@media (max-width: 768px) {
  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
    gap: 1rem;
  }
}

/* Theme Toggle Button */
.theme-toggle {
  position: fixed;
  width: var(--button-size);
  height: var(--button-size);
  border-radius: 50%;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  transition: all 0.3s ease;
  min-width: var(--min-tap-size);
  min-height: var(--min-tap-size);
  bottom: calc(var(--footer-safe-area) + var(--button-spacing));
  right: calc(var(--button-size) + var(--button-spacing) * 2);
  background-color: #ffffff;
  color: #000000;
  border: 2px solid #0066cc;
}

/* Email Button */
.email-button {
  position: fixed;
  width: var(--button-size);
  height: var(--button-size);
  border-radius: 50%;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  transition: all 0.3s ease;
  min-width: var(--min-tap-size);
  min-height: var(--min-tap-size);
  bottom: calc(var(--footer-safe-area) + var(--button-spacing));
  right: var(--button-spacing);
  background-color: #0066cc;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.theme-toggle svg {
  width: 1.5rem;
  height: 1.5rem;
  stroke: var(--text-color);
  stroke-width: 2;
  fill: none;
  transition: transform 0.3s ease;
}

.theme-toggle .sun-icon {
  position: absolute;
  opacity: 0;
}

.theme-toggle .moon-icon {
  position: absolute;
  opacity: 1;
}

:root.dark-mode .theme-toggle .sun-icon {
  opacity: 1;
}

:root.dark-mode .theme-toggle .moon-icon {
  opacity: 0;
}

/* Dark Mode Anpassungen */
:root.dark-mode .theme-toggle {
  background: rgba(29, 29, 31, 0.3);
  border-color: rgba(255, 255, 255, 0.1);
}

/* Responsive Anpassungen für Buttons */
@media screen and (max-width: 480px) {
  .theme-toggle {
    right: 6rem;
  }
}

.email-button svg {
  width: 1.5rem;
  height: 1.5rem;
  stroke: var(--text-color);
  stroke-width: 2;
  fill: none;
}

:root.dark-mode .email-button {
  background: rgba(29, 29, 31, 0.3); /* Dunklerer, transparenter Hintergrund */
  border-color: rgba(255, 255, 255, 0.1);
}

.start-section {
  padding: 80px 5%;
  background-color: var(--background-color);
}

.start-content {
  max-width: 1200px;
  margin: 0 auto;
}

.start-content img {
  display: none;
}

.start-text {
  text-align: center;
}

.start-text h1 {
  font-size: 3rem;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 1rem;
}

.start-text h2 {
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--text-color);
  margin-bottom: 2rem;
  opacity: 0.9;
}

.start-text p {
  font-size: 1.1rem;
  max-width: 800px;
  margin: 0 auto 2rem;
  opacity: 0.9;
}

.start-features {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  max-width: 1000px;
  margin: 2rem auto;
}

.start-features li {
  font-size: 1.1rem;
  padding: 1.25rem 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.start-features li::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(var(--primary-color), 0.03),
    transparent
  );
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.start-features li:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.1);
  border-color: rgba(var(--primary-color), 0.3);
  background: rgba(var(--primary-color), 0.03);
}

.start-features li:hover::before {
  transform: translateX(100%);
}

.section-divider {
  width: 100%;
  height: auto;
  overflow: hidden;
  position: relative;
}

.divider-image {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}

@media (min-width: 900px) {
  .section-divider {
    max-width: 900px;
    margin: 0 auto;
  }
}

/* Dark Mode Anpassungen */
:root.dark-mode .start-features li {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.1);
}

:root.dark-mode .start-features li:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(var(--primary-color), 0.4);
}

@media (max-width: 768px) {
  .desktop-bg {
    display: block;
  }

  .mobile-bg {
    display: none;
  }

  .section-divider {
    height: 250px;
  }
}

.privacy-section {
  max-width: 800px;
  margin: 120px auto 40px;
  padding: 0 20px;
}

.privacy-section h1 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  color: var(--text-color);
}

.privacy-section h2 {
  font-size: 1.8rem;
  margin: 2rem 0 1rem;
  color: var(--text-color);
  text-align: left;
  margin-top: 2em;
  margin-bottom: 1em;
}

.privacy-section h3 {
  font-size: 1.4rem;
  margin: 1.5rem 0 1rem;
  color: var(--text-color);
}

.privacy-section p,
.privacy-section ul {
  margin-bottom: 1rem;
  line-height: 1.6;
}

.privacy-section ul {
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) and (max-width: 845px) {
  .hero-media {
    height: 100%; /* Container füllt weiterhin die Höhe */
    /* aspect-ratio entfernt */
  }
  .desktop-bg {
    object-fit: cover;
    object-position: center;
  }
}
