/* Reduced height from 450vh to 180vh for much faster scroll triggering */
.kinetic-mesh-wrapper.expanded-section {
  color: #ffffff;
  position: relative;
  height: 180vh; /* Quick, high-impact scroll distance */
  width: 100%;
}

.mesh-sticky-container {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  perspective: 1200px;
}

.mesh-header {
  position: absolute;
  top: 8%;
  text-align: center;
  z-index: 15;
  pointer-events: none;
}

.section-badge {
  font-size: 0.75rem;
  letter-spacing: 2px;
  color: #c084fc;
  font-weight: 700;
  text-transform: uppercase;
}

.mesh-header h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-top: 0.4rem;
  color: #ffffff;
}

.mesh-3d-scene {
  position: absolute;
  width: 100%;
  max-width: 1300px;
  height: 90vh;
  top:5.5rem;
  z-index: 1;
  pointer-events: none;
  transform-style: preserve-3d;
  will-change: transform;
}

.mesh-svg {
  width: 100%;
  height: 100%;
}

.mesh-cards-grid {
  position: relative;
  width: 100%;
  max-width: 1280px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 0 2rem;
  margin-top: 3.5rem;
  z-index: 10;
  transform-style: preserve-3d;
}

.mesh-card {
  will-change: transform, opacity;
  transform-style: preserve-3d;
}

.card-glass {
  background: rgba(18, 10, 32, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(192, 132, 252, 0.2);
  border-radius: 16px;
  padding: 1.8rem 1.4rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 
              inset 0 0 15px rgba(192, 132, 252, 0.05);
}

.card-glass.highlight {
  border-color: rgba(192, 132, 252, 0.5);
  box-shadow: 0 20px 40px rgba(147, 51, 234, 0.25), 
              inset 0 0 25px rgba(192, 132, 252, 0.15);
}

.card-tag {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 2px;
  color: #c084fc;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.card-glass h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #f8fafc;
}

.card-glass p {
  font-size: 0.85rem;
  line-height: 1.45;
  color: #94a3b8;
}

/* Keep Desktop styles intact (above this line) */

/* ----------------------------------------------------
 * Mobile & Tablet Responsiveness
 * ---------------------------------------------------- */

/* ----------------------------------------------------
 * Mobile & Tablet Responsiveness (Zero Page-Overflow Slider)
 * ---------------------------------------------------- */
@media (max-width: 992px) { 
  .mesh-cards-grid { 
    grid-template-columns: repeat(2, 1fr); 
  } 
} 
 
@media (max-width: 768px) { 
  /* 1. Prevent section-level overflow */
  .kinetic-mesh-wrapper.expanded-section { 
    height: auto; 
    padding: 0 0;
    width: 100%;
    max-width: 100vw;
    overflow: hidden; /* Stops horizontal page scrollbar */
    box-sizing: border-box;
  } 

  /* 2. Release sticky behavior on mobile */
  .mesh-sticky-container { 
    position: relative; 
    top: auto;
    height: auto; 
    width: 100%;
    max-width: 100%;
    overflow: hidden; 
  } 

  .mesh-header { 
    position: relative; 
    top: auto; 
    margin-bottom: 1rem; 
    padding: 0 1rem;
    pointer-events: auto; 
  } 

  .mesh-header h2 {
      margin-bottom: 10px;
  }

  .mesh-3d-scene { 
    display: none; 
  } 

  /* 3. Fully-responsive horizontal track */
  .mesh-cards-grid { 
    display: flex;
    flex-direction: row;
    align-items: stretch; /* All cards match full height of tallest card */
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    gap: 16px; 
    padding: 0.5rem 1.25rem 1.5rem 1.25rem; 
    margin-top: 0; 
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Hide scrollbar Firefox */
  } 

  .mesh-cards-grid::-webkit-scrollbar {
    display: none; /* Hide scrollbar Chrome/Safari */
  }

  /* 4. Full responsive card sizing */
  .mesh-card { 
    flex: 0 0 calc(100% - 2.5rem); /* Keeps card within screen bounds while showing next slide */
    width: calc(100% - 2.5rem);
    scroll-snap-align: center;
    transform: none !important;
    display: flex;
    box-sizing: border-box;
  }

  .card-glass.highlight{
      box-shadow:unset;
  }

  /* 5. Natural card interior height */
  .card-glass {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    box-sizing: border-box;
    background:unset;
    box-shadow: usnet;
  }
}