/* ============================================
   Home Page Projects - Independent Styles
   ============================================
   These styles are scoped specifically for the 
   home page projects section and will not affect
   other image containers or galleries on the site.
   ============================================ */

/* Container for home projects section */
.home-projects-section {
  margin: 0 !important;
  padding: 0 0 40px 0 !important;
  width: 100% !important;
  position: relative !important;
}

/* Gallery container */
.home-projects-gallery {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
  gap: 28px !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
  width: 100% !important;
  min-height: 200px !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Individual project item */
.home-projects-gallery__item {
  position: relative !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border-radius: 16px !important;
  background: #fff !important;
  box-shadow: 0 8px 24px rgba(0, 53, 107, 0.12) !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease !important;
  min-height: 320px !important;
  display: block !important;
  list-style: none !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.home-projects-gallery__item:hover {
  transform: translateY(-6px) !important;
  box-shadow: 0 16px 40px rgba(0, 53, 107, 0.2) !important;
}

/* Link wrapper */
.home-projects-gallery__link {
  display: block !important;
  position: relative !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 320px !important;
  text-decoration: none !important;
  color: inherit !important;
  overflow: hidden !important;
}

/* Project image */
.home-projects-gallery__image {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  transition: transform 0.5s ease !important;
  display: block !important;
}

.home-projects-gallery__item:hover .home-projects-gallery__image {
  transform: scale(1.08) !important;
}

/* Overlay that appears on hover */
.home-projects-gallery__overlay {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  background: linear-gradient(
    135deg,
    rgba(0, 53, 107, 0.90) 0%,
    rgba(0, 87, 184, 0.85) 100%
  ) !important;
  opacity: 0 !important;
  transition: opacity 0.3s ease !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 32px 24px !important;
  z-index: 2 !important;
}

.home-projects-gallery__item:hover .home-projects-gallery__overlay {
  opacity: 1 !important;
}

/* Content inside overlay */
.home-projects-gallery__info {
  text-align: center !important;
  color: #fff !important;
  opacity: 0 !important;
  transform: translateY(15px) !important;
  transition: opacity 0.3s ease 0.1s, transform 0.3s ease 0.1s !important;
  position: relative !important;
  z-index: 3 !important;
  width: 100% !important;
}

.home-projects-gallery__item:hover .home-projects-gallery__info {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* Title in overlay */
.home-projects-gallery__title {
  font-size: 1.3rem !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  margin: 0 0 14px 0 !important;
  color: #fff !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

/* Description in overlay */
.home-projects-gallery__desc {
  font-size: 0.95rem !important;
  line-height: 1.5 !important;
  margin: 0 0 18px 0 !important;
  color: rgba(255, 255, 255, 0.95) !important;
  opacity: 0 !important;
  transition: opacity 0.3s ease 0.2s !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2) !important;
}

.home-projects-gallery__item:hover .home-projects-gallery__desc {
  opacity: 1 !important;
}

/* View project button */
.home-projects-gallery__button {
  display: inline-block !important;
  padding: 10px 22px !important;
  background: rgba(255, 255, 255, 0.95) !important;
  color: #00356b !important;
  font-size: 0.9rem !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  border-radius: 50px !important;
  transition: all 0.3s ease !important;
  opacity: 0 !important;
  transform: translateY(8px) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
  margin-top: 4px !important;
}

.home-projects-gallery__item:hover .home-projects-gallery__button {
  opacity: 1 !important;
  transform: translateY(0) !important;
  transition: all 0.3s ease 0.25s !important;
}

.home-projects-gallery__button:hover {
  background: #fff !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3) !important;
  color: #0057b8 !important;
}

/* View all link */
.home-projects-view-all {
  display: inline-block !important;
  margin-bottom: 28px !important;
  font-size: 16px !important;
  color: #00356b !important;
  text-decoration: none !important;
  font-weight: 600 !important;
  transition: color 0.2s ease !important;
}

.home-projects-view-all:hover {
  color: #0057b8 !important;
}

/* Status badge on card */
.home-projects-gallery__badge {
  position: absolute !important;
  top: 14px !important;
  right: 14px !important;
  padding: 5px 12px !important;
  background: rgba(255, 255, 255, 0.95) !important;
  color: #00356b !important;
  font-size: 0.7rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  border-radius: 20px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
  opacity: 0 !important;
  transform: scale(0.9) !important;
  transition: all 0.3s ease !important;
  z-index: 4 !important;
  pointer-events: none !important;
}

.home-projects-gallery__item:hover .home-projects-gallery__badge {
  opacity: 1 !important;
  transform: scale(1) !important;
  transition-delay: 0.15s !important;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .home-projects-gallery {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)) !important;
    gap: 24px !important;
  }
  
  .home-projects-gallery__item {
    min-height: 300px !important;
  }
  
  .home-projects-gallery__link {
    min-height: 300px !important;
  }
}

@media (max-width: 768px) {
  .home-projects-gallery {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
    gap: 20px !important;
  }
  
  .home-projects-gallery__item {
    min-height: 280px !important;
  }
  
  .home-projects-gallery__link {
    min-height: 280px !important;
  }
  
  .home-projects-gallery__title {
    font-size: 1.15rem !important;
  }
  
  .home-projects-gallery__desc {
    font-size: 0.9rem !important;
  }
}

@media (max-width: 640px) {
  .home-projects-gallery {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }
  
  .home-projects-gallery__item {
    min-height: 320px !important;
  }
  
  .home-projects-gallery__link {
    min-height: 320px !important;
  }
  
  .home-projects-gallery__overlay {
    padding: 24px 20px !important;
  }
  
  .home-projects-gallery__title {
    font-size: 1.1rem !important;
    margin-bottom: 12px !important;
  }
  
  .home-projects-gallery__desc {
    font-size: 0.85rem !important;
    margin-bottom: 16px !important;
  }
}
