.sec {
  padding-bottom: 0;
}

.main-pic {
  width: 100%;
  transition: all 500ms ease;
}

.main-element {
  margin-bottom: 16px;
}

#main-pic-onone {
  position: absolute;
  top: 0;
  left: 0;
}
#main-pic-onone1 {
  position: absolute;
  top: 0;
  left: 0;
}

.main-pic-container {
  width: 100vw;
  height: 100%;
  object-fit: fill;
  position: relative;
  border-top: 2px solid rgba(213, 168, 133, 0.735);
  border-bottom: 2px solid rgba(213, 168, 133, 0.735);
  transition: opacity 3s cubic-bezier(0.075, 0.82, 0.165, 1),
    transform 3s cubic-bezier(0.075, 0.82, 0.165, 1);
}

.poly {
  fill: transparent;
  pointer-events: all;
  cursor: pointer;
  opacity: 0;
  transition: fill 0.25s ease-in-out, opacity 0.25s ease-in-out;
}

.poly:hover {
  fill: black;
  opacity: 0.4;
}

.dark-mode .poly:hover {
  fill: white;
  opacity: 0.4;
}

.main-pic-container.visible {
  opacity: 1;
}

.main-pic-container div {
  width: 100%;
  height: 100%;
  display: inline-flex;
  position: absolute;
  top: 0;
  left: 0;
}

.onTop {
  z-index: 1;
}

.hidden {
  z-index: 0;
  opacity: 0;
  display: none;
}

.fade-in {
  animation: fadeIn 0.5s forwards;
}

.fade-out {
  animation: fadeOut 0.5s forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

.main-pic-container:hover .arrow,
.main-pic-container:hover .title,
.main-pic-container:hover .to-immo-button,
/* .main-pic-container:hover .shadow, */
.main-pic-container:hover .corner-element {
  opacity: 1;
}

.arrow {
  display: flex;
  align-items: center;
  position: absolute;
  align-self: center;
  top: 50%;
  color: white;
  transform: translateY(-50%);
  opacity: 1;
  transition: opacity 0.3s;
  z-index: 2;
  width: 50px;
  height: 50px;
  cursor: pointer;
}

.arrow-left {
  left: 10px;
}

.arrow-right {
  right: 10px;
}

.arrow-left-bottom {
  left: 30px;
}

.arrow-right-bottom {
  right: 0px;
}

.main-pic-container:hover .arrow {
  opacity: 1;
}

.title {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 5px 10px;
  border-radius: 4px;
  opacity: 0;
  font-size: clamp(20px, 2vw, 64px);
  transition: 0.3s;
  z-index: 2;
}

.immo-title div {
  position: relative;
  top: 30px;
  left: 30px;
  z-index: 3;
  background: rgba(0, 0, 0, 0.7);

  color: #fff;
  padding: 5px 10px;
  border-radius: 4px;
  opacity: 1;
  font-size: clamp(16px, 2vw, 24px);
  z-index: 5;
}

.to-immo-button {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 5px 10px;
  border-radius: 4px;
  opacity: 0;
  font-size: clamp(16px, 2vw, 24px);
  transition: 0.3s;
  z-index: 2;
  cursor: pointer;
  text-decoration: none;
  display: flex;
  align-items: center; /* Vertikale Zentrierung des Texts und Pfeils */
}

/* Hinzufügen des Pfeils */
.to-immo-button::after {
  content: "";
  background-image: url("arrow-right.svg"); /* Aktualisieren Sie den Pfad zu Ihrem Pfeil-SVG */
  background-size: contain;
  background-repeat: no-repeat;
  width: 16px; /* Größe des Pfeils anpassen */
  height: 16px;
  margin-left: 8px; /* Abstand zwischen Text und Pfeil */
  animation: moveArrow 1s infinite alternate; /* Animation */
  pointer-events: none; /* Verhindern, dass der Pfeil Klicks blockiert */
}

/* Keyframes für die Pfeil-Animation */
@keyframes moveArrow {
  from {
    transform: translateX(6px);
  }
  to {
    transform: translateX(0);
  }
}

.to-immo-button:hover {
  background: rgba(213, 168, 133, 0.848);
  color: rgb(31, 31, 31);
}

.shadow {
  position: absolute;
  left: 0;
  right: 0;
  height: 100px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0));
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 1;
}

.shadow-top {
  top: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
}
.shadow-bottom {
  bottom: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
}

.corner-element {
  width: auto;
  height: 33%;
  object-fit: cover;
  border-radius: 4px;
  position: absolute;
  bottom: 10px;
  right: 16px;
  opacity: 0;
  background: rgba(0, 0, 0, 0.7);
  transition: all 250ms ease;
  cursor: pointer;
}

.corner-element:hover {
  box-shadow: 0px 8px 16px rgba(213, 168, 133, 0.5);
  transform: translate3d(-8px, -8px, 0);
}

/* bottom-pics */
.bottom-pics {
  gap: 16px;
  /* margin-bottom: 32px; */
  /* grid-area: 4 / 1 / 5 / 4; */
  width: 100%;
  height: 33vh;
  display: flex;
}

.bottom-pic-layout {
  z-index: 4;
  border: 1px solid rgb(213, 168, 133);
  margin-top: 4px;
  object-fit: cover;
  overflow: hidden;
  border-radius: 4px;
  margin-left: 2px;
  margin-right: 2px;
  transition: all 250ms ease-in-out;
}

.bottom-pic-layout:hover {
  box-shadow: 0px 15px 60px rgb(213, 168, 133);
  border-radius: 8px;
  transform: translate3d(0, -4px, 0);
}

@media screen and (max-width: 768px) {
  .bottom-pic-layout {
    margin: 4px;
  }
  .bottom-pics {
    margin-bottom: 16px;
  }

  .main-pic-container .arrow,
  .main-pic-container .title,
  .main-pic-container .to-immo-button,
  .main-pic-container .shadow,
  .main-pic-container .corner-element {
    opacity: 1;
  }
}

@keyframes slideInFromRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutToLeft {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(-100%);
    opacity: 0;
  }
}

@keyframes slideInFromLeft {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutToRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

.slide-in-right {
  animation: slideInFromRight 0.5s forwards;
}

.slide-out-left {
  animation: slideOutToLeft 0.5s forwards;
}

.slide-in-left {
  animation: slideInFromLeft 0.5s forwards;
}

.slide-out-right {
  animation: slideOutToRight 0.5s forwards;
}

/* .black-hover polygon:hover {
  fill: black !important;
  opacity: 0.3;
}
polygon:hover {
  fill: black !important;
  opacity: 0.3;
} */

/* TEST */
.vertical-border {
  border-top: 2px solid rgba(213, 168, 133, 0.735);
  border-bottom: 2px solid rgba(213, 168, 133, 0.735);
  box-shadow: 2px 2px 500px rgba(0, 0, 0, 1);
  width: 100%;
  height: 100px;
  flex-direction: row;
  background-color: var(--background-color);
}
.row {
  display: flex;
  margin-top: 0;
}
.horizontal-border {
  /* border-left: 2px solid rgba(213, 168, 133, 0.735); */
  /* border-right: 2px solid rgba(213, 168, 133, 0.735); */
  width: 10%;
  margin-right: 16px;
  margin-top: 0;
  padding-top: 16px;
  padding-bottom: 16px;
}

.text-box {
  color: white;
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: start;
  align-items: center;
  height: 100%;
  gap: 16px;
  overflow: hidden;
}

.text-box-vertical {
  font-size: xx-large;
  color: var(--text-color);
  gap: 16px;
  padding: 10px;
  padding-left: 32px;
  display: flex;
  justify-content: start;
  align-items: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.text-box span {
  font-size: 3vw; /* Dynamische Schriftgröße basierend auf der Breite des Viewports */
  line-height: 1;
  text-align: center;
  display: inline-block;
}
.text-box-vertical span {
  font-size: 3vw; /* Dynamische Schriftgröße basierend auf der Breite des Viewports */
  line-height: 1;
  text-align: center;
  display: inline-block;
}

#sec-handle-handy {
  display: none;
}

@media (max-width: 768px) {
  #sec-handle-handy {
    display: block;
  }
  #sec-handle {
    display: none;
  }
}

/* Gallery bottom pics */
.gallery-container {
  display: flex;
  align-items: center;
  position: relative;
  width: 100%;
}

.gallery-view {
  overflow: hidden;
  flex: 1;
}

.gallery-track {
  display: flex;
  transition: transform 0.5s ease;
}
