/* Kachelbereich (oben) */
.tiles {
  display: flex;
  justify-content: center;
  gap: 40px;
  width: 70%;
}

/* Kacheln (oben) */
.tile {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  transition: transform 0.5s, box-shadow 0.5s, background 0.5s;
  font-size: 0.75em;
  font-weight: bold;
  color: #ffffff;
  text-decoration: none;
  overflow: hidden;
  position: relative;
  z-index: 1;
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 180px;
  height: 180px;
}

/* Icon in der Kachel (oben) */
.tile i {
  font-size: 3.3em;
  margin-bottom: 12px;
  color: #ffffff;
}

/* Text unter dem Icon (oben) */
.tile span {
  font-size: 1.2em;
  margin-top: 7px;
}

.tile:hover {
  transform: scale(1.15);
  box-shadow: 0 20px 35px rgba(9, 204, 148, 0.8);
  /* Farbverlauf: 50% Hauptakzent, dann 25% zweite Farbe, 25% dritte Farbe (Positionierung unten links und unten rechts) */ 
  background: linear-gradient(135deg, 
              #09cc94 0%, 
              #09cc94 50%, 
              #0fbf8c 50%, 
              #0fbf8c 75%, 
              #007e68 75%, 
              #007e68 100%);
}

.tile:hover i,
.tile:hover span {
  color: #000000;
}

/* Leuchteffekt um die Kachel (oben) */
.tile:hover::before {
  content: "";
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  border: 3px solid rgba(9, 204, 148, 0.8);
  border-radius: 10px;
  opacity: 0;
  animation: glow 0.5s forwards;
  z-index: 2;
}

@keyframes glow {
  to { opacity: 1; }
}

/* Abgedunkelte Kacheln beim Hover auf eine Kachel (oben) */
.tiles:hover .tile:not(:hover) {
  opacity: 0.4;
  transform: scale(1);
}

/* Neuer Kontaktbereich */
.contact-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 40px;
  background: transparent;
}

.contact-section .left-text {
  width: 30%;
}

.contact-section .left-text h2 {
  font-size: 1.5em;
  color: #09cc94;
  margin-bottom: 10px;
}

.contact-section .left-text p {
  font-size: 1em;
  line-height: 1.5;
}

/* Kontakt-Kachelbereich (rechts im Kontaktbereich) */
.contact-tiles {
  display: flex;
  justify-content: center;
  gap: 40px;
  width: 70%;
  flex-wrap: wrap;
}

/* Kontakt-Kacheln – analog zu den oberen Kacheln */
.tile.contact-tile {
  width: 180px;
  height: 180px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  transition: transform 0.5s, box-shadow 0.5s, background 0.5s;
  font-size: 0.75em;
  font-weight: bold;
  color: #ffffff;
  text-decoration: none;
  overflow: hidden;
  position: relative;
  z-index: 1;
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* Icon in der Kontakt-Kachel */
.tile.contact-tile i {
  font-size: 3.3em;
  margin-bottom: 12px;
  color: #ffffff;
}

/* Text in der Kontakt-Kachel */
.tile.contact-tile span {
  font-size: 1.2em;
  margin-top: 7px;
}

/* Hover-Effekt für Kontakt-Kacheln */
.tile.contact-tile:hover {
  transform: scale(1.15);
  box-shadow: 0 20px 35px rgba(9, 204, 148, 0.8);
  /* Farbverlauf: 50% Hauptakzent, dann 25% zweite Farbe, 25% dritte Farbe (Positionierung unten links und unten rechts) */ 
  background: linear-gradient(135deg, 
              #09cc94 0%, 
              #09cc94 50%, 
              #0fbf8c 50%, 
              #0fbf8c 75%, 
              #007e68 75%, 
              #007e68 100%);
}

.tile.contact-tile:hover i,
.tile.contact-tile:hover span {
  color: #000000;
}

/* Leuchteffekt um die Kontakt-Kachel */
.tile.contact-tile:hover::before {
  content: "";
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  border: 3px solid rgba(9, 204, 148, 0.8);
  border-radius: 10px;
  opacity: 0;
  animation: glow 0.5s forwards;
  z-index: 2;
}

/* Media Query für mobile Geräte (bis 768px Breite) */
@media screen and (max-width: 768px) {
  /* Oberer Bereich: Text und Kacheln untereinander */
  main {
      display: flex;
      flex-direction: column;
      align-items: center;
  }
  main .left-text,
  main .tiles {
      width: 100%;
      margin-bottom: 20px;
  }

  /* Anpassung der oberen Kacheln */
  .tiles {
      width: 100%;
      flex-wrap: wrap;
      gap: 20px;
      justify-content: center;
  }
  .tile {
      width: 45%;  /* Zwei Kacheln pro Zeile */
      height: auto;
  }

  /* Stacking im Kontaktbereich */
  .contact-section {
      flex-direction: column;
      align-items: center;
      text-align: center;
  }
  .contact-section .left-text,
  .contact-section .tiles {
      width: 100%;
      margin-bottom: 20px;
  }
  /* Sicherstellen, dass auch die Kontakt-Kacheln in zwei Spalten angeordnet werden */
  .tile.contact-tile {
      width: 45%;
      height: auto;
  }
}
