/* Projeler CSS */
.projects-section {
  padding: 60px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.text-center {
  text-align: center;
  margin-bottom: 40px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

/* Responsive grid */
@media (max-width: 900px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }
}

/* Card Style */
.project-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border-color: rgba(59, 130, 246, 0.4);
}

/* Card images container */
.project-card-images {
  display: flex;
  gap: 4px;
  height: 200px;
  background: #111;
  overflow: hidden;
  position: relative;
}

.project-card-img {
  flex: 1; /* equal width */
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.project-card:hover .project-card-img {
  transform: scale(1.05); /* inner zoom effect */
}

/* If there are multiple images, display a specific count indicator */
.img-overlay-count {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  backdrop-filter: blur(4px);
  z-index: 2;
}

.project-card-content {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-card-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 10px 0;
  color: #fff;
}

.project-card-desc {
  font-size: 14px;
  color: #bfbfbf;
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Modal Style */
.project-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.project-modal.active {
  opacity: 1;
  visibility: visible;
}

.project-modal-dialog {
  background: #111;
  width: 90%;
  max-width: 800px;
  max-height: 85vh; /* separate scroll logic */
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  position: relative;
  display: flex;
  flex-direction: column;
  transform: scale(0.95) translateY(20px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-modal.active .project-modal-dialog {
  transform: scale(1) translateY(0);
}

.project-close-btn {
  position: absolute;
  top: 16px;
  left: 16px; /* Kutunun Sol Üst Tarafında */
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: background 0.2s ease, transform 0.2s ease;
  line-height: 1;
}

.project-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.project-modal-content {
  padding: 40px 30px;
  flex: 1;
  overflow-y: auto;
  border-radius: 20px;
}

/* Modal Scrollbar customization */
.project-modal-content::-webkit-scrollbar {
  width: 8px;
}
.project-modal-content::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.02);
  border-radius: 10px;
}
.project-modal-content::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15);
  border-radius: 10px;
}
.project-modal-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.3);
}

.project-modal-title {
  font-size: 28px;
  color: #fff;
  margin: 0 0 20px 40px; /* offset for close button so they don't overlap on mobile */
  font-weight: 700;
  border-bottom: 2px solid rgba(59, 130, 246, 0.3);
  padding-bottom: 15px;
}

@media (min-width: 600px) {
  .project-modal-title {
    text-align: center;
    margin-left: 0;
  }
}

.project-modal-images {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 30px;
}

.project-modal-images img {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.project-modal-desc {
  font-size: 16px;
  line-height: 1.8;
  color: #d1d5db;
}

/* Sayfa Gövdesini Kitler */
.body-lock {
  overflow: hidden;
}
