
/* ==========================================================
   Qnna News Theme v1.37.90
   MOBILE SECTION HEADER CONTRACT
   Approved reference: "آخر الأخبار"
   Scope: MOBILE HOMEPAGE SECTION HEADERS ONLY.
   ========================================================== */

@media (max-width:767px){

  /* --------------------------------------------------------
     1) The outer section-header rail: fixed and compact.
     -------------------------------------------------------- */
  body.home.qnna-mobile-app-pro .qnna-home [data-block-id] :is(
    .qnna-section-head,
    .qnna-section-heading,
    .qnna-ref-section-head,
    .qnna-ref-video-head,
    .qnna-ref-articles-head,
    .qnna-okaz-title-row,
    .qnna-okaz-lead-title-row
  ){
    box-sizing:border-box!important;
    display:flex!important;
    align-items:center!important;
    min-height:58px!important;
    height:58px!important;
    max-height:58px!important;
    margin:0 0 14px!important;
    padding:7px 9px!important;
    gap:7px!important;
    border-radius:14px!important;
    overflow:hidden!important;
    flex-wrap:nowrap!important;
  }

  /* --------------------------------------------------------
     2) Title wrapper can never force the rail taller.
     -------------------------------------------------------- */
  body.home.qnna-mobile-app-pro .qnna-home [data-block-id] :is(
    .qnna-section-head,
    .qnna-section-heading,
    .qnna-ref-section-head,
    .qnna-ref-video-head,
    .qnna-ref-articles-head,
    .qnna-okaz-title-row,
    .qnna-okaz-lead-title-row
  ) :is(
    .qnna-title-wrap,
    .qnna-section-title-wrap
  ){
    box-sizing:border-box!important;
    display:flex!important;
    align-items:center!important;
    min-width:0!important;
    max-width:52vw!important;
    height:42px!important;
    max-height:42px!important;
    flex:0 1 auto!important;
    overflow:hidden!important;
    flex-wrap:nowrap!important;
  }

  /* --------------------------------------------------------
     3) Approved title chip = "آخر الأخبار".
     One line, fixed 42px height, never expands vertically.
     -------------------------------------------------------- */
  body.home.qnna-mobile-app-pro .qnna-home [data-block-id] :is(
    .qnna-section-head,
    .qnna-section-heading,
    .qnna-ref-section-head,
    .qnna-ref-video-head,
    .qnna-ref-articles-head,
    .qnna-okaz-title-row,
    .qnna-okaz-lead-title-row
  ) :is(
    h2,
    .qnna-section-title
  ){
    box-sizing:border-box!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    min-width:0!important;
    width:auto!important;
    max-width:52vw!important;
    min-height:42px!important;
    height:42px!important;
    max-height:42px!important;
    margin:0!important;
    padding:0 14px!important;
    border-radius:12px 4px 12px 4px!important;

    font-size:16px!important;
    line-height:1!important;
    font-weight:900!important;
    letter-spacing:0!important;

    white-space:nowrap!important;
    text-wrap:nowrap!important;
    word-break:normal!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;

    flex:0 1 auto!important;
  }

  /* Inner title elements also stay in one line. */
  body.home.qnna-mobile-app-pro .qnna-home [data-block-id] :is(
    .qnna-section-head,
    .qnna-section-heading,
    .qnna-ref-section-head,
    .qnna-ref-video-head,
    .qnna-ref-articles-head,
    .qnna-okaz-title-row,
    .qnna-okaz-lead-title-row
  ) :is(h2,.qnna-section-title) :is(a,span,strong,em){
    box-sizing:border-box!important;
    display:block!important;
    min-width:0!important;
    max-width:100%!important;
    height:auto!important;
    max-height:16px!important;
    margin:0!important;
    padding:0!important;
    font-size:inherit!important;
    line-height:1!important;
    white-space:nowrap!important;
    text-wrap:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }

  /* --------------------------------------------------------
     4) Section icon = same visual weight as Latest News.
     -------------------------------------------------------- */
  body.home.qnna-mobile-app-pro .qnna-home [data-block-id] :is(
    .qnna-section-title-icon,
    .qnna-section-head>.qnna-icon,
    .qnna-section-heading>.qnna-icon,
    .qnna-ref-section-head>.qnna-icon,
    .qnna-ref-video-head>.qnna-icon,
    .qnna-ref-articles-head>.qnna-icon,
    .qnna-okaz-title-row>.qnna-icon,
    .qnna-okaz-lead-title-row>.qnna-icon
  ){
    box-sizing:border-box!important;
    width:36px!important;
    height:36px!important;
    min-width:36px!important;
    min-height:36px!important;
    max-width:36px!important;
    max-height:36px!important;
    flex:0 0 36px!important;
    padding:8px!important;
    margin:0!important;
    border-radius:11px!important;
    overflow:hidden!important;
  }

  body.home.qnna-mobile-app-pro .qnna-home [data-block-id] :is(
    .qnna-section-title-icon,
    .qnna-section-head>.qnna-icon,
    .qnna-section-heading>.qnna-icon,
    .qnna-ref-section-head>.qnna-icon,
    .qnna-ref-video-head>.qnna-icon,
    .qnna-ref-articles-head>.qnna-icon
  ) :is(svg,img){
    width:100%!important;
    height:100%!important;
    max-width:100%!important;
    max-height:100%!important;
    object-fit:contain!important;
  }

  /* --------------------------------------------------------
     5) "عرض الكل" = compact, same proportion as Latest News.
     -------------------------------------------------------- */
  body.home.qnna-mobile-app-pro .qnna-home [data-block-id] .qnna-more-link{
    box-sizing:border-box!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    min-width:0!important;
    width:auto!important;
    max-width:112px!important;
    min-height:36px!important;
    height:36px!important;
    max-height:36px!important;
    flex:0 0 auto!important;
    margin:0!important;
    padding:0 11px!important;
    gap:5px!important;
    border-radius:11px!important;
    font-size:10.5px!important;
    line-height:1!important;
    font-weight:900!important;
    white-space:nowrap!important;
    overflow:hidden!important;
  }

  body.home.qnna-mobile-app-pro .qnna-home [data-block-id] .qnna-more-link :is(
    .qnna-icon,
    svg
  ){
    width:13px!important;
    height:13px!important;
    min-width:13px!important;
    max-width:13px!important;
    max-height:13px!important;
    flex:0 0 13px!important;
  }

  /* --------------------------------------------------------
     6) Decorative rails may not enlarge the header.
     -------------------------------------------------------- */
  body.home.qnna-mobile-app-pro .qnna-home [data-block-id] :is(
    .qnna-section-head,
    .qnna-ref-section-head,
    .qnna-ref-video-head,
    .qnna-ref-articles-head
  )::before{
    top:9px!important;
    bottom:9px!important;
    width:3px!important;
    max-height:40px!important;
  }

  body.home.qnna-mobile-app-pro .qnna-home [data-block-id] :is(
    .qnna-section-head,
    .qnna-ref-section-head,
    .qnna-ref-video-head,
    .qnna-ref-articles-head
  )::after{
    width:42px!important;
    height:3px!important;
    bottom:5px!important;
  }

  /* Any special/legacy heading badge inherits this same geometry. */
  body.home.qnna-mobile-app-pro .qnna-home [data-block-id] :is(
    .qnna-heading-badge,
    .qnna-heading-solid,
    .qnna-heading-card,
    .qnna-heading-line,
    .qnna-heading-minimal
  ) :is(
    .qnna-section-head,
    .qnna-ref-section-head,
    .qnna-ref-video-head,
    .qnna-ref-articles-head
  ){
    min-height:58px!important;
    height:58px!important;
    max-height:58px!important;
  }

  /* Explicitly prevent long section names from widening the title too much. */
  body.home.qnna-mobile-app-pro .qnna-home :is(
    [data-block-id="showcase-03-local"],
    [data-block-id="showcase-05-world"],
    [data-block-id="showcase-07-reports"],
    [data-block-id="showcase-08-sports"],
    [data-block-id="showcase-10-economy"],
    [data-block-id="showcase-11-jobs"],
    [data-block-id="showcase-12-visual"],
    [data-block-id="showcase-13-spotlight"],
    [data-block-id="showcase-14-video"],
    [data-block-id="showcase-15-opinion"],
    [data-block-id="showcase-16-community"],
    [data-block-id="showcase-17-education"]
  ) :is(
    .qnna-section-head,
    .qnna-ref-section-head,
    .qnna-ref-video-head,
    .qnna-ref-articles-head
  ) :is(h2,.qnna-section-title){
    max-width:50vw!important;
  }
}

/* Smaller phones: same reference, only slightly reduced typography/width. */
@media (max-width:430px){
  body.home.qnna-mobile-app-pro .qnna-home [data-block-id] :is(
    .qnna-section-head,
    .qnna-section-heading,
    .qnna-ref-section-head,
    .qnna-ref-video-head,
    .qnna-ref-articles-head,
    .qnna-okaz-title-row,
    .qnna-okaz-lead-title-row
  ) :is(h2,.qnna-section-title){
    max-width:48vw!important;
    padding-inline:11px!important;
    font-size:15px!important;
  }

  body.home.qnna-mobile-app-pro .qnna-home [data-block-id] .qnna-more-link{
    max-width:102px!important;
    padding-inline:9px!important;
    font-size:10px!important;
  }
}
