/* =========================================================
   Profile Page (About -> Profile)
   File: public/assets/css/components/profile.css
   ========================================================= */

/* ========== Base ========== */
.about-page {
  padding: 30px 0 50px;
}

.about-title {
  margin: 0 0 18px;
  font-weight: 800;
  letter-spacing: .2px;
  font-size: 22px;
  line-height: 1.3;
}

.about-section p {
  line-height: 1.9;
}

/* ================================
   TEXT READABILITY FIX (Profile)
   - تحسين حجم الخط والمسافات
   - مناسب للعربي والانجليزي
================================ */

/* النص داخل صندوق البروفايل */
.about-profile-text p{
  font-size: 15px;
  line-height: 1.95;
  color: #374151;
  margin-bottom: 14px;
  max-width: 72ch; /* يمنع سطر طويل متعب */
}

/* للعربي تحديدًا */
html[dir="rtl"] .about-profile-text p{
  font-size: 15.5px;
  line-height: 2;
}

/* القوائم إن وجدت داخل النص (لو محتوى HTML من لوحة التحكم) */
.about-profile-text ul,
.about-profile-text ol{
  padding-inline-start: 18px;
  margin: 12px 0;
}

.about-profile-text li{
  margin-bottom: 8px;
  line-height: 1.8;
}

/* ========== Profile Layout (Text + Image) ========== */
.about-profile-layout {
  display: grid;
  grid-template-columns: 1.35fr .95fr;
  gap: 26px;
  align-items: start;
  margin-top: 18px;
}

.about-profile-text {
  background: #fff;
  border-radius: 18px;
  padding: 28px; /* كان 26 */
  box-shadow: 0 8px 28px rgba(0,0,0,.06);
}

.about-profile-image {
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(0,0,0,.06);
}

.about-profile-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  max-height: 420px; /* يمنع الصورة تكبر زيادة */
}

/* ========== Highlights ========== */
.about-highlights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 22px; /* كان 18 */
}

.about-highlight-item {
  background: #f6f8fb;
  border-radius: 14px;
  padding: 14px 12px;
  text-align: center;
  border: 1px solid rgba(0,0,0,.05);
}

.ahi-number {
  font-size: 24px; /* كان 28 */
  font-weight: 900;
  color: #0b2a42;
  line-height: 1.1;
}

.ahi-label {
  margin-top: 6px;
  font-size: 12.5px; /* كان 13 */
  color: #5f6b76;
  line-height: 1.4;
}

/* ========== Why Choose Us ========== */
.about-why {
  margin-top: 24px;
  background: #fff;
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 8px 28px rgba(0,0,0,.06);
}

.about-why h3 {
  margin: 0 0 14px;
  font-size: 16px;
  letter-spacing: .8px;
  font-weight: 900;
  color: #0b2a42;
}

.about-why-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.about-why-item {
  background: #f6f8fb;
  border-radius: 14px;
  padding: 16px;
  border: 1px solid rgba(0,0,0,.05);
}

.about-why-item h4 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 900;
  color: #0b2a42;
}

.about-why-item p {
  margin: 0;
  color: #56616c;
}

/* =========================================================
   RIGHT TOOLBAR (Desktop)
   ========================================================= */
.right-toolbar {
  position: fixed;
  top: 42%;
  transform: translateY(-42%);
  z-index: 9999;

  display: flex;
  flex-direction: column;
  gap: 12px;

  padding: 0;
  background: transparent;
  border-radius: 0;
}

.right-toolbar .tool-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
}

/* RTL: يمين | LTR: يسار */
html[dir="rtl"] .right-toolbar { right: 14px; left: auto; }
html[dir="ltr"] .right-toolbar { left: 14px; right: auto; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 992px) {
  .about-profile-layout {
    grid-template-columns: 1fr;
  }

  .about-profile-image {
    max-height: 420px;
  }

  .about-why-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== Mobile FIX (no overlap) ===== */
@media (max-width: 768px) {

  .about-page {
    padding: 22px 0 42px;
    padding-bottom: 24px;
  }
  .about-page .container {
    padding-left: 14px;
    padding-right: 14px;
  }

  .about-profile-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .about-profile-text { order: 1; padding: 20px; }
  .about-profile-image { order: 2; }

  .about-highlights {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .about-highlights .about-highlight-item:last-child {
    grid-column: 1 / -1;
  }

  /* ========= FIX right-toolbar on mobile (NO COVER) ========= */

  .right-toolbar {
    position: fixed;
    top: 42%;
    transform: translateY(-42%);
    z-index: 9999;

    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0;
    background: transparent;
    border-radius: 0;
  }

  .right-toolbar .tool-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }

  .right-toolbar .tool-tooltip {
    display: none !important;
  }

  html[dir="rtl"] .right-toolbar {
    right: 10px;
    left: auto;
  }

  html[dir="ltr"] .right-toolbar {
    left: 10px;
    right: auto;
  }

  /* تخفيف عرض النص بالجوال */
  .about-profile-text p{
    max-width: 100%;
    font-size: 14.5px;
    line-height: 1.95;
  }
}

/* ===== ابعاد الـ toolbar عن النص ===== */
.right-toolbar{
  pointer-events: auto;
}

/* في العربي يكون يسار، في الانجليزي يمين */
html[dir="rtl"] .right-toolbar{
  inset-inline-start: 18px;
  inset-inline-end: auto;
}
html[dir="ltr"] .right-toolbar{
  inset-inline-end: 18px;
  inset-inline-start: auto;
}

/* اعمل مساحة داخل الصفحة حتى لا يغطي النص */
html[dir="rtl"] body{
  padding-left: 85px;
  padding-right: 0;
}
html[dir="ltr"] body{
  padding-right: 85px;
  padding-left: 0;
}

/* في الجوال لا نضيف مساحة كبيرة */
@media (max-width: 768px){
  html[dir="rtl"] body,
  html[dir="ltr"] body{
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}
