@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@100..900&display=swap');

body {
  margin: 0;
  background-color: #000; /* پس‌زمینه کل صفحه مشکی */
  color: #fff; /* متن پیش‌فرض سفید */
  font-family: 'Vazirmatn', Poppins, sans-serif;
}

.table-container {
  padding: 32px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.table-heading {
 margin-top: 60px;  /* فاصله از انتهای هدر */

  text-align: center;
  text-transform: uppercase;
  font-size: 24px;
  margin-bottom: 1px;
  border-bottom: 1px solid rgb(249, 201, 0);
  padding-bottom: 8px;
  color: #fff;
}

.table-container table {
  width: 100%;
  max-width: 1200px;
  background: #1a1a1a; /* جدول تیره */
  color: #fff; /* متن جدول سفید */
  padding: 24px;
  border-collapse: collapse;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.7); /* سایه نرم تیره */
}

.table-container table thead tr {
  background: rgba(249, 199, 0, 0.856); /* سطر هدر تیره‌تر */
  color: #fff;
}

.table-container table td,
.table-container table th {
  padding: 16px 32px;
  text-align: center;
  border-bottom: 1px solid #333; /* خطوط بین سلول‌ها تیره */
  white-space: nowrap; /* جلوگیری از شکسته شدن متن به خط بعد */
}

.table-container table tr:last-child td {
  border-bottom: none;
}

@media (max-width: 580px) {
  .table-container table thead {
    display: none;
  }

  .table-container table td {
    display: block;
    width: 100%;
    text-align: right;
    padding: 12px 16px;
    border-bottom: 1px solid #333;
    white-space: normal; /* در موبایل اجازه شکستن متن */
  }

  .table-container table td::before {
    content: attr(data-heading) ": ";
    font-weight: bold;
    display: inline-block;
    margin-bottom: 4px;
    color: #aaa;
  }

  .table-container table {
    box-shadow: none;
  }
}
/* 1. انیمیشن fade-in هنگام لود صفحه */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.table-container {
  /* انیمیشن 1 ثانیه‌ای با تابع ease-out */
  animation: fadeIn 1s ease-out both;
}

/* 2. افکت هاور روی ردیف‌ها */
.table-container table tbody tr {
  /* مقداری transition برای نرمی تغییرات */
  transition: background-color 0.3s, transform 0.3s;
}

.table-container table tbody tr:hover {
  /* هنگام هاور کمی بالاتر بیاد و زمینه روشن‌تر */
  background-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-3px);
}
#searchInput {
  width: 300px;
  max-width: 90%;
  padding: 8px 12px;
  margin-bottom: 16px;
  border: none;
  border-radius: 6px;
  font-size: 16px;
}
/* تنظیمات ریسپانسیو برای موبایل */
@media (max-width: 580px) {
  .table-container {
    margin-top: calc(50px + 16px);
    padding: 16px;
  }

  #searchInput {
    width: 100%;
    margin-bottom: 12px;
  }

  .table-container table thead {
    display: none;
  }

  .table-container table tr {
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 8px;
    background-color: #111;
  }

  .table-container table td {
    display: block;
    width: 100%;
    padding: 12px 8px;
    border-bottom: 1px solid #333;
    text-align: right;
    direction: rtl;
    box-sizing: border-box;
    order: initial; /* پیش‌فرض */
    white-space: normal; /* در موبایل اجازه شکستن متن */
  }

  .table-container table tr td:last-child {
    border-bottom: none;
  }

  /* ترتیب دلخواه: 1. پروژه (1)  2. خدمت (3)  3. کارفرما (2) */
  .table-container table td:nth-child(1) { order: 1; } /* نام پروژه */
  .table-container table td:nth-child(3) { order: 2; } /* نوع خدمت */
  .table-container table td:nth-child(2) { order: 3; } /* کارفرما */

  .table-container table td::before {
    content: attr(data-heading);
    display: block;
    font-weight: bold;
    color: #f9c900;
    margin-bottom: 4px;
    font-size: 15px;
  }

  .table-container table {
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  }
}