.stackContainer {
  position: relative;
  max-width: 320px;
  height: 160px;
  width: fit-content;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.panel {
  position: absolute;
  width: 320px;
  height: 160px;
  border: 1px solid #2e2828;
  background-color: #171717;
  color: white;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  box-sizing: border-box;
  overflow: hidden;
  transition: transform 0.5s ease, opacity 0.5s ease;
}

.panel-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 14px;
  z-index: 0;
  opacity: 0.35;
}

.panel h4 {
  position: relative;
  z-index: 1;
  font-size: 18px;
  color: #fff;
  margin: 0;
}

.front {
  z-index: 2;
  background: linear-gradient(135deg, #000000, #323232);
}

.back {
  top: 20px;
  left: 20px;
  z-index: 1;
  padding: 20px;
  background-color: #252323;
  border-radius: 12px;
}

.read-more {
  color: #ffffff;
  background-color: #000;
  padding: 10px 20px;
  margin-bottom: 9px;
  cursor: pointer;
  border: none;
  border-radius: 5px;
  font-size: 14px;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.read-more:hover {
  color: #ffffff;
  background-color: #000;
  transform: scale(1.05);
}

.stackContainer:hover .front,
.stackContainer.touch-hover .front {
  transform: translate(20px, 20px);
  z-index: 1;
}

.stackContainer:hover .back,
.stackContainer.touch-hover .back {
  transform: translate(0, 0);
  z-index: 2;
}

@media (prefers-reduced-motion: reduce) {
  .panel {
    transition: none;
  }
}

/*go to top button*/

.go-top-btn {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 40px;
    height: 40px;
    background-color: #2e2828;  /* red like the screenshot */
    color: #fff;
    border: none;
    border-radius: 0%;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0px 4px 8px rgba(0,0,0,0.3);
    transition: 0.3s ease-in-out;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
}

.go-top-btn.show {
    opacity: 1;
    visibility: visible;
}

.go-top-btn:hover {
    background-color: #ff9f49;
}
