/*! ITLab step 4 – titlebar, mobile menu, search/cart panels, tags, post navigation, responsive articles,
    home blocks, footer alignment. Additive and scoped: nothing here touches the header icon circles. */

/* ===================== 1. PAGE / POST TITLE BAR ===================== */
body:not(.home) .site-content .content-header:not(.content-header-featured){
  background:linear-gradient(135deg,#0a1a2f 0%,#102f63 58%,#156fff 140%)!important;
  color:#cfe0ff;padding:36px 0 32px!important;margin-bottom:34px!important;border-radius:0 0 28px 28px;overflow:hidden;isolation:isolate
}
body:not(.home) .site-content .content-header:not(.content-header-featured):before{display:none!important}
body:not(.home) .site-content .content-header:not(.content-header-featured):after{
  content:"";position:absolute;z-index:-1;width:420px;height:420px;left:-120px;top:-220px;border-radius:50%;
  background:radial-gradient(circle,rgba(21,111,255,.45),rgba(21,111,255,0) 70%);pointer-events:none
}
body:not(.home) .site-content .content-header.content-header-featured{padding:46px 0 40px!important;margin-bottom:34px!important;border-radius:0 0 28px 28px;overflow:hidden}
.site-content .content-header .page-title-wrap{width:100%!important;max-width:860px}
.site-content .content-header .page-title,
.site-content .content-header .page-title *{color:#fff!important}
.site-content .content-header .page-title{margin:0}
.site-content .content-header .page-title h1,.site-content .content-header .page-title .page-title-inner{
  font-family:"Dana","YekanBakh",sans-serif;font-weight:700;font-size:clamp(22px,3.6vw,36px);line-height:1.6;margin:0
}
.site-content .content-header .post-categories{margin-bottom:12px;display:flex;flex-wrap:wrap;gap:8px}
.site-content .content-header .post-categories a{
  display:inline-flex;align-items:center;padding:4px 14px;border-radius:999px;font-size:13px;line-height:1.8;
  background:rgba(255,255,255,.14);color:#fff!important;border:1px solid rgba(255,255,255,.2);text-decoration:none!important;transition:background-color .2s
}
.site-content .content-header .post-categories a:hover{background:#156fff}
.site-content .content-header .post-meta{margin-top:14px;font-size:13.5px;color:#b8cdf3}
.site-content .content-header .post-meta .post-meta-data{display:flex;flex-wrap:wrap;gap:6px 18px}
.site-content .content-header .post-meta a{color:#fff!important}
.site-content .content-header .breadcrumbs{margin-top:16px;font-size:13px;color:#a9c3f0}
.site-content .content-header .breadcrumbs .breadcrumbs-inner{white-space:normal;flex-wrap:wrap;gap:6px 10px}
.site-content .content-header .breadcrumbs a{color:#fff!important}
.site-content .content-header .navigation,
.site-content .content-header .down-arrow{display:none!important}
.site-content .content-header .post-thumbnail img{border-radius:18px;max-width:100%;height:auto}
body.home .site-content .content-header{display:none!important}
@media (max-width:600px){
  body:not(.home) .site-content .content-header:not(.content-header-featured){padding:26px 0 24px!important;border-radius:0 0 22px 22px;margin-bottom:24px!important}
}

/* ===================== 2. TAGS ===================== */
.post-tags{display:flex;flex-wrap:wrap;gap:8px;margin:6px 0 26px}
.post-tags a{
  display:inline-flex;align-items:center;gap:5px;margin:0!important;padding:6px 14px!important;border-radius:999px;
  background:#eef4ff;color:#1b4fbf!important;border:1px solid #dbe7ff;font-size:13px;line-height:1.7;text-decoration:none!important;
  transition:background-color .2s,color .2s,transform .2s
}
body.single .post-tags a:before{content:"#"!important;font-family:inherit!important;position:static!important;transform:none!important;opacity:.55;font-size:13px;margin:0!important}
.post-tags a:hover{background:#156fff;color:#fff!important;border-color:#156fff;transform:translateY(-1px)}

/* ===================== 3. PREVIOUS / NEXT POST CARDS ===================== */
.itl-postnav{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:0 auto 34px;width:100%;max-width:880px}
.itl-postnav-card{display:flex;align-items:center;gap:12px;padding:10px;border:1px solid #e3ebf8;border-radius:18px;background:#fff;
  color:#0a1a2f!important;text-decoration:none!important;min-width:0;box-shadow:0 6px 22px rgba(10,26,47,.05);transition:transform .2s,box-shadow .2s,border-color .2s}
.itl-postnav-card:hover{transform:translateY(-3px);border-color:#9fc2ff;box-shadow:0 14px 34px rgba(21,111,255,.16)}
.itl-postnav-card.is-empty{visibility:hidden;box-shadow:none;border:0}
.itl-postnav-thumb{flex:0 0 92px;width:92px;height:68px;border-radius:12px;overflow:hidden;background:#eef2f8}
.itl-postnav-thumb:empty{display:none}
.itl-postnav-thumb img{display:block;width:100%;height:100%;object-fit:cover}
.itl-postnav-text{display:flex;flex-direction:column;gap:4px;min-width:0}
.itl-postnav-label{font-size:12px;color:#156fff;font-weight:600}
.itl-postnav-card.is-prev .itl-postnav-label:before{content:"→ "}
.itl-postnav-card.is-next .itl-postnav-label:after{content:" ←"}
.itl-postnav-title{font-size:14px;line-height:1.7;font-weight:600;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
@media (max-width:600px){.itl-postnav{grid-template-columns:1fr}.itl-postnav-card.is-empty{display:none}.itl-postnav-thumb{flex-basis:80px;width:80px;height:60px}}

/* ===================== 4. MOBILE / SLIDING MENU ===================== */
.sliding-menu .off-canvas-wrap{padding:18px 18px 22px!important}
/* search on the right, close button on the left – both 40px */
[class*="sliding-"] .off-canvas-wrap .widget_search{position:absolute!important;right:18px!important;left:auto!important;top:18px!important;width:calc(100% - 36px - 50px)!important;margin:0!important}
[class*="sliding-"] .off-canvas-wrap .widget_search input.search-field{height:40px!important;border-radius:999px!important;font-size:14px;padding:0 16px!important}
.sliding-menu .off-canvas-toggle,
.rtl .sliding-menu .off-canvas-toggle{position:absolute!important;top:18px;left:18px;right:auto;margin:0!important;width:40px!important;height:40px!important;
  border-radius:50%!important;background:#156fff!important;color:#fff;display:block!important;z-index:5}
.sliding-menu .off-canvas-toggle:before{content:""!important;font-family:inherit!important;position:absolute;left:50%;top:50%;width:16px;height:2px;background:#fff;border-radius:2px;transform:translate(-50%,-50%) rotate(45deg)!important}
.sliding-menu .off-canvas-toggle:after{content:"";position:absolute;left:50%;top:50%;width:16px;height:2px;background:#fff;border-radius:2px;transform:translate(-50%,-50%) rotate(-45deg)}
.sliding-menu .off-canvas-toggle:hover{background:#0f57d1!important}
.menu-sliding{margin:66px 0 0!important;padding:14px 0 0!important;border-top:1px solid #e6edf7!important;height:auto!important;flex:1 1 auto;overflow-y:auto!important;overflow-x:hidden;text-align:right}
.menu-sliding li{margin:0 0 4px!important}
.menu-sliding li>a{display:flex!important;align-items:center;gap:10px;padding:11px 8px!important;font-size:15px;line-height:1.6;font-weight:600;color:#0a1a2f;border-radius:12px;text-align:right}
.rtl .menu-sliding li.menu-item-has-children>a{padding-left:56px!important;padding-right:8px!important}
.menu-sliding li>a:hover,.menu-sliding li.current-menu-item>a{background:#eef4ff;color:#156fff}
.menu-sliding li>a i,.menu-sliding li>a svg,.menu-sliding li>a img{flex:0 0 24px;width:24px;height:24px;text-align:center;line-height:24px;font-size:17px;color:#156fff;margin:0}
.rtl .menu-sliding li .menu-item-toggle{top:2px;width:38px;height:38px;border:0!important;background:#eef4ff;border-radius:50%}
.rtl .menu-sliding li .sub-menu,.rtl .menu-sliding li .children{margin:2px 18px 6px 0!important;padding:0 12px 0 0!important;border-right:2px solid #dbe7ff}
.menu-sliding li .sub-menu li>a{font-size:14px;font-weight:500;color:#3a4a63;padding:8px 8px!important}
/* bottom info chips (support / virtualisation …) – smaller, one baseline */
[class*="sliding-"] .off-canvas-wrap .header-info-text ul{flex-wrap:wrap;align-items:stretch;gap:8px;margin-top:14px}
[class*="sliding-"] .off-canvas-wrap .header-info-text ul li{flex:1 1 140px;min-width:0;padding:8px 12px;border:1px solid #e3ebf8;border-radius:12px;font-size:12px;line-height:1.7;margin:0}
[class*="sliding-"] .off-canvas-wrap .header-info-text ul li strong{font-size:13px;line-height:1.6;margin-bottom:2px}
[class*="sliding-"] .off-canvas-wrap .social-icons{margin-top:14px;justify-content:flex-start;flex-wrap:wrap}
[class*="sliding-"] .off-canvas-wrap .social-icons a{width:38px;height:38px;line-height:36px}

/* ===================== 5. SEARCH + CART PANELS FIT THE SCREEN ===================== */
.site-header-inner{position:relative}
@media (max-width:768px){
  [class*="header-style"] .menu-extras>li.search-box,
  [class*="header-style"] .menu-extras>li.shopping-cart,
  [class*="header-style"] .extras,[class*="header-style"] .menu-extras{position:static!important}
  [class*="header-style"] .search-box .widget_search{left:12px!important;right:12px!important;width:auto!important;top:calc(100% + 6px)!important}
  [class*="header-style"] .shopping-cart .sub-menu{left:12px!important;right:auto!important;top:calc(100% + 6px)!important;width:min(320px,calc(100vw - 24px))!important;max-width:none!important}
  [class*="header-style"] .shopping-cart .widget_shopping_cart_content{width:100%!important}
  [class*="header-style"] .shopping-cart .sub-menu ul.woocommerce-mini-cart li{padding-top:14px!important;padding-bottom:14px!important}
}
/* opened search: the icon is always visible */
[class*="header-style"] .menu-extras>li.search-box.active>a{background:#156fff!important;color:#fff!important}
[class*="header-style"] .menu-extras>li.search-box.active>a svg{stroke:#fff!important;opacity:1!important;visibility:visible!important}

/* ===================== 6. SIDEBAR SEARCH WIDGET ===================== */
.main-sidebar .widget_search .search-form{display:flex;align-items:stretch;gap:8px;position:relative}
.main-sidebar .widget_search .search-form label{flex:1 1 auto;min-width:0;margin:0;position:relative;display:block}
.main-sidebar .widget_search .search-form label .screen-reader-text{display:none!important}
.main-sidebar .widget_search .search-form .search-field{width:100%;height:46px;padding:0 14px;border-radius:12px}
.main-sidebar .widget_search .search-form .search-submit{
  position:static!important;transform:none!important;opacity:1!important;flex:0 0 auto;height:46px;padding:0 16px!important;margin:0;
  border-radius:12px;white-space:nowrap;font-size:13px;line-height:1;background:#0a1a2f;color:#fff;border:0
}
.main-sidebar .widget{margin-bottom:20px}
.main-sidebar .widget img{max-width:100%;height:auto;border-radius:14px}

/* ===================== 7. ARTICLES: INLINE-STYLED HTML STAYS RESPONSIVE ===================== */
.single-post .post-content{overflow-wrap:anywhere}
.single-post .post-content :not(.kk-star-ratings):not(.kk-star-ratings *){max-width:100%;box-sizing:border-box}
.single-post .post-content iframe,.single-post .post-content video{width:100%;aspect-ratio:16/9;height:auto;border:0;border-radius:12px}
.single-post .post-content table{display:block;overflow-x:auto;width:100%!important;-webkit-overflow-scrolling:touch;border-collapse:collapse}
.single-post .post-content table td,.single-post .post-content table th{padding:8px 10px;min-width:90px}
.single-post .post-content [style*="min-width"]:not(.kk-star-ratings *){min-width:0!important}
@media (max-width:900px){
  .single-post .post-content [style*="grid-template-columns"]:not(.kk-star-ratings *){grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media (max-width:768px){
  .single-post .post-content [style*="width"]:not(.kk-star-ratings *):not(img):not(table):not(iframe){width:auto!important;max-width:100%!important}
  .single-post .post-content [style*="float"]:not(.kk-star-ratings *){float:none!important;margin-left:0!important;margin-right:0!important}
  .single-post .post-content [style*="display:flex"]:not(.kk-star-ratings *),.single-post .post-content [style*="display: flex"]:not(.kk-star-ratings *){flex-wrap:wrap!important;gap:10px}
  .single-post .post-content [style*="display:flex"]:not(.kk-star-ratings *)>*,.single-post .post-content [style*="display: flex"]:not(.kk-star-ratings *)>*{flex:1 1 220px!important;min-width:0}
  .single-post .post-content [style*="margin-left"]:not(.kk-star-ratings *),.single-post .post-content [style*="margin-right"]:not(.kk-star-ratings *){margin-left:0!important;margin-right:0!important}
}
@media (max-width:600px){
  .single-post .post-content [style*="grid-template-columns"]:not(.kk-star-ratings *){grid-template-columns:1fr!important}
  .single-post .post-content [style*="position:absolute"]:not(.kk-star-ratings *),.single-post .post-content [style*="position: absolute"]:not(.kk-star-ratings *){position:static!important}
}

/* ===================== 8. HOME: the two blocks before the footer ===================== */
/* the legacy "section" is an exact duplicate of the container below it (same title, same 4-post grid) */
.elementor-element-6219330{display:none!important}
.elementor-element-79fcea5{background:linear-gradient(180deg,#f4f8ff 0%,#fff 100%);padding:70px 0 80px!important}
.elementor-element-79fcea5 .elementor-element-853950f{display:flex!important;flex-direction:row!important;align-items:flex-end;justify-content:space-between;flex-wrap:wrap;gap:14px;margin-bottom:34px!important}
.elementor-element-79fcea5 .elementor-element-ad12a02 .elementor-heading-title{display:inline-flex;padding:5px 14px;border-radius:999px;background:#e5eeff;color:#156fff!important;font-size:13px;font-weight:600;line-height:1.8;margin-bottom:10px}
.elementor-element-79fcea5 .elementor-element-68129d0 .elementor-heading-title{font-family:"Dana","YekanBakh",sans-serif;font-size:clamp(22px,3vw,32px);line-height:1.6;color:#0a1a2f;margin:0}
.elementor-element-79fcea5 .elementor-element-9fe9b3c .elementor-button{background:#fff!important;color:#156fff!important;border:1px solid #bcd3ff;border-radius:12px;padding:11px 22px;font-size:14px;font-weight:600;transition:background-color .2s,color .2s}
.elementor-element-79fcea5 .elementor-element-9fe9b3c .elementor-button:hover{background:#156fff!important;color:#fff!important}
.elementor-element-79fcea5 .pp-posts{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:20px!important}
.elementor-element-79fcea5 .pp-post-wrap{width:auto!important;margin:0!important;padding:0!important}
.elementor-element-79fcea5 .pp-post{display:flex;height:100%;overflow:hidden;background:#fff;border:1px solid #e3ebf8;border-radius:20px;box-shadow:0 8px 26px rgba(10,26,47,.06);transition:transform .25s,box-shadow .25s}
.elementor-element-79fcea5 .pp-post:hover{transform:translateY(-4px);box-shadow:0 18px 40px rgba(21,111,255,.16)}
.elementor-element-79fcea5 .pp-post-thumbnail{flex:0 0 40%;max-width:40%;overflow:hidden}
.elementor-element-79fcea5 .pp-post-thumbnail a,.elementor-element-79fcea5 .pp-post-thumbnail-wrap{display:block;height:100%}
.elementor-element-79fcea5 .pp-post-thumbnail img{width:100%;height:100%;min-height:170px;object-fit:cover;display:block;transition:transform .5s}
.elementor-element-79fcea5 .pp-post:hover .pp-post-thumbnail img{transform:scale(1.05)}
.elementor-element-79fcea5 .pp-post-content-wrap{flex:1 1 auto;min-width:0;padding:18px 20px}
.elementor-element-79fcea5 .pp-post-title{font-size:17px;line-height:1.8;margin:0 0 8px}
.elementor-element-79fcea5 .pp-post-title a{color:#0a1a2f;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.elementor-element-79fcea5 .pp-post-title a:hover{color:#156fff}
@media (max-width:900px){.elementor-element-79fcea5 .pp-posts{grid-template-columns:1fr!important}}
@media (max-width:600px){
  .elementor-element-79fcea5{padding:44px 0 56px!important}
  .elementor-element-79fcea5 .pp-post{flex-direction:column}
  .elementor-element-79fcea5 .pp-post-thumbnail{flex:none;max-width:100%;aspect-ratio:16/10}
  .elementor-element-79fcea5 .pp-post-thumbnail img{min-height:0}
}

/* ===================== 9. FOOTER: equal-height, aligned blocks ===================== */
html body .itf-columns{align-items:stretch!important}
html body .itf-column{display:flex!important;flex-direction:column;height:100%}
html body .itf-column-title{min-height:34px;margin-bottom:16px!important}
html body .itf-menu,html body .itf-contact-list{margin-top:0!important}
html body .itf-posts-grid{align-items:stretch!important}
html body .itf-post-card{height:100%}
