/* 
 * SLIDER SECTION STYLES
 */
.facts-slider-section {
  display: none; /* Start hidden */
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  padding: 0 20px;
  box-sizing: border-box;
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 10; /* Ensure it appears above other content */
}

.facts-slider-section.visible {
  display: block !important; /* Force display */
  opacity: 1;
}

/* Category filter and slide indicators */
.category-filter,
.slide-indicators {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 1.5rem;
  text-align: center;
}

.category-filter label {
  font-weight: bold;
  margin-right: 0.5rem;
}

.category-filter select {
  padding: 0.5rem 1rem;
  border-radius: 4px;
  border: 1px solid #ccc;
  font-size: 1rem;
  min-width: 200px;
  background-color: white;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg fill='black' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  color: #333;
}

/* Slider container */
.slider-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto 1rem;
  padding: 20px 0; /* Add padding to ensure content is visible */
}

/* Slides wrapper - 16:9 aspect ratio */
.slides-wrapper {
  position: relative;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  background-color: #2e7d32; /* Match header's base color */
  background: linear-gradient(45deg, #2e7d32, #66bb6a); /* Match header's gradient */
  padding-top: 40%; /* Reduced from 56.25% for a less tall aspect ratio */
  overflow: hidden;
  min-height: 250px; /* Reduced from 300px */
  max-height: 450px; /* Add maximum height */
}

.slides {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Navigation buttons */
.slider-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 50px;
  height: 50px;
  background-color: #2e7d32; /* Match header's base color */
  color: white;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.slider-nav.prev {
  left: -25px;
  margin-right: 0;
}

.slider-nav.next {
  right: -25px;
  margin-left: 0;
}

.slider-nav:hover {
  background-color: #66bb6a; /* Match header's lighter green */
  transform: translateY(-50%) scale(1.1);
}

.slider-nav:active {
  transform: translateY(-50%) scale(0.95);
}

/* 
 * IMPROVED SLIDE STYLES 
 */
.slide {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 1.5rem 2rem; /* Reduced top/bottom padding */
  box-sizing: border-box;
  opacity: 0;
  transition: opacity 0.3s ease;
  overflow-y: auto;
  /* Base color as fallback */
  background-color: #2e7d32;
  
  /* Completely revised background approach with more visible textures */
  /* First apply the gradient */
  background-image: linear-gradient(45deg, #2e7d32, #66bb6a);
  
  /* Add a more visible grid overlay */
  background-image: 
    linear-gradient(0deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 20px 20px;
  
  /* Add the SVG pattern with higher opacity */
  position: relative;
}

/* Add a pseudo-element for the SVG texture to ensure it's visible */
.slide::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='rgba(255,255,255,0.08)' fill-rule='evenodd'/%3E%3C/svg%3E");
  background-size: 100px 100px;
  background-repeat: repeat;
  opacity: 1;
  pointer-events: none;
  z-index: 1;
}

.slide.active {
  display: flex !important; /* Force display */
  flex-direction: column;
  justify-content: center;
  opacity: 1;
  animation: fadeIn 0.5s ease-in-out;
  z-index: 5; /* Ensure active slide is on top */
  position: relative; /* Ensure position for progress bar */
  overflow-y: auto; /* Ensure content can scroll if needed */
}

/* Slide indicators */
.slide-indicators {
  display: flex;
  gap: 10px;
  position: relative;
  bottom: auto;
  left: auto;
  transform: none;
  z-index: 10;
  margin: 15px auto 0;
  padding: 0;
  justify-content: center;
}

.slide-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(46, 125, 50, 0.6); /* Match header's base color with transparency */
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

.slide-indicator:hover {
  transform: scale(1.2);
  background-color: #66bb6a; /* Match header's lighter green */
}

.slide-indicator.active {
  background-color: #66bb6a; /* Match header's lighter green */
  box-shadow: 0 0 8px rgba(102, 187, 106, 0.7); /* Glow effect with header's lighter green */
}

/* Progress bar */
.progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background-color: #66bb6a; /* Match header's lighter green */
  z-index: 5;
  border-radius: 0 0 0 8px;
  /* Add gradient to match header */
  background: linear-gradient(to right, #2e7d32, #66bb6a);
}

@keyframes progressBar {
  from { width: 0%; }
  to { width: 100%; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Make sure slide content appears above the texture */
.slide-content {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem; /* Reduced padding */
  overflow-y: auto;
  margin: 0 auto;
  max-width: 90%; /* Ensure content doesn't stretch too wide */
}

.slide-content p {
  font-size: 1.8rem; /* Slightly smaller font size */
  line-height: 1.4;
  color: white;
  text-align: center;
  margin: 0;
  font-weight: bold;
  text-shadow: 0px 1px 2px rgba(0,0,0,0.2);
}

/* Make sure slide sources appear above the texture */
.slide-sources {
  position: relative;
  z-index: 2;
  font-size: 0.9rem;
  bottom: 0.75rem; /* Reduced from 1rem */
  width: calc(100% - 4rem);
  text-align: center;
  color: white;
}

.slide-sources a {
  color: white;
  text-decoration: none;
  margin-right: 0.5rem;
  display: inline-flex;
  align-items: center;
}

.slide-sources a:hover {
  text-decoration: underline;
  color: white;
}

.slide-sources a::before {
  content: "🔗";
  margin-right: 4px;
}

/* Responsive styles for slider */
@media (max-width: 768px) {
  .slider-nav {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
  
  .slider-nav.prev {
    left: -10px;
  }
  
  .slider-nav.next {
    right: -10px;
  }
  
  .slides-wrapper {
    margin: 0 20px;
    border-radius: 6px;
    padding-top: 0;
    height: auto;
    min-height: 220px; /* Reduced from 250px */
    max-height: none; /* Remove max-height constraint on mobile */
  }
  
  .slides {
    position: relative;
    height: auto;
    min-height: 220px; /* Reduced from 250px */
  }
  
  .slide {
    position: relative;
    padding: 1rem 1.5rem; /* Adjusted padding */
    overflow-y: auto;
    height: auto;
    min-height: 220px; /* Reduced from 250px */
    max-height: none; /* Remove max-height constraint on mobile */
  }
  
  .slide-content {
    height: auto;
    min-height: calc(100% - 2.5rem); /* Adjusted for new padding */
    padding: 0.5rem;
    overflow-y: visible;
    margin-bottom: 2rem; /* Add space for sources */
  }
  
  .slide-sources {
    position: relative;
    bottom: auto;
    width: 100%;
    margin-top: 0.75rem; /* Reduced from 1rem */
  }
  
  /* Prevent browser jumping */
  html, body {
    scroll-behavior: smooth;
    overflow-anchor: none; /* Disable browser scroll anchoring */
  }
  
  .facts-slider-section {
    overflow-anchor: none; /* Disable browser scroll anchoring */
  }
  
  /* Ensure slide content is fully visible */
  .slide.active {
    overflow-y: auto;
    height: auto;
    min-height: 220px;
    max-height: none;
    display: block !important; /* Use block instead of flex on mobile */
  }
}

@media (max-width: 480px) {
  .slider-nav {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }
  
  .slides-wrapper {
    padding-top: 0;
    height: auto;
    min-height: 180px; /* Reduced from 200px */
    max-height: none; /* Remove max-height constraint on mobile */
  }
  
  .slides {
    position: relative;
    height: auto;
    min-height: 180px; /* Reduced from 200px */
  }
  
  .slide {
    position: relative;
    padding: 0.75rem 1rem; /* Adjusted padding */
    height: auto;
    min-height: 180px; /* Reduced from 200px */
    max-height: none; /* Remove max-height constraint on mobile */
  }
  
  .slide-content {
    padding: 0.25rem 0.5rem; /* Reduced padding */
    height: auto;
    overflow-y: visible;
    display: block;
    margin-bottom: 1.5rem; /* Add space for sources */
  }
  
  .slide-content p {
    font-size: 1.1rem; /* Reduced from 1.2rem */
    line-height: 1.3;
    margin-bottom: 0.75rem; /* Reduced from 1rem */
  }
  
  .slide-sources {
    font-size: 0.8rem;
    margin-top: 0.5rem; /* Reduced from implicit 1rem */
    position: relative;
    bottom: auto;
  }
} 