/* Blog hub local owner.
   Scope: blog index axis/card safety only. Do not move global card,
   container, image, nav, footer or homepage rules into this file. */

@media (max-width:640px){
  body.dsk-blog-hub{
    --dsk-blog-mobile-gutter:20px;
    --dsk-blog-mobile-rail:calc(100vw - (var(--dsk-blog-mobile-gutter) * 2));
    --dsk-sb-container-rail:var(--dsk-blog-mobile-rail);
  }

  body.dsk-blog-hub #sb-page-structure #blog-hero .dsk-about-hero__inner,
  body.dsk-blog-hub main#main-content #blog-hero .dsk-about-hero__inner,
  body.dsk-blog-hub #sb-page-structure .dsk-hub-filters__inner,
  body.dsk-blog-hub #sb-page-structure .dsk-blog-quicknav,
  body.dsk-blog-hub #sb-page-structure .dsk-blog-pagination:not(.dsk-blog-pagination--bottom),
  body.dsk-blog-hub #sb-page-structure .section-intro,
  body.dsk-blog-hub main#main-content .dsk-hub-filters__inner,
  body.dsk-blog-hub main#main-content .dsk-blog-quicknav,
  body.dsk-blog-hub main#main-content .dsk-blog-pagination:not(.dsk-blog-pagination--bottom),
  body.dsk-blog-hub main#main-content .dsk-blog-listing-owner__rail,
  body.dsk-blog-hub main#main-content #blog .container.sb-container-fixed,
  body.dsk-blog-hub main#main-content .dsk-cta-lab__inner,
  body.dsk-blog-hub #sb-page-structure #blog .container.sb-container-fixed,
  body.dsk-blog-hub #sb-page-structure .dsk-cta-lab__inner{
    width:var(--dsk-blog-mobile-rail) !important;
    max-width:var(--dsk-blog-mobile-rail) !important;
    margin-left:var(--dsk-blog-mobile-gutter) !important;
    margin-right:auto !important;
    box-sizing:border-box !important;
  }

  :is(html[lang="pl"], html[lang="uk"]) body.dsk-blog-hub main#main-content #blog-hero .dsk-about-hero__inner{
    padding-left:0;
    padding-right:0;
    box-sizing:border-box;
  }

  :is(html[lang="pl"], html[lang="uk"]) body.dsk-blog-hub:not(.dsk-blog-hub--index) main#main-content #blog-hero .dsk-about-hero__eyebrow,
  :is(html[lang="pl"], html[lang="uk"]) body.dsk-blog-hub:not(.dsk-blog-hub--index) main#main-content #blog-hero .dsk-about-hero__title,
  :is(html[lang="pl"], html[lang="uk"]) body.dsk-blog-hub:not(.dsk-blog-hub--index) main#main-content #blog-hero .dsk-about-hero__subtitle{
    max-width:100%;
    margin-left:0;
    margin-right:0;
    box-sizing:border-box;
  }

  :is(html[lang="pl"], html[lang="uk"]) body.dsk-blog-hub:not(.dsk-blog-hub--index) main#main-content #blog-hero .dsk-about-hero__title{
    max-width:min(100%, 13ch);
    font-size:clamp(1.78rem, 8.2vw, 2.08rem);
    line-height:1.1;
    letter-spacing:0;
    overflow-wrap:normal;
  }

  body.dsk-blog-hub .section-intro__inner,
  body.dsk-blog-hub #blog .sb-blog-card-section .option-width.sb-section-alignable,
  body.dsk-blog-hub #blog .items-grid.sb-blog{
    padding-left:0 !important;
    padding-right:0 !important;
    width:100% !important;
    max-width:none !important;
    box-sizing:border-box !important;
  }

  body.dsk-blog-hub #blog .items-grid__item-content{
    padding:16px !important;
  }

  body.dsk-blog-hub .dsk-blog-most-read{
    width:100% !important;
    max-width:none !important;
    padding:14px 12px !important;
    box-sizing:border-box !important;
  }
}

/* Stage 23: blog index desktop card safety.
   The existing card min-height reads --dsk-hub-card-h; this local token gives
   desktop CTAs enough room without touching global card or image rules. */
@media (min-width:1024px){
  body.dsk-blog-hub.dsk-blog-hub--index{
    --dsk-hub-card-h:540px;
  }

  body.dsk-blog-hub.dsk-blog-hub--index #blog li.items-grid__item.sb-blog-card .items-grid__header,
  body.dsk-blog-hub.dsk-blog-hub--index #blog li.items-grid__item.sb-blog-card .items-grid__header.h3{
    min-height:0 !important;
    max-height:none !important;
    overflow:visible;
    -webkit-line-clamp:unset !important;
    line-clamp:unset !important;
  }

  body.dsk-blog-hub.dsk-blog-hub--index #blog li.items-grid__item.sb-blog-card .items-grid__summary{
    display:block;
    min-height:0 !important;
    max-height:none !important;
    overflow:visible !important;
    -webkit-line-clamp:unset !important;
    line-clamp:unset !important;
  }


}

/* Stage 110: blog-family card text clipping fix.
   Runtime proof showed vertical clipping on mobile card titles/summaries.
   Keep this scoped to blog listing pages only; do not touch global card rules. */
@media (max-width:767px){
  body.dsk-blog-hub.dsk-blog-hub--index #blog li.items-grid__item.sb-blog-card .items-grid__header,
  body.dsk-blog-hub.dsk-blog-hub--index #blog li.items-grid__item.sb-blog-card .items-grid__header.h3{
    display:block !important;
    min-height:0 !important;
    max-height:none !important;
    overflow:visible !important;
    -webkit-line-clamp:unset !important;
    line-clamp:unset !important;
  }

  body.dsk-blog-hub.dsk-blog-hub--index #blog li.items-grid__item.sb-blog-card .items-grid__summary{
    display:block !important;
    min-height:0 !important;
    max-height:none !important;
    overflow:visible !important;
    -webkit-line-clamp:unset !important;
    line-clamp:unset !important;
  }
}

/* Stage 110B: tablet card text clipping parity. */
@media (min-width:641px) and (max-width:1023px){
  body.dsk-blog-hub.dsk-blog-hub--index #blog li.items-grid__item.sb-blog-card{
    height:auto !important;
    min-height:0 !important;
  }

  body.dsk-blog-hub.dsk-blog-hub--index #blog li.items-grid__item.sb-blog-card .items-grid__header,
  body.dsk-blog-hub.dsk-blog-hub--index #blog li.items-grid__item.sb-blog-card .items-grid__header.h3,
  body.dsk-blog-hub.dsk-blog-hub--index #blog li.items-grid__item.sb-blog-card .items-grid__summary{
    display:block !important;
    min-height:0 !important;
    max-height:none !important;
    overflow:visible !important;
    -webkit-line-clamp:unset !important;
    line-clamp:unset !important;
  }
}

/* Stage 111: blog intro text squeeze guard.
   Keep long intro copy on the real reading rail instead of a centered narrow column. */
@media (max-width:767px){
  :is(html[lang="pl"], html[lang="uk"]) body.dsk-blog-hub main#main-content .section-intro{
    width:var(--dsk-sb-container-rail) !important;
    max-width:var(--dsk-sb-container-rail) !important;
    margin-left:20px !important;
    margin-right:auto !important;
    padding-left:0 !important;
    padding-right:0 !important;
    text-align:left !important;
    box-sizing:border-box !important;
  }

  :is(html[lang="pl"], html[lang="uk"]) body.dsk-blog-hub main#main-content .section-intro__inner,
  :is(html[lang="pl"], html[lang="uk"]) body.dsk-blog-hub main#main-content .section-intro__text{
    width:100% !important;
    max-width:100% !important;
    margin-left:0 !important;
    margin-right:0 !important;
    padding-left:0 !important;
    padding-right:0 !important;
    text-align:left !important;
    box-sizing:border-box !important;
  }
}

@media (min-width:768px) and (max-width:1023px){
  :is(html[lang="pl"], html[lang="uk"]) body.dsk-blog-hub main#main-content .dsk-blog-quicknav,
  :is(html[lang="pl"], html[lang="uk"]) body.dsk-blog-hub main#main-content .dsk-blog-pagination,
  :is(html[lang="pl"], html[lang="uk"]) body.dsk-blog-hub main#main-content .dsk-blog-listing-owner__rail,
  :is(html[lang="pl"], html[lang="uk"]) body.dsk-blog-hub main#main-content .section-intro{
    width:calc(100vw - 40px) !important;
    max-width:calc(100vw - 40px) !important;
    margin-left:20px !important;
    margin-right:auto !important;
    padding-left:0 !important;
    padding-right:0 !important;
    text-align:left !important;
    box-sizing:border-box !important;
  }

  :is(html[lang="pl"], html[lang="uk"]) body.dsk-blog-hub main#main-content .section-intro__inner,
  :is(html[lang="pl"], html[lang="uk"]) body.dsk-blog-hub main#main-content .section-intro__text{
    width:100% !important;
    max-width:100% !important;
    margin-left:0 !important;
    margin-right:0 !important;
    padding-left:0 !important;
    padding-right:0 !important;
    text-align:left !important;
    box-sizing:border-box !important;
  }
}

/* Blog device-polish pack 001: tighten tablet hero/filter handoff without changing rails. */
@media (min-width:768px) and (max-width:1023px){
  :is(html[lang="pl"], html[lang="uk"]) body.dsk-blog-hub main#main-content #blog-hero.dsk-hub-hero.dsk-about-hero--photo{
    min-height:auto;
    padding-top:88px;
    padding-bottom:54px;
  }

  :is(html[lang="pl"], html[lang="uk"]) body.dsk-blog-hub main#main-content #blog-hero.dsk-about-hero--photo::after{
    height:76px;
  }

  :is(html[lang="pl"], html[lang="uk"]) body.dsk-blog-hub main#main-content .dsk-hub-filters{
    margin-top:-24px;
    padding-bottom:10px;
  }

  :is(html[lang="pl"], html[lang="uk"]) body.dsk-blog-hub main#main-content .dsk-blog-quicknav{
    margin-top:10px;
    margin-bottom:12px;
  }

  :is(html[lang="pl"], html[lang="uk"]) body.dsk-blog-hub main#main-content .section-intro{
    margin-top:10px;
    margin-bottom:10px;
  }
}

/* Blog device-polish pack 001B: human-eye mobile text rhythm. */
@media (max-width:640px){
  :is(html[lang="pl"], html[lang="uk"]) body.dsk-blog-hub main#main-content .section-intro__text{
    font-size:.96rem;
    line-height:1.56;
  }

  :is(html[lang="pl"], html[lang="uk"]) body.dsk-blog-hub main#main-content .dsk-blog-most-read{
    margin-bottom:22px;
    border-radius:18px;
  }

  :is(html[lang="pl"], html[lang="uk"]) body.dsk-blog-hub main#main-content .dsk-blog-most-read h2{
    margin-bottom:.45rem;
    font-size:1.24rem;
    line-height:1.18;
  }

  :is(html[lang="pl"], html[lang="uk"]) body.dsk-blog-hub main#main-content .dsk-blog-most-read p{
    margin-bottom:.8rem;
    font-size:.94rem;
    line-height:1.5;
  }

  :is(html[lang="pl"], html[lang="uk"]) body.dsk-blog-hub main#main-content .dsk-blog-most-read ul{
    gap:7px;
  }

  :is(html[lang="pl"], html[lang="uk"]) body.dsk-blog-hub main#main-content .dsk-blog-most-read li a{
    padding:8px 10px;
    border-radius:11px;
    font-size:.94rem;
    line-height:1.36;
  }
}
