

/* Screen reader only utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.sr-only:focus, .focus\:not-sr-only:focus {
  position: static;
  width: auto;
  height: auto;
  padding: 0;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
}


/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Focus visible for better accessibility */
*:focus-visible {
  outline: 2px solid #1D8070;
  outline-offset: 2px;
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Loading state for dynamic content */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #DAA700;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Image optimization */


/* Lazy loading blur effect */
img[loading="lazy"] {
  transition: filter 0.3s ease-in-out;
}

img[loading="lazy"]:not([src]) {
  filter: blur(10px);
}

/* Hide scrollbar for carousel */
#cards4::-webkit-scrollbar {
  display: none;
}

#cards4 {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

/* Carousel item sizing and snapping */
/* Mobile marquee track */
.cards4-track {
  animation: cards4-scroll 16s linear infinite;
  transform: translate3d(0,0,0);
}

.cards4-track > article {
  flex: 0 0 auto;
}

 @keyframes cards4-scroll {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-100%, 0, 0); }
  
}

/* Pause on hover (desktop dev tools) */
#cards4:hover .cards4-track { animation-play-state: paused; }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .cards4-track { animation: none; }
}

/* Desktop grid spacing override */
@media (min-width: 1024px) {
  #cards4 {
    overflow-x: hidden !important;     
    width: fit-content;
    
    
                    
 
  }

  .cards4-track {
       
    width: max-content !important; 
      gap: 5rem; 
      animation: none !important;
     transform: translateX(0) !important;
  }
  
  
}



/* Scroll container for marquee */
#cards4 {
  background: transparent;
  scroll-padding-left: 16px;
  scroll-padding-right: 16px;
}

/* Apply snap only on mobile/tablet */
@media (max-width: 1023.98px) {
  #cards4 { scroll-snap-type: x proximity; }
}

#cards4 .cards4-track,
#cards4 .cards4-track > article,
#cards4 .cards4-track img {
  background: transparent;
}

/* Enable snap on items for better manual scroll */
#cards4 .cards4-track > article { scroll-snap-align: center; }

/* Helper class to pause animation while interacting */
.cards4-paused .cards4-track {
  animation-play-state: paused !important;
}
