/* === Portfolio Section === */
.works-area {
  padding: 100px 0;
  background-color: #f8f9fb;
}

.portfolio-items {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  /* gap: 25px; */
}

@media screen and (max-width: 659px) {
  .portfolio-items {
    justify-content: center;
  }
}

.portfolio-item {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  max-width: 300px;
  flex: 1 1 calc(25% - 25px);
  margin-bottom: 20px;
}

.portfolio-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.portfolio-img {
  position: relative;
  overflow: hidden;
}

.portfolio-img img {
  width: 100%;
  height: auto;
  transition: transform 0.4s ease;
}

.portfolio-item:hover .portfolio-img img {
  transform: scale(1.05);
}

/* Optional hover overlay */
.portfolio-img::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 0, 0, 0.3); /* subtle red overlay */
  opacity: 0;
  transition: opacity 0.4s ease;
}

.portfolio-item:hover .portfolio-img::after {
  opacity: 1;
}

/* Responsive Design */
@media (max-width: 991px) {
  .portfolio-item {
    flex: 1 1 calc(33.333% - 25px);
  }
}

@media (max-width: 767px) {
  .portfolio-item {
    flex: 1 1 calc(50% - 20px);
  }
}

@media (max-width: 575px) {
  .portfolio-item {
    flex: 1 1 100%;
  }
}

/* Make the <a> fill the image area and be on top */
.portfolio-img a {
  display: block;
  position: relative;
  z-index: 2;           /* sit above the overlay */
  text-decoration: none;/* optional: remove underline */
}

/* Ensure image fills anchor cleanly */
.portfolio-img img {
  display: block;
  width: 100%;
  height: auto;
}

/* Overlay: don't block clicks and keep layering under the link */
.portfolio-img::after {
  content: "";
  position: absolute;
  inset: 0;             /* shorthand for top:0;right:0;bottom:0;left:0; */
  background: rgba(255, 0, 0, 0.30);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 1;           /* below the link (z-index:2) */
  pointer-events: none; /* allow clicks to pass through to the <a> */
}

/* Hover states (unchanged) */
.portfolio-item:hover .portfolio-img img {
  transform: scale(1.05);
}
.portfolio-item:hover .portfolio-img::after {
  opacity: 1;
}

.brand-title{
    position: absolute;
    bottom: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    text-align: center;
    padding: 10px 0;
    font-size: 18px;
}