/* Gallery Section Styles */
:root {
  --primary-green: #7BB661;
  --dark-green: #2E5339;
  --light-grey: #f8f9fa;
  --border-radius: 1rem;
  --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  --box-shadow-hover: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Gallery Hero Section */
.gallery-hero {
  text-align: center;
  max-width: 100%;
  margin: 0 auto 30px auto;
  padding: 30px 15px 20px 15px;
}

@media (min-width: 576px) {
  .gallery-hero {
    max-width: 600px;
    margin-bottom: 40px;
    padding: 40px 20px 25px 20px;
  }
}

@media (min-width: 768px) {
  .gallery-hero {
    max-width: 800px;
    margin-bottom: 50px;
    padding: 50px 20px 30px 20px;
  }
}

.gallery-hero h1 {
  font-size: 2.2rem;
  color: var(--dark-green);
  margin-bottom: 15px;
  line-height: 1.2;
}

@media (min-width: 576px) {
  .gallery-hero h1 {
    font-size: 2.4rem;
    margin-bottom: 18px;
  }
}

@media (min-width: 768px) {
  .gallery-hero h1 {
    font-size: 2.8rem;
    margin-bottom: 20px;
  }
}

.gallery-hero p {
  font-size: 1rem;
  color: #666;
  line-height: 1.6;
  margin-bottom: 20px;
}

@media (min-width: 576px) {
  .gallery-hero p {
    font-size: 1.1rem;
    margin-bottom: 25px;
  }
}

@media (min-width: 768px) {
  .gallery-hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
  }
}

/* Featured Carousel */
.featured-carousel {
  margin-bottom: 30px;
  padding: 0 15px;
}

@media (min-width: 576px) {
  .featured-carousel {
    margin-bottom: 40px;
    padding: 0 20px;
  }
}

@media (min-width: 768px) {
  .featured-carousel {
    margin-bottom: 50px;
  }
}

.carousel-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
}

.carousel-wrapper {
  display: flex;
  width: 100%;
  height: 250px;
}

@media (min-width: 576px) {
  .carousel-wrapper {
    height: 350px;
  }
}

@media (min-width: 768px) {
  .carousel-wrapper {
    height: 400px;
  }
}

@media (min-width: 1024px) {
  .carousel-wrapper {
    height: 500px;
  }
}

.carousel-slide {
  min-width: 100%;
  height: 100%;
  position: relative;
  display: none;
}

.carousel-slide.active {
  display: block;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 20px;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.carousel-slide:hover .carousel-caption {
  transform: translateY(0);
}

.carousel-caption h3 {
  font-size: 1.5em;
  margin-bottom: 10px;
  color: white;
}

.carousel-caption p {
  font-size: 1em;
  margin: 0;
  color: #ddd;
}

.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.7);
  color: var(--dark-green);
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 1.5em;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
}

.carousel-nav:hover {
  background: white;
  transform: translateY(-50%) scale(1.1);
}

.prev-slide {
  left: 20px;
}

.next-slide {
  right: 20px;
}

.carousel-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background 0.3s ease;
}

.dot.active,
.dot:hover {
  background: white;
}

/* Category Filter */
.category-filter {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
  padding: 0 20px;
}

.category-filter-btn {
  background-color: #f0f0f0;
  color: #555;
  border: none;
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 0.9em;
  cursor: pointer;
  transition: all 0.3s ease;
}

.category-filter-btn:hover,
.category-filter-btn.active {
  background-color: var(--primary-green);
  color: white;
}

/* Media Grid */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto 50px auto;
  padding: 0 20px;
}

/* Media Card */
.media-card {
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
  /* Glassmorphism effect */
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.media-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--box-shadow-hover);
  /* Enhanced glassmorphism effect on hover */
  background: rgba(22, 163, 74, 0.1);
  box-shadow: 0 8px 32px rgba(22, 163, 74, 0.2);
  border: 1px solid rgba(22, 163, 74, 0.3);
}

.media-wrapper {
  position: relative;
  overflow: hidden;
}

.media-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.media-wrapper:hover .media-image {
  transform: scale(1.05);
}

.media-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(123, 182, 97, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  cursor: pointer;
}

.media-wrapper:hover .media-overlay {
  opacity: 1;
}

.media-overlay i {
  color: white;
  font-size: 2em;
}

.media-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.media-date {
  font-size: 0.85em;
  color: var(--primary-green);
  font-weight: 600;
  margin-bottom: 10px;
}

.media-category {
  display: inline-block;
  background-color: var(--primary-green);
  color: white;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 0.8em;
  font-weight: 600;
  margin-bottom: 15px;
  align-self: flex-start;
}

.media-title {
  font-size: 1.3em;
  color: var(--dark-green);
  margin-bottom: 15px;
  line-height: 1.3;
  flex-grow: 1;
}

.media-description {
  font-size: 0.95em;
  color: #666;
  line-height: 1.6;
  margin-bottom: 20px;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  margin: 50px 0;
  gap: 10px;
  padding: 0 20px;
}

.pagination-btn {
  background-color: #f0f0f0;
  color: #555;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.pagination-btn:hover,
.pagination-btn.active {
  background-color: var(--primary-green);
  color: white;
}

/* Timeline Section */
.timeline-section {
  padding: 60px 20px;
  background-color: var(--light-grey);
  margin: 60px 0;
}

.timeline-section h2 {
  text-align: center;
  font-size: 2em;
  color: var(--dark-green);
  margin-bottom: 50px;
}

.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 4px;
  background-color: var(--primary-green);
  left: 50%;
  margin-left: -2px;
}

.timeline-item {
  position: relative;
  margin-bottom: 50px;
  width: 100%;
}

.timeline-item:nth-child(odd) {
  padding-right: calc(50% + 30px);
  text-align: right;
}

.timeline-item:nth-child(even) {
  padding-left: calc(50% + 30px);
}

.timeline-dot {
  position: absolute;
  width: 20px;
  height: 20px;
  background-color: var(--primary-green);
  border-radius: 50%;
  top: 15px;
  left: 50%;
  margin-left: -10px;
  z-index: 1;
}

.timeline-content {
  border-radius: var(--border-radius);
  padding: 25px;
  box-shadow: var(--box-shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  /* Glassmorphism effect */
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.timeline-content:hover {
  transform: translateY(-5px);
  box-shadow: var(--box-shadow-hover);
  /* Enhanced glassmorphism effect on hover */
  background: rgba(22, 163, 74, 0.1);
  box-shadow: 0 8px 32px rgba(22, 163, 74, 0.2);
  border: 1px solid rgba(22, 163, 74, 0.3);
}

.timeline-date {
  font-size: 0.85em;
  color: var(--primary-green);
  font-weight: 600;
  margin-bottom: 10px;
  display: block;
}

.timeline-title {
  font-size: 1.4em;
  color: var(--dark-green);
  margin-bottom: 15px;
  line-height: 1.3;
}

.timeline-content p {
  font-size: 0.95em;
  color: #666;
  line-height: 1.6;
  margin-bottom: 20px;
}

.timeline-media {
  border-radius: var(--border-radius);
  overflow: hidden;
  margin-top: 15px;
}

.timeline-media img {
  width: 100%;
  height: auto;
  display: block;
}

/* CTA Section */
.gallery-cta {
  background-color: var(--light-grey);
  padding: 60px 20px;
  text-align: center;
  margin: 60px 0;
  border-radius: var(--border-radius);
}

.gallery-cta h2 {
  font-size: 2em;
  color: var(--dark-green);
  margin-bottom: 20px;
}

.gallery-cta p {
  font-size: 1.1em;
  color: #666;
  max-width: 600px;
  margin: 0 auto 30px auto;
  line-height: 1.6;
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  z-index: 1000;
  padding-top: 100px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.9);
}

.lightbox-content {
  position: relative;
  margin: auto;
  padding: 20px;
  width: 80%;
  max-width: 800px;
  text-align: center;
}

.close-lightbox {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 1001;
}

.close-lightbox:hover {
  color: #bbb;
}

#lightbox-img {
  width: 100%;
  height: auto;
  border-radius: var(--border-radius);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.lightbox-caption {
  margin-top: 20px;
  color: white;
  text-align: center;
}

.lightbox-caption h3 {
  font-size: 1.5em;
  color: white;
  margin-bottom: 10px;
}

.lightbox-caption p {
  font-size: 1em;
  color: #ddd;
  margin-bottom: 0;
}

.prev-lightbox,
.next-lightbox {
  position: absolute;
  top: 50%;
  width: auto;
  padding: 16px;
  margin-top: -50px;
  color: white;
  font-weight: bold;
  font-size: 30px;
  border-radius: 0 3px 3px 0;
  user-select: none;
  cursor: pointer;
  z-index: 1001;
}

.prev-lightbox {
  left: 10px;
  border-radius: 3px 0 0 3px;
}

.next-lightbox {
  right: 10px;
  border-radius: 0 3px 3px 0;
}

.prev-lightbox:hover,
.next-lightbox:hover {
  background-color: rgba(255, 255, 255, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
  .gallery-hero h1 {
    font-size: 2.2em;
  }
  
  .gallery-hero p {
    font-size: 1em;
  }
  
  .carousel-wrapper {
    height: 300px;
  }
  
  .carousel-caption h3 {
    font-size: 1.2em;
  }
  
  .carousel-nav {
    width: 40px;
    height: 40px;
    font-size: 1.2em;
  }
  
  .category-filter {
    gap: 8px;
  }
  
  .category-filter-btn {
    padding: 8px 15px;
    font-size: 0.85em;
  }
  
  .media-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
  }
  
  .media-content {
    padding: 20px;
  }
  
  .media-title {
    font-size: 1.1em;
  }
  
  .timeline::before {
    left: 30px;
  }
  
  .timeline-item {
    padding-right: 0 !important;
    padding-left: 70px !important;
    text-align: left !important;
  }
  
  .timeline-dot {
    left: 30px;
  }
  
  .timeline-content {
    padding: 20px;
  }
  
  .timeline-title {
    font-size: 1.2em;
  }
  
  .gallery-cta h2 {
    font-size: 1.5em;
  }
  
  .gallery-cta p {
    font-size: 1em;
  }
}

@media (max-width: 480px) {
  .gallery-hero {
    padding: 30px 15px 20px 15px;
  }
  
  .gallery-hero h1 {
    font-size: 1.8em;
  }
  
  .gallery-hero p {
    font-size: 0.9em;
  }
  
  .carousel-wrapper {
    height: 250px;
  }
  
  .carousel-caption {
    padding: 15px;
  }
  
  .carousel-caption h3 {
    font-size: 1em;
  }
  
  .carousel-caption p {
    font-size: 0.8em;
  }
  
  .category-filter-btn {
    padding: 6px 12px;
    font-size: 0.8em;
  }
  
  .media-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  
  .media-content {
    padding: 20px;
  }
  
  .media-title {
    font-size: 1.1em;
  }
  
  .pagination-btn {
    width: 35px;
    height: 35px;
    font-size: 0.9em;
  }
  
  .timeline-section {
    padding: 40px 15px;
  }
  
  .timeline-section h2 {
    font-size: 1.5em;
  }
  
  .timeline-title {
    font-size: 1.1em;
  }
  
  .gallery-cta {
    padding: 40px 15px;
  }
  
  .gallery-cta h2 {
    font-size: 1.3em;
  }
  
  .gallery-cta p {
    font-size: 0.9em;
  }
  
  .lightbox-content {
    width: 95%;
    padding: 10px;
  }
  
  .close-lightbox {
    font-size: 30px;
    top: 10px;
    right: 15px;
  }
  
  .prev-lightbox,
  .next-lightbox {
    font-size: 20px;
    padding: 10px;
  }
}