body {
  background: linear-gradient(to right, #daece7, #d9ebe6);
  font-feature-settings: "ss01";
}

.samples-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

/* هدر */
.samples-header {
  background: #359a7e;
  color: white;
  border-radius: 15px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.back-home {
  display: flex;
  align-items: center;
  gap: 15px;
  text-decoration: none;
  color: white;
  font-size: 18px;
  transition: opacity 0.3s;
}

.back-home:hover {
  opacity: 0.9;
}

.back-home .logo {
  height: 40px;
  width: auto;
}

.header-title h1 {
  font-size: 2.2rem;
  margin: 0;
  font-weight: 700;
}

.subtitle {
  margin: 10px 0 0 0;
  opacity: 0.9;
  font-size: 1.1rem;
}

.header-stats .stat-item {
  text-align: center;
  background: rgba(255, 255, 255, 0.2);
  padding: 15px 25px;
  border-radius: 10px;
  backdrop-filter: blur(10px);
}

.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 700;
}

.stat-label {
  font-size: 0.9rem;
  opacity: 0.9;
}

/* فیلتر دسته‌بندی */
.categories-filter {
  background: white;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.filter-container {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.filter-label {
  font-weight: 600;
  color: #555;
  font-size: 1.1rem;
}

.filter-label i {
  margin-right: 8px;
  color: #2657a4;
}

.filter-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 20px;
  background: #f5f5f5;
  border-radius: 25px;
  text-decoration: none;
  color: #555;
  font-weight: 500;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-btn:hover {
  background: #e0e0e0;
  transform: translateY(-2px);
}

.filter-btn.active {
  background: #2657a4;
  color: white;
}

.count-badge {
  background: rgba(255, 255, 255, 0.3);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 600;
}

.filter-btn.active .count-badge {
  background: rgba(255, 255, 255, 0.2);
}

/* گرید نمونه‌ها */
.samples-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 25px;
  margin-bottom: 40px;
}

.sample-card {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-content: center;
  justify-content: space-around;
  align-items: center;

  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border: 1px solid #eee;

  height: 28rem;
}

.sample-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.sample-preview {
  height: 25vh;
  width: 100%;

  background: #f5f5f5;
  overflow: hidden;
  background-size: contain;
  background-position: top center;
  background-repeat: no-repeat;
  position: relative;
}

.preview-image {
  width: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.sample-card:hover .preview-image {
  transform: scale(1.05);
}

.no-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #aaa;
  font-size: 14px;
}

.no-preview i {
  font-size: 48px;
  margin-bottom: 10px;
}

.category-overlay {
  position: absolute;
  top: 15px;
  left: 15px;
}

.sample-info {
  padding: 1rem 0.5rem 1rem 0.5rem;

  width: 95%;
}

.sample-title {
  margin: 0 0 15px 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: #333;
  line-height: 1.4;
}

.sample-meta {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #666;
  font-size: 0.9rem;
}

.meta-item i {
  color: #2657a4;
}

.flag-icon-small {
  height: 1.3rem;
  margin-left: 8px;
  margin-right: 8px;

  border-radius: 2px;
  vertical-align: middle;
}

.sample-actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.btn {
  padding: 10px 20px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s;
  border: none;
  cursor: pointer;
}

.btn-view-sample {
  background: #2657a4;
  color: white;
  flex: 1;
  justify-content: center;
}

.btn-view-sample:hover {
  background: #5a6fd8;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-owner-profile {
  background: #f0f0f0;
  color: #666;
  padding: 10px 15px;
}

.btn-owner-profile:hover {
  background: #e0e0e0;
}

/* حالت خالی */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.empty-icon {
  font-size: 64px;
  color: #ddd;
  margin-bottom: 20px;
}

.empty-state h3 {
  color: #555;
  margin-bottom: 15px;
}

.empty-state p {
  color: #777;
  max-width: 600px;
  margin: 0 auto 25px;
  line-height: 1.6;
}

.empty-action .btn-primary {
  background: #2657a4;
  color: white;
  padding: 12px 30px;
  border-radius: 25px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.empty-action .btn-primary:hover {
  background: #5a6fd8;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

/* صفحه‌بندی */
.pagination-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 40px;
  padding: 20px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.pagination {
  display: flex;
  gap: 5px;
  align-items: center;
}

.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  text-decoration: none;
  color: #555;
  font-weight: 500;
  transition: all 0.3s;
  border: 2px solid transparent;
}

.page-link:hover:not(.disabled):not(.active) {
  background: #f0f0f0;
  border-color: #e0e0e0;
}

.page-link.active {
  background: #2657a4;
  color: white;
  border-color: #2657a4;
}

.page-link.disabled {
  color: #ccc;
  cursor: not-allowed;
}

.page-numbers {
  display: flex;
  gap: 5px;
}

.page-dots {
  padding: 0 10px;
  color: #999;
}

.page-jump-form {
  display: flex;
  gap: 10px;
  align-items: center;
}

.page-input {
  width: 70px;
  padding: 10px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  text-align: center;
  font-size: 14px;
}

.page-input:focus {
  outline: none;
  border-color: #2657a4;
}

.page-go-btn {
  padding: 10px 20px;
  background: #2657a4;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.3s;
}

.page-go-btn:hover {
  background: #5a6fd8;
}

/* فوتر */
.samples-footer {
  margin-top: 50px;
  padding: 30px;
  background: #f8f9fa;
  border-radius: 12px;
  text-align: center;
}

.footer-text {
  color: #666;
  margin-bottom: 20px;
  font-size: 1.1rem;
}

.footer-action .btn-outline {
  border: 2px solid #2657a4;
  color: #2657a4;
  background: transparent;
  padding: 12px 30px;
  border-radius: 25px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  transition: all 0.3s;
}

.footer-action .btn-outline:hover {
  background: #2657a4;
  color: white;
  transform: translateY(-2px);
}

/* استایل بخش کپی رایت */
.copyright-section {
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
  opacity: 0.8;
}

.copyright-text {
  color: #666;
  font-size: 14px;
  margin: 0;
  text-align: center;
}

/* ریسپانسیو */
@media (max-width: 768px) {
  .copyright-text {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .copyright-text {
    font-size: 12px;
    line-height: 1.4;
  }
}

.category-badge {
  display: inline-block;
  padding: 4px 12px;
  background: #e3f2fd;
  color: #1976d2;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.category-badge.catalog {
  background: #e8f5e9;
  color: #2e7d32;
}

.category-badge.document {
  background: #fff3e0;
  color: #f57c00;
}

.category-badge.guide {
  background: #f3e5f5;
  color: #7b1fa2;
}

.category-badge.article {
  background: #e1f5fe;
  color: #0288d1;
}

/* استایل آواتار مالک */
.owner-info {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #eee;
}

.owner-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #666;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.owner-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.owner-name {
  font-size: 14px;
  color: #667eea;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s;
  flex: 1;
}

.owner-name:hover {
  color: #5a6fd8;
  text-decoration: underline;
  transform: translateX(2px);
}

[dir="rtl"] .owner-info {
  text-align: right;
}

[dir="rtl"] .owner-name {
  margin-left: 0;
}

[dir="rtl"] .owner-name:hover {
  transform: translateX(-2px);
}

@media (max-width: 480px) {
  .owner-avatar {
    width: 28px;
    height: 28px;
    font-size: 14px;
  }

  .owner-name {
    font-size: 13px;
  }
}

/* انیمیشن برای آواتار */
.owner-avatar {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.owner-avatar:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.owner-avatar {
  position: relative;
  cursor: pointer;
}

.owner-avatar::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  z-index: 10;
}

.owner-avatar:hover::after {
  opacity: 1;
  visibility: visible;
}
.date-info {
  font-size: 12px;
  color: #888;
  margin-top: 5px;
}

/* استایل‌های انتخاب‌گر زبان */
.header-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.language-selector-container {
  position: relative;
}

.custom-select {
  position: relative;
  width: 140px;
  cursor: pointer;
}

.selected-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  backdrop-filter: blur(10px);
  transition: all 0.3s;
}

.selected-option:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
}

.selected-option img {
  height: 2.5vh;
  margin-right: 1vh;
  margin-left: 1vh;
}

.selected-option span {
  color: white;
  font-size: 14px;
  font-family: "Vazirmatn";
  font-weight: 500;
  flex: 1;
}

.selected-option i {
  color: white;
  font-size: 12px;
  transition: transform 0.3s;
}

.custom-select.active .selected-option i {
  transform: rotate(180deg);
}

.options-list {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  max-height: 250px;
  overflow-y: auto;
  display: none;
  z-index: 1000;
  margin-top: 5px;
  padding: 0;
}

.options-list li {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  color: #333;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;

  font-family: "Vazirmatn";
}

.options-list li:hover {
  background: #f5f5f5;
}

.options-list li img {
  height: 2.5vh;
  border-radius: 2px;
  margin-right: 0.5rem;
  margin-left: 0.5rem;
}

/* استایل برای حالت فعال */
.custom-select.active .options-list {
  display: block;
}

/* ریسپانسیو */
@media (max-width: 768px) {
  .header-left {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }

  .language-selector-container {
    width: 100%;
  }

  .custom-select {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .header-content {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }

  .header-left {
    width: 100%;
    align-items: center;
  }

  .header-title {
    order: 2;
  }

  .header-stats {
    order: 3;
  }
}

@media (max-width: 768px) {
  .samples-container {
    padding: 15px;
  }

  .samples-header {
    padding: 20px;
  }

  .header-content {
    flex-direction: column;
    text-align: center;
  }

  .header-title h1 {
    font-size: 1.8rem;
  }

  .samples-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
  }

  .pagination-container {
    flex-direction: column;
    text-align: center;
  }

  .filter-buttons {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .samples-grid {
    grid-template-columns: 1fr;
  }

  .filter-container {
    flex-direction: column;
    align-items: flex-start;
  }

  .filter-buttons {
    width: 100%;
  }

  .filter-btn {
    flex: 1;
    justify-content: center;
    text-align: center;
  }
}
