/* ============================================
   CUSTOM SCROLLBAR - MYCOSCOPE GREEN THEME
   ============================================ */

/* Webkit browsers (Chrome, Safari, Edge) */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: #f5f5dc;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #a6d6a8, #90c092);
  border-radius: 10px;
  border: 2px solid #f5f5dc;
  transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #90c092, #7aaa7c);
  box-shadow: 0 8px 20px rgba(166, 214, 168, 0.3);
}

::-webkit-scrollbar-corner {
  background: #f5f5dc;
}

/* Firefox */
html {
  scrollbar-width: thin;
  scrollbar-color: #a6d6a8 #f5f5dc;
}

/* ============================================
   BASE STYLES
   ============================================ */

/* Horizontal scroll wrapper */
.horizontal-scroll {
  display: flex;
  flex-wrap: nowrap;
 /* overflow-x: scroll;*/
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  height: 100vh;
  width: 100vw;
  background-image: url('../imgs/HozBG.png');
  background-size: cover;
  background-position: center;
  gap: 0;
  -webkit-overflow-scrolling: touch;
}

/* Prevent vertical scroll */
html, body {
  overflow: hidden;
  height: 100vh;
  margin: 0;
  padding: 0;
}

/* Typography */
h1 {
  font-family: 'Micaelasfont-Regular', sans-serif;
  font-size: clamp(2rem, 4vw, 5rem);
  z-index: 500;
}

h2 {
  font-family: 'Micaelasfont-Regular', sans-serif;
  font-size: clamp(1.5rem, 3vw, 4rem);
  z-index: 500;
}

p {
  font-size: clamp(1rem, 2.5vw, 2rem);
  max-width: 600px;
  font-family: "Sora", sans-serif;
  z-index: 500;
}

/* ============================================
   KEYWORDS STYLING
   ============================================ */

.keywords-container {
  position: absolute;
  display: flex;
  flex-direction: column;
  top: 25%;
  left: 10%;
  gap: 8px;
  margin-top: 0;
  margin-bottom: 20px;
  align-items: flex-start;
}

.keyword-tag {
  background: #a6d6a8;
  color: #000000;
  padding: 8px 20px;
  border-radius: 50px;
  font-family: 'Sora', sans-serif;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  cursor: pointer;
  min-width: 120px;
  text-align: center;
  transition: all 0.3s ease;
  cursor: default;
}

.keyword-tag:hover {
  background: #90c092;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(52, 132, 58, 0.3);
  transition: all 0.3s ease;
  cursor: default;
}

/* ============================================
   SECTION LAYOUT
   ============================================ */

.section {
  flex: 0 0 100vw;
  height: 100vh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  position: relative;
  padding: 0;
  box-sizing: border-box;
  margin: 0;
  overflow: hidden;
}

.section-content {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: repeat(12, 1fr);
  gap: 0;
  padding: 2% 5%;
  box-sizing: border-box;
}

.section-content > * {
  grid-column: 1 / -1;
  grid-row: 1 / -1;
}

/* ============================================
   SECTION 1: MYCOSCOPE INTRO
   ============================================ */

.Mycoscope1 h1 {
  position: absolute;
  top: 8%;
  left: 10%;
  width: 40%;
}

.Mycoscope1 h3 {
  position: absolute;
  top: 20%;
  left: 10%;
  font-family: "Sora", sans-serif;
  font-size: 18px;
  color: #000;
  text-align: left;
  line-height: 1.5;
}

.Mycoscope1 h2 {
  position: absolute;
  top: 8%;
  left: 55%;
}

.Mycoscope1 .Problem6Text {
  position: absolute;
  font-size: 16px;
  top: 18%;
  left: 55%;
  width: 30%;
}

.Mycoscope1 .IA6 {
  position: absolute;
  top: 50%;
  left: 55%;
}

.Mycoscope1 .IA6Text {
  position: absolute;
  left: 55%;
  top: 60%;
  width: 30%;
  font-family: "Sora", sans-serif;
  font-size: 16px;
  color: #000;
  text-align: left;
}

.FinProduct {
  position: relative;
  top: 20%;
  left: -20%;
  scale: 0.5;
}

.Mush3 {
  position: absolute;
  left: 50px;
  top: 55%;
  z-index: 10;
  scale: 0.5;
}

.scope{
  position: relative;
  top: -25%;
  left: 220%;
  scale: 0.35;
}
/* ============================================
   SECTION 2: THE BRIEF
   ============================================ */

.Mycoscope2 h2 {
  position: absolute;
  top: 8%;
  left: 5%;
}

.Mycoscope2 p {
  position: absolute;
  top: 18%;
  left: 5%;
  width: 25%;
  font-family: "Sora", sans-serif;
  font-size: 16px;
  color: #000;
  text-align: left;
}
 .BriefH2 h2{
  top: 65%;
  left: 12%; 
 }
.rightUp{
  position: absolute;
  top: 62%;
  left: 30%;
  rotate: 20deg;
  scale: 0.6;
}
.Draft {
  position: absolute;
  top: -13%;
  left: 30%;
  scale: 0.75;
  z-index: 10;
}

.Mush2 {
  position: absolute;
  right: -30%;
  top: 60%;
  transform: translate(-50%, 0) scale(0.65);
}

/* ============================================
   SECTION 3: THE SOLUTION
   ============================================ */

.section3 h2 {
  position: absolute;
  top: 30%;
  left: 5%;
}

.section3 p {
  position: absolute;
  top: 40%;
  left: 5%;
  width: 25%;
  font-family: "Sora", sans-serif;
  font-size: 16px;
  color: #000;
  text-align: left;
}

.Top34 {
  position: absolute;
  left: 55%;
  top: 40%;
  height: 50%;
  width: 50%;
  scale: 1;
  transform: translate(-50%, -50%);
  z-index: 100;
  font-family: "Sora", sans-serif;
}

.Wheat {
  position: relative;
  left: 300%;
  top: 25%;
  scale: 0.75;
  z-index: 5;
  transform: translate(-50%, -50%);
}

.Hand {
  position: absolute;
  right: -33%;
  top: 20%;
  scale: 0.35;
  z-index: 156;
}

.Mush4, .Mush5 {
  position: absolute;
  left: 250%;
  top: 90%;
  scale: 0.75;
  z-index: 56;
}

/* Hotspots */
.hotspot {
  position: absolute;
  width: 22px;
  height: 22px;
  background-color: rgba(174, 226, 171, 0.588);
  border: 2px solid #000;
  border-radius: 50%;
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: transform 0.2s ease, background-color 0.2s ease;
  z-index: 101;
}

.hotspot:hover {
  transform: translate(-50%, -50%) scale(1.2);
  background-color: #f5f5dc;
  border: transparent;
}

.tooltip {
  position: absolute;
  top: -50px;
  left: 50%;
  transform: translateX(-50%);
  background: #f5f5dc;
  color: #000;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-family: "Sora", sans-serif;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  white-space: normal;
  min-width: 250px;
  text-align: left;
  border: 1px solid rgba(0, 0, 0, 0.1);
  z-index: 105;
}

.tooltip strong {
  font-weight: 600;
  color: #000;
}

.hotspot:hover .tooltip {
  opacity: 1;
}

/* Priority hotspots (1 and 2) should appear above all others when hovered */
.hotspot-priority:hover {
  z-index: 110 !important;
}

.hotspot-priority:hover .tooltip {
  z-index: 115 !important;
}

/* ============================================
   SECTION 4: USER PERSONAS
   ============================================ */

.section4 h2 {
  position: absolute;
  top: 8%;
  left: 5%;
}

.John, .Bobby, .Lucinda {
  position: absolute;
  left: 5%;
  scale: 0.4;
  transform: translate(-50%, -50%);
  z-index: 100;
  cursor: pointer;
  transition: transform 0.5s ease;
}

.John { top: 25%; }
.Bobby { top: 50%; }
.Lucinda { top: 75%; }

.John:hover, .Bobby:hover, .Lucinda:hover {
  transform: translate(-50%, -50%) scale(1.05);
}

.persona-text {
  position: absolute;
  width: 25%;
  left: 20%;
  font-family: "Sora", sans-serif;
  z-index: 101;
  opacity: 1;
  visibility: visible;
  transition: all 0.5s ease;
  pointer-events: none;
}

.john-text { top: 35%; }
.bobby-text { top: 60%; }
.lucinda-text { top: 85%; }

.persona-text h3 {
  font-family: "Sora", sans-serif;
  font-size: 18px;
  margin: 0 0 5px 0;
  color: #000;
}

.persona-text h4 {
  font-family: "Sora", sans-serif;
  font-size: 18px;
  margin: 0 0 15px 0;
  color: #000;
  font-weight: normal;
}

.persona-text p {
  font-size: 16px;
  margin: 8px 0;
  color: #000;
  line-height: 1.2;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
  max-height: 0;
  overflow: hidden;
}

.John:hover ~ .john-text,
.Bobby:hover ~ .bobby-text,
.Lucinda:hover ~ .lucinda-text {
  transform: translateY(-50%);
}

.John:hover ~ .john-text p,
.Bobby:hover ~ .bobby-text p,
.Lucinda:hover ~ .lucinda-text p {
  opacity: 1;
  visibility: visible;
  max-height: 500px;
}

.blueMush {
  position: absolute;
  right: -25%;
  top: 60%;
  scale: 0.5;
  transform: translate(-50%, -50%);
  z-index: 100;
}

.AppH2 h2{
  position: absolute;
  top: 10%;
  left: 55%;
}
/* Carousel container positioned at 55% left */
.carousel-container {
  position: absolute;
  left: 45%;
  top: 55%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 600px;
  height: 400px;
  overflow: visible;
  z-index: 10;
}

/* Carousel track */
.carousel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

/* Each image - position them properly */
.carousel-item {
  width: 180px;
  height: auto;
  cursor: pointer;
  opacity: 0;
  transform: scale(0.7) translate(-50%, -50%);
  transition: all 0.5s ease;
  position: absolute;
  filter: brightness(0.7);
  left: 50%;
  top: 50%;
  transform-origin: center;
}

/* Show only 3 images: previous, current, next */
.carousel-item.prev {
  opacity: 0.6;
  transform: scale(0.8) translate(-350px, -50%);
  z-index: 1;
}

.carousel-item.active {
  opacity: 1 !important;
  transform: scale(1) translate(-50%, -50%) !important;
  z-index: 3;
  filter: brightness(1) !important;
}
.carousel-item.next {
  opacity: 0.6;
  transform: scale(0.8) translate(120px, -50%);
  z-index: 1;
}

/* Buttons */
.carousel-btn {
  background: none;
  border: none;
  cursor: pointer;
  z-index: 10;
  width: 50px;
  z-index: 5000;
}

.carousel-btn img.arrow {
  width: 40px;
  transition: transform 0.3s ease;
  z-index: 5000;
}

.carousel-btn img.rotate {
  transform: rotate(180deg);
}

.carousel-btn:hover img {
  transform: scale(1.2);
}

.carousel-btn:hover img.rotate {
  transform: rotate(180deg) scale(1.2);
}

/* Position buttons */
.prev-btn {
  position: absolute;
  left: -8%; /* Move further to the left */
  top: 50%;
  transform: translateY(-50%);
}

.next-btn {
  position: absolute;
  right: -5%;
  top: 50%;
  transform: translateY(-50%);
}

/* ============================================
   APP DESIGN BUTTON
   ============================================ */

.app-design-button-container {
  position: absolute;
  left: 67%;
  bottom: 5%;
  transform: translateX(-50%);
  z-index: 20;
}

.app-design-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 32px;
  background: #a6d6a86f ;
  color: rgb(0, 0, 0);
  text-decoration: none;
  border-radius: 50px;
  border: #00000000 ;
  font-family: 'Sora', sans-serif;
  font-size: 16px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.app-design-btn:hover {
  background-color: #a6d6a8;
  border-color: #000000;
}

.app-design-btn:active {
  transform: translateY(0);
}

.app-design-btn svg {
  transition: transform 0.3s ease;
}

.app-design-btn:hover svg {
  transform: translate(2px, -2px);
}

/* Responsive adjustments for app design button */
@media (min-width: 1921px) {
  .app-design-btn {
    padding: 20px 40px;
    font-size: 18px;
  }
  
  .app-design-button-container {
    bottom: 12%;
  }
}

/* ============================================
   SECTION 5: VIDEO
   ============================================ */

.section5 h2 {
  position: absolute;
  top: 10%;
  left: 28%;
  z-index: 10;
}

.section5 video {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 45%;
  transform: translate(-50%, -50%);
  
  /* Polaroid styling */
  border-top: 15px solid #ffffff;
  border-left: 15px solid #ffffff;
  border-right: 15px solid #ffffff;
  border-bottom: 15px solid #ffffff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), 
              0 0 0 1px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  background: #ffffff;
}

.Fields{
  position: relative;
  left: 430%;
  top: 25%;
  scale: 0.75;
  transform: translate(-50%, -50%);
}

/* ============================================
   MEDIA QUERIES
   ============================================ */

/* MacBook specific adjustments - covers most MacBook viewport sizes */
@media (min-width: 1280px) and (max-width: 1728px) and (min-height: 800px) and (max-height: 1117px) {
  .scope {
    left: 250% !important;
    top: -30% !important;
    width: auto !important;
    z-index: 0 !important;
  }
  
  .Wheat {
    left: 320% !important;
    top: 15% !important;
    scale: 0.65 !important;
    z-index: 0 !important;
  }
  
  .Fields {
    left: 435% !important;
    top: 10% !important;
    scale: 0.65 !important;
    z-index: 0 !important;
  } 

  .FinProduct { top: 50%; left: 10% !important; }
}

/* Large screens: 1920px+ */
@media (min-width: 1921px) {
  img:not(.Hand):not(.FinProduct):not(.Wheat):not(.John):not(.Bobby):not(.Lucinda):not(.Fields):not(.scope){
    scale: 1 !important;
  }
  
  .Hand { scale: 0.60 !important; right: -17% !important; left: auto !important; top: 55% !important; }
  .FinProduct { scale: 0.75 !important; top: 50% !important; left: 5%;}
  .Wheat { scale: 0.6 !important; top: 10% !important; left: 297% !important; }
  .Draft { top: 50% !important; left: 70% !important; transform: translate(-50%, -50%) !important; }
  .Top34 { left: 55% !important; top: 50% !important; }
  .Fields { left: 435% !important; top: 25% !important; }
  .scope{ left: 230% !important; top: -30% !important; scale: 0.35 !important; }
  
  .John, .Bobby, .Lucinda { left: 10% !important; scale: 0.65 !important; }
  
  .Mush3, .Mush4, .Mush5 { top: 70% !important; }
  .Mush2 { top: 80% !important; left: 90% !important; }
  .blueMush { top: 85% !important; left: 85% !important; }
  
  .hotspot { margin-top: -3% !important; margin-left: -25% !important; }
  
  .Problem6Text, .IA6Text, .section3 p, .Mycoscope2 p, .Mycoscope1 p, .persona-text p { width: 30% !important; }
  .Mycoscope1 h3 { font-size: 24px !important; }
  .IA6 { top: 50% !important; }
  .IA6Text { top: 60% !important; }
  
  .john-text { top: 27% !important; width: 75% !important; }
  .bobby-text { top: 52% !important; width: 70% !important; }
  .lucinda-text { top: 77% !important; width: 70% !important; }
  
  p { font-size: 20px !important; }
  .section4 h3, .persona-text h3 { font-size: 24px !important; }
  .section4 h4, .persona-text h4 { font-size: 22px !important; }
  
  /* Larger carousel for big screens */
  .carousel-container {
    width: 800px !important;
    height: 500px !important;
    left: 52% !important;
  }
  .carousel-item {
    width: 240px !important; /* Increased from 180px */
  }
  
  .carousel-item.prev {
    transform: scale(1.0) translate(-450px, -50%) !important; /* Adjusted positioning for larger size */
  }
  
  .carousel-item.active {
    transform: scale(1.3) translate(-50%, -50%) !important; /* Larger active image */
  }
  
  .carousel-item.next {
    transform: scale(1.0) translate(140px, -50%) !important; /* Fixed: positive value to move right */
  }

  .prev-btn {
    left: -15% !important;
  }
}

/* Medium screens: 700px - 1919px */
/* Small-medium screens: 700px - 767px */
@media (min-width: 700px) and (max-width: 767px) {
  .horizontal-scroll { transform: scale(calc(100vw / 1920)); }
}

/* Normal layout screens: 768px - 1920px */
@media (min-width: 768px) and (max-width: 1920px) {
  .horizontal-scroll { transform: none; }
}

/* Small screens: under 700px */
@media (max-width: 699px) {
  .horizontal-scroll { transform: scale(calc(100vw / 1920)); }
  .section-content { transform: scale(0.5); transform-origin: top left; }
}

/* Very large screens: 2560px+ */
@media (min-width: 2560px) {
  .horizontal-scroll { transform: none; }
}

/* Aspect ratio adjustments */
@media (max-aspect-ratio: 16/9) {
  .horizontal-scroll { transform: scale(calc(100vh / 1080)); }
}

/* IMAGE OPTIMIZATION STYLES */

/* Lazy loading image states */
img.lazy {
  opacity: 0;
  transition: opacity 0.3s ease;
  filter: blur(2px);
}

img.loaded {
  opacity: 1;
  filter: none;
}

img.error {
  opacity: 0.5;
  filter: grayscale(1);
}

/* Progressive loading animation */
img.loading {
  position: relative;
}

img.loading::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Responsive image container */
.img-container {
  position: relative;
  overflow: hidden;
}

.img-container img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

/* Image optimization for different screen densities */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .carousel-item {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* WebP support detection */
.webp-support img {
  background-image: none;
}

/* AVIF support detection */
.avif-support img {
  background-image: none;
}

/* Performance optimization for animations */
img {
  will-change: auto;
}

img.animating {
  will-change: transform, opacity;
}
