/* =========================================================
   Medically Single Post - Desktop & Mobile Styles
   Minimal, Small, Chic & Soft (منيمال صغير شيك ناعم)
   ========================================================= */

/* =========================================================
   Article Headings Gradation (H1 to H6) - Desktop (>= 992px)
   ========================================================= */

/* Main Article Title */
.wpo-blog-single-section .post > h2:first-of-type,
.wpo-blog-single-section .post > h1:first-of-type {
  font-size: 34px !important;
  line-height: 1.35em !important;
  margin-top: 15px !important;
  margin-bottom: 22px !important;
  color: #0b4f8a !important;
  font-weight: 800 !important;
}

/* In-Content H1 */
.wpo-blog-single-section .post h1,
.wpo-blog-single-section .post .entry-content h1 {
  font-size: 32px !important;
  line-height: 1.35em !important;
  font-weight: 800 !important;
  color: #0b4f8a !important;
  margin-top: 36px !important;
  margin-bottom: 18px !important;
}

/* In-Content H2 (Main Content Sections / TOC targets) */
.wpo-blog-single-section .post h2,
.wpo-blog-single-section .post .entry-content h2,
.wpo-blog-single-section .post h2[id^="toc-heading-"],
.wpo-blog-single-section .post > h2 ~ h2 {
  font-size: 27px !important;
  line-height: 1.4em !important;
  font-weight: 700 !important;
  color: #0c6eb4 !important;
  margin-top: 32px !important;
  margin-bottom: 16px !important;
  padding-right: 12px !important;
  border-right: 4px solid #0080d2 !important;
  border-radius: 2px !important;
}

/* In-Content H3 (Subsections) */
.wpo-blog-single-section .post h3,
.wpo-blog-single-section .post .entry-content h3 {
  font-size: 22px !important;
  line-height: 1.4em !important;
  font-weight: 700 !important;
  color: #1e293b !important;
  margin-top: 26px !important;
  margin-bottom: 14px !important;
}

/* In-Content H4 (Minor Subsections) */
.wpo-blog-single-section .post h4,
.wpo-blog-single-section .post .entry-content h4 {
  font-size: 19px !important;
  line-height: 1.4em !important;
  font-weight: 700 !important;
  color: #27374d !important;
  margin-top: 22px !important;
  margin-bottom: 12px !important;
}

/* In-Content H5 (Groupings / Minor Labels) */
.wpo-blog-single-section .post h5,
.wpo-blog-single-section .post .entry-content h5 {
  font-size: 17px !important;
  line-height: 1.4em !important;
  font-weight: 600 !important;
  color: #475569 !important;
  margin-top: 18px !important;
  margin-bottom: 10px !important;
}

/* In-Content H6 (Smallest Heading / Category tags) */
.wpo-blog-single-section .post h6,
.wpo-blog-single-section .post .entry-content h6 {
  font-size: 15px !important;
  line-height: 1.4em !important;
  font-weight: 700 !important;
  color: #64748b !important;
  letter-spacing: 0.3px !important;
  margin-top: 16px !important;
  margin-bottom: 8px !important;
}

.wpo-blog-single-section .post p {
  line-height: 1.8em !important;
  margin-bottom: 18px !important;
  color: #334155;
  font-size: 16px;
}

.wpo-blog-single-section .comments-area .comments-meta h4,
.wpo-blog-single-section .author-box .author-name {
  line-height: 1.4em !important;
}

/* Mobile Table of Contents - Hidden on Desktop */
.mobile_article_toc {
  display: none;
}

/* =========================================================
   Mobile Minimal, Small, Chic & Soft Styling (Screen <= 991px)
   ========================================================= */
@media (max-width: 991px) {

  /* Hide the duplicate bottom sidebar on mobile/tablet */
  .single-post-sidebar {
    display: none !important;
  }

  /* Show the in-content Mobile Table of Contents */
  .mobile_article_toc {
    display: block !important;
    background: #fbfdff !important;
    border: 1px solid #eef3f8 !important;
    border-radius: 18px !important;
    padding: 13px 14px 11px !important;
    margin: 14px 0 20px !important;
    box-shadow: none !important;
  }

  .mobile_toc_header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding-bottom: 9px !important;
    margin-bottom: 9px !important;
    border-bottom: 1px solid #f1f5f9 !important;
    cursor: pointer;
    user-select: none;
  }

  .mobile_toc_title_wrap {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
  }

  .mobile_toc_icon {
    width: 26px !important;
    height: 26px !important;
    border-radius: 8px !important;
    background: #0080d2 !important;
    color: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
  }

  .mobile_toc_icon svg {
    display: block;
  }

  .mobile_toc_title {
    font-size: 14.5px !important;
    font-weight: 700 !important;
    color: #0b4f8a !important;
    line-height: 1.2 !important;
  }

  .mobile_toc_badge_count {
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #0284c7 !important;
    background: #e0f2fe !important;
    padding: 2px 7px !important;
    border-radius: 10px !important;
  }

  .mobile_toc_arrow {
    color: #94a3b8;
    transition: transform 0.25s ease;
    display: flex;
    align-items: center;
  }

  .mobile_toc_arrow.collapsed {
    transform: rotate(180deg);
  }

  .mobile_toc_list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
  }

  .mobile_toc_item {
    margin: 0 !important;
    padding: 0 !important;
  }

  .mobile_toc_link {
    display: flex !important;
    align-items: center !important;
    gap: 9px !important;
    padding: 5px 8px !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    transition: all 0.18s ease-in-out !important;
    background: transparent;
  }

  .mobile_toc_link:hover,
  .mobile_toc_link:active,
  .mobile_toc_link.active {
    background: #eaf4fc !important;
  }

  .mobile_toc_num {
    width: 21px !important;
    height: 21px !important;
    border-radius: 6px !important;
    background: #e0f2fe !important;
    color: #0284c7 !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    transition: all 0.18s ease-in-out !important;
  }

  .mobile_toc_link.active .mobile_toc_num {
    background: #0080d2 !important;
    color: #ffffff !important;
  }

  .mobile_toc_text {
    font-size: 13px !important;
    line-height: 1.4em !important;
    font-weight: 600 !important;
    color: #475569 !important;
    flex: 1 1 auto !important;
    text-align: right !important;
  }

  .mobile_toc_link.active .mobile_toc_text {
    color: #0077ca !important;
    font-weight: 700 !important;
  }

  /* =========================================================
     Article Headings Gradation (H1 to H6) - Tablet (<= 991px)
     ========================================================= */

  /* Main Article Title */
  .wpo-blog-single-section .post > h2:first-of-type,
  .wpo-blog-single-section .post > h1:first-of-type {
    font-size: 26px !important;
    line-height: 1.35em !important;
    margin-top: 12px !important;
    margin-bottom: 18px !important;
    color: #0b4f8a !important;
    font-weight: 800 !important;
  }

  .wpo-blog-single-section .post h1,
  .wpo-blog-single-section .post .entry-content h1 {
    font-size: 25px !important;
    line-height: 1.35em !important;
    font-weight: 800 !important;
    color: #0b4f8a !important;
    margin-top: 28px !important;
    margin-bottom: 14px !important;
  }

  .wpo-blog-single-section .post h2,
  .wpo-blog-single-section .post .entry-content h2,
  .wpo-blog-single-section .post h2[id^="toc-heading-"],
  .wpo-blog-single-section .post > h2 ~ h2 {
    font-size: 22px !important;
    line-height: 1.4em !important;
    font-weight: 700 !important;
    color: #0c6eb4 !important;
    margin-top: 24px !important;
    margin-bottom: 12px !important;
    padding-right: 10px !important;
    border-right: 3px solid #0080d2 !important;
    border-radius: 2px !important;
  }

  .wpo-blog-single-section .post h3,
  .wpo-blog-single-section .post .entry-content h3 {
    font-size: 18.5px !important;
    line-height: 1.4em !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    margin-top: 20px !important;
    margin-bottom: 10px !important;
  }

  .wpo-blog-single-section .post h4,
  .wpo-blog-single-section .post .entry-content h4 {
    font-size: 16.5px !important;
    line-height: 1.4em !important;
    font-weight: 700 !important;
    color: #27374d !important;
    margin-top: 16px !important;
    margin-bottom: 8px !important;
  }

  .wpo-blog-single-section .post h5,
  .wpo-blog-single-section .post .entry-content h5 {
    font-size: 15px !important;
    line-height: 1.4em !important;
    font-weight: 600 !important;
    color: #475569 !important;
    margin-top: 14px !important;
    margin-bottom: 7px !important;
  }

  .wpo-blog-single-section .post h6,
  .wpo-blog-single-section .post .entry-content h6 {
    font-size: 14px !important;
    line-height: 1.4em !important;
    font-weight: 700 !important;
    color: #64748b !important;
    margin-top: 12px !important;
    margin-bottom: 6px !important;
  }
}

/* =========================================================
   Mobile Minimal Screens (Screen <= 767px)
   ========================================================= */
@media (max-width: 767px) {

  /* Section Padding */
  .wpo-blog-single-section.section-padding {
    padding: 18px 0 28px !important;
  }

  /* Featured image */
  .wpo-blog-single-section .entry-media img {
    border-radius: 14px !important;
    margin-bottom: 12px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
  }

  /* Entry Meta - minimal soft row */
  .wpo-blog-single-section .entry-meta {
    margin: 6px 0 10px !important;
  }

  .wpo-blog-single-section .entry-meta ul {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px 12px !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .wpo-blog-single-section .entry-meta ul li {
    font-size: 11.5px !important;
    color: #64748b !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .wpo-blog-single-section .entry-meta ul li:before {
    display: none !important;
  }

  .wpo-blog-single-section .entry-meta ul li i {
    color: #0080d2 !important;
    font-size: 12px !important;
  }

  /* =========================================================
     Article Headings Gradation (H1 to H6) - Mobile (<= 767px)
     Noticeable, Elegant & Distinct (واضح ومتدرج بأناقة)
     ========================================================= */

  /* Main Post Title under featured image */
  .wpo-blog-single-section .post > h2:first-of-type,
  .wpo-blog-single-section .post > h1:first-of-type {
    font-size: 21px !important;
    line-height: 1.35em !important;
    margin: 8px 0 14px !important;
    color: #0b4f8a !important;
    font-weight: 800 !important;
  }

  /* In-Content H1 */
  .wpo-blog-single-section .post h1,
  .wpo-blog-single-section .post .entry-content h1 {
    font-size: 20px !important;
    line-height: 1.35em !important;
    font-weight: 800 !important;
    color: #0b4f8a !important;
    margin: 22px 0 10px !important;
  }

  /* In-Content H2 (Main sections / TOC targets) */
  .wpo-blog-single-section .post h2,
  .wpo-blog-single-section .post .entry-content h2,
  .wpo-blog-single-section .post h2[id^="toc-heading-"],
  .wpo-blog-single-section .post > h2 ~ h2 {
    font-size: 18px !important;
    line-height: 1.4em !important;
    font-weight: 700 !important;
    color: #0c6eb4 !important;
    margin: 20px 0 8px !important;
    padding-right: 8px !important;
    border-right: 3px solid #0080d2 !important;
    border-radius: 2px !important;
  }

  /* In-Content H3 (Subsections) */
  .wpo-blog-single-section .post h3,
  .wpo-blog-single-section .post .entry-content h3 {
    font-size: 16px !important;
    line-height: 1.4em !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    margin: 16px 0 6px !important;
  }

  /* In-Content H4 (Minor Subsections) */
  .wpo-blog-single-section .post h4,
  .wpo-blog-single-section .post .entry-content h4 {
    font-size: 14.5px !important;
    line-height: 1.4em !important;
    font-weight: 700 !important;
    color: #27374d !important;
    margin: 14px 0 5px !important;
  }

  /* In-Content H5 (Group Labels) */
  .wpo-blog-single-section .post h5,
  .wpo-blog-single-section .post .entry-content h5 {
    font-size: 13.5px !important;
    line-height: 1.4em !important;
    font-weight: 600 !important;
    color: #475569 !important;
    margin: 12px 0 4px !important;
  }

  /* In-Content H6 (Smallest Heading / Category tags) */
  .wpo-blog-single-section .post h6,
  .wpo-blog-single-section .post .entry-content h6 {
    font-size: 12.5px !important;
    line-height: 1.4em !important;
    font-weight: 700 !important;
    color: #64748b !important;
    margin: 10px 0 4px !important;
  }

  /* Paragraphs */
  .wpo-blog-single-section .post p {
    font-size: 14.5px !important;
    line-height: 1.75em !important;
    color: #334155 !important;
    margin-bottom: 12px !important;
  }

  /* Lists inside post */
  .wpo-blog-single-section .post ul:not(.social-link):not(.entry-meta ul),
  .wpo-blog-single-section .post ol {
    padding-right: 18px !important;
    margin-bottom: 12px !important;
    font-size: 14px !important;
    line-height: 1.7em !important;
    color: #334155 !important;
  }

  .wpo-blog-single-section .post ul:not(.social-link):not(.entry-meta ul) li {
    margin-bottom: 5px !important;
  }

  /* Blockquote */
  .wpo-blog-single-section .post blockquote {
    padding: 12px 14px !important;
    border-radius: 12px !important;
    background: #f8fafc !important;
    border: 1px solid #edf2f7 !important;
    border-right: 3px solid #0080d2 !important;
    font-size: 13.5px !important;
    line-height: 1.65em !important;
    color: #1e293b !important;
    margin: 16px 0 !important;
  }

  .wpo-blog-single-section .post blockquote:before {
    display: none !important;
  }

  /* Tags & Share */
  .wpo-blog-single-section .tag-share,
  .wpo-blog-single-section .tag-share-s2 {
    margin-top: 16px !important;
    padding-bottom: 10px !important;
    border-bottom: 1px solid #f1f5f9 !important;
  }

  .wpo-blog-single-section .tag-share .tag,
  .wpo-blog-single-section .tag-share-s2 .tag {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
  }

  .wpo-blog-single-section .tag-share .tag span,
  .wpo-blog-single-section .tag-share-s2 .tag span {
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #64748b !important;
    margin-left: 4px !important;
  }

  .wpo-blog-single-section .tag-share ul li a,
  .wpo-blog-single-section .tag-share-s2 ul li a {
    font-size: 11.5px !important;
    padding: 3px 8px !important;
    border-radius: 6px !important;
    background: #f1f5f9 !important;
    color: #475569 !important;
  }

  /* Author Box - Minimal Soft Card */
  .wpo-blog-single-section .author-box {
    background: #fbfcfe !important;
    border: 1px solid #edf2f7 !important;
    border-radius: 16px !important;
    padding: 16px 12px !important;
    margin: 18px 0 !important;
    text-align: center !important;
  }

  .wpo-blog-single-section .author-box .author-avatar {
    float: none !important;
    margin: 0 auto 8px !important;
    display: block !important;
    width: 54px !important;
    height: 54px !important;
  }

  .wpo-blog-single-section .author-box .author-avatar img {
    width: 54px !important;
    height: 54px !important;
    border-radius: 50% !important;
  }

  .wpo-blog-single-section .author-box .author-content {
    padding: 0 !important;
    margin: 0 !important;
  }

  .wpo-blog-single-section .author-box .author-name {
    font-size: 15px !important;
    line-height: 1.3em !important;
    font-weight: 700 !important;
    color: #0b4f8a !important;
    margin-bottom: 4px !important;
    display: inline-block !important;
  }

  .wpo-blog-single-section .author-box .author-content p {
    font-size: 12.5px !important;
    line-height: 1.6em !important;
    color: #64748b !important;
    margin-bottom: 8px !important;
  }

  .wpo-blog-single-section .author-box .social-link {
    display: flex !important;
    justify-content: center !important;
    gap: 6px !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .wpo-blog-single-section .author-box .social-link li {
    margin: 0 !important;
    float: none !important;
  }

  .wpo-blog-single-section .author-box .social-link li a {
    width: 28px !important;
    height: 28px !important;
    line-height: 28px !important;
    font-size: 11px !important;
    border-radius: 50% !important;
    background: #f1f5f9 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #475569 !important;
  }

  /* Previous & Next Post Cards */
  .wpo-blog-single-section .more-posts {
    border: none !important;
    padding: 0 !important;
    margin: 16px 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
  }

  .wpo-blog-single-section .more-posts>div {
    float: none !important;
    width: 100% !important;
  }

  .wpo-blog-single-section .more-posts .previous-post,
  .wpo-blog-single-section .more-posts .next-post {
    border: 1px solid #edf2f7 !important;
    border-radius: 12px !important;
    background: #ffffff !important;
    padding: 9px 12px !important;
    text-align: right !important;
  }

  .wpo-blog-single-section .more-posts .post-control-link {
    font-size: 10.5px !important;
    font-weight: 700 !important;
    color: #0284c7 !important;
    display: block !important;
    margin-bottom: 2px !important;
    padding: 0 !important;
  }

  .wpo-blog-single-section .more-posts .post-name {
    font-size: 12.5px !important;
    line-height: 1.4em !important;
    color: #1e293b !important;
    font-weight: 600 !important;
    margin: 0 !important;
  }

  /* Comments Area */
  .wpo-blog-single-section .comments-area {
    margin-top: 20px !important;
  }

  .wpo-blog-single-section .comments-area .comments-title,
  .wpo-blog-single-section .comment-respond .comment-reply-title {
    font-size: 16.5px !important;
    line-height: 1.3em !important;
    color: #0b4f8a !important;
    font-weight: 700 !important;
    margin-bottom: 10px !important;
  }

  .wpo-blog-single-section .comments-area li>div {
    padding: 10px 12px !important;
    border: 1px solid #f1f5f9 !important;
    border-radius: 10px !important;
    background: #fbfcfe !important;
    margin-bottom: 8px !important;
  }

  .wpo-blog-single-section .comment-respond form input {
    height: 38px !important;
    font-size: 12.5px !important;
    border-radius: 8px !important;
    margin-bottom: 8px !important;
    border: 1px solid #e2e8f0 !important;
    padding: 6px 10px !important;
  }

  .wpo-blog-single-section .comment-respond form textarea {
    height: 80px !important;
    font-size: 12.5px !important;
    border-radius: 8px !important;
    padding: 8px 10px !important;
    margin-bottom: 8px !important;
    border: 1px solid #e2e8f0 !important;
  }

  .wpo-blog-single-section .comment-respond form .form-submit input[type="submit"] {
    border-radius: 8px !important;
    font-size: 12.5px !important;
    padding: 8px 16px !important;
    height: auto !important;
  }
}
/* Share icons */
.wpo-blog-single-section .tag-share-s2 .tag a.share-icon {
  align-items: center;
  background: #ecf4fb;
  border-radius: 50%;
  color: #000b47;
  display: inline-flex;
  font-size: 16px;
  height: 40px;
  justify-content: center;
  padding: 0;
  text-decoration: none;
  transition: background .2s ease, color .2s ease;
  width: 40px;
}
.wpo-blog-single-section .tag-share-s2 .tag a.share-icon i { line-height: 1; }
.wpo-blog-single-section .tag-share-s2 .tag a.share-facebook:hover { background: #1877f2; color: #fff; }
.wpo-blog-single-section .tag-share-s2 .tag a.share-twitter:hover { background: #1da1f2; color: #fff; }
.wpo-blog-single-section .tag-share-s2 .tag a.share-linkedin:hover { background: #0a66c2; color: #fff; }
.wpo-blog-single-section .tag-share-s2 .tag a.share-pinterest:hover { background: #e60023; color: #fff; }
