html {
    scroll-behavior: smooth;
}

table tbody tr td,
table tbody tr th {
    text-align: center !important;
    vertical-align: middle !important;
}

table tbody tr td[style],
table tbody tr th[style] {
    text-align: center !important;
    vertical-align: middle !important;
}

.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
    background-color: #efefef;
    padding: 10px;
    color: #000000;
    border-radius: 10px;
    position: relative;
}

.entry-content h2::before,
.entry-content h3::before,
.entry-content h4::before,
.entry-content h5::before,
.entry-content h6::before {
    content: "";
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 5px;
    background-color: red;
    border-radius: 5px 0 0 5px;
}

body.home .post-title,
body.home .section-recom .mobilltna-list .title,
body.home .section-recom .mobilltna-list .truncate {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 15px;
    max-width: none;
    white-space: normal;
}

body.category .post-title {
    font-size: 15px !important;
    line-height: 1.5 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.related-posts-list .post-title {
    text-align: center;
    font-size: 15px !important;
    line-height: 1.5 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.post-title.entry-title {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    visibility: visible !important;
}

.time, 
.date, 
.post-meta time, 
.tie-date {
    display: none !important;
}

.single .time, 
.single .date, 
.single .post-meta time, 
.single .tie-date {
    display: inline !important;
}

/* أزرار التحميل — mbdown فقط (بدون fasc) */
.mbdown-btn,
a.mbdown-button {
  width: 350px !important;
  max-width: 90% !important;
  display: block !important;
  margin: 10px auto !important;
  float: none !important;
  clear: both !important;
  text-align: center !important;
  box-sizing: border-box !important;

  background-color: #12821c !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 14px !important;
  padding: 12px 18px !important;
  font-size: 16px !important;
  font-weight: bold !important;
  line-height: 1.4 !important;
  text-decoration: none !important;
  white-space: normal !important;
}

.mbdown-btn:hover,
a.mbdown-button:hover {
  background-color: #0e6616 !important;
  color: #ffffff !important;
}

.mbdown-btn .btn-content,
a.mbdown-button .btn-content {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
}

.mbdown-btn .btn-version,
a.mbdown-button .btn-version {
  display: block !important;
  font-size: 13px !important;
  margin-top: 4px !important;
  opacity: 0.9 !important;
  text-align: center !important;
}

/* صندوق الروابط */
.related-posts-ad {
  background: #f9f9f9;
  padding: 15px;
  border: 1px solid #ddd;
  margin: 25px 0;
  border-radius: 10px;
  text-align: center !important;
}

/* العنوان */
.centered-title {
  display: block;
  text-align: center !important;
  font-weight: bold;
  margin-bottom: 15px;
  font-size: 16px;
}

/* الموبايل */
@media (max-width: 480px) {
  .mbdown-btn,
  a.mbdown-button {
    width: 90% !important;
    max-width: 350px !important;
    font-size: 15px !important;
    padding: 11px 14px !important;
  }
}

body.home .mag-box .posts-items,
body.category .mag-box .posts-items,
body.category #posts-container .posts-items,
body.archive.category ul.posts-items {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}
body.home .mag-box .posts-items li,
body.category .mag-box .posts-items li,
body.category #posts-container .posts-items > li,
body.archive.category ul.posts-items > li {
    width: 25% !important;
    max-width: 25% !important;
    flex: 0 0 25% !important;
    padding: 0 10px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    float: none !important;
}

/* المقالات على الموبايل: 2 في الصف */
@media (max-width: 670px) {
    body.home .big-posts-box .posts-items li,
    body.category .mag-box .posts-items li,
    body.category #posts-container .posts-items > li,
    body.archive.category ul.posts-items > li {
        width: 50% !important;
        max-width: 50% !important;
        flex: 0 0 50% !important;
    }
}

.mag-box .posts-items li {
    margin-top: 10px !important;
}
body.home .post-cat {
    display: none !important;
}

/* أقسام: لا كارت كبير في الأول — نفس ستايل الشبكة */
body.category .big-post-box,
body.category .first-post-media,
body.category #posts-container > .container-wrapper.full-width,
body.category .posts-list-normal > li.first-post,
body.category li.post-item.first-post {
    width: 25% !important;
    max-width: 25% !important;
    float: none !important;
}
@media (max-width: 670px) {
    body.category .big-post-box,
    body.category .first-post-media,
    body.category li.post-item.first-post {
        width: 50% !important;
        max-width: 50% !important;
    }
}

/*
 * Category archives default to .wide-post-box (excerpt layout).
 * Parent theme sets .post-thumb { flex: 0 0 50% } for a side-by-side row.
 * Under our 4-col column grid that 50% becomes HEIGHT → tall empty towers.
 * Match homepage .big-posts-box: natural thumb height, no aspect-ratio,
 * no min-height, no width:100% image stretch.
 */
body.category .wide-post-box .posts-items > li,
body.archive.category .wide-post-box .posts-items > li {
    flex-direction: column !important;
    align-items: center;
}

/*
 * Design 1 natural — ORIGINAL image bounds. No square box, no crop, no
 * overflow clip. Wrapper hugs img. Transparent. Leave .mob-lcp-final alone.
 */
body.category .wide-post-box .posts-items > li .post-thumb,
body.category .wide-post-box .posts-items > li .app-card-icon-wrap,
body.archive.category .wide-post-box .posts-items > li .post-thumb {
    display: block !important;
    position: relative !important;
    flex: 0 0 auto !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    aspect-ratio: auto !important;
    margin: 0 auto 8px !important;
    padding: 0 !important;
    float: none !important;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    overflow: visible !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    min-height: 0 !important;
}

body.category .wide-post-box .posts-items > li .post-thumb img,
body.category .wide-post-box .posts-items > li .app-card-icon-wrap img {
    display: block !important;
    position: static !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 0 auto !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 18px !important;
    object-fit: unset !important;
    transform: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

body.category .wide-post-box .posts-items > li .post-details {
    flex: 0 1 auto !important;
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    padding: 0 !important;
}

body.category .mag-box .post-title,
body.category #posts-container .post-title {
    text-align: center;
}
.main-content.tie-col-md-12 {
    padding: 0 !important;
}
	
	body.home .mag-box .post-title {
    text-align: center;
}

/* Dark Mode Headings for Jannah / TieLabs */

html.dark-skin .entry-content h2,
html.dark-skin .entry-content h3,
html.dark-skin .entry-content h4,
html.dark-skin .entry-content h5,
html.dark-skin .entry-content h6 {
    background-color: #1a1a1a !important;
    padding: 10px !important;
    color: #ffffff !important;
    border-radius: 10px !important;
    position: relative !important;
    border: 1px solid #333 !important;
}

html.dark-skin .entry-content h2::before,
html.dark-skin .entry-content h3::before,
html.dark-skin .entry-content h4::before,
html.dark-skin .entry-content h5::before,
html.dark-skin .entry-content h6::before {
    content: "";
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 5px;
    background-color: #ff5252 !important;
    border-radius: 5px 0 0 5px;
}

/*
 * Lighthouse a11y: «الروابط يمكن تمييزها بالاعتماد على الألوان»
 * مقالات فقط — جسم المقال (Jannah: article.post-content > .entry-content.entry).
 * لا قائمة / هيدر / فوتر / كروت أقسام / أزرار تحميل.
 */
body.single-post article.post-content .entry-content a,
body.single article.post-content .entry-content a,
body.single-post .entry.entry-content a,
body.single .entry.entry-content a {
    color: #af0000;
    text-decoration: underline;
    text-underline-offset: 0.15em;
    text-decoration-thickness: from-font;
    font-weight: 600;
}

body.single-post article.post-content .entry-content a:hover,
body.single-post article.post-content .entry-content a:focus,
body.single article.post-content .entry-content a:hover,
body.single article.post-content .entry-content a:focus,
body.single-post .entry.entry-content a:hover,
body.single-post .entry.entry-content a:focus,
body.single .entry.entry-content a:hover,
body.single .entry.entry-content a:focus {
    color: #8a0000;
    text-decoration: underline;
}

html.dark-skin body.single-post article.post-content .entry-content a,
html.dark-skin body.single article.post-content .entry-content a,
html.dark-skin body.single-post .entry.entry-content a,
html.dark-skin body.single .entry.entry-content a {
    color: #ff6b6b;
}

html.dark-skin body.single-post article.post-content .entry-content a:hover,
html.dark-skin body.single-post article.post-content .entry-content a:focus,
html.dark-skin body.single article.post-content .entry-content a:hover,
html.dark-skin body.single article.post-content .entry-content a:focus,
html.dark-skin body.single-post .entry.entry-content a:hover,
html.dark-skin body.single-post .entry.entry-content a:focus,
html.dark-skin body.single .entry.entry-content a:hover,
html.dark-skin body.single .entry.entry-content a:focus {
    color: #ff8a8a;
}

/* أزرار التحميل / JAC / TOC داخل المقال — بدون underline */
body.single-post article.post-content .entry-content a.mbdown-btn,
body.single-post article.post-content .entry-content a.mbdown-button,
body.single article.post-content .entry-content a.mbdown-btn,
body.single article.post-content .entry-content a.mbdown-button,
body.single-post .entry.entry-content a.mbdown-btn,
body.single-post .entry.entry-content a.mbdown-button,
body.single .entry.entry-content a.mbdown-btn,
body.single .entry.entry-content a.mbdown-button,
body.single-post article.post-content .entry-content a.jac-btn,
body.single article.post-content .entry-content a.jac-btn,
body.single-post .entry.entry-content a.jac-btn,
body.single .entry.entry-content a.jac-btn,
body.single-post article.post-content .entry-content a.ez-toc-btn,
body.single article.post-content .entry-content a.ez-toc-btn,
body.single-post .entry.entry-content a.ez-toc-btn,
body.single .entry.entry-content a.ez-toc-btn {
    text-decoration: none !important;
    font-weight: 800;
}

body.single-post article.post-content .entry-content a.mbdown-btn,
body.single-post article.post-content .entry-content a.mbdown-button,
body.single article.post-content .entry-content a.mbdown-btn,
body.single article.post-content .entry-content a.mbdown-button,
body.single-post .entry.entry-content a.mbdown-btn,
body.single-post .entry.entry-content a.mbdown-button,
body.single .entry.entry-content a.mbdown-btn,
body.single .entry.entry-content a.mbdown-button {
    color: #ffffff !important;
}

body.single-post article.post-content .entry-content a.jac-btn,
body.single article.post-content .entry-content a.jac-btn,
body.single-post .entry.entry-content a.jac-btn,
body.single .entry.entry-content a.jac-btn {
    color: #ffffff !important;
}
