.container-page {
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 25px;
}

.filters {
  text-align: center;
  margin-bottom: 25px;
}

.filters button {
  margin: 5px;
  padding: 10px 18px;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  background: #8aaa0d;
  color: white;
  font-weight: 600;
  transition: 0.25s;
}

.filters button:hover {
  background: #aac651;
}

.filters button.active {
  background: #3a4827;
  color: #fff;
  transform: scale(1.05);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

#projects-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
  width: 100%;
  max-width: 1400px; /* يحصر العرض الكبير */
  margin: 0 auto 40px auto;
  padding: 0 15px;
  justify-items: center;
}

.project-card {
  background: white;
  padding: 18px;
  border: 1px solid #e6e6e6;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
  cursor: pointer;
  transition: 0.3s;
  transform: translateY(25px);
}
.project-card.visible {
  opacity: 1;
  transform: translateY(0);
}
.project-card:hover {
  transform: translateY(-7px) scale(1.02);
  box-shadow: 0 10px 20px rgba(99, 161, 125, 0.2);
}
.project-card img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  border-radius: 10px;
}
.project-card h3 {
  margin: 10px 0 5px;
  font-size: 18px;
  color: #111;
}
.project-card p {
  font-size: 14px;
  color: #555;
  margin: 2px 0;
}
.badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  color: white;
}
.badge.done {
  background: green;
}
.badge.progress {
  background: orange;
}

/* Lightbox */
/* Lightbox */
#lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75); /* خلفية نصف شفافة داكنة */
  justify-content: center;
  align-items: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease;
}
#lightbox .content {
  display: flex;
  flex-direction: row;
  width: 80vw;
  height: 70vh;
  padding: 20px;
  gap: 20px;
  background: #fff;  /* خلي المحتوى نفسه أبيض */
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.3); /* شوية ظل يخليها تطلع عن الخلفية */
  overflow: hidden;
}
#lightbox .content img,
#lightbox-slider img {
  flex: 1;
  max-width: 50%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 10px;
}
#lightbox .details {
  flex: 1;2
  overflow-y: auto;
  font-size: 40px;
  color: #333;
  padding-left: 10px;
}

#lightbox .close {
  position: absolute;
  top: 12px;
  right: 18px;
  font-size: 26px;
  cursor: pointer;
  font-weight: bold;
  color: #444;
  transition: 0.2s;
}
#lightbox .close:hover {
  color: #8aaa0d;
  transform: scale(1.2);
}
#lightbox-slider {
  flex: 1; /* ياخد كل المساحة المتاحة */
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}
#lightbox-slider img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain; /* يحافظ على نسبة الصورة */
}
#lightbox .details {
  font-size: 20px;
  color: #333;
}
#load-more {
  display: block;
  margin: 20px auto;
  padding: 10px 20px;
  cursor: pointer;
  border: none;
  background: #8aaa0d;
  color: white;
  border-radius: 5px;
}
#load-more:hover {
  background: #aac651;
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes scaleIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
@media (max-width: 900px) {
  #lightbox .content {
    flex-direction: column;
    width: 90vw;
    height: auto;
  }
  #lightbox .content img,
  #lightbox-slider img {
    max-width: 100%;
    max-height: 300px;
  }
}

@media (max-width: 1400px) {
  #projects-container {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
  }
}

@media (max-width: 992px) {
  #projects-container {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  }
}

@media (max-width: 768px) {
  #projects-container {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
}
