/* Basis-Reset */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: Arial, sans-serif; line-height: 1.6; color: #333; }
a { text-decoration: none; color: inherit; }

/* Header */
header {
  background-color: #fff;
  border-bottom: 1px solid #ccc;
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  z-index: 1000;
}
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0px 0;
}
.logo { font-size: 24px; font-weight: bold; }
nav ul {
  list-style: none;
  display: flex;
}
nav ul li { margin-left: 20px; }



/* Hero-Bereich */
.hero {
  background: url('startbild.webp') no-repeat center center/cover;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  position: relative;
}
.hero::after {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}
.hero-content {
  margin-left: 600px;
  margin-top: 200px;
  padding: 20px;
  border-radius: 8px;
  position: relative;
  z-index: 2;
}
.hero h1 { font-size: 48px; margin-bottom: 20px; }
.hero p { font-size: 24px; margin-bottom: 30px; }
.hero .btn {
  padding: 10px 30px;
  background-color: #e67e22;
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 18px;
}

/* Allgemeine Sektionen */
section {
  padding: 80px 0;
}
.section-title {
  text-align: center;
  margin-bottom: 40px;
  font-size: 32px;
}

/* Über mich */
.about {
  background-color: #f9f9f9;
}
.about-content {
  max-width: 800px;
  margin: 0 auto;
}
.about-content p {
  font-size: 18px;
  margin-bottom: 20px;
}

/* Leistungen */
.services {
  background-color: #fff;
}

.service-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

/* Das übergeordnete Element erhält nur Breite, Margin und Perspektive */
.service-card {
  width: calc(33.333% - 40px);
  margin: 10px;
  perspective: 1000px;
  height: 430px;
  /* min-width: 300px; */
}

/* Enthält beide Seiten (Front & Back) und steuert die Rotation */
.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

/* Beim Flippen rotiert die innere Karte */
.service-card.flipped .card-inner {
  transform: rotateY(180deg);
}

/* Vorder- und Rückseite: Absolute Positionierung, damit sie exakt übereinander liegen */
.card-front,
.card-back {
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  backface-visibility: hidden;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  text-align: center;
  padding: 20px;
  background: #f9f9f9;
}

/* Frontseite – exakte Übernahme der ursprünglichen Styles */
.card-front img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 15px;
}
.service-card img {
  margin-bottom: 0px;
  width: 320px;
  height: 320px;
  object-fit: cover;
}
.card-front h3 {
  font-size: 20px;
  margin-bottom: 10px;
}

/* Rückseite – Flippt um 180° und erhält eine abgesetzte Gestaltung */
.card-back {
  transform: rotateY(180deg);
  background: #333;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Padding beibehalten, damit der Text nicht am Rand klebt */
  padding: 20px;
}

/* Kontakt */
.contact {
  background-color: #fff;
}
.contact-form {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}
.contact-form form {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 10px;
  margin-bottom: 20px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 16px;
}
.contact-form button {
  padding: 10px 30px;
  background-color: #5DA8B2;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 18px;
  cursor: pointer;
}

/* Impressum */
.impressum {
  padding: 80px 20px;
  background-color: #fff;
}
.impressum h1 {
  text-align: center;
  font-size: 32px;
  margin-bottom: 20px;
}
.impressum p {
  max-width: 800px;
  margin: 0 auto;
  font-size: 18px;
  line-height: 1.6;
  white-space: pre-line;
}

/* Footer */
footer {
  background-color: #333;
  color: #fff;
  text-align: center;
  padding: 20px 0;
}
.mobile-nav-btn {
  display: none;
}

/* Responsive Anpassungen */
@media (max-width: 768px) {
  .mobile-nav-btn {
    display: block;
  }
  .nav {
    padding: 20px;
  }

  .nav-menu {
    display: none;
  
  }

  /* Navigation initial ausblenden */
  nav ul {
    position: absolute;
    top: 70px;
    right: 0;
    background-color: #fff;
    width: 200px;
    flex-direction: column;
    border: 1px solid #ccc;
    display: none;
  }
  /* Navigation anzeigen, wenn aktiv */
  nav ul.active {
    display: flex;
  }
  nav ul li {
    margin: 0;
    padding: 10px;
    border-bottom: 1px solid #eee;
  }
  nav ul li:last-child {
    border-bottom: none;
  }
  .hero-content {
    margin: 0;
    padding: 20px;
  }
  .service-card {
    width: calc(50% - 20px);
  }
  .impressum h1 {
    font-size: 28px;
  }
  .impressum p {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 32px;
  }
  .hero p {
    font-size: 18px;
  }
  .service-card {
    width: 100%;
    margin: 10px 0;
  }
  .impressum h1 {
    font-size: 24px;
  }
  .impressum p {
    font-size: 14px;
  }
}



/* mobile-sidenav */

.mobile-sidenav {
  height: 100%;
  width: 0;
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;
  background-color: #333;
  overflow-x: hidden;
  transition: 0.5s;
  padding-top: 60px;
}

.mobile-sidenav a {
  padding: 8px 8px 8px 32px;
  text-decoration: none;
  font-size: 25px;
  color: #818181;
  display: block;
  transition: 0.3s;
}

.mobile-sidenav a:hover {
  color: #f1f1f1;
}

.mobile-sidenav .closebtn {
  position: absolute;
  top: 0;
  right: 25px;
  font-size: 36px;
  margin-left: 50px;
}

@media screen and (max-height: 450px) {
  .mobile-sidenav {padding-top: 15px;}
  .mobile-sidenav a {font-size: 18px;}
}
