/* project.css - refined layout for projects section */

/* Projects grid */
.projects-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); /* enlarged grid */
  gap: 25px;
  padding: 40px;
  justify-items: center;
  align-items: start;
  background: #f8f8f8;
}

/* Card base */
.project-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 20px;
  width: 100%;
  max-width: 400px;
  min-height: 520px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.project-card.expanded {
  min-height: auto;
  overflow: visible;
}

/* Hover lift */
.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.12);
}

/* Image gallery inside card */
.project-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.project-gallery img {
  width: 100%;
  height: 120px; /* slightly larger */
  object-fit: cover;
  border-radius: 8px;
  transition: transform 0.25s ease;
}

.project-gallery img:hover {
  transform: scale(1.04);
}

/* ✅ Single images (not in project-gallery) */
.project-card > img {
  width: 100%;
  height: 180px; /* reduced from full-size to balance cards */
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 12px;
  transition: transform 0.25s ease;
}

.project-card > img:hover {
  transform: scale(1.04);
}

/* Titles, text */
.project-card h3 {
  font-size: 20px;
  color: #222;
  margin: 8px 0;
  font-weight: 600;
  text-align: left;
}

.project-card p {
  font-size: 14px;
  color: #444;
  line-height: 1.5;
  margin: 0 0 12px 0;
  text-align: left;
}

/* Keep details hidden initially */
.project-details {
  margin-top: 10px;
  text-align: left;
  display: none;
}

.project-card.expanded .project-details {
  display: block;
}

/* progress bar */
.progress-bar {
  background: #eee;
  border-radius: 6px;
  overflow: hidden;
  height: 10px;
  margin: 8px 0;
}

.progress {
  background: #4caf50;
  height: 100%;
  border-radius: 6px;
}

/* donation input / buttons */
.donation-input-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.currency-symbol {
  margin-right: 6px;
  font-weight: 700;
  color: #333;
}

.donation-input {
  padding: 8px 10px;
  width: 120px;
  border: 1px solid #ccc;
  border-radius: 6px;
  text-align: center;
}

/* Center only the donate button */
.donate-button {
  background: #007bff;
  display: block;
  margin: 8px auto 10px;
  border: none;
  border-radius: 6px;
  color: #fff;
  padding: 9px 16px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.donate-button:hover {
  background: #0062cc;
}

/* SEE MORE button styling */
.see-more-button {
  background: #0056b3;
  display: block;
  margin: 0 auto;
  border: none;
  border-radius: 6px;
  color: #fff;
  padding: 9px 16px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.see-more-button:hover {
  background: #004080;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .projects-section {
    gap: 18px;
    padding: 30px 20px;
  }
  .project-gallery img {
    height: 110px;
  }
  .project-card > img {
    height: 160px;
  }
}

@media (max-width: 768px) {
  .projects-section {
    grid-template-columns: 1fr;
    padding: 20px;
  }
  .project-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
  .project-gallery img {
    height: 100px;
  }
  .project-card > img {
    height: 150px;
  }
}

@media (max-width: 480px) {
  .project-gallery img {
    height: 90px;
  }
  .project-card > img {
    height: 140px;
  }
  .project-card {
    padding: 16px;
    max-width: 100%;
    min-height: 480px;
  }
  .donation-input {
    width: 100px;
  }
}
