/* ═══════════════════════════════════════════════════
   BIOGRAPHY PAGE — Dark Theme #2b2b2b
   imamali.net AKD-* classes · 2-column · Animated
   RTL · Arabic
═══════════════════════════════════════════════════ */

/* ────────────────────────────────────────
   ROOT PALETTE
──────────────────────────────────────── */
:root {
  --bio-page: #2b2b2b;
  --bio-card: #333333;
  --bio-card2: #3a3a3a;
  --bio-teal: #366d6d;
  --bio-teal-dk: #274f4f;
  --bio-teal-lt: #4a8f8f;
  --bio-gold: #c9a227;
  --bio-gold2: #e8c547;
  --bio-text: #e0e0e0;
  --bio-muted: #aaaaaa;
  --bio-border: rgba(201, 162, 39, .2);
  --bio-border2: rgba(255, 255, 255, .07);
  --bio-green: #4a8f6a;
  --bio-green-dk: #366050;
  --bio-link: #7ecfcf;
}

/* ────────────────────────────────────────
   BASE
──────────────────────────────────────── */
.bio-page {
  background: var(--bio-page);
  direction: rtl;
  font-family: 'Bahij', 'Tajawal', 'Tahoma', Arial, sans-serif;
  color: var(--bio-text);
  min-height: 100vh;
  font-size: 16px;
  position: relative;
}

.bio-cont {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 15px;
  box-sizing: border-box;
}

/* ────────────────────────────────────────
   CALLIGRAPHY HERO
──────────────────────────────────────── */
.bio-hero-callig {
  position: relative;
  width: 100%;
  margin-top: -130px;
  padding-top: 130px;
  min-height: 420px;
  overflow: visible;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* الصورة تبدأ من أعلى الصفحة خلف الهيدر وتمتد لأسفل */
.bio-callig-img {
  position: absolute;
  top: -130px;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: calc(100% + 130px);
  object-fit: cover;
  object-position: center top;
  opacity: 0.75;
  filter: brightness(1.2);
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

/* تلاشي تدريجي في الأسفل للانتقال السلس لقسم السيرة */
.bio-hero-callig::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to bottom, transparent, var(--bio-page));
  z-index: 2;
  pointer-events: none;
}

/* Content over image — توسيط عمودي وأفقي */
.bio-callig-overlay {
  position: relative;
  z-index: 3;
  text-align: center;
  padding: 60px 24px 80px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.bio-callig-text {
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
}

.bio-callig-bism {
  font-size: .95rem;
  color: var(--bio-gold);
  letter-spacing: .05em;
  margin: 0 0 14px;
  opacity: .85;
}

.bio-callig-title {
  font-size: clamp(1.55rem, 4.5vw, 3.4rem);
  font-weight: 800;
  color: #fff;
  margin: 0 0 14px;
  text-shadow: 0 2px 30px rgba(0, 0, 0, .85);
  line-height: 1.3;
  white-space: nowrap;
}

.bio-callig-sub {
  font-size: clamp(1rem, 2.2vw, 1.4rem);
  color: var(--bio-gold2);
  margin: 0 0 20px;
}

.bio-callig-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 18px;
}

.bio-callig-divider span {
  display: block;
  width: 70px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 162, 39, .55), transparent);
}

.bio-callig-divider i {
  color: var(--bio-gold);
  font-size: .95rem;
}

.bio-callig-ayah {
  font-size: clamp(.88rem, 2vw, 1rem);
  color: rgba(255, 255, 255, .8);
  line-height: 1.9;
  margin: 0;
}

/* ────────────────────────────────────────
   BREADCRUMB
──────────────────────────────────────── */
.bio-bc-wrap {
  position: relative;
  z-index: 5;
}

.bio-bc-bar {
  background: #252525;
  border-bottom: 1px solid var(--bio-border2);
  padding: 8px 0;
  font-size: 13px;
  color: var(--bio-muted);
  position: relative;
  z-index: 5;
}

/* breadcrumb الداخل يتبع container */
.bio-bc-bar .bio-cont {
  padding: 0 15px;
}

.bio-bc-bar a {
  color: var(--bio-teal-lt);
  text-decoration: none;
  transition: color .2s;
}

.bio-bc-bar a:hover {
  color: var(--bio-gold);
}

.bio-bc-sep {
  margin: 0 6px;
  opacity: .4;
}

/* ────────────────────────────────────────
   MAIN BODY
──────────────────────────────────────── */
.bio-body {
  padding: 30px 0 60px;
  width: 100%;
}

/* ────────────────────────────────────────
   SECTION HEADING
──────────────────────────────────────── */
.bio-sec-head {
  margin-bottom: 22px;
}

.bio-sec-head-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}

.bio-sec-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--bio-teal), var(--bio-teal-lt));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
  flex-shrink: 0;
  border: 2px solid rgba(201, 162, 39, .3);
}

.bio-sec-head h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 3px;
}

.bio-sec-head p {
  font-size: .85rem;
  color: var(--bio-muted);
  margin: 0;
}

.bio-sec-line {
  height: 2px;
  background: linear-gradient(to left, var(--bio-gold), var(--bio-teal), transparent);
  border-radius: 2px;
}

/* عنوان القسم */
.AKD-Categ_Header {
  background: #2b2b2b;
  border-radius: 6px;
  padding: 11px 18px;
  margin-bottom: 2px;
  border-bottom: 3px solid var(--bio-gold);
}

.AKD-HeaderTit_ {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin: 0;
  line-height: 1.5;
}

.AKD-HeaderTit_ span {
  color: rgba(255, 255, 255, .65);
  font-weight: 400;
  font-size: 16px;
}

/* العنوان الفرعي */
.AKD-Tit_Descript {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--bio-border2);
  padding: 8px 4px;
  font-size: 16px;
  font-weight: 600;
  color: var(--bio-gold);
  margin: 0 0 4px;
}

/* ────────────────────────────────────────
   AKD — بدون صندوق، حر بعرض الصفحة
──────────────────────────────────────── */
.AKD-C_Categorybody {
  direction: rtl;
  text-align: right;
  font-family: 'Bahij', 'Tajawal', 'Tahoma', Arial, sans-serif;
  color: var(--bio-text);
  box-sizing: border-box;
  margin-bottom: 24px;
  /* لا border، لا background على الغلاف */
}

/* حاوية داخلية للمحتوى */
.AKD-CategSira {
  width: 100%;
  box-sizing: border-box;
}


/* حاوية المحتوى — بدون صندوق */
.AKD-Categ_Descript {
  background: transparent;
  border: none;
  position: relative;
  width: 100%;
  padding: 0;
  overflow: hidden;
  max-height: 340px;
  transition: all 0.3s ease-in-out;
}

.AKD-Categ_Descript.AKD-Descript--open {
  max-height: 2400px;
}

/* ════════════════════════════════════════
   TWO COLUMNS — نسخة الصورة
════════════════════════════════════════ */
.AKD-TwoCols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

/* UL reset */
.AKD-DescriptSira_Ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* العمود الأيمن: فاصل عمودي على اليسار */
.AKD-Col--right {
  border-left: 1px solid var(--bio-border2);
}

/* ── كل صف — حر بدون صندوق ── */
.AKD-SiraItem_li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 6px;
  border-bottom: 1px solid var(--bio-border2);
  transition: background .15s;
  border-radius: 4px;
}

.AKD-SiraItem_li:last-child {
  border-bottom: none;
}

.AKD-SiraItem_li:hover {
  background: rgba(54, 109, 109, .08);
}

/* للمحتوى الطويل (العمود الأيسر) */
.AKD-SiraItem--block {
  align-items: flex-start;
}

/* ── الشارة الخضراء ── */
.AKD-SiraName {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--bio-teal);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 4px;
  white-space: nowrap;
  min-width: 86px;
  text-align: center;
  line-height: 1.6;
  height: 30px;
  box-shadow: 0 1px 5px rgba(54, 109, 109, .4);
  transition: background .15s;
}

.AKD-SiraItem_li:hover .AKD-SiraName {
  background: var(--bio-teal-lt);
}

/* ── النص ── */
.AKD-ExplainSira_P {
  font-size: 16px;
  color: var(--bio-text);
  line-height: 1.85;
  flex: 1;
}

/* ── Shadow + زر المزيد ── */
.AKD-Shadow_inset {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  text-align: center;
  padding: 32px 0 14px;
  background: linear-gradient(to bottom, transparent, var(--bio-page) 65%);
  pointer-events: none;
}

.AKD-Shadow_inset .AKD-MoreInf_ {
  pointer-events: auto;
}

.AKD-Descript--open .AKD-Shadow_inset {
  position: static;
  background: none;
  border-top: 1px solid var(--bio-border2);
  padding: 12px 0;
}

.AKD-MoreInf_ {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--bio-teal);
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 8px 28px;
  font-size: .88rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background .2s, transform .2s;
  box-shadow: 0 3px 12px rgba(54, 109, 109, .4);
}

.AKD-MoreInf_:hover {
  background: var(--bio-teal-lt);
  transform: translateY(-1px);
}

/* ── Responsive: عمود واحد ── */
@media (max-width: 680px) {
  .AKD-TwoCols {
    grid-template-columns: 1fr;
  }

  .AKD-Col--right {
    border-left: none;
    border-bottom: 1px solid var(--bio-border2);
  }

  .AKD-SiraName {
    min-width: 64px;
    font-size: .7rem;
  }
}

/* ────────────────────────────────────────
   HADITH STRIP
──────────────────────────────────────── */
.bio-hadith-strip {
  background: linear-gradient(135deg, var(--bio-teal-dk) 0%, #1e3535 100%);
  border: 1px solid var(--bio-border);
  border-radius: 6px;
  padding: 22px 28px;
  text-align: center;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

.bio-hadith-strip::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(201, 162, 39, .08) 1px, transparent 1px);
  background-size: 22px 22px;
  pointer-events: none;
}

.bio-q-icon {
  font-size: 1.5rem;
  color: var(--bio-gold);
  opacity: .6;
  display: block;
  margin-bottom: 8px;
}

.bio-hadith-strip p {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, .9);
  line-height: 1.9;
  margin: 0 0 6px;
}

.bio-hadith-strip span {
  font-size: .82rem;
  color: var(--bio-gold2);
}

/* ────────────────────────────────────────
   TOPICS LIST — حرة بدون صندوق خارجي
──────────────────────────────────────── */
.AKD-C_TopicsBody {
  margin-bottom: 0;
}

/* الحاوية: لا border، لا خلفية */
.AKD-Topics_List {
  list-style: none;
  margin: 0;
  padding: 8px 4px 4px;
  background: transparent;
  border: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: visible;
}

/* كل عنصر = كارد مستقل حر */
.AKD-Categ_List {
  background: var(--bio-card2);
  border-radius: 8px;
  border: 1px solid var(--bio-border2);
  overflow: hidden;
  transform: translateX(0);
  transition: background .15s ease, border-color .15s ease, transform .05s ease-out;
}

.AKD-Categ_List:hover {
  background: rgba(54, 109, 109, .18);
  border-color: var(--bio-teal);
  transform: translateX(-8px) !important;
}

.AKD-Categ_List:hover .AKD-Li_Tx_ {
  color: var(--bio-gold);
}

.AKD-Categ_List:hover .AKD-Li_Num_ {
  color: var(--bio-gold);
}

/* الرابط — يملأ الكارد كاملاً */
.AKD-HrefList {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0;
  text-decoration: none;
  color: inherit;
  min-height: 48px;
}

/* ── الجانب الأيمن: رقم + نص ── */
.AKD-H_ListRight {
  display: flex;
  align-items: center;
  gap: 0;
  flex: 1;
  min-width: 0;
}

/* رقم — مثل الصورة: صغير، مكتنز في الجانب الأيمن */
.AKD-Li_Num_ {
  flex-shrink: 0;
  width: 40px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--bio-muted);
  padding: 0 8px;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  border-left: 1px solid var(--bio-border2);
  transition: color .25s ease;
}

/* نص العنوان */
.AKD-Li_Tx_ {
  flex: 1;
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 500;
  color: var(--bio-text);
  line-height: 1.5;
  transition: color .18s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── الجانب الأيسر: views في صندوق مستدير ── */
.AKD-H_ListLeft {
  flex-shrink: 0;
  padding: 0 10px;
}

.AKD-Li_Views_ {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--bio-card);
  border: 1px solid var(--bio-border2);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: .76rem;
  color: var(--bio-muted);
  direction: ltr;
  white-space: nowrap;
}

.AKD-Li_Views_ i {
  font-size: .72rem;
  opacity: .55;
}

/* ────────────────────────────────────────
   ANIMATIONS
──────────────────────────────────────── */
/* Scroll-reveal base */
.bio-anim {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .6s cubic-bezier(.22, 1, .36, 1), transform .6s cubic-bezier(.22, 1, .36, 1);
}

.bio-anim.bio-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered delays */
.bio-anim-d1 {
  transition-delay: .1s;
}

.bio-anim-d2 {
  transition-delay: .18s;
}

.bio-anim-d3 {
  transition-delay: .25s;
}

/* Topic rows stagger via CSS custom property */
.bio-topic-anim {
  opacity: 0;
  transform: translateX(16px);
  transition: opacity .45s ease, transform .45s ease;
  transition-delay: calc(var(--i) * 0.04s);
}

.bio-topic-anim.bio-visible {
  opacity: 1;
  transform: translateX(0);
  transition-delay: 0s;
  transition: opacity .45s ease, transform .2s ease-out, background .15s ease, border-color .15s ease;
}

/* Hero entrance */
.bio-callig-title,
.bio-callig-sub,
.bio-callig-bism,
.bio-callig-divider,
.bio-callig-ayah {
  animation: bioFadeUp .8s cubic-bezier(.22, 1, .36, 1) both;
}

.bio-callig-bism {
  animation-delay: .05s;
}

.bio-callig-title {
  animation-delay: .18s;
}

.bio-callig-sub {
  animation-delay: .30s;
}

.bio-callig-divider {
  animation-delay: .40s;
}

.bio-callig-ayah {
  animation-delay: .50s;
}

@keyframes bioFadeUp {
  from {
    opacity: 0;
    transform: translateY(22px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* ────────────────────────────────────────
   RESPONSIVE
──────────────────────────────────────── */
@media (max-width: 720px) {
  .AKD-TwoCols {
    grid-template-columns: 1fr;
  }

  .AKD-Col {
    border-left: none;
    border-bottom: 1px solid var(--bio-border2);
  }

  .AKD-Col:last-child {
    border-bottom: none;
  }

  .AKD-SiraName {
    min-width: 68px;
    font-size: .72rem;
  }

  .bio-hero-callig {
    min-height: 300px;
  }

  .bio-callig-img {
    object-position: center center;
  }
}

@media (max-width: 480px) {
  .bio-hero-callig {
    min-height: 300px;
    margin-top: -90px;
    padding-top: 90px;
  }

  .bio-callig-img {
    top: -90px;
    height: calc(100% + 90px);
    object-position: center center;
  }

  .bio-callig-overlay {
    padding: 30px 12px 0px;
  }

  /* السطر الأول: العنوان — سطر واحد */
  .bio-callig-title {
    font-size: clamp(1.3rem, 6vw, 1.75rem);
    white-space: nowrap;
  }

  /* السطر الثاني: العنوان الفرعي */
  .bio-callig-sub {
    font-size: clamp(1.1rem, 4.2vw, 1.35rem);
  }

  /* الحديث/الآية — صغير، سطر أو سطرين متناسقين */
  .bio-callig-ayah {
    font-size: clamp(.72rem, 2.6vw, .85rem);
    line-height: 1.75;
    white-space: normal;
    max-width: 88vw;
    margin: 0 auto;
  }

  .AKD-Li_Views_ {
    display: inline-flex;
    padding: 2px 6px;
    font-size: .7rem;
  }

  .AKD-Li_Num_ {
    width: 36px;
    font-size: .74rem;
  }

  .AKD-Li_Tx_ {
    font-size: .84rem;
    padding: 9px 10px;
  }

  .bio-hadith-strip {
    padding: 16px 16px;
  }

  .bio-hadith-strip p {
    font-size: .92rem;
  }
}