
:root {
  --bg-dark: #0f172a;
  --bg-light: #f9fafb;
  --card-dark: #1e293b;
  --card-light: #ffffff;
  --text-dark: #f1f5f9;
  --text-light: #1e293b;
  --accent: #3b82f6;
}

html[data-theme='dark'] {
  --bg: var(--bg-dark);
  --card: var(--card-dark);
  --text: var(--text-dark);
}
html[data-theme='light'] {
  --bg: var(--bg-light);
  --card: var(--card-light);
  --text: var(--text-light);
}

body {
  padding: 2rem;

  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  transition: background 0.5s, color 0.5s;
  padding: 0;
}

nav {
  background: #111827;
  color: #fff;
  display: flex;
  justify-content: space-between;
  padding: 1rem 2rem;
  align-items: center;
}

.logo span {
  color: var(--accent);
}
.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}
.nav-links a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
}
#theme-toggle {
  background: none;
  border: none;
  font-size: 1.3rem;
  color: white;
  cursor: pointer;
  transition: transform 0.3s;
}
#theme-toggle:hover {
  transform: scale(1.2);
}

.hero {
  background: linear-gradient(to right, #1e3a8a, #2563eb);
  color: white;
  text-align: center;
  padding: 5rem 2rem;
}
.hero h1 {
  font-size: 2.5rem;
}
.hero h1 span {
  color: #93c5fd;
}
.hero-buttons {
  margin-top: 2rem;
}
.btn {
  padding: 0.8rem 1.5rem;
  margin: 0.5rem;
  border-radius: 8px;
  font-weight: bold;
  border: none;
  cursor: pointer;
}
.btn.primary {
  background: var(--accent);
  color: white;
}
.btn.secondary {
  background: #e5e7eb;
  color: #1f2937;
}
.phone-display {
  margin-top: 1rem;
  font-size: 1.2rem;
}

.section {
  max-width: 960px;
  margin: 3rem auto;
  padding: 2rem;
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}
.service-card {
  background: var(--card);
  padding: 1.5rem;
  border-radius: 12px;
  transition: transform 0.3s, box-shadow 0.3s;
}
.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.3);
}
.service-card .icon {
  font-size: 2rem;
}
.contact-form input,
.contact-form textarea,
.select-wrapper select {
  width: 100%;
  padding: 0.8rem;
  margin-bottom: 1rem;
  border-radius: 8px;
  border: 1px solid #ccc;
}
.select-wrapper {
  margin-bottom: 1rem;
}

/* Ladescreen */
#loader {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.85);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  transition: opacity 0.1s ease;
}
#loader.hide {
  opacity: 0;
  pointer-events: none;
}
.loader-box {
  text-align: center;
}
.loader-spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto 1rem;
  border: 4px solid #60a5fa;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

footer {
  text-align: center;
  padding: 2rem;
  background: #111827;
  color: #aaa;
}
footer a {
  color: #60a5fa;
}

.logo-img img {
  height: 40px;
  margin-right: 1rem;
  vertical-align: middle;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
  padding: 0 1rem;
}

.service-card {
  background: var(--card);
  padding: 1.5rem;
  border-radius: 12px;
  text-align: left;
  transition: transform 0.3s, box-shadow 0.3s;
  perspective: 1000px;
}

.service-card:hover {
  transform: rotateY(8deg) rotateX(-4deg) scale(1.02);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
}

/* Responsive Menü */
@media (max-width: 768px) {
  .nav-links {
    flex-direction: column;
    background: #111827;
    position: absolute;
    top: 60px;
    right: 0;
    display: none;
    padding: 1rem;
  }
  .nav-links.show {
    display: flex;
  }
  .menu-toggle {
    display: block;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
  }
}
.menu-toggle {
  display: none;
}

/* Animierter Seitenaufbau */
.section, .hero, .service-card, .card {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.section.visible, .hero.visible, .service-card.visible, .card.visible {
  opacity: 1;
  transform: none;
}

/* Grid exakt 2x2 auf größeren Screens */
@media (min-width: 768px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.logo-big {
  height: 90px !important;

  height: 55px;
  filter: drop-shadow(0 0 5px rgba(59,130,246,0.5));
}

.service-card .icon img {
  width: 32px;
  height: 32px;
  margin-bottom: 0.5rem;
}

/* Alternierende 3D Hover Effekte */
.service-card:nth-child(even):hover {
  transform: rotateY(-8deg) rotateX(4deg) scale(1.02);
}

/* Über uns Box schöner gestalten */
#about.card {
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  color: white;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  border-radius: 16px;
  padding: 2.5rem;
  text-align: center;
}
#about.card h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}
#about.card p {
  font-size: 1.1rem;
  line-height: 1.6;
}

/* Eigene Icons stilisieren */
.service-card .icon img {
  width: 40px;
  height: 40px;
  margin-bottom: 1rem;
  filter: drop-shadow(0 0 4px rgba(59,130,246,0.5));
}

/* 3D Hover abwechselnd links/rechts */
.service-card:hover {
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
}
.service-card:nth-child(odd):hover {
  transform: rotateY(8deg) rotateX(-4deg) scale(1.02);
}
.service-card:nth-child(even):hover {
  transform: rotateY(-8deg) rotateX(4deg) scale(1.02);
}

body {
  padding: 2rem;

  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

main, .section {
  padding: 3rem 2rem;

  padding: 2rem 1.5rem;
}

.logo-img {
  display: flex;
  align-items: center;
}
.logo-big {
  height: 90px !important;

  height: 60px;
  margin-left: 1rem;
  filter: drop-shadow(0 0 6px rgba(59,130,246,0.5));
}

#about.card {
  animation: fadeInUp 1.2s ease-in-out both;
  background: linear-gradient(120deg, #2563eb, #1e3a8a);
  color: #fff;
  padding: 2.5rem;
  margin-top: 3rem;
  border-radius: 1rem;
}
#about.card h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}
#about.card p {
  font-size: 1.1rem;
  line-height: 1.6;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.service-card .icon img {
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  filter: drop-shadow(0 0 6px rgba(59,130,246,0.6));
}

#about.card {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  padding: 3rem 2rem;
  border-radius: 1rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  text-align: center;
  animation: aboutFade 1s ease-out both;
  transform-origin: bottom center;
}

@keyframes aboutFade {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

#about h2 {
  color: #ffffff;
  font-size: 2rem;
  margin-bottom: 1rem;
}
#about p {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #e0e0e0;
}

.service-card .icon i {
  font-size: 2rem;
  color: #3b82f6;
  margin-bottom: 1rem;
}

#about {
  opacity: 0;
  transform: translateY(30px) scale(0.98);
  transition: all 0.8s ease;
}
#about.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.logo-big {
  height: 90px !important;

  height: 75px;
  margin-left: 1rem;
  filter: drop-shadow(0 0 8px rgba(59,130,246,0.6));
}

#about.card {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  padding: 3rem 2rem;
  border-radius: 1rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  text-align: center;
  animation: aboutFade 1.2s ease-out both;
  transition: transform 0.5s ease;
}
#about.card:hover {
  transform: scale(1.02) rotateX(1deg) rotateY(-1deg);
}
@keyframes aboutFade {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.contact-form .form-group {
  margin-bottom: 1rem;
}
.contact-form label {
  display: block;
  margin-bottom: 0.3rem;
  font-weight: 500;
}
.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  padding: 0.8rem;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 1rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.contact-form label {
  font-weight: 600;
  display: block;
  margin-bottom: 0.3rem;
}
.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
}

.impressum-box {
  background: #f9fafb;
  color: #1f2937;
  border-radius: 12px;
  padding: 2rem;
}
.impressum-grid {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
}
.impressum-grid p {
  margin: 0 0 1rem;
}

.warum-section {
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  color: white;
  border-radius: 16px;
  overflow: hidden;
  animation: fadeInUp 1.2s ease-in-out both;
}

.warum-container {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
  justify-content: space-between;
}

.warum-text {
  flex: 1;
  min-width: 260px;
}

.warum-text p {
  font-size: 1.1rem;
  line-height: 1.6;
}

.warum-bildbox {
  flex: 1;
  position: relative;
  min-width: 300px;
}

.bild-placeholder {
  background: #ffffff22;
  border: 2px dashed #ffffff55;
  border-radius: 12px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-style: italic;
}

.map-card {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 200px;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  transform: translateX(110%);
  transition: transform 0.6s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  z-index: 5;
}

.map-card.open {
  transform: translateX(0);
}

.map-card iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.btn.toggle-map {
  background: #facc15;
  color: #1f2937;
}

.warum-img {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.map-card {
  position: relative;
  top: auto;
  left: auto;
  width: 100%;
  height: 250px;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  transform: scaleY(0);
  transition: transform 0.5s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.map-card.open {
  transform: scaleY(1);
}

.warum-title {
  text-align: center;
  font-size: 2.2rem;
  margin-bottom: 2rem;
}

.warum-container.vertical {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.warum-liste {
  background: rgba(255, 255, 255, 0.1);
  padding: 1.5rem;
  border-radius: 12px;
  width: 100%;
  max-width: 600px;
  text-align: left;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.warum-liste h3 {
  margin-bottom: 1rem;
  font-size: 1.4rem;
  color: #facc15;
}

.warum-liste ul {
  list-style: disc;
  padding-left: 1.5rem;
}

.warum-liste li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.warum-img {
  width: 75%;
  max-width: 500px;
  border-radius: 12px;
  margin-bottom: 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.warum-img:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.btn.toggle-map {
  background: #facc15;
  color: #1f2937;
  transition: background 0.3s ease, transform 0.3s ease;
}

.btn.toggle-map:hover {
  background: #fde68a;
  transform: scale(1.05);
}

.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Navigation Link: Warum Wir - gelb mit Sternanimation */
.nav-links a[href="#warum"] {
  color: #facc15;
  position: relative;
  font-weight: bold;
  animation: sparkleFade 2s infinite;
}

@keyframes sparkleFade {
  0%, 100% {
    text-shadow: 0 0 4px #facc15, 0 0 8px #facc15;
    transform: scale(1);
  }
  50% {
    text-shadow: 0 0 8px #fcd34d, 0 0 12px #fde68a;
    transform: scale(1.05);
  }
}

nav .nav-links li {
  opacity: 0;
  transform: translateY(-10px);
  animation: navFadeIn 0.6s ease forwards;
}
nav .nav-links li:nth-child(1) { animation-delay: 0.2s; }
nav .nav-links li:nth-child(2) { animation-delay: 0.4s; }
nav .nav-links li:nth-child(3) { animation-delay: 0.6s; }
nav .nav-links li:nth-child(4) { animation-delay: 0.8s; }

@keyframes navFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Logo Animation beim Laden */
.logo-img, .logo {
  opacity: 0;
  transform: translateY(-10px);
  animation: navFadeIn 0.6s ease forwards;
  animation-delay: 0.1s;
}

/* Dark-Mode-Button Animation */
#theme-toggle {
  opacity: 0;
  transform: translateY(-10px);
  animation: navFadeIn 0.6s ease forwards;
  animation-delay: 1s;
}

/* Hover-Effekt für Über-uns-Box */
#about.card {
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

#about.card:hover {
  transform: scale(1.02) rotateX(2deg) rotateY(-2deg);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
}

/* Sticky Navigation */
nav {
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* Scroll-to-top Button */
#scrollTopBtn {
  position: fixed;
  bottom: 40px;
  right: 30px;
  z-index: 999;
  background: var(--accent);
  color: white;
  border: none;
  padding: 0.8rem 1rem;
  border-radius: 50px;
  font-size: 1.2rem;
  display: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  transition: background 0.3s ease;
}

#scrollTopBtn:hover {
  background: #2563eb;
}

/* Ladebalken */
#loader-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 1rem;
}

#loader-progress {
  height: 100%;
  width: 0%;
  background: #60a5fa;
  transition: width 2s ease;
}

/* Milchglas-Effekt für Navigation */
nav {
  background: rgba(17, 24, 39, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Cookie-Hinweis */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(31, 41, 55, 0.95);
  color: white;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 999;
  font-size: 0.9rem;
  backdrop-filter: blur(10px);
}
#cookie-banner button {
  background: var(--accent);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
}

/* Kontakt-Popup */
#contactModal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  justify-content: center;
  align-items: center;
  z-index: 9999;
}
.modal-content {
  background: var(--card);
  padding: 2rem;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  color: var(--text);
}
.modal-content h2 {
  margin-top: 0;
}
.modal-content button {
  margin-top: 1rem;
  padding: 0.6rem 1.2rem;
}

/* Neue Keyframe-Animation für Sektionen */
@keyframes smoothSlideUp {
  0% {
    opacity: 0;
    transform: translateY(50px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Spezifische Scroll-Reveal für Über Uns und Warum Wir */
#about.scroll-reveal,
#warum.scroll-reveal {
  opacity: 0;
  transform: translateY(40px) scale(0.98);
  transition: none;
  animation: smoothSlideUp 0.9s ease-out forwards;
}

/* Logo-Größe & Nav-Höhe */
nav {
  height: 80px;
  padding: 0.5rem 2rem;
}

.logo-img img,
.logo-big {
  height: 60px !important;
}

/* Scroll-Indikator seitlich */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 4px;
  height: 0%;
  background: var(--accent);
  z-index: 9999;
  transition: height 0.2s ease-out;
}

/* Sanfter Dark/Light Mode Übergang */
html {
  transition: background-color 0.6s ease, color 0.6s ease;
}
body {
  transition: background-color 0.6s ease, color 0.6s ease;
}

/* Neue Progressbar (animiert & modern) */
#loader-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 1rem;
  position: relative;
}

#loader-progress {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #3b82f6, #60a5fa, #3b82f6);
  background-size: 200% 100%;
  animation: progressAnim 2.5s ease-out forwards;
  transition: width 2s ease;
  border-radius: 4px;
}

@keyframes progressAnim {
  0% { width: 5%; background-position: 0% 50%; }
  70% { width: 90%; background-position: 100% 50%; }
  100% { width: 100%; background-position: 200% 50%; }
}


@media (max-width: 768px) {
  .problem-image img {
    width: 90% !important;
  }
}


@media (max-width: 768px) {
  #warum-wir {
    padding: 20px 15px;
    font-size: 16px;
    text-align: center;
  }

  #warum-wir .container {
    flex-direction: column !important;
    align-items: center;
  }

  #warum-wir .column {
    width: 100% !important;
    margin-bottom: 20px;
  }
}
