/* Home Page Custom Styles */

/* Events Grid Hover Effects */
.events-grid article {
  transition: all 0.3s ease;
}

.events-grid article:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

/* View All Button Animation */
.view-all-btn {
  position: relative;
  overflow: hidden;
}

.view-all-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;
}

.view-all-btn:hover::before {
  left: 100%;
}

/* Responsive Grid */
@media (max-width: 640px) {
  .events-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

@media (min-width: 641px) and (max-width: 1024px) {
  .events-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

@media (min-width: 1025px) {
  .events-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
  }
}

/* Events Section Title Animation */
.events-section h2 {
  position: relative;
  display: inline-block;
}

.events-section h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, #16a34a, #22c55e);
  border-radius: 2px;
}

/* Card Image Hover Effect */
.events-grid article img {
  transition: transform 0.3s ease;
}

.events-grid article:hover img {
  transform: scale(1.05);
}

/* Loading State for Button */
.view-all-btn:active {
  transform: scale(0.98);
}

/* Product card title: smaller and uniform height */
.product-card-title {
  font-size: 1rem;
  line-height: 1.4;
  height: 2.8rem;
  overflow: hidden;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Add-to-cart button uniform style */
.product-cart-btn {
  background-color: #155638;
  color: #ffffff;
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(21, 86, 56, 0.2);
  border: none;
  cursor: pointer;
  min-width: 120px;
}

.product-cart-btn:hover {
  background-color: #0f3f2a;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(21, 86, 56, 0.3);
}

.product-cart-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(21, 86, 56, 0.2);
}

/* Lazy loading for images */
.lazy-image {
  opacity: 0;
  transition: opacity 0.3s;
}

.lazy-image.loaded {
  opacity: 1;
}
