.portfolio-section {
  position: relative;
  padding: 60px 20px;
  overflow: hidden;
}

.portfolio-section::before,
.portfolio-section::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: var(--gradient-2);
  filter: blur(80px);
  opacity: 0.2;
}

.portfolio-section::before {
  width: 300px;
  height: 300px;
  top: -100px;
  left: -100px;
}

.portfolio-section::after {
  width: 250px;
  height: 250px;
  bottom: -80px;
  right: -80px;
}


.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.project-card {
  background: var(--bg-color);
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  border: 2px solid transparent;
  background-image: linear-gradient(var(--bg-color), var(--bg-color)),
    var(--gradient-1);
  background-origin: border-box;
  background-clip: content-box, border-box;
}

.project-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 15px 30px rgba(var(--primary-rgb), 0.25);
}

.project-image {
  position: relative;
  overflow: hidden;
  height: 200px;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-bottom: 1px solid #eee;
  transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
  transform: scale(1.1) rotate(2deg);
}

.project-content {
  padding: 20px;
  text-align: left;
}

.project-title {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-bottom: 10px;
  font-weight: 700;
  text-transform: capitalize;
}

.project-desc {
  font-size: 0.95rem;
  color: #4b5563;
  line-height: 1.5;
  margin-bottom: 15px;
}

.tech-stack {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 15px;
}

.tech-badge {
  background: var(--gradient-2);
  color: white;
  font-size: 0.75rem;
  padding: 5px 12px;
  border-radius: 50px;
  font-weight: bold;
  transition: background 0.3s ease;
}

.tech-badge:hover {
  background: var(--gradient-3);
}

.project-btn {
  display: inline-block;
  background: var(--gradient-1);
  color: #fff;
  padding: 10px 18px;
  text-decoration: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.3s ease, transform 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.project-btn:hover {
  background: var(--gradient-2);
  transform: translateY(-3px);
}



/* فلترة المشاريع (أزرار) */
.filter-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background: #f9fafb;
  border-radius: 12px;
  max-width: fit-content;
  margin: 0 auto 30px;
  position: relative;
}

.filter-btn {
  position: relative;
  border: none;
  background: none;
  padding: 10px 18px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  border-radius: 8px;
  transition: color 0.3s ease, background 0.3s ease;
}

.filter-btn:hover {
  background: rgba(var(--primary-rgb), 0.08);
}

.filter-btn.active {
  background: var(--gradient-1);
  color: #fff;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}



/* المشاريع المخفية */
.project-card.hidden {
  display: none;
}

/* أيقونة العين */
.view-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  color: white;
  font-size: 5rem;
  padding: 12px;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.project-card:hover .view-icon {
  opacity: 1;
    font-size: 7rem;
  transform: translate(-50%, -50%) scale(1);
}

.view-icon svg {
  width: 22px;
  height: 22px;
  fill: white;
}

/* Modal Container */
.image-modal {
  display: none;
  opacity: 0;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  backdrop-filter: blur(8px);
  background: rgba(0, 0, 0, 0.7);
  transition: opacity 0.4s ease;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.image-modal.active {
  display: flex;
  opacity: 1;
}

/* Modal Content Wrapper */
.modal-content-wrapper {
  background: var(--bg-color);
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  max-width: 1000px;
  width: 90%;
  display: flex;
  flex-wrap: wrap;
  overflow: hidden;
  animation: zoomIn 0.4s ease;
}

/* Image Section */
.modal-image-section {
  position: relative;
  flex: 1 1 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--section-bg);
  padding: 10px;
}

.modal-image-section img {
  max-width: 100%;
  max-height: 70vh;
  border-radius: 8px;
  object-fit: contain;
}

/* Navigation Arrows */
.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.4);
  color: white;
  border: none;
  font-size: 2rem;
  padding: 8px 12px;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.3s ease;
}

.modal-nav:hover {
  background: rgba(0, 0, 0, 0.7);
}

.modal-nav.prev {
  left: 10px;
}

.modal-nav.next {
  right: 10px;
}

/* Info Section */
.modal-info {
  flex: 1 1 50%;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.modal-info h2 {
  color: var(--primary-color);
}

.modal-tech span {
  display: inline-block;
  padding: 4px 10px;
  background: var(--gradient-2);
  border-radius: 20px;
  font-size: 0.85rem;
  color: #fff;
  margin: 3px;
}

.modal-links .modal-btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 6px;
  text-decoration: none;
  color: white;
  font-weight: bold;
  background: var(--gradient-1);
  margin-right: 10px;
  transition: transform 0.2s ease;
}

.modal-links .modal-btn.github {
  background: var(--gradient-3);
}

.modal-links .modal-btn:hover {
  transform: scale(1.05);
}

/* Close Button */
.close-modal {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 2rem;
  color: white;
  cursor: pointer;
  z-index: 10000;
  transition: transform 0.3s ease;
}

.close-modal:hover {
  transform: scale(1.2);
}

/* Animation */
@keyframes zoomIn {
  from { transform: scale(0.85); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Responsive */
@media (max-width: 768px) {
  .modal-content-wrapper {
    flex-direction: column;
  }
  .modal-image-section, .modal-info {
    flex: 1 1 100%;
  }
}

