/* Mobile view fixes */

/* Essential display properties for all screens */
.past-events-container, 
.upcoming-events-container,
section#events {
  display: block !important;
  width: 100% !important;
  visibility: visible !important;
  opacity: 1 !important;
  overflow: visible !important;
}

/* Fix mobile display of past events section */
.past-events-track {
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
  position: relative !important;
  width: 100% !important;
  display: block !important;
}

/* Force display the grid flex container */
.past-events-track .grid-flex {
  display: flex !important;
  flex-wrap: nowrap !important;
  width: auto !important;
}

/* Make event images visible and properly sized */
.image-event {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Ensure controls are visible */
.controls-container {
  display: flex !important;
  z-index: 10 !important;
}

.controls-container button {
  opacity: 1 !important;
  z-index: 11 !important;
  pointer-events: auto !important;
}

/* Better mobile view */
@media screen and (max-width: 767px) {
  /* Make sure past events container is displayed */
  .past-events-container {
    display: block !important;
    width: 100% !important;
    overflow: visible !important;
    min-height: 320px !important;
    margin-bottom: 60px !important;
  }
  
  /* Adjust past events track sizing */
  .past-events-track {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 20px;
    margin-bottom: 20px !important;
  }
  
  /* Add spacing below past events heading on mobile */
  .past-events-container h4 {
    margin-bottom: 20px !important;
    display: block !important;
  }
  
  /* Adjust image sizes for mobile */
  .image-event img {
    width: 250px !important;
    max-width: 85vw !important;
    display: block !important;
  }
  
  /* Fix display-contents elements */
  .display-contents.flex-mod {
    display: flex !important;
  }
  
  /* Fix for testimonials on mobile */
  .testimonials-container {
    display: flex !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 30px;
  }
  
  .testimonial-card {
    scroll-snap-align: start;
    flex: 0 0 300px !important;
    margin-right: 15px !important;
  }
  
  /* Fix testimonials section */
  .testimonials-section {
    padding: 60px 0 !important;
  }
}

/* Additional fixes for very small screens */
@media screen and (max-width: 480px) {
  .image-event img {
    width: 200px !important;
    max-width: 80vw !important;
  }
  
  .testimonial-card {
    flex: 0 0 280px !important;
  }
  
  /* Add specific fixes for smallest screens */
  .past-events-track .grid-flex {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
  
  /* Reduce control button size on very small screens */
  .controls-container button {
    width: 36px !important;
    height: 36px !important;
  }
}
