/**
 * Enhanced Carousel Styles 
 * Additional styles to improve carousel visibility and readability
 */

/* Enhanced backdrop for better contrast with images */
.enhanced-blur-backdrop #modalContent {
  transform-origin: center;
  animation: subtle-pop 0.3s ease-out forwards;
}

/* Animation for modal content entry */
@keyframes subtle-pop {
  0% { transform: scale(0.95); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* Enhanced image appearance */
.enhanced-blur-backdrop #modalImage {
  filter: drop-shadow(0 0 20px rgba(0, 0, 0, 0.7));
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7), 
              0 0 0 1px rgba(255, 255, 255, 0.1),
              0 0 30px rgba(255, 125, 0, 0.15);
  transition: all 0.3s ease;
}

/* Default (Desktop) Navigation buttons styling */
.enhanced-blur-backdrop #prevImageBtn,
.enhanced-blur-backdrop #nextImageBtn {
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.7);
  background-color: rgba(10, 10, 10, 0.7);
  padding: 12px;
  opacity: 0.9;
  transition: all 0.2s ease-in-out;
  position: absolute; 
  top: 50%; 
  transform: translateY(-50%);
  z-index: 20; 
}

.enhanced-blur-backdrop #prevImageBtn {
  left: 15px;
}

.enhanced-blur-backdrop #nextImageBtn {
  right: 15px;
}

/* Default (Desktop) Hover effect for navigation buttons */
.enhanced-blur-backdrop #prevImageBtn:hover,
.enhanced-blur-backdrop #nextImageBtn:hover {
  background-color: rgba(255, 125, 0, 0.8);
  box-shadow: 0 0 15px rgba(255, 125, 0, 0.4);
  transform: translateY(-50%) scale(1.1); 
}

/* Improve close button visibility (Global) */
.enhanced-blur-backdrop #closeModal {
  background-color: rgba(10, 10, 10, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.enhanced-blur-backdrop #closeModal:hover {
  background-color: rgba(255, 125, 0, 0.8);
  transform: scale(1.1);
}

/* Styles for modal caption (title and counter text) - APPLIES TO ALL VIEWS */
.modal-caption-container {
  display: flex;
  align-items: baseline; 
  justify-content: center; 
  padding-top: 0.5rem;
  padding-bottom: 1rem;
  
  width: 100%; 
}
/* This new class wraps the title and counter text */
.caption-text-group {
  display: flex;
  flex-direction: column;
  align-items: center;  
  justify-content: center; 
  text-align: center;    
}

#modalImageTitle {
  font-size: 1.125rem; 
  line-height: 1.5rem;
  font-weight: bold;
  color: #FFFFFF;
  margin-left: 0; 
  margin-bottom: 0.25rem; 
}

#modalImageCounterText {
  font-size: 0.875rem; 
  line-height: 1.25rem;
  color: #E2E8F0; 
  margin-bottom: 0;
  white-space: nowrap; 
}

/* Information text at bottom (Global, but animation might be mobile-focused) */
.enhanced-blur-backdrop::after {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  background-color: rgba(0, 0, 0, 0.8);
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.7);
  animation: pulse-text 2s infinite;
  pointer-events: none;
}

@keyframes pulse-text {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

/* Media query to adjust for mobile devices */
@media (max-width: 768px) {
  .enhanced-blur-backdrop #modalContent {
    max-width: 95vw;
  }

  .modal-caption-container {
    justify-content: space-between;
    align-items: center; 
    padding-left: 10px; 
    padding-right: 10px; 
  }

  /* This new class wraps the title and counter text */
  .caption-text-group {
    display: flex;
    flex-direction: column; 
    align-items: center;
    justify-content: center; 
    gap: 0.5rem; 
    text-align: center;
  }

  /* Mobile styling for navigation buttons */
  .enhanced-blur-backdrop #prevImageBtn,
  .enhanced-blur-backdrop #nextImageBtn {
    position: static;  
    transform: none;   
    padding: 8px;      
    opacity: 0.8;      
    flex-shrink: 0;
  }


  .enhanced-blur-backdrop #prevImageBtn {
    order: 0; 
    left: auto; 
  }
  
  .enhanced-blur-backdrop #nextImageBtn {
    order: 2;
    right: auto; 
  }
  
  /* Mobile hover effect for navigation buttons */
  .enhanced-blur-backdrop #prevImageBtn:hover,
  .enhanced-blur-backdrop #nextImageBtn:hover {
    opacity: 1; 
    transform: scale(1.1); 
  }
  
  .enhanced-blur-backdrop::after { 
    font-size: 12px;
    padding: 8px 16px;
    bottom: 15px;
  }

  #modalImageTitle {
    font-size: 1rem; 
    margin-left: 0.25rem; 
  }

  #modalImageCounterText {
    font-size: 0.75rem; 
  }
}