/* Performance and Visual Optimizations */

/* Lazy loading styles */
img[data-src] {
  filter: blur(5px);
  transition: filter 0.3s;
}

img[data-src].loaded {
  filter: blur(0);
}

/* Modern image filters and effects */
.gallery-item .image img {
  filter: brightness(1) contrast(1.1) saturate(1.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item:hover .image img {
  filter: brightness(1.1) contrast(1.2) saturate(1.2);
  transform: scale(1.05);
}

/* Improved button hover effects */
.btn {
  position: relative;
  overflow: hidden;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

/* Smooth animations */
* {
  scroll-behavior: smooth;
}

/* Optimized carousel */
.carousel-item {
  will-change: transform;
  backface-visibility: hidden;
}

/* Modern card shadows */
.features-box,
.about__box,
.story {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.3s ease;
}

.features-box:hover,
.about__box:hover,
.story:hover {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Responsive image optimization */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Loading states */
.loading {
  position: relative;
  overflow: hidden;
}

.loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Alert styles */
.alert {
  padding: 1rem 1.5rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  font-weight: 500;
}

.alert-success {
  background-color: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.alert-error {
  background-color: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

/* Improved form styles */
.contactFill__form--input,
.contactFill__form textarea {
  border: 2px solid #e5e7eb;
  border-radius: 0.5rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contactFill__form--input:focus,
.contactFill__form textarea:focus {
  outline: none;
  border-color: #ff6600;
  box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.1);
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .btn {
    padding: 1rem 2rem;
    font-size: 1.4rem;
  }
  
  .gallery-item .image img {
    transition: none;
  }
  
  .gallery-item:hover .image img {
    transform: none;
  }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus styles for accessibility */
button:focus,
a:focus,
input:focus,
textarea:focus {
  outline: 2px solid #ff6600;
  outline-offset: 2px;
}

/* Print styles */
@media print {
  .navigation,
  .whatsappNav,
  .instagramNav,
  .quickNavigation {
    display: none !important;
  }
}