/* Custom CSS for Product Portfolio */

/* Fix image container height and ensure consistent aspect ratio */
.portfolio-attractive .grid-item .portfolio-box .portfolio-image {
  height: 300px !important;
  overflow: hidden !important;
  position: relative !important;
  width: 100% !important;
}

.portfolio-attractive .grid-item .portfolio-box .portfolio-image img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  max-width: none !important;
  max-height: none !important;
}

/* Loading state styles */
.portfolio-wrapper.loading {
  position: relative;
  min-height: 300px;
}

.portfolio-wrapper.loading::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #666666;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  transform: translate(-50%, -50%);
  z-index: 999;
}

@keyframes spin {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.portfolio-wrapper.loading .grid-item {
  opacity: 0.3;
}

/* Filter active state */
.portfolio-filter .nav.active a {
  color: #333333 !important;
  font-weight: 600;
}

/* Responsive adjustments */
@media (max-width: 991px) {
  .portfolio-attractive .grid-item .portfolio-box .portfolio-image {
    height: 250px !important;
  }
}

@media (max-width: 767px) {
  .portfolio-attractive .grid-item .portfolio-box .portfolio-image {
    height: 200px !important;
  }
}

