/* Gallery Styles - Adapted for ET theme */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
  padding: 0;
}

.gallery-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(105, 123, 65, 0.1);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  background: #f5ebc4;
  cursor: pointer;
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(105, 123, 65, 0.15);
}

.gallery-item img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
}

.overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(245, 235, 196, 0.9));
  color: #111;
  padding: 20px;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.gallery-item:hover .overlay {
  transform: translateY(0);
}

.overlay h4 {
  margin: 0 0 8px 0;
  font-size: 18px;
  font-weight: 600;
}

.overlay p {
  margin: 0;
  font-size: 14px;
  opacity: 0.9;
  line-height: 1.4;
}

/* Lightbox carousel styles */
.lightbox {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(245, 235, 196, 0.95);
  backdrop-filter: blur(5px);
}

.lightbox.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-content {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.lightbox-image {
  max-width: 95vw;
  max-height: 95vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.lightbox-info {
  position: fixed;
  bottom: 20px;
  left: 20px;
  background: rgba(245, 235, 196, 0.9);
  color: #111;
  padding: 20px 25px;
  border-radius: 10px;
  text-align: left;
  backdrop-filter: blur(10px);
  max-width: 400px;
  z-index: 1001;
  border: 1px solid rgba(105, 123, 65, 0.3);
}

.lightbox-info h4 {
  margin: 0 0 5px 0;
  font-size: 18px;
  font-weight: 600;
}

.lightbox-info p {
  margin: 0;
  font-size: 14px;
  opacity: 0.9;
}

/* Navigation controls */
.lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(245, 235, 196, 0.8);
  border: 2px solid rgba(105, 123, 65, 0.3);
  color: #697b41;
  width: 60px;
  height: 60px;
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1001;
}

.lightbox-nav svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
}

.lightbox-nav:hover {
  background: rgba(245, 235, 196, 0.95);
  border-color: rgba(105, 123, 65, 0.5);
  transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

.lightbox-close {
  position: fixed;
  top: 20px;
  right: 20px;
  background: rgba(245, 235, 196, 0.8);
  border: 2px solid rgba(105, 123, 65, 0.3);
  color: #697b41;
  width: 50px;
  height: 50px;
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1001;
}

.lightbox-close svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}

.lightbox-close:hover {
  background: rgba(245, 235, 196, 0.95);
  border-color: rgba(105, 123, 65, 0.5);
  transform: scale(1.1);
}

/* Responsive adjustments */
@media screen and (max-width: 850px) {
  .gallery {
    grid-template-columns: 1fr;
    gap: 1rem;
    max-width: 100%; /* Full width on mobile */
  }

  .gallery-item img {
    height: 200px;
  }

  .lightbox-nav {
    width: 50px;
    height: 50px;
  }

  .lightbox-nav svg {
    width: 20px;
    height: 20px;
  }

  .lightbox-prev {
    left: 10px;
  }

  .lightbox-next {
    right: 10px;
  }

  .lightbox-close {
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
  }

  .lightbox-close svg {
    width: 16px;
    height: 16px;
  }

  .lightbox-info {
    bottom: 10px;
    left: 10px;
    padding: 15px 20px;
    max-width: calc(100vw - 40px);
    font-size: 14px;
  }

  .lightbox-info h4 {
    font-size: 16px;
  }

  .lightbox-info p {
    font-size: 12px;
  }
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
  .gallery-item {
    background: #212419;
    box-shadow: 0 4px 8px rgba(215, 179, 147, 0.1);
  }

  .gallery-item:hover {
    box-shadow: 0 8px 16px rgba(215, 179, 147, 0.15);
  }

  .overlay {
    background: linear-gradient(transparent, rgba(33, 36, 25, 0.9));
    color: #f5ebc4;
  }

  .lightbox {
    background-color: rgba(33, 36, 25, 0.95);
  }

  .lightbox-info {
    background: rgba(33, 36, 25, 0.9);
    color: #f5ebc4;
    border: 1px solid rgba(215, 179, 147, 0.3);
  }

  .lightbox-nav {
    background: rgba(33, 36, 25, 0.8);
    border: 2px solid rgba(215, 179, 147, 0.3);
    color: #d7b393;
  }

  .lightbox-nav:hover {
    background: rgba(33, 36, 25, 0.95);
    border-color: rgba(215, 179, 147, 0.5);
  }

  .lightbox-close {
    background: rgba(33, 36, 25, 0.8);
    border: 2px solid rgba(215, 179, 147, 0.3);
    color: #d7b393;
  }

  .lightbox-close:hover {
    background: rgba(33, 36, 25, 0.95);
    border-color: rgba(215, 179, 147, 0.5);
  }
}
