/* ── Card image wrap ── */
.card-image-wrap {
  position: relative;
  height: 210px;
  overflow: hidden;
  background: #eee;
}
 
.projects-hero {
    background: url("/static/img/hero-bg.png") center/cover no-repeat;
    position: relative;
    color: white;
    text-align: center;
    padding: 80px 20px;
}

.projects-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.projects-hero h1,
.projects-hero p {
    position: relative;
    z-index: 1;
}
.card-img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}
 
.project-card:hover .card-img {
  transform: scale(1.04);
}
 
/* Before/After toggle buttons on card */
.ba-toggle-btns {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  z-index: 5;
}
 
.ba-btn {
  border: none;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  background: rgba(255,255,255,0.85);
  color: #333;
  transition: background 0.2s, color 0.2s;
}
 
.ba-btn.active {
  background: #1f5a3a;
  color: #fff;
}
 
/* Card content */
.project-card {
  cursor: pointer;
}
 
.project-content {
  padding: 18px 20px 22px;
}
 
.project-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #1f5f3b;
  background: #e8f4ed;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 8px;
}
 
.project-content h3 {
  font-size: 1.05rem;
  color: #1a2b22;
  margin: 0 0 8px;
}
 
.project-content p {
  font-size: 0.88rem;
  color: #5f6461;
  line-height: 1.55;
  margin: 0;
}
 
/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
 
.modal-box {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  max-width: 780px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  position: relative;
  animation: modalIn 0.22s ease;
}
 
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.94); }
  to   { opacity: 1; transform: scale(1); }
}
 
.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: rgba(0,0,0,0.5);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  font-size: 20px;
  cursor: pointer;
  z-index: 10;
  line-height: 1;
}
 
.modal-image-wrap {
  position: relative;
}
 
#modalImg {
  width: 100%;
  height: 420px;
  object-fit: cover;
  display: block;
}
 
/* Modal before/after buttons */
.modal-ba-btns {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 3px 12px rgba(0,0,0,0.35);
}
 
.modal-ba-btn {
  border: none;
  padding: 8px 22px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  background: rgba(255,255,255,0.88);
  color: #333;
  transition: background 0.2s, color 0.2s;
}
 
.modal-ba-btn.active {
  background: #1f5a3a;
  color: #fff;
}
 
.modal-info {
  padding: 22px 28px 28px;
}
 
.modal-info h3 {
  font-size: 1.4rem;
  color: #1a2b22;
  margin: 8px 0 12px;
}
 
.modal-info p {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.6;
  margin: 0;
}
 
/* ── Filter buttons ── */
.project-filters {
  text-align: center;
  margin-bottom: 40px;
}
 
.filter-btn {
  border: none;
  padding: 8px 18px;
  margin: 4px;
  border-radius: 20px;
  background: #eee;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.2s, color 0.2s;
}
 
.filter-btn.active {
  background: #1f5a3a;
  color: white;
}