/* ====== PAGE STYLES - ALL PEOPLE PAGE ====== */

/* Main Content */
.people-content {
  padding-top: 120px;
  min-height: calc(100vh - 120px);
  background: #f8f5fc;
  position: relative;
  font-family: 'Cairo', sans-serif;
}

/* Container */
.people-content .container {
  display: flex;
  gap: 30px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
  position: relative;
  min-height: 500px;
}

/* Mobile Filter Button - مخفي في الموبايل لأن الفلتر هيبقى فوق */
.mobile-filter-btn {
  display: none !important;
}

/* Filter Overlay */
.filter-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 998;
  display: none;
}

/* Filter Close Button */
.filter-close-btn {
  display: none !important;
}

/* Filter Section */
.filter-section {
  width: 300px;
  min-width: 300px;
  background: white;
  border-radius: 15px;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
  padding: 20px;
  position: sticky;
  top: 140px;
  height: fit-content;
  max-height: calc(100vh - 160px);
  overflow-y: auto;
  z-index: 10;
  border: 1px solid #e6d6ff;
}

.filter-section h2 {
  color: #5a189a;
  font-size: 1.3rem;
  margin: 0 0 20px 0;
  padding-bottom: 15px;
  border-bottom: 2px solid #f0e6ff;
  text-align: center;
}

.filter-group {
  margin-bottom: 20px;
}

.filter-group label {
  display: block;
  color: #333;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.filter-input,
.filter-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 0.9rem;
  background: white;
  color: #333;
  transition: border-color 0.3s;
  font-family: 'Cairo', sans-serif;
  box-sizing: border-box;
}

.filter-input:focus,
.filter-select:focus {
  outline: none;
  border-color: #9d4edd;
  box-shadow: 0 0 0 2px rgba(157, 78, 221, 0.1);
}

/* Checkbox Group */
.checkbox-group {
  margin-top: 10px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.checkbox-item input[type="checkbox"] {
  margin-left: 10px;
}

/* Filter Buttons */
.filter-buttons {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.filter-buttons button,
.filter-buttons a {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  font-family: 'Cairo', sans-serif;
}

.filter-buttons button[type="submit"] {
  background: #7b2cbf;
  color: white;
}

.filter-buttons a {
  background: #f0e6ff;
  color: #5a189a;
}

/* Results Section */
.results-section {
  flex: 1;
}

.results-header {
  margin-bottom: 25px;
}

.results-header h2 {
  color: #5a189a;
  font-size: 1.5rem;
  margin: 0 0 10px 0;
}

.results-count {
  color: #7b2cbf;
  font-size: 0.9rem;
  background: #f0e6ff;
  padding: 6px 15px;
  border-radius: 20px;
  display: inline-block;
}

/* Results Grid */
.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

/* Result Card */
.result-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease;
  border: 1px solid #f0e6ff;
}

.result-card:hover {
  transform: translateY(-5px);
}

.result-card a {
  text-decoration: none;
  color: inherit;
  display: block;
  height: 100%;
}

/* Card Image */
.card-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: #f9f5ff;
  position: relative;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Status Badge */
.status-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 10px;
  border-radius: 15px;
  font-size: 0.75rem;
  font-weight: 700;
  color: white;
  z-index: 2;
}

.status-badge.missed {
  background: #e63946;
}

.status-badge.found {
  background: #2a9d8f;
}

/* Card Content */
.card-content {
  padding: 15px;
}

.card-title {
  color: #333;
  font-size: 1.1rem;
  margin: 0 0 10px 0;
  font-weight: 600;
}

.card-details {
  margin-bottom: 15px;
}

.detail-item {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  font-size: 0.85rem;
  color: #555;
}

.detail-item i {
  width: 20px;
  color: #9d4edd;
  margin-left: 8px;
}

/* Card Footer */
.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 15px;
  border-top: 1px solid #eee;
}

.card-date {
  font-size: 0.8rem;
  color: #888;
}

.view-btn {
  background: #7b2cbf;
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
}

/* No Results */
.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 20px;
  background: white;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.no-results i {
  font-size: 3rem;
  color: #e6d6ff;
  margin-bottom: 15px;
}

.no-results h3 {
  color: #5a189a;
  font-size: 1.3rem;
  margin: 0 0 10px 0;
}

.no-results p {
  color: #666;
  margin-bottom: 20px;
}

.reset-btn {
  display: inline-block;
  background: #7b2cbf;
  color: white;
  padding: 10px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
}

/* ======================================
   RESPONSIVE - TABLET (max 992px)
   الفلتر يتحول لـ accordion فوق الكاردز
====================================== */
@media (max-width: 992px) {
  .people-content {
    padding-top: 100px;
    min-height: calc(100vh - 100px);
  }

  /* Container يبقى column - الفلتر فوق والكاردز تحت */
  .people-content .container {
    flex-direction: column;
    gap: 15px;
    padding: 15px;
  }

  /* الفلتر يبقى عرض كامل في الأعلى - مش fixed */
  .filter-section {
    width: 100%;
    min-width: unset;
    position: static !important;
    top: unset;
    left: unset;
    height: auto;
    max-height: none;
    border-radius: 12px;
    padding: 15px;
    overflow: visible;
    box-sizing: border-box;
  }

  /* الفلتر قابل للطي في الموبايل */
  .filter-section .filter-form-body {
    display: none;
  }

  .filter-section.filter-expanded .filter-form-body {
    display: block;
  }

  /* Header الفلتر يبقى زرار للفتح والغلق */
  .filter-section h2 {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
    user-select: none;
  }

  .filter-section h2::after {
    content: '\f107';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.9rem;
    transition: transform 0.3s ease;
    margin-right: auto;
  }

  .filter-section.filter-expanded h2::after {
    transform: rotate(180deg);
  }

  .filter-section.filter-expanded h2 {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0e6ff;
  }

  .results-section {
    flex: 1;
  }

  .results-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
  }
}

/* ======================================
   MOBILE (max 768px)
====================================== */
@media (max-width: 768px) {
  .people-content {
    padding-top: 90px;
  }

  .people-content .container {
    gap: 12px;
    padding: 12px;
    min-height: calc(100vh - 140px);
  }

  .filter-section {
    padding: 12px 15px;
    border-radius: 10px;
  }

  .filter-section h2 {
    font-size: 1.1rem;
  }

  /* الفلتر مقفول بالأساس في الموبايل */
  .filter-section .filter-form-body {
    display: none;
  }

  .filter-section.filter-expanded .filter-form-body {
    display: block;
    margin-top: 10px;
  }

  .results-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .result-card {
    border-radius: 10px;
  }

  .card-image {
    height: 150px;
  }

  .card-content {
    padding: 10px;
  }

  .card-title {
    font-size: 0.95rem;
    margin-bottom: 8px;
  }

  .detail-item {
    font-size: 0.78rem;
    margin-bottom: 5px;
  }

  .card-footer {
    padding-top: 8px;
    flex-wrap: wrap;
    gap: 6px;
  }

  .card-date {
    font-size: 0.72rem;
  }

  .view-btn {
    padding: 6px 10px;
    font-size: 0.78rem;
  }

  .results-header h2 {
    font-size: 1.2rem;
  }
}

/* ======================================
   SMALL MOBILE (max 480px)
====================================== */
@media (max-width: 480px) {
  .people-content {
    padding-top: 80px;
    min-height: calc(100vh - 80px);
  }

  .people-content .container {
    gap: 10px;
    padding: 10px;
  }

  /* كاردين جنب بعض حتى في الشاشات الصغيرة */
  .results-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .card-image {
    height: 130px;
  }

  .card-content {
    padding: 8px;
  }

  .card-title {
    font-size: 0.88rem;
  }

  .detail-item {
    font-size: 0.72rem;
    margin-bottom: 4px;
  }

  .detail-item i {
    width: 16px;
    font-size: 0.75rem;
  }

  .status-badge {
    font-size: 0.68rem;
    padding: 3px 7px;
  }

  .card-footer {
    padding-top: 6px;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }

  .view-btn {
    width: 100%;
    text-align: center;
    padding: 6px 8px;
    font-size: 0.75rem;
  }

  .no-results {
    padding: 30px 15px;
    border-radius: 10px;
  }

  .no-results i {
    font-size: 2.5rem;
    margin-bottom: 10px;
  }

  .no-results h3 {
    font-size: 1.1rem;
  }

  .reset-btn {
    padding: 8px 20px;
    font-size: 0.9rem;
  }
}