/* ============================================================
   AL-HABIB REAL ESTATE — NEWS DETAILS PAGE CSS (Arabic / RTL)
   Sections: Breadcrumbs · Hero gallery · Article (details aside +
             title/lead/body) · Related-articles bar · Related cards
   All page-level sections use the .mah-nd-* BEM prefix.
   Related cards reuse the shared .mah-news-card component (news.css).
   ============================================================ */

/* ============================================================
   CSS CUSTOM PROPERTIES
   ============================================================ */
:root {
  --nd-bg:           #f8fafc;
  --nd-nav-blue:     #103c55;
  --nd-gold:         #7f6f33;
  --nd-title-blue:   #0c3144;
  --nd-lead-blue:    #16506e;
  --nd-body-text:    #354956;
  --nd-card-bg:      #e1ecf1;
  --nd-surface:      #f8fbfc;
  --nd-divider:      #b4d2e1;
  --nd-light-blue:   #b4d2e1;
  --nd-accent-blue:  #86b8d1;
  --nd-px:           96px;
  --nd-radius:       8px;
  --nd-transition:   0.3s ease;
}

/* Page background spans the whole content area */
body.news-details-page main,
.mah-nd {
  background: var(--nd-bg);
}

/* ============================================================
   BREADCRUMBS — .mah-nd-breadcrumbs (dark nav-blue bar)
   ============================================================ */
.mah-nd-breadcrumbs {
  background-color: var(--nd-nav-blue);
  padding: 12px var(--nd-px);
}

.mah-nd-breadcrumbs__inner {
  display: flex;
  align-items: center;
}

.mah-nd-breadcrumbs__link {
  font-family: '29LT Zarid', 'Work Sans', sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: var(--nd-accent-blue);
  text-decoration: none;
  padding: 16px 8px;
  line-height: 1.5;
  white-space: nowrap;
  transition: opacity var(--nd-transition);
}

.mah-nd-breadcrumbs__link:hover {
  opacity: 0.8;
  color: var(--nd-accent-blue);
}

.mah-nd-breadcrumbs__sep {
  color: var(--nd-accent-blue);
  opacity: 0.6;
  flex-shrink: 0;
}

[dir="rtl"] .mah-nd-breadcrumbs__sep {
  transform: scaleX(-1);
}

.mah-nd-breadcrumbs__current {
  font-family: '29LT Zarid', 'Work Sans', sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: var(--nd-light-blue);
  padding: 16px 8px;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 520px;
}

/* ============================================================
   HERO GALLERY — .mah-nd-hero
   ============================================================ */
.mah-nd-hero {
  position: relative;
  width: 100%;
  height: 640px;
  overflow: hidden;
  background: #d4e1e9;
}

.mah-nd-hero__img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.mah-nd-hero__img.is-active {
  opacity: 1;
}

.mah-nd-hero__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  padding: 24px;
  background: var(--nd-surface);
  border: 0;
  border-radius: 9999px;
  cursor: pointer;
  transition: background var(--nd-transition);
}

.mah-nd-hero__nav:hover {
  background: #ffffff;
}

.mah-nd-hero__nav--prev { left: 32px; }
.mah-nd-hero__nav--next { right: 32px; }

.mah-nd-hero__nav svg {
  width: 32px;
  height: 32px;
  color: var(--nd-nav-blue);
}

/* ============================================================
   ARTICLE — .mah-nd-article (details aside + body column)
   ============================================================ */
.mah-nd-article {
  display: flex;
  gap: 48px;
  align-items: flex-start;
  padding: 32px var(--nd-px);
}

/* Body / description column (fixed width as per design) */
.mah-nd-article__main {
  width: 824px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 48px;
  padding: 12px 0;
  text-align: right;
}

.mah-nd__title {
  font-family: '29LT Zarid', sans-serif;
  font-size: 60px;
  font-weight: 700;
  color: var(--nd-title-blue);
  line-height: 1.25;
  letter-spacing: -2px;
  margin: 0;
}

.mah-nd__lead {
  font-family: '29LT Zarid', sans-serif;
  font-size: 32px;
  font-weight: 500;
  color: var(--nd-lead-blue);
  line-height: 1.5;
  margin: 0;
}

.mah-nd__body {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.mah-nd__body p {
  font-family: '29LT Zarid', 'Work Sans', sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: var(--nd-body-text);
  line-height: 1.7;
  margin: 0;
}

/* Details aside (sticky) */
.mah-nd-aside {
  flex: 1 1 0;
  min-width: 0;
  padding: 96px 0;
  position: sticky;
  top: 24px;
}

.mah-nd-details {
  display: flex;
  flex-direction: column;
  gap: 32px;
  background: var(--nd-card-bg);
  border-radius: 16px;
  padding: 24px;
}

.mah-nd-share {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: var(--nd-surface);
  border: 0;
  border-radius: var(--nd-radius);
  box-shadow: 0 1px 2px 0 rgba(35, 47, 55, 0.05);
  padding: 16px 24px;
  font-family: '29LT Zarid', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--nd-body-text);
  cursor: pointer;
  transition: background var(--nd-transition);
}

.mah-nd-share:hover {
  background: #ffffff;
}

.mah-nd-share svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.mah-nd-info {
  display: flex;
  flex-direction: column;
}

.mah-nd-info__row {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 16px 0;
}

.mah-nd-info__row + .mah-nd-info__row {
  border-top: 0;
}

.mah-nd-info__row:not(:last-child) {
  border-bottom: 1px solid var(--nd-divider);
}

.mah-nd-info__label {
  width: 128px;
  flex-shrink: 0;
  font-family: '29LT Zarid', 'Work Sans', sans-serif;
  font-size: 18px;
  font-weight: 400;
  color: var(--nd-lead-blue);
  line-height: 1.4;
  margin: 0;
}

.mah-nd-info__value {
  flex: 1 0 0;
  min-width: 0;
  font-family: '29LT Zarid', 'Work Sans', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--nd-title-blue);
  line-height: 1.4;
  margin: 0;
}

/* ============================================================
   RELATED-ARTICLES BAR — .mah-nd-related-bar
   ============================================================ */
.mah-nd-related-bar {
  display: flex;
  align-items: center;
  padding: 24px var(--nd-px);
  background: var(--nd-bg);
}

.mah-nd-related-bar__title {
  font-family: 'Work Sans', '29LT Zarid', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--nd-gold);
  line-height: 1.25;
  text-align: right;
  margin: 0;
}

/* ============================================================
   RELATED CARDS — .mah-nd-cards (3-up grid of .mah-news-card)
   ============================================================ */
.mah-nd-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  padding: 0 var(--nd-px) 48px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1200px) {
  :root {
    --nd-px: 48px;
  }

  .mah-nd-article__main {
    width: 60%;
  }
}

@media (max-width: 992px) {
  .mah-nd-hero {
    height: 420px;
  }

  .mah-nd-article {
    flex-direction: column;
  }

  .mah-nd-article__main {
    width: 100%;
    order: 2;
  }

  .mah-nd-aside {
    width: 100%;
    padding: 0;
    position: static;
    order: 1;
  }

  .mah-nd__title {
    font-size: 40px;
    letter-spacing: -1px;
  }

  .mah-nd__lead {
    font-size: 24px;
  }

  .mah-nd-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  :root {
    --nd-px: 20px;
  }

  .mah-nd-hero {
    height: 320px;
  }

  .mah-nd-hero__nav {
    width: 56px;
    height: 56px;
    padding: 16px;
  }

  .mah-nd-hero__nav svg {
    width: 24px;
    height: 24px;
  }

  .mah-nd-hero__nav--prev { left: 16px; }
  .mah-nd-hero__nav--next { right: 16px; }

  .mah-nd__title {
    font-size: 32px;
  }

  .mah-nd__lead {
    font-size: 20px;
  }

  .mah-nd-cards {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}
