/* ═══════════════════════════════════════════════════════════════
   كادر — البروفايل (v7): بطاقة واضحة بالفاتح والداكن بدل الزجاج الرمادي
   ينحمّل بعد profile-ios.css ويغلبه
   ═══════════════════════════════════════════════════════════════ */
.profile-page-background, .profile-orb { display: none !important; }

/* v12: الغلاف صار داخل البطاقة (قطعة وحدة)، طرفه السفلي قوس ناعم بلون البطاقة،
   والصورة الشخصية گاعدة على رأس القوس — حلقتها بنفس لون البطاقة فتبين طالعة منها.
   (قبل: البطاقة جانت نص شفافة فوق الغلاف ← شريط غامق يقطع الصورة) */
.profile-container-ios { --pf-pad: 28px; --pf-r: 28px; --pf-cover: 250px; --pf-arc: 64px; --pf-av: 136px;
  max-width: 1100px; margin: 92px auto 40px; padding: 0 20px; }
.profile-card-ios, .profile-card-ios.lg.lg-card { background: var(--k-surface) !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
  border: 1px solid var(--k-line) !important; border-radius: var(--pf-r) !important; box-shadow: var(--k-card-shadow) !important;
  padding: 0 var(--pf-pad) 26px !important; max-width: 760px; margin: 0 auto !important; animation: none !important; color: var(--k-ink); }

.profile-cover-ios { position: relative; z-index: 0; height: var(--pf-cover); width: auto; max-width: none;
  margin: 0 calc(-1 * var(--pf-pad)) !important; align-self: stretch; overflow: hidden; border: 0 !important; box-shadow: none;
  border-radius: calc(var(--pf-r) - 1px) calc(var(--pf-r) - 1px) 0 0; background: var(--k-grad); }
.profile-cover-ios > img { width: 100%; height: 100%; object-fit: cover; display: block; -webkit-mask-image: none !important; mask-image: none !important; filter: none !important; }
.profile-cover-ios > .pf-cover-fill { width: 100%; height: 100%; background: var(--k-grad); position: relative; }
.profile-cover-ios > .pf-cover-fill::after { content: ""; position: absolute; inset: 0;
  background: radial-gradient(60% 90% at 85% 10%, rgba(255,255,255,.22), transparent 60%), radial-gradient(50% 80% at 10% 100%, rgba(255,255,255,.12), transparent 60%); }
/* ظل خفيف فوق القوس حتى الغلاف يندمج وما ينقطع حاد (يشتغل مع صور الغلاف الفاتحة هم) */
.profile-cover-ios::after { content: ""; position: absolute; inset: auto 0 0; height: 45%; pointer-events: none;
  background: linear-gradient(to bottom, transparent, rgba(var(--k-shadow-rgb, 20,14,60), .18)); }
.pf-arc { position: absolute; z-index: 1; inset-inline: 0; bottom: -1px; width: 100%; height: var(--pf-arc); display: block; fill: var(--k-surface); }

.profile-avatar-ios { position: relative; z-index: 2; width: var(--pf-av) !important; height: var(--pf-av) !important;
  margin: calc(-1 * (var(--pf-av) / 2 + var(--pf-arc) - 6px)) auto 12px !important; padding: 0 !important;
  background: var(--k-surface) !important; border: 6px solid var(--k-surface) !important;
  box-shadow: 0 -6px 18px -8px rgba(var(--k-shadow-rgb, 30,26,60), calc(.35 * var(--k-sk, 1))) !important; }
.profile-avatar-ios img { width: 100% !important; height: 100% !important; border-radius: 50% !important; object-fit: cover; border: 0 !important; box-shadow: none !important; }
.verified-badge-ios { background: var(--k-accent) !important; color: #fff !important; border: 3px solid var(--k-surface) !important; box-shadow: none !important; }

.profile-name-ios { font-size: clamp(1.5rem, 3.4vw, 2rem) !important; color: var(--k-ink) !important; background: none !important;
  -webkit-text-fill-color: currentColor !important; margin: 0 0 2px !important; line-height: 1.35; text-shadow: none !important; }
.profile-username-ios { display: inline-block; direction: ltr; color: var(--k-ink-3) !important; background: var(--k-surface-2) !important; border: 0 !important;
  border-radius: 999px; padding: 2px 12px !important; font-size: .88rem !important; margin-bottom: 14px !important; }
.profile-bio-ios { color: var(--k-ink-2) !important; font-size: 1rem !important; line-height: 1.9 !important; max-width: 58ch; margin: 0 auto 16px !important; white-space: normal; }

/* v19: النبذة الطويلة تنطوي + روابطها واضحة */
.pf-bio { position: relative; max-width: 58ch; margin: 0 auto 16px; }
.pf-bio .profile-bio-ios { margin: 0 auto !important; overflow-wrap: anywhere; }
.pf-bio .profile-bio-ios a { color: var(--k-brand); font-weight: 700; text-decoration: none; border-bottom: 1px dashed rgba(var(--k-brand-rgb), .4); }
.pf-bio.is-long:not(.open) .profile-bio-ios { max-height: calc(1.9em * 4); overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent); mask-image: linear-gradient(to bottom, #000 55%, transparent); }
.pf-bio-more { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; padding: 6px 14px; border-radius: 999px; cursor: pointer; font: inherit; font-size: .84rem; font-weight: 800;
  color: var(--k-brand); background: rgba(var(--k-brand-rgb), .1); border: 1px solid rgba(var(--k-brand-rgb), .2); }
.pf-bio-more i { font-size: .7rem; transition: transform .2s; }
.pf-bio.open .pf-bio-more i { transform: rotate(180deg); }

/* زر تعديل الغلاف (صاحب البروفايل) */
.pf-cover-edit { position: absolute; z-index: 3; top: 12px; inset-inline-start: 12px; display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 999px; font-size: .8rem; font-weight: 800; color: #fff; text-decoration: none;
  background: rgba(12, 9, 28, .45); border: 1px solid rgba(255,255,255,.22); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.pf-cover-edit:hover { background: rgba(12, 9, 28, .65); }

.pf-specs { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin: 0 0 20px; }
.pf-spec { display: inline-flex; align-items: center; gap: 6px; padding: 5px 14px; border-radius: 999px; font-size: .86rem; font-weight: 700;
  color: var(--k-brand); background: rgba(var(--k-brand-rgb), .1); border: 1px solid rgba(var(--k-brand-rgb), .18); }

/* الأرقام */
.profile-stats-ios { display: flex !important; justify-content: center; gap: 0 !important; margin: 0 auto 20px !important; padding: 12px 6px !important; width: 100%; max-width: 520px;
  background: var(--k-surface-2) !important; border: 1px solid var(--k-line) !important; border-radius: 18px !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
.stat-item-ios { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 8px !important; background: none !important; border: 0 !important; cursor: pointer; }
.stat-item-ios + .stat-item-ios { border-inline-start: 1px solid var(--k-line) !important; }
.stat-count { font-size: 1.35rem !important; font-weight: 800 !important; color: var(--k-ink) !important; background: none !important; -webkit-text-fill-color: currentColor !important; font-variant-numeric: tabular-nums; }
.stat-label { font-size: .82rem !important; color: var(--k-ink-3) !important; }

/* الأزرار */
.profile-actions-ios { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px !important; margin-bottom: 4px; }
.profile-actions-ios .btn-ios-primary, .profile-actions-ios .btn-ios-secondary { min-height: 44px; padding: 0 20px !important; border-radius: 14px !important;
  font-size: .93rem !important; font-weight: 800 !important; display: inline-flex !important; align-items: center; justify-content: center; gap: 8px; text-decoration: none;
  -webkit-backdrop-filter: none !important; backdrop-filter: none !important; transition: transform .15s var(--k-ease, ease), border-color .2s ease, background-color .2s ease; }
.profile-actions-ios .btn-ios-primary { background: var(--k-grad) !important; color: #fff !important; border: 0 !important;
  box-shadow: 0 8px 20px rgba(var(--k-brand-rgb), calc(.28 * var(--k-glow, 1))) !important; }
.profile-actions-ios .btn-ios-primary.following { background: var(--k-surface) !important; color: var(--k-brand) !important; border: 1.5px solid rgba(var(--k-brand-rgb), .45) !important; box-shadow: none !important; }
.profile-actions-ios .btn-ios-secondary { background: var(--k-surface) !important; color: var(--k-ink) !important; border: 1px solid var(--k-line) !important; box-shadow: none !important; }
.profile-actions-ios .btn-ios-secondary:hover { border-color: rgba(var(--k-brand-rgb), .45) !important; }
.profile-actions-ios .btn-ios-secondary[style*="--k-bad"], .profile-actions-ios .restriction-btn { color: var(--k-bad) !important; border-color: rgba(var(--k-bad-rgb), .3) !important; background: rgba(var(--k-bad-rgb), .06) !important; }
.profile-actions-ios .btn-ios-secondary[href*="edit-model"] { color: var(--k-warn) !important; }
.profile-actions-ios :is(.btn-ios-primary, .btn-ios-secondary):active { transform: scale(.97); }
#inbox-badge { background: var(--k-bad) !important; border-radius: 999px !important; padding: 0 5px; line-height: 18px; box-shadow: none !important; }

.contact-info-ios { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 10px; }
.contact-info-ios:empty { display: none; }
.contact-btn-ios { background: var(--k-surface-2) !important; color: var(--k-ink) !important; border: 1px solid var(--k-line) !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
.contact-btn-ios.whatsapp { color: #128C4A !important; border-color: rgba(37, 211, 102, .35) !important; background: rgba(37, 211, 102, .08) !important; }
:root[data-mode="dark"] .contact-btn-ios.whatsapp { color: #4ADE80 !important; }

/* آراء العملاء */
#kdReviews { color: var(--k-ink); }
#kdReviews .kd-rv { background: var(--k-surface-2) !important; border-color: var(--k-line) !important; }

/* التبويبات: نفس شكل الاستكشاف */
.profile-tabs-ios { display: flex !important; justify-content: center; gap: 4px !important; margin: 26px auto 22px !important; padding: 5px !important; width: fit-content; max-width: 100%;
  background: var(--k-surface); border: 1px solid var(--k-line) !important; border-radius: 999px; box-shadow: var(--k-card-shadow); animation: none !important; }
.profile-tab-ios { padding: 9px 20px !important; border-radius: 999px; font-size: .95rem !important; color: var(--k-ink-2) !important; gap: 8px !important;
  transition: background-color .25s, color .25s, box-shadow .25s !important; }
.profile-tab-ios::after, .profile-tab-ios::before { display: none !important; }
.profile-tab-ios > span:not(.tab-count) { display: inline !important; }
.profile-tab-ios i { color: inherit !important; -webkit-text-fill-color: currentColor !important; background: none !important; }
.ex-feed [hidden], .profile-tab-panel-ios [hidden] { display: none !important; }
.profile-tab-ios:hover { color: var(--k-ink) !important; }
.profile-tab-ios.active { color: #fff !important; background: var(--k-grad) !important; box-shadow: 0 6px 16px rgba(var(--k-brand-rgb), calc(.28 * var(--k-glow, 1))); }
.profile-tab-ios .tab-count { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center; font-size: .75rem !important; font-weight: 800;
  background: rgba(var(--k-brand-rgb), .12) !important; color: var(--k-brand) !important; border: 0 !important; box-shadow: none !important; }
.profile-tab-ios.active .tab-count { background: rgba(255,255,255,.25) !important; color: #fff !important; }
.profile-tab-panel-ios { display: none; }
.profile-tab-panel-ios.active { display: block; animation: exIn .3s var(--k-ease, ease) both; }
.section-divider-ios { display: none; }

/* كاتب المنشور */
.pf-composer { background: var(--k-surface); border: 1px solid var(--k-line); border-radius: 20px; padding: 14px 16px; box-shadow: var(--k-card-shadow); }
.pf-composer-top { display: flex; gap: 12px; align-items: flex-start; }
.pf-composer-top img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: none; }
.pf-composer textarea { flex: 1; min-width: 0; min-height: 90px; resize: vertical; border: 1px solid var(--k-line); border-radius: 14px; padding: 12px 14px;
  background: var(--k-surface-2); color: var(--k-ink); font: inherit; font-size: .98rem; line-height: 1.8; }
.pf-composer textarea:focus { outline: none; border-color: rgba(var(--k-brand-rgb), .5); box-shadow: 0 0 0 3px rgba(var(--k-brand-rgb), .12); }
.pf-composer-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; padding-inline-start: 56px; }
.pf-composer .char-counter { color: var(--k-ink-3); font-size: .82rem; font-variant-numeric: tabular-nums; }
.pf-composer .char-counter.warning { color: var(--k-bad); }
.pf-composer .k-btn:disabled { opacity: .5; cursor: not-allowed; }
.pf-limit { margin-top: 10px; padding: 10px 14px; border-radius: 12px; text-align: center; font-size: .9rem; color: var(--k-warn); background: rgba(var(--k-warn-rgb), .1); border: 1px solid rgba(var(--k-warn-rgb), .25); }
.pf-composer-tip { margin: 10px 0 0; color: var(--k-ink-3); font-size: .82rem; line-height: 1.7; }
.pf-posts { display: flex; flex-direction: column; gap: 14px; }
.pf-del { flex: none; width: 34px; height: 34px; border-radius: 10px; border: 0; background: transparent; color: var(--k-ink-3); cursor: pointer; transition: background-color .2s, color .2s; }
.pf-del:hover { background: rgba(var(--k-bad-rgb), .1); color: var(--k-bad); }
.ex-post-head .ex-post-av img { display: block; }

/* الموبايل */
@media (max-width: 700px) {
  .profile-container-ios { --pf-pad: 16px; --pf-r: 26px; --pf-cover: 178px; --pf-arc: 46px; --pf-av: 112px; margin-top: 78px; padding: 0 12px; }
  .profile-card-ios, .profile-card-ios.lg.lg-card { padding-bottom: 20px !important; }
  .profile-avatar-ios { border-width: 5px !important; }
  .profile-bio-ios { font-size: .95rem !important; }
  .stat-count { font-size: 1.15rem !important; }
  /* v19: الزر الأساسي بعرض كامل، والباقي يتوزعون بالتساوي (3 بالسطر) بدل زر يتيم بسطر وحده */
  .profile-actions-ios { display: flex; flex-wrap: wrap; width: 100%; }
  .profile-actions-ios > * { flex: 1 1 28%; min-width: 0; padding: 0 10px !important; white-space: nowrap; }
  .profile-actions-ios > .btn-ios-primary { flex-basis: 100%; order: -1; }
  .profile-actions-ios > :is(a, button)[title] { flex: 0 0 52px; }
  /* v61: «أضف تخصص» بيه title بس مو زر أيقونة — جان ينضغط لـ 52px ونصه يطلع برّه الشاشة */
  .profile-actions-ios > a.pf-add-spec { flex: 1 1 28%; }
  .profile-actions-ios > :is(a, button):not(.btn-ios-primary) { font-size: .86rem !important; gap: 6px; padding: 0 8px !important; }
  .pf-cover-edit { top: 10px; inset-inline-start: 10px; padding: 6px 10px; font-size: .76rem; }
  .profile-tabs-ios { width: 100%; }
  .profile-tab-ios { flex: 1 1 0; justify-content: center; padding: 9px 8px !important; font-size: .88rem !important; }
  .pf-composer-foot { padding-inline-start: 0; }
  .pf-composer-top img { display: none; }
}
@media (prefers-reduced-motion: reduce) { .profile-tab-panel-ios.active { animation: none; } }
