/* Enhanced Gallery Styling */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  padding: 2rem 0;
  max-width: 1200px;
  margin: 0 auto;
}

.gallery-item {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--warm-sand), #f0e6d2);
  box-shadow: 0 8px 25px rgba(93, 64, 55, 0.1);
  transition: all 0.3s ease;
}

.gallery-item:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 15px 35px rgba(93, 64, 55, 0.2);
}

.gallery-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-image {
  transform: scale(1.1);
}

.gallery-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(93, 64, 55, 0.9), rgba(93, 64, 55, 0.3), transparent);
  padding: 1.5rem 1rem 1rem;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

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

.gallery-overlay .gallery-title {
  color: var(--cloud-white);
  font-family: var(--heading-font);
  font-weight: 600;
  font-size: 1.1rem;
  display: block;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Responsive Design */
@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    padding: 1.5rem 0;
  }
  
  .gallery-item {
    border-radius: 12px;
  }
  
  .gallery-overlay {
    padding: 1rem 0.75rem 0.75rem;
  }
  
  .gallery-overlay .gallery-title {
    font-size: 1rem;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1025px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Loading state */
.gallery-image[loading="lazy"] {
  background: linear-gradient(135deg, var(--warm-sand), #f0e6d2);
}

/* Enhanced hover effects for desktop */
@media (hover: hover) {
  .gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent, rgba(0, 168, 89, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
  }
  
  .gallery-item:hover::before {
    opacity: 1;
  }
}

/* Gallery section spacing */
.gallery-section {
  padding: var(--space-4xl) 0;
  background: linear-gradient(135deg, var(--cloud-white) 0%, var(--warm-sand) 100%);
}

.gallery-section .section-header {
  margin-bottom: var(--space-2xl);
}

/* Print styles */
@media print {
  .gallery-item {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
  }
  
  .gallery-overlay {
    transform: translateY(0);
    background: rgba(93, 64, 55, 0.1);
  }
  
  .gallery-overlay .gallery-title {
    color: var(--earth-brown);
    text-shadow: none;
  }
}