/* GRID BASE */
.jn-portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
  margin: 60px auto;
  padding: 0 20px;
  max-width: 1400px;
}

/* CARD */
.jn-card {
  position: relative;
  background: #0b273e;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.2);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.jn-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

/* IMAGE */
.jn-image {
  width: 100%;
  height: 220px;
  background-size: cover;
  background-position: center center;
  transition: transform 0.4s ease;
}

.jn-card:hover .jn-image {
  transform: scale(1.05);
}

/* CONTENT OVERLAY */
.jn-content {
  background: rgba(13, 53, 89, 0.95);
  color: #f2f5fa;
  padding: 25px 25px 40px;
  text-align: left;
  min-height: 200px;
  flex-grow: 1;
}

.jn-content h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  color: #f5f7fb;
  margin-bottom: 10px;
}

.jn-content p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #d8e2ef;
}

/* BUTTON */
.jn-btn {
  position: absolute;
  bottom: 20px;
  left: 25px;
  display: inline-block;
  background: #375876;
  color: #fff;
  text-decoration: none;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  transition: background 0.3s ease, transform 0.2s ease;
}

.jn-btn:hover {
  background: #023a6b;
  transform: translateY(-2px);
}

/* RESPONSIVE FIXES */
@media (max-width: 768px) {
  .jn-content {
    padding: 20px;
  }

  .jn-content h3 {
    font-size: 1.2rem;
  }

  .jn-btn {
    position: relative;
    bottom: 0;
    left: 0;
    margin-top: 15px;
  }
}
