/* Tamiyouz Blog Phase 4 — Mobile & Tablet Perfection
   Scoped to public blog layouts; leaves editor, content, security and SEO untouched.
   Fluid RTL/LTR rules, touch targets, accessible focus, restrained motion.
*/
@media (min-width:780px) and (max-width:1100px){
  /* The theme's desktop 8/4 split squeezes article text to 482px on 820px tablets.
     Allow article to span the row; move the unchanged sidebar beneath it. */
  body:is(.single-post,.archive,.category) #page_content > .row > .col.s8 {
    float:none !important;
    width:100% !important;
    max-width:100% !important;
    margin:0 !important;
    clear:both;
  }
  body:is(.single-post,.archive,.category) #page_content > .row > .col.s4.sidebar_primary {
    float:none !important;
    clear:both;
    width:100% !important;
    max-width:100% !important;
    margin-block-start:22px !important;
  }
  body:is(.single-post,.archive,.category) #page_content > .row > .col.s4.sidebar_primary .sidebar_inner {
    max-width:100%;
  }
  body:is(.single-post,.archive,.category) #page_content > .row > .col.s4.sidebar_primary :is(img,iframe,video) {
    max-width:100%;
    height:auto;
  }
  body.single-post .content.single_con {
    max-width:100%;
  }
  body.single-post .cz_related_posts > .clr {
    grid-template-columns:repeat(auto-fit,minmax(min(100%,210px),1fr)) !important;
    gap:16px;
  }
}
@media (max-width:779px){
  /* Keep the theme's single-column mobile article layout intact. */
  body.single-post #page_content > .row > .col.s8 {
    min-width:0;
    max-width:100%;
  }
}
@media (max-width:600px) {
  /* Remove the overflow and excess height of Phase 2's two-column category tiles.
     Codevz emits table-display and unbreakable title widths by default. */
  body.home .elementor-element-394a394 > .elementor-container >
    .elementor-column:not(:first-child) {
    box-sizing:border-box!important;
    min-height:190px!important;
    height:190px!important;
  }
  body.home .elementor-element-394a394 > .elementor-container >
    .elementor-column:not(:first-child) .elementor-widget-wrap {
    box-sizing:border-box!important;
    width:100%!important;
    min-width:0!important;
    min-height:0!important;
    height:100%!important;
    max-height:100%!important;
    padding:14px 10px!important;
    margin:0!important;
    align-content:center!important;
    justify-content:center!important;
  }
  body.home .elementor-element-394a394 > .elementor-container >
    .elementor-column:not(:first-child) .elementor-widget {
    min-width:0!important;
    width:100%!important;
    max-width:100%!important;
  }
  body.home .elementor-element-394a394 > .elementor-container >
    .elementor-column:not(:first-child) .elementor-widget-container {
    margin:0!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
  }
  body.home .elementor-element-394a394 > .elementor-container >
    .elementor-column:not(:first-child) .cz_title,
  body.home .elementor-element-394a394 > .elementor-container >
    .elementor-column:not(:first-child) .cz_title_content,
  body.home .elementor-element-394a394 > .elementor-container >
    .elementor-column:not(:first-child) .cz_wpe_content {
    box-sizing:border-box!important;
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
    text-wrap:balance;
    text-align:center!important;
    line-height:1.55!important;
  }
  body.home .elementor-element-394a394 > .elementor-container >
    .elementor-column:not(:first-child) .cz_title a {
    display:block!important;
    width:100%;
    max-width:100%;
    line-height:1.55!important;
    padding:4px 0;
    white-space:normal!important;
    overflow-wrap:anywhere;
  }
  body.home .elementor-element-394a394 > .elementor-container >
    .elementor-column:not(:first-child) .cz_title a:focus-visible {
    outline:2px solid #efcf99;
    outline-offset:3px;
  }
  /* Improve the logo touch target without changing its visual size. */
  header a.brand {
    min-width:44px;
    min-height:44px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    box-sizing:border-box;
  }
  /* Images/media never force article width; wide historical tables scroll locally. */
  body.single-post .cz_post_content :is(iframe,video,embed,object,figure) {
    max-width:100%!important;
  }
  body.single-post .cz_post_content table {
    display:block;
    width:100%;
    max-width:100%;
    overflow-x:auto;
    overscroll-behavior-inline:contain;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:thin;
  }
  body.single-post .tyz-p3-toc summary {
    min-height:44px;
  }
  body.single-post .tyz-p3-toc a {
    min-height:42px;
    display:flex;
    align-items:center;
  }
  body.single-post .cz_related_posts > .clr {
    grid-template-columns:minmax(0,1fr)!important;
  }
}
@media (max-width:359px) {
  body.home .elementor-element-394a394 > .elementor-container {
    column-gap:9px!important;
    padding-inline:10px!important;
  }
  body.home .elementor-element-394a394 > .elementor-container >
    .elementor-column:not(:first-child) {
    min-height:184px!important;
    height:184px!important;
  }
  body.home .elementor-element-394a394 > .elementor-container >
    .elementor-column:not(:first-child) .elementor-widget-wrap {
    padding:10px 7px!important;
  }
  body.single-post .tyz-p3-toc a {font-size:12px}
}
@media (prefers-reduced-motion:reduce) {
  body.home .elementor-element-394a394 .elementor-column a {
    transition:none!important;
  }
}
