/* Modern Portfolio Grid - Responsive Layout */
.modern-portfolio-grid {
  display: grid;
  gap: 20px;
  padding: 20px;
  grid-template-columns: repeat(var(--psc-cols, 4), 1fr);
  box-sizing: border-box;
}

/* Portfolio Card */
.modern-card {
  position: relative;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  transition: transform 0.3s ease;
  background-color: #fff;
}

.modern-card:hover {
  transform: scale(1.02);
}

/* Image Section */
.modern-card img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: transform 0.4s ease;
}

/* Overlay Styling */
.modern-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 20px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
  color: #fff;
  text-align: left;
  box-sizing: border-box;
  transition: all 0.3s ease-in-out;
}

/* Title */
.modern-card-overlay h3 {
  margin: 0 0 6px;
  font-size: 1.4rem;
  font-weight: 600;
  color: #fff;
  border-top: Solid 1px #fff;
  padding-top: 25px;
}

/* Description */
.modern-card-overlay p {
  margin: 0 0 10px;
  font-size: 0.95rem;
  color: #f0f0f0;
}

/* Button Link */
.modern-card-overlay a {
  display: inline-block;
  padding: 6px 12px;
  background: #0073aa;
  border-radius: 6px;
  color: #fff;
  text-decoration: none;
  font-size: 0.9rem;
}

.modern-card-overlay a:hover {
  background: #005e8a;
}

/* Responsive Text Adjustments */
@media (max-width: 768px) {
  .modern-card-overlay h3 {
    font-size: 1rem;
  }

  .modern-card-overlay p {
    font-size: 0.85rem;
  }

  .modern-card-overlay a {
    font-size: 0.8rem;
    padding: 5px 10px;
  }
}
