.hero {
  position: relative;
  padding-bottom: 15px;
  color: white;
  margin-top: 10px;
  max-width: 90%;
  margin-left: 10px;
  margin-right: 10px;
  text-align: center;
  overflow: visible;
  z-index: 10;
}
[class^="hero-image-"] {
  height: 50%;
  margin-top: 10px;
  margin-bottom: 10px;
  border-radius: 10px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  position: relative;
  overflow: hidden;
  z-index: 10;
}
[class^="hero-image-"]::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.5) 50%, rgba(0, 0, 0, 0.45) 100%);
  z-index: 1;
  transition: background 0.5s ease;
  border-radius: 10px;
}
.hero-image-home { background-image: url("../images/hero_technicalDrawing.webp"); }
.hero-image-productdevelopment { background-image: url("../images/hero-produktentwicklung-gen.webp"); }
.hero-image-scanning { background-image: url("../images/hero-3d-scanning-gen.webp"); }
.hero-image-construct { background-image: url("../images/hero-konstruktion-gen2.webp"); }
.hero-image-calculate { background-image: url("../images/hero-berechnung-gen.webp"); }
.hero-image-advice { background-image: url("../images/hero-beratung.webp"); }
.hero-image-optimization { background-image: url("../images/hero-optimierung-gen.webp"); }
.hero-image-contact { background-image: url("../images/contact.webp"); }
.hero-image-company { background-image: url("../images/company.webp"); }

.hero h2, .hero p, .btn-primary {
  position: relative;
  z-index: 2;
  transition: color 0.5s ease, text-shadow 0.5s ease;
}
.hero h2 {
  font-size: clamp(1.4rem, 4vw, 2.4rem);
  margin-bottom: 10px;
  word-wrap: break-word;
  position: relative;
  z-index: 2;
  color: #ffffff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  font-weight: 700;
  letter-spacing: 0.02em;
}
.hero p {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  margin-bottom: 20px;
  word-wrap: break-word;
  position: relative;
  z-index: 2;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  font-weight: 500;
  line-height: 1.5;
}
.hero-clickable {
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  min-height: 140px;
  padding-bottom: 10px;
  box-sizing: border-box;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
  z-index: 10;
}
.hero-clickable:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
  z-index: 10;
}
[class^="hero-image-"].hero-clickable:hover::before {
  background: linear-gradient(to top, rgba(160, 0, 0, 0.88) 0%, rgba(200, 0, 0, 0.75) 40%, rgba(220, 0, 0, 0.65) 100%);
}
.hero-clickable:hover .hero h2 {
  color: white;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
.hero-clickable:hover .hero p {
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}
.hero-clickable:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}
.hero-container a {
  text-decoration: none;
  color: inherit;
}
.hero-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 0px;
  margin-top: 20px;
  overflow: visible;
  z-index: 10;
}
.hero-icon-container {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  top: 5px;
  left: 50%;
  transform: translateX(-50%);
  transition: transform 0.5s ease, background 0.5s ease, border-color 0.5s ease;
  overflow: visible;
}
.hero-icon {
    width: 32px;
    height: auto;
    filter: brightness(0) invert(1);
    opacity: 0.95;
    transition: filter 0.5s ease, opacity 0.5s ease;
}
.hero-clickable:hover .hero-icon-container {
    transform: translateX(-50%) scale(1.1);
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}
.hero-clickable:hover .hero-icon {
    filter: brightness(0) invert(1);
    opacity: 1;
}
@media (max-width: 768px) {
  .hero {
    padding: 0.5vw;
    padding-bottom: 4vw;
    max-width: 95%;
  }
  .hero h2 {
      font-size: clamp(1.2rem, 5vw, 2.5rem);
  }
  .hero p {
      font-size: clamp(0.95rem, 3.5vw, 1.3rem);
  }
  .hero-icon-container {
    width: 54px;
    height: 54px;
    animation: pulse 2s infinite;
  }
  @keyframes pulse {
    0% { transform: translateX(-50%) scale(1); }
    50% { transform: translateX(-50%) scale(1.1); }
    100% { transform: translateX(-50%) scale(1); }
  }
  .hero-icon {
      width: 30px;
  }
  .hero-clickable:hover .hero-icon-container {
      transform: none;
  }
}
