/* ============================================================================
 * v2.6.32 — الفلاتر الاحترافية + الترقيم + شارات الباقات + عمودان للجوال
 * يُحمَّل على قالبَي page-technicians.php و page-institutions.php فقط
 * (بعد style.css الرئيسي — لذا يحل محله عند تساوي الخصوصية بترتيب المصدر)
 * ========================================================================== */

/* ===== شريط الفلترة الاحترافي ===== */
.akfp-filterbar {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 6px 22px rgba(15, 23, 42, 0.06);
  padding: 16px;
  margin: 0 0 18px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 10px;
}

.akfp-f-search {
  grid-column: span 2;
  position: relative;
  min-width: 0;
}
.akfp-f-search-icon {
  position: absolute;
  inset-inline-start: 13px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 15px;
  opacity: 0.55;
  pointer-events: none;
}
.akfp-f-search input {
  width: 100%;
  min-width: 0;
  border: 1.5px solid #d1d5db;
  border-radius: 12px;
  padding: 11px 14px;
  padding-inline-start: 40px;
  font-size: 14px;
  font-family: inherit;
  background: #f9fafb;
  color: #1f2937;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
.akfp-f-search input:focus {
  outline: none;
  border-color: var(--primary, #0f5298);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(15, 82, 152, 0.14);
}

.akfp-filterbar select {
  min-width: 0;
  width: 100%;
  border: 1.5px solid #d1d5db;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13.5px;
  font-family: inherit;
  background: #f9fafb;
  color: #374151;
  cursor: pointer;
  text-overflow: ellipsis;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
.akfp-filterbar select:focus {
  outline: none;
  border-color: var(--primary, #0f5298);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(15, 82, 152, 0.14);
}
.akfp-f-sort {
  font-weight: 700;
  background: #fff;
  border-color: #c7d8ec;
}

.akfp-f-reset {
  border: 1.5px dashed #cbd5e1;
  border-radius: 12px;
  background: #fff;
  color: #475569;
  font-weight: 700;
  font-size: 13px;
  font-family: inherit;
  padding: 10px 14px;
  cursor: pointer;
  transition: all 0.18s ease;
  min-height: 44px;
}
.akfp-f-reset:hover {
  border-color: var(--primary, #0f5298);
  color: var(--primary, #0f5298);
}

/* ===== شريط العدّ ===== */
.akfp-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 16px;
}
.akfp-count {
  color: #475569;
  font-size: 14px;
  font-weight: 600;
}
.akfp-count b {
  color: var(--primary, #0f5298);
  font-weight: 800;
}
.akfp-showall-btn {
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  color: #334155;
  font-weight: 700;
  font-size: 13px;
  font-family: inherit;
  padding: 8px 14px;
  cursor: pointer;
  min-height: 38px;
  transition: all 0.18s ease;
}
.akfp-showall-btn:hover {
  border-color: var(--primary, #0f5298);
  color: var(--primary, #0f5298);
}

/* ===== شارة الباقة على البطاقات ===== */
.akfp-pkg-badge {
  position: absolute;
  top: 10px;
  inset-inline-start: 10px;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.22);
}
.akfp-tcard,
.akfp-icard {
  position: relative;
}
/* شارة ساكنة داخل رأس بطاقة المؤسسة */
.akfp-pkg-badge--static {
  position: static;
  box-shadow: none;
  font-size: 9.5px;
  padding: 2px 8px;
}

/* ===== الإخفاء (ترقيم الصفحات/الفلترة) ===== */
.akfp-hide {
  display: none !important;
}

/* ===== حالة لا نتائج ===== */
.akfp-empty {
  text-align: center;
  padding: 70px 20px;
  color: #6b7280;
}
.akfp-empty-icon {
  font-size: 60px;
  margin-bottom: 14px;
}

/* ===== الترقيم ===== */
.akfp-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 28px 0 6px;
}
.akfp-pager button {
  min-width: 40px;
  height: 42px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1.5px solid #e2e8f0;
  background: #fff;
  color: #334155;
  font-weight: 700;
  font-size: 13.5px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.18s ease;
}
.akfp-pager button:hover:not([disabled]) {
  border-color: var(--primary, #0f5298);
  color: var(--primary, #0f5298);
  transform: translateY(-1px);
}
.akfp-pager button.active {
  background: var(--primary, #0f5298);
  border-color: var(--primary, #0f5298);
  color: #fff;
  box-shadow: 0 6px 14px rgba(15, 82, 152, 0.25);
}
.akfp-pager button[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}
.akfp-pager .akfp-ellipsis {
  min-width: 24px;
  height: auto;
  border: 0;
  background: none;
  box-shadow: none;
  cursor: default;
  color: #94a3b8;
}

/* ===== الجوال: شبكة الفنيين بعمودين + بطاقات مضغوطة ===== */
@media (max-width: 768px) {
  .akfp-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .akfp-grid .tech-card {
    border-radius: 14px;
  }
  .akfp-grid .tech-card-avatar {
    max-height: 105px;
    font-size: 34px;
  }
  .akfp-grid .tech-card-body {
    padding: 12px 12px 14px;
  }
  .akfp-grid .tech-card-body h3 {
    font-size: 14.5px;
    margin: 0 0 4px;
  }
  .akfp-grid .tech-specialty {
    font-size: 11.5px;
  }
  .akfp-grid .tech-rating {
    font-size: 11px;
  }
  .akfp-grid .tech-info-grid {
    gap: 4px;
  }
  .akfp-grid .tech-info-item {
    font-size: 10.5px;
    padding: 2px 0;
  }
  .akfp-grid .tech-bio {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 11px;
    line-height: 1.7;
    margin: 6px 0 0;
  }
  .akfp-grid .tech-services-tags .tech-tag {
    font-size: 9.5px;
    padding: 2px 7px;
  }
  .akfp-grid .tech-status-badge {
    font-size: 10px;
    padding: 3px 9px;
  }
  .akfp-grid .btn-primary {
    width: 100%;
    justify-content: center;
    font-size: 12px;
    padding: 8px 10px;
    margin-top: 10px !important;
  }
  .akfp-pkg-badge {
    font-size: 9.5px;
    padding: 3px 8px;
    top: 8px;
    inset-inline-start: 8px;
  }

  /* شريط الفلترة على الجوال: صفوف مضغوطة */
  .akfp-filterbar {
    grid-template-columns: repeat(2, 1fr);
    padding: 12px;
    gap: 8px;
  }
  .akfp-f-search {
    grid-column: 1 / -1;
  }
  .akfp-f-sort {
    grid-column: 1 / -1;
  }
  .akfp-f-reset {
    grid-column: 1 / -1;
    width: 100%;
  }
  .akfp-filterbar select {
    font-size: 12.5px;
    padding: 9px 10px;
  }

  .akfp-pager button {
    min-width: 36px;
    height: 38px;
    font-size: 12.5px;
    padding: 0 10px;
  }
  .akfp-count {
    font-size: 13px;
  }
  .akfp-empty {
    padding: 50px 16px;
  }
  .akfp-empty-icon {
    font-size: 48px;
  }
}

@media (max-width: 380px) {
  .akfp-grid {
    gap: 10px;
  }
  .akfp-grid .tech-card-avatar {
    max-height: 92px;
  }
  .akfp-grid .tech-card-body h3 {
    font-size: 13.5px;
  }
}
