/**
 * DECOSIUM - Styles Dédiés pour la Page Détail d'un Article de Blog (blog-detail.php)
 */

/* ==========================================================================
   1. Breadcrumb Bar
   ========================================================================== */
.blog-breadcrumb-nav {
  padding: 14px 0;
  background: #fbf9f5;
  border-bottom: 1px solid #ede3d8;
  font-size: 0.8125rem;
}

.blog-breadcrumb-list {
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.blog-breadcrumb-item {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  color: #799184;
  list-style: none !important;
}

.blog-breadcrumb-item::before {
  content: none !important;
}

.blog-breadcrumb-item a {
  color: #556b60;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.blog-breadcrumb-item a:hover {
  color: #a37237;
}

.blog-breadcrumb-sep {
  color: #c4b5a4;
  font-size: 0.75rem;
}

.blog-breadcrumb-item.active {
  color: #163026;
  font-weight: 700;
  max-width: 420px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ==========================================================================
   2. Article Hero Header
   ========================================================================== */
.blog-detail-header {
  padding: 36px 0 24px;
  background: #ffffff;
}

.blog-detail-tag-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.blog-detail-cat-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fbf4ea;
  color: #8c5e28;
  border: 1px solid #ebd9c8;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.blog-detail-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1.25;
  color: #163026;
  margin: 12px 0 22px;
  letter-spacing: -0.01em;
}

/* Meta Bar Under Title */
.blog-detail-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  padding: 16px 0;
  border-top: 1px solid #f0e6dc;
  border-bottom: 1px solid #f0e6dc;
  margin-bottom: 28px;
}

.blog-meta-author-side {
  display: flex;
  align-items: center;
  gap: 14px;
}

.blog-meta-author-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #dfb26b;
  flex-shrink: 0;
}

.blog-meta-author-avatar-fallback {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #163026;
  color: #dfb26b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  font-weight: 700;
  border: 2px solid #dfb26b;
  flex-shrink: 0;
}

.blog-meta-author-info {
  display: flex;
  flex-direction: column;
}

.blog-meta-author-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #163026;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s;
}

.blog-meta-author-name:hover {
  color: #a37237;
}

.blog-meta-author-sub {
  font-size: 0.78125rem;
  color: #799184;
}

.blog-meta-info-side {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 0.8125rem;
  color: #726b60;
  flex-wrap: wrap;
}

.blog-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.blog-meta-pill svg {
  color: #a37237;
}

/* ==========================================================================
   3. Hero Cover Image
   ========================================================================== */
.blog-detail-cover-wrap {
  width: 100%;
  margin: 10px 0 36px;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.08);
  border: 1px solid #ebd9c8;
  max-height: 520px;
  background: #ede3d8;
}

.blog-detail-cover-img {
  width: 100%;
  height: 100%;
  max-height: 520px;
  object-fit: cover;
  display: block;
}

.blog-detail-cover-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(22, 48, 38, 0.9), transparent);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.78125rem;
  padding: 30px 24px 14px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

/* ==========================================================================
   4. Two Column Layout & Main Content
   ========================================================================== */
.blog-detail-container {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 40px;
  align-items: start;
  padding-bottom: 60px;
}

.blog-detail-main-content {
  background: #ffffff;
}

.blog-detail-lead-chapeau {
  font-size: 1.15rem;
  line-height: 1.7;
  color: #273b30;
  background: #faf6f0;
  border-left: 4px solid #dfb26b;
  border-radius: 0 12px 12px 0;
  padding: 22px 26px;
  margin-bottom: 32px;
  font-style: italic;
  font-family: Georgia, serif;
}

.blog-detail-body {
  font-size: 1.05rem;
  line-height: 1.85;
  color: #3d5045;
}

.blog-detail-body p {
  margin-bottom: 22px;
}

.blog-detail-body h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.6rem;
  color: #163026;
  font-weight: 700;
  margin: 38px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #f2e7da;
  display: flex;
  align-items: center;
  gap: 10px;
}

.blog-detail-body h2::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 22px;
  background: #dfb26b;
  border-radius: 4px;
}

.blog-detail-body h3 {
  font-family: var(--font-sans);
  font-size: 1.25rem;
  color: #163026;
  font-weight: 700;
  margin: 28px 0 12px;
}

.blog-detail-body blockquote {
  margin: 32px 0;
  padding: 22px 28px;
  background: #fbf9f5;
  border-left: 4px solid #a37237;
  border-radius: 0 12px 12px 0;
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  font-style: italic;
  color: #163026;
  position: relative;
}

.blog-detail-body ul, .blog-detail-body ol {
  margin: 16px 0 24px 28px;
  padding: 0;
}

.blog-detail-body li {
  margin-bottom: 10px;
  line-height: 1.7;
}

/* Expert Tip Box */
.blog-pro-tip-box {
  background: #f2f7f4;
  border: 1px solid #cde0d5;
  border-left: 4px solid #163026;
  border-radius: 10px;
  padding: 22px 26px;
  margin: 34px 0;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.blog-pro-tip-icon {
  width: 40px;
  height: 40px;
  background: #163026;
  color: #dfb26b;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.blog-pro-tip-title {
  font-weight: 700;
  color: #163026;
  margin-bottom: 6px;
  font-size: 0.95rem;
}

.blog-pro-tip-desc {
  font-size: 0.875rem;
  color: #375345;
  line-height: 1.6;
  margin: 0;
}

/* ==========================================================================
   5. Social Share Box
   ========================================================================== */
.blog-detail-share-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 20px 24px;
  background: #fbf9f5;
  border: 1px solid #ebd9c8;
  border-radius: 12px;
  margin: 40px 0;
}

.blog-share-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: #163026;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.blog-share-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-blog-share {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #ffffff;
  border: 1px solid #ddcfbf;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #163026;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-blog-share:hover {
  background: #163026;
  color: #ffffff;
  border-color: #163026;
  transform: translateY(-2px);
}

.btn-blog-share.btn-share-whatsapp:hover {
  background: #25D366;
  border-color: #25D366;
  color: #fff;
}

.btn-blog-share.btn-share-fb:hover {
  background: #1877F2;
  border-color: #1877F2;
  color: #fff;
}

/* ==========================================================================
   6. Author Signature Card
   ========================================================================== */
.blog-author-signature-card {
  background: #ffffff;
  border: 1px solid #ebd9c8;
  border-radius: 16px;
  padding: 28px;
  margin-top: 40px;
  display: flex;
  gap: 24px;
  align-items: flex-start;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.blog-signature-avatar-wrap {
  width: 76px !important;
  height: 76px !important;
  min-width: 76px !important;
  max-width: 76px !important;
  min-height: 76px !important;
  max-height: 76px !important;
  border-radius: 50% !important;
  overflow: hidden !important;
  border: 2px solid #dfb26b !important;
  flex-shrink: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #163026 !important;
}

.blog-signature-avatar {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}

.blog-signature-avatar-fallback {
  width: 100% !important;
  height: 100% !important;
  background: #163026 !important;
  color: #dfb26b !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.75rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  line-height: 1 !important;
}

.blog-signature-content {
  flex: 1 1 0% !important;
  min-width: 0 !important;
}

.blog-signature-badge,
.blog-signature-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: #a37237;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.blog-signature-name,
.blog-signature-title {
  font-family: var(--font-serif, 'Playfair Display', Georgia, serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: #163026;
  margin: 0 0 6px 0;
  line-height: 1.3;
}

.blog-signature-meta {
  font-size: 0.8125rem;
  color: #799184;
  margin-bottom: 12px;
}

.blog-signature-bio {
  font-size: 0.875rem;
  line-height: 1.65;
  color: #4f6356;
  margin-bottom: 18px;
}

.blog-signature-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-signature-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: #163026;
  color: #ffffff !important;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s;
}

.btn-signature-primary:hover {
  background: #a37237;
  transform: translateY(-2px);
}

.btn-signature-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: #fbf9f5;
  color: #163026 !important;
  border: 1px solid #ebd9c8;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s;
}

.btn-signature-secondary:hover {
  border-color: #a37237;
  color: #a37237 !important;
}

/* ==========================================================================
   7. Sidebar (Interactive Widgets & Cards)
   ========================================================================== */
.blog-detail-sidebar {
  display: flex;
  flex-direction: column;
  gap: 28px;
  position: static;
}

.blog-sidebar-card,
.blog-sidebar-widget {
  background: #ffffff;
  border: 1px solid #ebd9c8;
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
}

.blog-sidebar-title,
.blog-sidebar-widget-title {
  font-family: var(--font-serif, 'Playfair Display', Georgia, serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: #163026;
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f2e9de;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Pro CTA Widget in Sidebar */
.blog-sidebar-pro-cta {
  background: linear-gradient(180deg, #ffffff 0%, #fcfbf9 100%);
  border-left: 4px solid #dfb26b;
}

html[dir="rtl"] .blog-sidebar-pro-cta,
body.rtl .blog-sidebar-pro-cta {
  border-left: 1px solid #ebd9c8;
  border-right: 4px solid #dfb26b;
}

.blog-sidebar-pro-desc {
  font-size: 0.85rem;
  color: #554e42;
  line-height: 1.55;
  margin: 0 0 16px;
}

.blog-sidebar-buttons-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-sidebar-quote {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: #163026;
  color: #ffffff !important;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-sidebar-quote:hover {
  background: #dfb26b;
  color: #163026 !important;
  transform: translateY(-1px);
}

.btn-sidebar-whatsapp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  background: #25D366;
  color: #ffffff !important;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-sidebar-whatsapp:hover {
  background: #1eb956;
  transform: translateY(-1px);
}

/* Popular Articles List in Sidebar */
.blog-sidebar-popular-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.blog-sidebar-pop-item {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  padding-bottom: 14px;
  border-bottom: 1px solid #f4ece2;
  transition: transform 0.2s ease;
}

.blog-sidebar-pop-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.blog-sidebar-pop-item:hover {
  transform: translateX(4px);
}

html[dir="rtl"] .blog-sidebar-pop-item:hover,
body.rtl .blog-sidebar-pop-item:hover {
  transform: translateX(-4px);
}

.blog-sidebar-pop-thumb {
  position: relative;
  width: 68px;
  height: 68px;
  min-width: 68px;
  max-width: 68px;
  min-height: 68px;
  max-height: 68px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: #ede3d8;
}

.blog-sidebar-pop-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.blog-sidebar-pop-rank {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(22, 48, 38, 0.85);
  color: #dfb26b;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
}

html[dir="rtl"] .blog-sidebar-pop-rank,
body.rtl .blog-sidebar-pop-rank {
  left: auto;
  right: 4px;
}

.blog-sidebar-pop-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 0%;
  min-width: 0;
}

.blog-sidebar-pop-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #163026;
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s;
}

.blog-sidebar-pop-item:hover .blog-sidebar-pop-title {
  color: #dfb26b;
}

.blog-sidebar-pop-meta {
  font-size: 0.74rem;
  color: #8c8375;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Banner Pro Widget in Sidebar */
.blog-sidebar-banner-pro {
  background: linear-gradient(135deg, #173223 0%, #0d1e15 100%);
  color: #ffffff;
  border: 1px solid rgba(223, 178, 107, 0.25);
  position: relative;
  overflow: hidden;
}

.blog-sidebar-banner-tag {
  display: inline-block;
  background: rgba(223, 178, 107, 0.2);
  color: #dfb26b;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 10px;
}

.blog-sidebar-banner-title {
  font-family: var(--font-serif, 'Playfair Display', Georgia, serif);
  font-size: 1.15rem;
  color: #ffffff;
  font-weight: 700;
  margin: 0 0 8px;
  line-height: 1.35;
}

.blog-sidebar-banner-desc {
  font-size: 0.8125rem;
  color: #d1dad5;
  line-height: 1.5;
  margin: 0 0 16px;
}

.btn-sidebar-banner-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: #dfb26b;
  color: #173223 !important;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-sidebar-banner-link:hover {
  background: #eac485;
  transform: translateY(-1px);
}

/* ==========================================================================
   8. Related Articles Grid
   ========================================================================== */
.blog-related-section {
  padding: 60px 0;
  background: #faf6f0;
  border-top: 1px solid #ebd9c8;
}

.blog-related-header {
  text-align: center;
  margin-bottom: 36px;
}

.blog-related-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.85rem;
  color: #163026;
  font-weight: 700;
  margin-bottom: 8px;
}

.blog-related-desc {
  font-size: 0.875rem;
  color: #6b7f75;
}

/* ==========================================================================
   9. Responsive Rules
   ========================================================================== */
@media (max-width: 991px) {
  .blog-detail-container {
    grid-template-columns: 1fr;
  }
  .blog-detail-sidebar {
    position: static;
  }
  .blog-detail-title {
    font-size: 2rem;
  }
}

@media (max-width: 600px) {
  .blog-detail-title {
    font-size: 1.6rem;
  }
  .blog-detail-meta-bar {
    flex-direction: column;
    align-items: flex-start;
  }
  .blog-author-signature-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .blog-signature-actions {
    justify-content: center;
  }
}

/* ==========================================================================
   10. RTL (Right-to-Left) Adjustments for Arabic Version
   ========================================================================== */
html[dir="rtl"] .blog-detail-header,
body.rtl .blog-detail-header,
html[dir="rtl"] .blog-detail-main,
body.rtl .blog-detail-main,
html[dir="rtl"] .blog-detail-main-content,
body.rtl .blog-detail-main-content {
  text-align: right;
  direction: rtl;
}

html[dir="rtl"] .blog-detail-title,
body.rtl .blog-detail-title {
  font-family: 'Cairo', 'Playfair Display', Georgia, serif;
  text-align: right;
  letter-spacing: normal;
}

html[dir="rtl"] .blog-detail-lead-chapeau,
body.rtl .blog-detail-lead-chapeau {
  border-right: 4px solid var(--color-gold-primary, #dfb26b);
  border-left: none;
  padding-right: 22px;
  padding-left: 0;
  text-align: right;
}

html[dir="rtl"] .blog-pro-tip-box,
body.rtl .blog-pro-tip-box {
  border-right: 4px solid var(--color-gold-primary, #dfb26b);
  border-left: none;
}

html[dir="rtl"] .blog-detail-body blockquote,
body.rtl .blog-detail-body blockquote {
  border-right: 4px solid var(--color-gold-primary, #dfb26b);
  border-left: none;
  padding-right: 20px;
  padding-left: 0;
  text-align: right;
}

html[dir="rtl"] .blog-detail-body p,
html[dir="rtl"] .blog-detail-body h2,
html[dir="rtl"] .blog-detail-body h3,
body.rtl .blog-detail-body p,
body.rtl .blog-detail-body h2,
body.rtl .blog-detail-body h3 {
  text-align: right;
  direction: rtl;
}

html[dir="rtl"] .blog-sidebar-card,
body.rtl .blog-sidebar-card {
  text-align: right;
}

html[dir="rtl"] .blog-sidebar-pop-thumb,
body.rtl .blog-sidebar-pop-thumb {
  margin-left: 12px;
  margin-right: 0;
}

html[dir="rtl"] .blog-author-signature-card,
body.rtl .blog-author-signature-card {
  text-align: right;
  flex-direction: row;
}

html[dir="rtl"] .blog-signature-content,
body.rtl .blog-signature-content {
  text-align: right;
}

html[dir="rtl"] .blog-meta-author-side,
body.rtl .blog-meta-author-side {
  flex-direction: row;
}

html[dir="rtl"] .blog-detail-tag-wrap,
body.rtl .blog-detail-tag-wrap {
  flex-direction: row;
}

/* Popular Articles Component (Self-Contained in blog-detail.css) */
.popular-articles-card {
  background: #ffffff;
  border: 1px solid #ebd9c8;
  border-radius: 16px;
  padding: 24px 20px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
}

.popular-card-title {
  font-family: var(--font-serif, 'Playfair Display', serif);
  font-size: 1.125rem;
  font-weight: 700;
  color: #163026;
  margin: 0 0 18px;
}

html[dir="rtl"] .popular-card-title,
body.rtl .popular-card-title {
  font-family: 'Cairo', sans-serif;
  text-align: right;
}

.popular-articles-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.popular-article-item {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  padding-bottom: 14px;
  border-bottom: 1px solid #f4ece2;
  transition: transform 0.2s;
}

.popular-article-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.popular-article-item:hover {
  transform: translateX(3px);
}

html[dir="rtl"] .popular-article-item:hover,
body.rtl .popular-article-item:hover {
  transform: translateX(-3px);
}

.popular-thumb {
  width: 54px;
  height: 54px;
  min-width: 54px;
  max-width: 54px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: #ede3d8;
}

.popular-rank-badge {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #f3eae0;
  color: #8c5e28;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.popular-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

html[dir="rtl"] .popular-content,
body.rtl .popular-content {
  text-align: right;
}

.popular-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #163026;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.popular-views {
  font-size: 0.75rem;
  color: #8c8375;
}

/* Signature Avatar Constraints */
.blog-signature-avatar-wrap {
  width: 76px;
  height: 76px;
  min-width: 76px;
  max-width: 76px;
  min-height: 76px;
  max-height: 76px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #dfb26b;
  flex-shrink: 0;
  display: block;
}

.blog-signature-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 600px) {
  html[dir="rtl"] .blog-author-signature-card,
  body.rtl .blog-author-signature-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

/* ==========================================================================
   11. Interactive DOM Components: Progress Bar, TOC, Resizer & Mobile Bar
   ========================================================================== */
.blog-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3.5px;
  background: linear-gradient(90deg, #dfb26b, #163026);
  width: 0%;
  z-index: 10000;
  transition: width 0.08s ease-out;
  box-shadow: 0 1px 4px rgba(223, 178, 107, 0.45);
}

.blog-toc-widget {
  background: #ffffff;
  border: 1px solid #ebd9c8;
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
}

.blog-toc-title {
  font-family: var(--font-serif, 'Playfair Display', serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: #163026;
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

html[dir="rtl"] .blog-toc-title {
  font-family: 'Cairo', sans-serif;
}

.blog-toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.blog-toc-item {
  font-size: 0.82rem;
  line-height: 1.4;
}

.blog-toc-item.level-3 {
  padding-left: 14px;
}

html[dir="rtl"] .blog-toc-item.level-3 {
  padding-left: 0;
  padding-right: 14px;
}

.blog-toc-link {
  color: #635b4f;
  text-decoration: none;
  transition: all 0.2s ease;
  display: block;
  padding: 5px 8px;
  border-radius: 6px;
}

.blog-toc-link:hover,
.blog-toc-link.active {
  color: #173223;
  background: #fbf4ea;
  font-weight: 700;
}

.blog-font-resizer {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid #ebd9c8;
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 0.72rem;
  color: #726b60;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}

.blog-font-resizer button {
  background: none;
  border: none;
  color: #173223;
  font-weight: 800;
  font-size: 0.78rem;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: background 0.2s;
}

.blog-font-resizer button:hover {
  background: #f4eee6;
}

.btn-like-article.liked {
  background: #ffe4e6 !important;
  border-color: #fda4af !important;
  color: #e11d48 !important;
}

.btn-like-article.liked svg {
  fill: #e11d48 !important;
  stroke: #e11d48 !important;
  animation: heartPulse 0.4s ease;
}

@keyframes heartPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10001;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

html[dir="rtl"] .toast-container {
  right: auto;
  left: 24px;
}

.toast-message {
  pointer-events: auto;
  background: #163026;
  color: #ffffff;
  padding: 12px 20px;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  font-size: 0.875rem;
  border-left: 4px solid #dfb26b;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideInToast 0.3s ease;
}

html[dir="rtl"] .toast-message {
  border-left: none;
  border-right: 4px solid #dfb26b;
}

@keyframes slideInToast {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Floating Mobile Bottom Action Bar */
.blog-mobile-bottom-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-top: 1px solid #ebd9c8;
  padding: 10px 16px;
  z-index: 999;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
  justify-content: space-between;
  align-items: center;
}

.blog-mobile-bar-btn {
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 0.68rem;
  color: #554e42;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
  text-decoration: none;
}

.blog-mobile-bar-btn svg {
  width: 18px;
  height: 18px;
}

.blog-mobile-bar-cta {
  background: #163026;
  color: #ffffff !important;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

@media (max-width: 768px) {
  .blog-mobile-bottom-bar {
    display: flex;
  }
  body {
    padding-bottom: 64px;
  }
  body.has-bottom-ad-bar .blog-mobile-bottom-bar {
    bottom: calc(var(--deco-ad-bar-height-mobile, 58px) + env(safe-area-inset-bottom, 0px)) !important;
  }
  body.has-bottom-ad-bar {
    padding-bottom: calc(64px + var(--deco-ad-bar-height-mobile, 58px) + env(safe-area-inset-bottom, 0px)) !important;
  }
}



