/* ==========================================
   1. THE SCROLL TRACK
   ========================================== */
.accordion-pin-wrapper {
  height: 450vh; /* Determines how long the section stays pinned */
  position: relative;
}

/* ==========================================
   2. THE STICKY CONTAINER
   ========================================== */
.how-we-do-it-cards {
  position: sticky;
  top: 120px; 
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  max-width: 1200px; 
  margin: 0 auto;
  padding: 0 20px 5px 20px; 
}

/* ==========================================
   3. STICKY MODULE TITLE
   ========================================== */
.accordion-main-title {
  text-align: center;
  text-transform: uppercase;
  margin-top: 0;
  margin-bottom: 20px; 
}

/* ==========================================
   4. YOUR ACCORDION CARDS
   ========================================== */
.accordion-card {
  background-color: var(--bg-color, #ffce32);
  color: var(--txt-color, #17153e);
  border-radius: 60px;
  padding: 20px 30px; 
  transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
  overflow: hidden;
}

.accordion-card.is-active { border-radius: 40px; }
.accordion-header { display: flex; align-items: center; gap: 25px; }

.accordion-number { 
  background-color: rgba(255, 255, 255, 0.3); 
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.1), 0 4px 10px rgba(0,0,0,0.15); 
  width: 60px; height: 60px; flex-shrink: 0; border-radius: 50%; display: flex; 
  align-items: center; justify-content: center; font-size: 28px; font-weight: 800; 
}

.accordion-title { 
  margin: 0; font-size: 36px; font-weight: 800; line-height: 1.1; color: inherit; 
}

.accordion-body { 
  display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.5s cubic-bezier(0.25, 1, 0.5, 1); 
}

.accordion-card.is-active .accordion-body { grid-template-rows: 1fr; }

.accordion-content { 
  overflow: hidden; padding-left: 85px; padding-top: 0; transition: padding 0.5s ease; 
}

.accordion-card.is-active .accordion-content { padding-top: 15px; }

/* ==========================================
   5. SCROLL INDICATOR
   ========================================== */
.scroll-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 20px; 
  opacity: 1;
  transition: opacity 0.4s ease; 
}

.scroll-indicator.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.scroll-text {
  font-size: 14px;
  font-weight: 600;
  color: #17153e; 
  text-transform: uppercase;
  letter-spacing: 1px;
}

.scroll-arrow {
  width: 16px;
  height: 16px;
  border-right: 3px solid #17153e;
  border-bottom: 3px solid #17153e;
  transform: rotate(45deg);
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0) rotate(45deg); }
  40% { transform: translateY(-10px) rotate(45deg); }
  60% { transform: translateY(-5px) rotate(45deg); }
}

/* ==========================================
   6. MOBILE RESPONSIVENESS: THE SLIDE DECK
   ========================================== */
@media (max-width: 768px) {
  
  /* 1. Neutralize the desktop scroll track */
  .accordion-pin-wrapper {
    height: auto !important; 
    margin-bottom: 0 !important;
  }
  
  /* 2. THE PARENT CONTAINER (Holds Title + Cards) */
  .how-we-do-it-cards {
    position: relative !important; 
    top: 0 !important; 
    padding: 0 15px 60px 15px !important; 
    /* ⚠️ CRITICAL: Must be visible for sticky children to work */
    overflow: visible !important; 
    display: block !important;
  }
  
  .scroll-indicator {
    display: none !important; 
  }

  /* ==========================================
     3. THE STICKY TITLE
     ========================================== */
  .accordion-main-title {
    position: sticky !important;
    top: 0 !important;
    
    /* ⚠️ CRITICAL: Set this to your exact page background color 
       so the cards slide cleanly underneath it without text overlapping */
    background-color: #f9f9f6 !important; 
    
    z-index: 10 !important; 
    padding-top: 20px !important; 
    padding-bottom: 20px !important;
    margin-top: 0 !important;
    margin-bottom: 20px !important;
    width: 100%;
    box-sizing: border-box;
  }

  /* ==========================================
     4. THE SLIDE DECK CARDS
     ========================================== */
  .accordion-card {
    position: sticky !important;
    
    /* Docks nicely below your sticky title */
    top: 100px !important; 
    
    height: auto !important;
    opacity: 1 !important;
    visibility: visible !important;
    margin-bottom: 60px !important; 
    
    /* Soft, realistic shadow for depth */
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.12) !important; 
    border-radius: 30px !important;
    padding: 30px !important;
    
    /* Keeps cards layered below the sticky title */
    z-index: 1; 
  }

  /* Forces any hidden text inside the card to display completely */
  .accordion-card .accordion-content,
  .accordion-card .accordion-body {
    display: block !important;
    height: auto !important;
    opacity: 1 !important;
    visibility: visible !important;
  }
  
  /* Minor typography tweaks for mobile readability */
  .accordion-header {
    gap: 15px;
  }
  .accordion-number {
    width: 50px;
    height: 50px;
    font-size: 24px;
  }
  .accordion-title {
    font-size: 24px;
  }