/* Literary realms - carousel on home page */
.litrealms_conatiner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  text-align: center; 
}

.section {
  padding: 0;
}

.section-subtitle {
  font-size: 24px;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 10px;
}

.section-title {
  font-size: 32px;
  margin-bottom: 40px;
  position: relative;
  text-align: center; 
}

/* Carousel styles */
.carousell-wrapper {
  position: relative;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px; /* Adjust padding for container */
  width: 100%;
  box-sizing: border-box;
}

.carousell {
  display: flex;
  transition: transform 0.5s ease;
  width: 100%;
  margin: 0;
  
  padding: 0;
  gap: 20px; /* Gap between cards */
  overflow: hidden; /* Hide extra cards outside of the view */
  scroll-behavior: smooth;
}

.carousell-wrapper i {
  height: 50px;
  width: 50px;
  cursor: pointer;
  font-size: 1.25rem;
  position: absolute;
  text-align: center;
  line-height: 50px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 3px 6px rgba(0,0,0,0.23);
  transform: translateY(-50%);
  transition: transform 0.1s linear;
} 

.carousell-wrapper i:active {
  transform: translateY(-50%) scale(0.85);
}

#left-arrow {
  position: absolute;
  left: -60px;
  z-index: 10;
}

#right-arrow {
  position: absolute;
  right: -60px;
  z-index: 10;
}


.litrealms_card {
  flex: 0 0 calc((100% / 3) - 20px); 
  min-width: 320px;
  max-width: 320px; 
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  border-radius: 10px;
  text-align: center;
  padding: 0px;
  box-sizing: border-box;
  transition: transform 0.5s ease;
}

.cardo {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  position: relative;
  max-width: 500px;
  background-color: hsl(22, 73%, 80%);
  border: 2px solid hsl(357, 79%, 72%);
  border-radius: 4px;
  padding: 32px 24px;
  margin: 2px;
  text-decoration: none;
  z-index: 0;
  overflow: hidden;
}

.cardo:before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -16px;
  right: -16px;
  background: hsl(357, 79%, 72%);
  height: 49px;
  width: 49px;
  border-radius: 32px;
  transform: scale(1);
  transform-origin: 50% 50%;
  transition: transform 0.50s ease-out;
}

.cardo:hover:before {
  transform: scale(21);
}

.go-arrow:hover {
  color: #ffffff;
}

.cardo:hover p {
  transition: all 0.3s ease-out;
  color: rgba(255, 255, 255, 0.8);
}

.cardo:hover h3 {
  transition: all 0.3s ease-out;
  color: #ffffff;
}

.litrealms_card h3 {
  font-size: 24px;
  margin-bottom: 10px;
}

.litrealms_card p {
  font-size: 16px;
  color: #666;
}

.lithead {
  color: black;
}

.go-corner {
  position: relative; 
  text-align: right;
  font-size: 18px;
}

.go-arrow {
  font-size: 24px;
  color: #ff5e00;
}

/* Dark mode styles for lit realms */
.dark-mode #right-arrow,
.dark-mode #left-arrow {
  background-color: rgb(45, 45, 46);
}

.dark-mode #right-arrow::before,
.dark-mode #left-arrow::before {
  color: hsl(358, 38%, 60%);
}

.dark-mode .cardo {
  color: rgb(219, 215, 215);
  background-color: #2d1716;
  border-color: #8e4949;
}

.dark-mode .go-arrow {
  color: rgb(214, 141, 141);
}

.dark-mode .go-arrow:hover {
  color: #ffffff;
}

.dark-mode .litrealms_card {
  background: #151111;
}

.dark-mode .small {
  color: rgb(242, 234, 234);
}

.dark-mode .lithead {
  color: rgb(242, 242, 242);
}

.dark-mode .cardo::before {
  background-color: #8e4949;
}

.dark-mode .section-subtitle {
  color: #FAADA1;
}

/* Responsive styles */
@media screen and (max-width: 768px) {
  .carousell {
    gap: 10px; /* Reduce gap for smaller screens */
  }

  .litrealms_card {
    flex: 0 0 90%; /* Show one card at a time on smaller screens */
    min-width: 90%;
    margin: 0 5px; /* Adjust margin */
  }

  #left-arrow,
  #right-arrow {
    font-size: 1rem;
    height: 40px;
    width: 40px;
    line-height: 40px;
  }
}
