/* portfolio-style.css */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  -moz-tap-highlight-color: transparent;
}

@font-face {
  font-family: 'Vazir';
  src: url('/contents/font/Vazir-Black.woff2') format('woff2');
  font-display: swap;
}

body {
  font-family: 'Vazir', sans-serif;
  background: #fefaf5;
  color: #2c241a;
  line-height: 1.6;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* دکمه بازگشت */
.back-home-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #2c241a;
  color: #efeadc;
  padding: 0.6rem 1rem;
  border-radius: 3rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 100;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border: 1px solid #c7a252;
}
.back-home-btn:hover {
  background: #c7a252;
  color: #2c241a;
  transform: translateX(-4px);
}
.back-home-btn svg {
  width: 20px;
  height: 20px;
}

/* صفحه نمونه کارها */
.portfolio-page {
  padding: 4rem 0;
}

.portfolio-header {
  text-align: center;
  margin-bottom: 2rem;
}
.portfolio-header h1 {
  font-size: 2.8rem;
  margin-bottom: 0.5rem;
  color: #3f2e1e;
}
.portfolio-header h1 span {
  background: linear-gradient(135deg, #b57c48, #7f5a30);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}
.portfolio-header p {
  font-size: 1.1rem;
  color: #7f6b4a;
}

/* فیلتر */
.portfolio-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}
.filter-btn {
  background: none;
  border: 1px solid #e9dccc;
  padding: 0.5rem 1.2rem;
  border-radius: 2rem;
  cursor: pointer;
  font-family: 'Vazir', sans-serif;
  transition: all 0.2s;
}
.filter-btn.active, .filter-btn:hover {
  background: #c7a252;
  color: white;
  border-color: #c7a252;
}

.results-count {
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: #7f6b4a;
  text-align: center;
}

/* گرید نمونه کارها */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}
.portfolio-item {
  background: white;
  border-radius: 1rem;
  overflow: hidden;
  transition: all 0.3s ease;
  border: 1px solid #eddabc;
  cursor: pointer;
}
.portfolio-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 30px -12px rgba(0,0,0,0.1);
  border-color: #c7a252;
}
.portfolio-img {
  width: 100%;
  aspect-ratio: 1 / 1.2;
  background: #e4d4be;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  position: relative;
}
.portfolio-img .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(44, 36, 26, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
  color: white;
  font-size: 1.2rem;
}
.portfolio-item:hover .overlay {
  opacity: 1;
}
.portfolio-info {
  padding: 1.2rem;
}
.portfolio-title {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 0.3rem;
  color: #3f2e1e;
}
.portfolio-category {
  font-size: 0.8rem;
  color: #a78e6d;
  margin-bottom: 0.3rem;
}
.portfolio-description {
  font-size: 0.85rem;
  color: #7f6b4a;
  margin-bottom: 0.5rem;
}
.portfolio-detail-link {
  background: none;
  border: 1px solid #c7a252;
  padding: 0.3rem 0.8rem;
  border-radius: 1rem;
  font-size: 0.8rem;
  cursor: pointer;
  transition: 0.2s;
  display: inline-block;
}
.portfolio-detail-link:hover {
  background: #c7a252;
  color: white;
}

.empty-message {
  text-align: center;
  padding: 2rem;
  color: #7f6b4a;
}
.hidden {
  display: none;
}

/* مودال */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}
.modal-content {
  background: white;
  border-radius: 1.5rem;
  max-width: 550px;
  width: 100%;
  padding: 1.5rem;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-close {
  position: absolute;
  top: 10px;
  left: 15px;
  font-size: 1.8rem;
  cursor: pointer;
  color: #a78e6d;
  transition: 0.2s;
}
.modal-close:hover {
  color: #c7a252;
}
.modal-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #e4d4be;
  border-radius: 0.8rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-title {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
  color: #3f2e1e;
}
.modal-category {
  color: #a78e6d;
  font-size: 0.9rem;
}
.modal-description {
  color: #5b4a34;
  margin: 1rem 0;
}
.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}
.modal-tag {
  background: #fef9ef;
  padding: 0.2rem 0.8rem;
  border-radius: 1rem;
  font-size: 0.8rem;
  color: #7f6b4a;
}

/* ریسپانسیو */
@media (max-width: 800px) {
  .container {
    padding: 0 16px;
  }
  .portfolio-header h1 {
    font-size: 2rem;
  }
  .portfolio-grid {
    gap: 1.5rem;
  }
}
@media (max-width: 550px) {
  .portfolio-page {
    padding: 2rem 0;
  }
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  .portfolio-item {
    /* کاهش سایز در موبایل */
  }
  .portfolio-info {
    padding: 0.7rem;
  }
  .portfolio-title {
    font-size: 0.9rem;
  }
  .portfolio-category, .portfolio-description {
    font-size: 0.7rem;
  }
  .portfolio-detail-link {
    font-size: 0.65rem;
    padding: 0.2rem 0.6rem;
  }
  .back-home-btn {
    top: 12px;
    right: 12px;
    padding: 0.4rem 0.8rem;
  }
  .filter-btn {
    padding: 0.3rem 0.8rem;
    font-size: 0.8rem;
  }
  .modal-content {
    padding: 1rem;
  }
}