.pgc-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  margin: 20px 0;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
  overflow-x: hidden;
}
@media (max-width: 1100px) {
  .pgc-cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 800px) {
  .pgc-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .pgc-cards-grid {
    grid-template-columns: 1fr;
  }
  .pgc-card {
    max-width: 100%;
  }
}

.pgc-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 12px #0001;
  overflow: hidden;
  min-height: 370px;
  max-width: 340px;
  margin: 0 auto;
  transition: box-shadow 0.18s;
  height: 100%;
}

.pgc-card-img {
  flex: 0 0 180px;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  height: 180px;
}
.pgc-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  max-width: 100%;
}

.pgc-card,
.pgc-card * {
  box-sizing: border-box;
  word-break: break-word;
}

.pgc-card {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.pgc-card-title {
  background: #b37ab7; /* light purple, tweak as needed */
  color: #fff;
  font-weight: bold;
  padding: 10px 15px;
  border-radius: unset;
  margin: 0;
  font-size: 1.13em;
  line-height: 1.28;
  max-height: fit-content;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.pgc-card-desc {
  flex: 1 1 auto;
  margin: 8px 15px;
  font-size: 1em;
  color: #555;
  min-height: 3.8em; /* enough for 140 chars */
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  word-break: break-word;
}

.pgc-card-title,
.pgc-card-desc {
  word-break: break-word;
  overflow-wrap: break-word;
}

.pgc-card-footer {
  margin-top: auto;
  padding: 13px 15px 17px 15px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.pgc-card-btn {
  background: #98388d;
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 7px 21px;
  font-size: 1.02em;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s;
}
.pgc-card-btn:hover {
  background: #5b21b6;
}

.pgc-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(30, 12, 68, 0.13);
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pgc-modal-content {
  background: #fff;
  border-radius: 10px;
  max-width: 400px;
  width: 96vw;
  padding: 25px 22px;
  box-shadow: 0 4px 22px #0002;
  position: relative;
}
.pgc-modal-close {
  position: absolute;
  right: 18px;
  top: 17px;
  font-size: 1.5em;
  cursor: pointer;
  color: #888;
  z-index: 2;
}
.pgc-modal-field {
  margin-bottom: 14px;
}
.pgc-modal-field label {
  font-weight: 600;
  display: block;
  margin-bottom: 3px;
}
.pgc-modal-btn {
  background: #98388d;
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 7px 21px;
  font-size: 1.05em;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s;
}
.pgc-modal-btn:hover {
  background: #5b21b6;
}

.pgc-card-footer {
  margin-top: auto;
  padding: 13px 15px 17px 15px;
  display: flex;
  align-items: center;
  justify-content: center; /* center the button */
}

.pgc-card-btn {
  width: 95%;
  display: block;
  color: #fff !important;
  background-color: rgb(152, 56, 141) !important;
  border: 1px solid #98388d !important;
  padding: 0.7rem 1rem;
  font-size: 1.05rem;
  border-radius: 3px;
  font-weight: 600;
  text-align: center;
  transition: all 0.3s;
  margin: 0 auto;
}

.pgc-card-btn:hover,
.pgc-card-btn:focus {
  background-color: #fff !important;
  border-color: #98388d !important;
  color: #98388d !important;
}
