/* Image Loading Styles */

/* Base style for lazy images */
img[loading="lazy"],
img.lazy {
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

/* Style for loaded images */
img.loaded {
  opacity: 1;
}

/* Placeholder styles - blurred background while loading */
.image-container {
  position: relative;
  overflow: hidden;
  background-color: #f0f0f0;
}

.image-container.dark {
  background-color: #2a2a2a;
}

/* Pulse animation for image placeholders */
.image-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  animation: pulse 1.5s infinite;
}

.dark .image-container::before {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
}

.image-container.loaded::before {
  animation: none;
  opacity: 0;
}

/* Hide placeholder when image is loaded */
.image-container.loaded {
  background-color: transparent;
}

@keyframes pulse {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* Fade-in animation for images */
.fade-in {
  animation: fadeIn 0.5s ease-in-out forwards;
}

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

/* Responsive image container */
.responsive-image {
  width: 100%;
  height: auto;
  display: block;
}

/* Logo image resizing */
.logo-image, .footer-logo-img {
  max-width: 120px;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* Ensure all images have proper sizing */
img {
  max-width: 100%;
  height: auto;
}

/* Make sure images have aspect ratio */
.gallery-grid img,
.service-image img,
.about-image img {
  aspect-ratio: attr(width) / attr(height);
  object-fit: cover;
}

/* Picture element styles */
picture {
  display: block;
  width: 100%;
}

/* Reset max-width for specific elements */
.logo-image {
  max-width: 120px !important; /* Only 120px max */
  width: auto;
  height: auto;
  aspect-ratio: 1/1;
}

@media (max-width: 768px) {
  .logo-image {
    max-width: 90px !important;
  }
}

/* Better aspect ratio handling */
.hero-image, .service-header-image {
  aspect-ratio: 16/9;
}

.about-image img {
  aspect-ratio: 3/4;
} 