/* =========================================================
   ARTICLE.CSS – CLEANED / RTL-SAFE
========================================================= */

/* -------------------------
   GLOBAL BACKGROUND
------------------------- */
.article-page-wrap,
main,
.container,
.container-lg,
.container-xl {
  background: transparent !important;
}

body {
  background: linear-gradient(180deg, #f6f2ea 0%, #f2eee7 100%);
  color: #1f1b17;
}

/* -------------------------
   LAYOUT
------------------------- */
.article-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding-bottom: 24px;
}

/* =========================================================
   HERO
========================================================= */
.article-hero,
.article-hero.card {
  margin: 0 0 1.7rem !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(181, 135, 53, 0.14) !important;
  background: transparent !important;
  box-shadow: none !important;
}

.article-hero .card-body {
  padding: 0 0 1.4rem !important;
}

.article-hero-inner {
  max-width: 880px;
  margin: 0 auto;
  padding-top: 2px;
  text-align: left;
}

.article-hero-top {
  margin-bottom: 0.7rem;
}

.article-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #6d604d;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
}

.article-back-link:hover {
  color: #2f271f;
}

/* -------------------------
   META
------------------------- */
.article-hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.28rem 0.52rem;
  margin-bottom: 0.6rem;
  color: #85745f;
  font-size: 0.82rem;
  line-height: 1.58;
}

.article-hero-meta i {
  margin-right: 0.2rem;
  font-size: 0.74rem;
  opacity: 0.58;
}

.meta-sep {
  opacity: 0.26;
}

.meta-author-with-image {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.meta-author-avatar {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid rgba(181, 135, 53, 0.12);
}

/* -------------------------
   TITLE
------------------------- */
.article-hero-title {
  margin: 0 0 0.85rem !important;
  color: #17130f;
  font-size: clamp(1.95rem, 2.9vw, 2.85rem);
  font-weight: 780;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

/* -------------------------
   ACTIONS
------------------------- */
.article-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px;
  margin-top: 0;
}

/* -------------------------
   HERO RTL
------------------------- */
html[dir="rtl"] .article-hero-inner,
html[dir="rtl"] .article-hero-top,
html[dir="rtl"] .article-hero-title,
html[dir="rtl"] .article-toolbar-actions {
  text-align: right;
}

html[dir="rtl"] .article-hero-meta {
  justify-content: flex-start;
}

html[dir="rtl"] .article-hero-meta i {
  margin-right: 0;
  margin-left: 0.2rem;
}

/* =========================================================
   ARTICLE BODY
========================================================= */
.article-shell-card {
  border: 0 !important;
  border-bottom: 1px solid rgba(181, 135, 53, 0.14) !important;
  background: transparent !important;
  margin-bottom: 1.8rem !important;
}

.article-cover-image {
  width: 100%;
  max-height: 560px;
  object-fit: cover;
  background: #e8e1d6;
}

.article-body-wrap {
  padding: 26px 0 12px !important;
}

.article-content {
  font-size: 1.02rem;
  line-height: 1.9;
  color: #4d4338;
}

/* -------------------------
   ARTICLE LAYOUT NEUTRAL / RTL SAFE
------------------------- */
.article-layout-neutral {
  direction: ltr;
  unicode-bidi: isolate;
}

.article-layout-neutral .article-body-wrap {
  direction: ltr;
}

.article-layout-neutral .article-content {
  text-align: left;
}

.article-layout-neutral{
  unicode-bidi: isolate;
}

.article-layout-neutral .article-body-wrap{
  direction: inherit;
}

.article-layout-neutral .article-content{
  line-height: 1.9;
}

/* =========================================================
   COMMENTS HEAD
========================================================= */
.article-comments-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  margin: 1.55rem 0 1rem;
  padding: 0 0 0.85rem;
  border-bottom: 1px solid rgba(181, 135, 53, 0.14);
  text-align: left;
}

.article-comments-title {
  margin: 0;
  color: #17130f;
  font-size: 1.28rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.article-comments-count {
  color: #766955;
  font-size: 0.9rem;
  line-height: 1.5;
}

.article-comments-guideline {
  max-width: 60ch;
  margin-top: 0.35rem;
  color: #766955;
  font-size: 0.88rem;
  line-height: 1.65;
}

/* =========================================================
   COMMENT ENTRY
========================================================= */
.article-comment-entry,
.article-comment-entry-guest {
  max-width: 760px;
  margin: 0 0 1.4rem;
  padding: 1rem 1.1rem 1.05rem;
  border: 1px solid rgba(181, 135, 53, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.34);
  box-shadow: none;
  text-align: left;
}

.article-comment-entry-guest {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.article-comment-entry-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}

.article-comment-entry-text {
  max-width: 60ch;
}

.article-comment-entry-title {
  margin: 0 0 0.22rem;
  color: #17130f;
  font-size: 1rem;
  font-weight: 760;
  line-height: 1.35;
}

.article-comment-entry-note {
  color: #766955;
  font-size: 0.92rem;
  line-height: 1.62;
}

.article-comment-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.article-comment-textarea {
  min-height: 120px;
  margin: 0;
}

.article-comment-form-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding-top: 0.1rem;
}

/* =========================================================
   COMMENTS LIST
========================================================= */
.article-comments-list-wrap {
  margin-top: 0.1rem;
  padding-top: 0.1rem;
  text-align: left;
}

.article-comments-list-head {
  margin: 0 0 0.6rem;
  color: #17130f;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.3;
}

.article-comments-empty {
  max-width: 760px;
  padding: 0.35rem 0 0.9rem;
  color: #766955;
  font-size: 0.97rem;
  line-height: 1.7;
}

.comment-list {
  max-width: 860px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* =========================================================
   COMMENT CARD
========================================================= */
.comment-card {
  padding: 1rem 0 0.95rem;
  border-bottom: 1px solid rgba(181, 135, 53, 0.14);
  background: transparent;
  box-shadow: none;
  text-align: left;
}

.comment-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.comment-author {
  color: #17130f;
  font-weight: 800;
  font-size: 0.98rem;
  line-height: 1.35;
}

.comment-date {
  color: #766955;
  font-size: 0.82rem;
  white-space: nowrap;
}

.comment-body {
  margin-top: 0.45rem;
  color: #4d4338;
  line-height: 1.85;
}

.comment-actions {
  margin-top: 0.78rem;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.comment-reply {
  position: relative;
  margin-top: 0.05rem;
  padding-inline-start: 20px;
}

.comment-reply::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 14px;
  bottom: 14px;
  width: 2px;
  border-radius: 999px;
  background: rgba(181, 135, 53, 0.2);
}

.comment-children {
  margin-top: 0.35rem;
}

.comment-children-inner {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* =========================================================
   REPLY FORM
========================================================= */
.article-reply-form,
.article-reply-login-note {
  margin-top: 0.75rem;
  padding-top: 0.8rem;
  border-top: 1px dashed rgba(181, 135, 53, 0.14);
  text-align: left;
}

.article-reply-form .form-control {
  min-height: 90px;
}

/* =========================================================
   COMMENTS RTL
========================================================= */
html[dir="rtl"] .article-comments-head,
html[dir="rtl"] .article-comment-entry,
html[dir="rtl"] .article-comment-entry-guest,
html[dir="rtl"] .article-comments-list-wrap,
html[dir="rtl"] .comment-card,
html[dir="rtl"] .article-reply-form,
html[dir="rtl"] .article-reply-login-note {
  text-align: right;
}

html[dir="rtl"] .article-comments-head {
  align-items: flex-end;
}

html[dir="rtl"] .comment-actions {
  justify-content: flex-end;
}

html[dir="rtl"] .comment-reply {
  padding-inline-start: 0;
  padding-inline-end: 20px;
}

html[dir="rtl"] .comment-reply::before {
  inset-inline-start: auto;
  inset-inline-end: 0;
}

/* =========================================================
   MOBILE
========================================================= */
@media (max-width: 767.98px) {
  .article-hero,
  .article-hero.card {
    margin-bottom: 1.35rem !important;
  }

  .article-hero .card-body {
    padding-bottom: 1.15rem !important;
  }

  .article-hero-top {
    margin-bottom: 0.55rem;
  }

  .article-hero-meta {
    margin-bottom: 0.5rem;
  }

  .article-hero-title {
    margin-bottom: 0.7rem !important;
  }

  .article-shell-card {
    margin-bottom: 1.45rem !important;
  }

  .article-body-wrap {
    padding: 20px 0 10px !important;
  }

  .article-comments-head {
    margin: 1.3rem 0 0.9rem;
  }

  .article-comment-entry,
  .article-comment-entry-guest {
    padding: 0.9rem 0.9rem 0.95rem;
    margin-bottom: 1.2rem;
    border-radius: 14px;
  }

  .article-comments-title {
    font-size: 1.18rem;
  }

  .article-comment-form-footer,
  .article-comment-entry-head,
  .article-comment-entry-guest {
    align-items: flex-start;
  }

  .comment-head {
    flex-direction: column;
    gap: 4px;
  }
}

/* =========================================================
   DARK MODE
========================================================= */
body.dark .article-comments-head {
  border-bottom-color: rgba(181, 135, 53, 0.14);
}

body.dark .article-comments-title,
body.dark .article-comments-list-head,
body.dark .comment-author,
body.dark .article-comment-entry-title {
  color: #f5f1e8;
}

body.dark .article-comments-count,
body.dark .article-comment-entry-note,
body.dark .article-comments-empty,
body.dark .comment-date,
body.dark .comment-body {
  color: #c6b89d;
}

body.dark .article-comment-entry,
body.dark .article-comment-entry-guest {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(181, 135, 53, 0.16);
}

body.dark .comment-card {
  border-bottom-color: rgba(181, 135, 53, 0.14);
}

body.dark .comment-reply::before {
  background: rgba(181, 135, 53, 0.22);
}

body.dark .article-reply-form,
body.dark .article-reply-login-note {
  border-top-color: rgba(181, 135, 53, 0.14);
}