@import './style.css';
@import './detail.css';

.stones-background {
  margin: 0 auto;
  padding: 0;
  color: rgb(var(--grey-700));
  font-family: 'Geist';
  opacity: 0.4;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  cursor: progress;
  background-color: #F8F9FA;
  position: fixed;
  font-family:'Geist';
}

.stone-container{
  display: grid;
  font-family:'Geist';
  margin: 5% 0;
}

.stone-container p{
      font-family: system-ui;
}
.stone-header {
  position: relative; /* ensures the h1 is positioned relative to this container */
  color: rgb(var(--grey-800));
  text-align: center;
  font-family: 'Geist';

}

.stone-header h1 {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  text-transform: uppercase;
  letter-spacing: 10px;
  top:10%;

}

.stone-header .tooltip:after { 
  content: attr(title);
  color:rgb(var(--grey-500));
  display: block;           /* force new line */
  margin-top: 10px;
  font-size: 0.5em;         
} 

.stone-header .tooltip{
  position: relative;
  cursor: default; /* optional */
}

#carousel-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  perspective: 2000px;
  width: 500px;
  height: 500px;
  backface-visibility: hidden;
}

#carousel-wrapper::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60px;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(248,249,250,1) 100%);
  z-index: 10;
}

#carousel {
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  backface-visibility: hidden;
}

.carousel {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}

.slide {
  position: absolute;
  min-width: 500px;
  min-height: 500px;
  cursor: pointer;
  transform-origin: center;
  transform: rotateY(-40deg);
  will-change: transform;
  backface-visibility: hidden;
  font-weight: 500;
  background-color: rgba(var(--grey-100), .6);
}

.slide::before {
  content: "";
  position: absolute;
  top: -20px;
  left: -20px;
  right: -20px;
  bottom: -20px;
  z-index: 99999;
}

.slide .tooltip:after { 
  content: attr(title);
  opacity:0;
  position:absolute;
  top:50%;
  left:50%;
  transition: all 0.3s ease-in-out;
  color:rgba(var(--grey-600), 1);
  transform: translate(-50%);
} 

.slide:hover .tooltip:after { 
  content: attr(title);
  opacity:1;
  } 

.slide img {
  max-width: 100%;
  display: block;
  opacity: 1;
  border-radius: 5px
}

.slide:hover {
  background-color: rgba(var(--grey-100), 0.3);
  border-color: rgb(var(--grey-400));
}

.slide:hover p, .slide:hover p:last-of-type{
    color: rgb(var(--grey-400));
}

.slide:hover img{
  opacity: 0.5;
}

.slide p {  
  color: rgb(var(--grey-600));
  margin: 1rem 0;
}

.slide-inner {
  width: 100%;
  height: 100%;
  padding: 4rem 2rem;
  position: relative;
  display: block;
  transition: all 0.3s ease-in-out;
  box-sizing: border-box;
  pointer-events: auto;  
  border: 1px solid rgba(var(--grey-100), .2);
  border-radius: 15px;
  text-align:center;
  box-sizing: border-box;
}

.slide img,
.slide p {
  pointer-events: none; /* ignore clicks, let them pass to parent .slide */

}

.slide p:last-of-type {
  font-style: italic;
  text-transform: capitalize; /* ignore clicks, let them pass to parent .slide */
  font-size: 0.9rem;
  color: rgb(var(--grey-500));
}

#carousel-wrapper {
  perspective: 1000px;
}

.carousel-item {
  display: inline-block;
  transform-origin: center;
}

/*PROGRESS DOTS*/
#carousel-progress {
  position: fixed;
  right: 1rem;
  bottom: 50%;
  transform: translateY(50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 999;
  gap: 10px; /* space between dots */
}

.progress-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(var(--grey-100), 0.8);
  background-color: rgba(var(--grey-100), 0.4);
  transition: background-color 0.3s ease;
}

/*CLICK APP*/

.slide.flattening {
  transform: perspective(800px) rotateY(0deg);
}

.slide.fullscreen {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 999;
  width: 100vw !important;
  height: 100vh !important;
  transform: none !important;
}

/* Responsive adjustments WITHOUT scale or transform-scale */

@media (max-width: 912px) {
  #carousel-container {
    top: 50%;
    width: 560px;  /* 80% of 700 */
    height: 560px; /* 80% of 300 */
  }
  .slide {
    min-width: 560px;
    min-height:560px
  }
  .slide-inner {
    padding: 3.2rem 1.6rem; /* 80% of 4rem 2rem */
  }
}

@media (max-width: 768px) {
  #carousel-container {
    top: 50%;
    width: 300px;  /* 60% of 700 */
    height: 300px; /* 60% of 300 */
  }
  .slide {
    min-width: 300px;
    min-height:300px
  }
  .slide-inner {
    padding: 2.4rem 1.2rem; /* 60% of 4rem 2rem */
  }
}

@media (max-width: 768px) and (orientation: landscape) {
  /* Styles for landscape iPad */
    #carousel-container {
    top: 50%;
    width: 150px;
    height: 150px;
  }
  .slide {
    min-width: 150px;
    min-height:150px
  }
  .slide-inner {
    padding: .8rem 0.8rem;
  }

}

@media (max-width: 460px) {
  #carousel-container {
    top: 50%;
    width: 280px;  /* 40% of 700 */
    height: 280px; /* 40% of 300 */
  }
  .slide {
    min-width: 280px;
    min-height:280px
  }
  .slide-inner {
    padding: .8rem 0.8rem; /* 40% of 4rem 2rem */
  }
}

@media (min-device-width: 768px) and (max-device-width: 1024px) and (orientation: landscape) {
  /* Styles for landscape iPad */
    #carousel-container {
    top: 50%;
    width: 280px;
    height: 280px;
  }
  .slide {
    min-width: 280px;
    min-height:280px
  }
  .slide-inner {
    padding: .8rem 0.8rem;
  }

}

@media (min-device-width: 768px) and (max-device-width: 1024px) and (orientation: landscape) {
  /* Styles for landscape iPad */
    #carousel-container {
    top: 50%;
    width: 280px;
    height: 280px;
  }
  .slide {
    min-width: 280px;
    min-height:280px
  }
  .slide-inner {
    padding: .8rem 0.8rem;
  }

}
