/* ============================================================
 * الاختيار الذكي — صفحات بروفايل مزودي الخدمة (v2.6.21)
 * single-technician.php / single-institution.php
 * ألوان القالب: --primary #0f5298 · --primary-dark #0a3d72
 *               --primary-light #e1edf7 · --secondary #f08726
 * بادئة كل القواعد akpp- (لا تلامس أي قاعدة قائمة)
 * ============================================================ */

.akpp-profile {
  direction: rtl;
  text-align: right;
  font-family: 'Cairo', sans-serif;
  color: var(--text, #1f2937);
  padding-bottom: 70px;
}

/* ===== البطاقة التعريفية (الهيرو) ===== */
.akpp-hero {
  position: relative;
  background: linear-gradient(135deg, #0f5298 0%, #0a3d72 100%);
  padding: 42px 0 118px;
  overflow: hidden;
  margin-top: -1px;
}
.akpp-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(720px 240px at 85% -20%, rgba(240, 135, 38, .28), transparent 65%),
    radial-gradient(520px 200px at 12% 130%, rgba(255, 255, 255, .12), transparent 70%);
  pointer-events: none;
}
.akpp-hero-inner {
  position: relative;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}
.akpp-hero-back a {
  color: rgba(255, 255, 255, .85);
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  transition: color .2s;
}
.akpp-hero-back a:hover { color: #fff; }

.akpp-hero-card {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.akpp-avatar {
  position: relative;
  width: 116px;
  height: 116px;
  border-radius: 30px;
  background: #fff center / cover no-repeat;
  border: 4px solid rgba(255, 255, 255, .9);
  box-shadow: 0 14px 30px rgba(0, 0, 0, .28);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.akpp-avatar-empty span { font-size: 52px; }
.akpp-avatar-status {
  position: absolute;
  bottom: 7px;
  inset-inline-end: 7px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 3px solid #fff;
}
.akpp-avatar-status.akpp-active { background: #10b981; }
.akpp-avatar-status.akpp-busy { background: #f59e0b; }
.akpp-avatar-status.akpp-inactive { background: #9ca3af; }

.akpp-hero-info { flex: 1 1 320px; min-width: 0; }
.akpp-name {
  color: #fff;
  font-size: clamp(24px, 4vw, 34px);
  font-weight: 800;
  line-height: 1.35;
  margin: 0;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .25);
}
.akpp-hero-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.akpp-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding: 4px 14px;
  font-size: 12.5px;
  font-weight: 800;
}
.akpp-badge-type { background: var(--secondary, #f08726); color: #fff; }
.akpp-badge-verified { background: rgba(255, 255, 255, .95); color: #047857; }
.akpp-badge-status.akpp-active { background: rgba(16, 185, 129, .95); color: #fff; }
.akpp-badge-status.akpp-busy { background: rgba(245, 158, 11, .95); color: #fff; }
.akpp-badge-status.akpp-inactive { background: rgba(107, 114, 128, .95); color: #fff; }

.akpp-hero-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.akpp-chip {
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .28);
  color: #fff;
  border-radius: 10px;
  padding: 5px 13px;
  font-size: 13px;
  font-weight: 700;
  backdrop-filter: blur(4px);
}
.akpp-chip-soft { background: rgba(255, 255, 255, .1); font-weight: 600; }

.akpp-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin-top: 26px;
}
.akpp-stat {
  background: rgba(255, 255, 255, .13);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 14px;
  padding: 12px 16px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
  backdrop-filter: blur(5px);
}
.akpp-stat-ic { font-size: 22px; }
.akpp-stat strong { font-size: 22px; font-weight: 800; line-height: 1.1; }
.akpp-stat small { display: block; font-size: 12px; opacity: .85; }

/* ===== المحتوى ===== */
.akpp-main { transform: translateY(-64px); padding-bottom: 0; }
.akpp-container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.akpp-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 22px;
  align-items: start;
}
.akpp-col-main { display: flex; flex-direction: column; gap: 22px; min-width: 0; }

.akpp-card {
  background: #fff;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 18px;
  box-shadow: var(--shadow, 0 4px 6px -1px rgba(0, 0, 0, .1));
  padding: 24px 26px;
}
.akpp-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 800;
  color: var(--primary-dark, #0a3d72);
  margin: 0 0 14px;
}
.akpp-tic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--primary-light, #e1edf7);
  font-size: 19px;
}
.akpp-bio {
  margin: 0;
  line-height: 2.15;
  font-size: 15px;
  color: var(--text, #1f2937);
  white-space: pre-wrap;
}

/* الخدمات */
.akpp-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.akpp-tag {
  background: var(--primary-light, #e1edf7);
  color: var(--primary-dark, #0a3d72);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 800;
}

/* ===== معرض نماذج الأعمال ===== */
.akpp-gal-hint { color: var(--text-light, #6b7280); font-size: 12.5px; margin: -6px 0 14px; }
.akpp-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.akpplg-item {
  position: relative;
  border: 0;
  padding: 0;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  cursor: zoom-in;
  background: var(--bg-light, #f9fafb);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .08);
  transition: transform .25s, box-shadow .25s;
}
.akpplg-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.akpplg-item::after {
  content: '⤢';
  position: absolute;
  inset-inline-start: 10px;
  bottom: 10px;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: rgba(15, 82, 152, .85);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  opacity: 0;
  transition: opacity .25s;
  pointer-events: none;
}
.akpplg-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-xl, 0 20px 25px -5px rgba(0, 0, 0, .1)); }
.akpplg-item:hover::after { opacity: 1; }
.akpplg-item:focus-visible { outline: 3px solid var(--secondary, #f08726); outline-offset: 2px; }

.akpp-gallery-empty {
  border: 2px dashed var(--border, #e5e7eb);
  border-radius: 14px;
  background: var(--bg-light, #f9fafb);
  text-align: center;
  padding: 44px 20px;
  color: var(--text-light, #6b7280);
}
.akpp-gallery-empty span { font-size: 40px; display: block; margin-bottom: 8px; }
.akpp-gallery-empty p { margin: 0; font-weight: 700; }

/* ===== العمود الجانبي ===== */
.akpp-card-sticky { position: sticky; top: 92px; }
.akpp-side-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border, #e5e7eb);
  font-size: 13.5px;
}
.akpp-side-row:last-of-type { border-bottom: 0; }
.akpp-k { color: var(--text-light, #6b7280); font-weight: 700; }
.akpp-v { font-weight: 800; text-align: left; }

.akpp-cta { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.akpp-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 14.5px;
  font-weight: 800;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: transform .2s, box-shadow .2s, background .2s;
  min-height: 44px;
}
.akpp-btn:hover { transform: translateY(-2px); }
.akpp-btn-primary {
  background: linear-gradient(135deg, var(--primary, #0f5298), var(--primary-dark, #0a3d72));
  color: #fff;
  box-shadow: 0 8px 18px rgba(15, 82, 152, .32);
}
.akpp-btn-outline {
  background: #fff;
  color: var(--primary, #0f5298);
  border-color: var(--primary, #0f5298);
}
.akpp-btn-outline span { direction: ltr; }
.akpp-btn-wa {
  background: #05a368;
  color: #fff;
  box-shadow: 0 8px 18px rgba(5, 163, 104, .3);
}
.akpp-side-note {
  margin: 14px 0 0;
  background: var(--secondary-light, #fef3e2);
  color: #92600a;
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 11.5px;
  font-weight: 700;
  text-align: center;
}

/* ===== Lightbox ===== */
.akpplg-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 20, 35, .93);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.akpplg-overlay[hidden] { display: none; }
.akpplg-figure { margin: 0; max-width: min(1080px, 94vw); text-align: center; }
.akpplg-figure img {
  max-width: 100%;
  max-height: 82vh;
  border-radius: 10px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
  background: #fff;
}
.akpplg-figure figcaption { color: #cbd5e1; font-size: 13px; margin-top: 12px; font-weight: 700; }
.akpplg-close, .akpplg-prev, .akpplg-next {
  position: fixed;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, .14);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s, transform .2s;
  z-index: 2;
}
.akpplg-close { top: 20px; inset-inline-start: 20px; }
.akpplg-prev { inset-inline-end: 20px; top: 50%; transform: translateY(-50%); }
.akpplg-next { inset-inline-start: 20px; top: 50%; transform: translateY(-50%); }
.akpplg-close:hover, .akpplg-prev:hover, .akpplg-next:hover { background: rgba(255, 255, 255, .3); }
.akpplg-close:focus-visible, .akpplg-prev:focus-visible, .akpplg-next:focus-visible {
  outline: 3px solid var(--secondary, #f08726);
}

/* ===== استجابة الجوال (390px بلا تجاوز أفقي) ===== */
@media (max-width: 860px) {
  .akpp-cols { grid-template-columns: 1fr; }
  .akpp-card-sticky { position: static; }
}
@media (max-width: 620px) {
  .akpp-hero { padding: 30px 0 96px; }
  .akpp-hero-card { gap: 16px; }
  .akpp-avatar { width: 92px; height: 92px; border-radius: 22px; }
  .akpp-avatar-empty span { font-size: 42px; }
  .akpp-stats { grid-template-columns: repeat(2, 1fr); margin-top: 18px; }
  .akpp-main { transform: translateY(-46px); }
  .akpp-card { padding: 18px 16px; border-radius: 15px; }
  .akpp-gallery { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .akpp-hero-meta { gap: 6px; }
  .akpp-chip { font-size: 12px; padding: 4px 10px; }
  .akpplg-prev, .akpplg-next { width: 42px; height: 42px; }
  .akpplg-close { inset-inline-start: 12px; top: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .akpplg-item, .akpp-btn { transition: none; }
  .akpplg-item:hover, .akpp-btn:hover { transform: none; }
}

