/*
Theme Name: Talash Bangla — ColorMag Pro Child
Theme URI: https://www.talashbangla.com/
Description: Talash Bangla scoped news landing header, curated footer, ad slot and responsive improvements for ColorMag Pro.
Author: Virtual IT Professional
Version: 0.2.1
Template: colormag-pro
Text Domain: talashbangla-child
Requires PHP: 7.4
*/
:root{--tb-brand-red:#bc101b;--tb-brand-deep:#950c17;--tb-text:#1c2428;--tb-border:#e9ecef;--tb-content:1240px}
body{color:var(--tb-text);-webkit-font-smoothing:antialiased}
/* Preserve ColorMag header functionality, update only its navigation finish. */
#site-navigation,.main-navigation,.cm-primary-nav,.cm-header-nav{transition:background-color .2s ease}
@media(min-width:768px){
 #site-navigation,.main-navigation:not(.mobile-menu),.cm-primary-nav,.cm-header-nav{background:var(--tb-brand-red)}
 #site-navigation a,.main-navigation:not(.mobile-menu) a,.cm-primary-nav a,.cm-header-nav a{color:#fff}
 #site-navigation a:hover,.main-navigation:not(.mobile-menu) a:hover,.cm-primary-nav a:hover,.cm-header-nav a:hover{color:#fff;background:rgba(0,0,0,.12)}
}
/* Plugin homepage is the only content whose layout we deliberately alter. */
.tnl-page-shell{max-width:1320px;padding-inline:clamp(15px,2.5vw,28px)}
.tnl-page-shell .tnl-home{--tnl-red:var(--tb-brand-red);max-width:var(--tb-content);padding-top:20px}
.tnl-home .tnl-section-heading{border-bottom:1px solid var(--tb-border)}
.tnl-home .tnl-section-heading h2{font-weight:750;letter-spacing:0}
.tnl-home .tnl-card{border-color:var(--tb-border);box-shadow:0 1px 2px rgba(10,20,35,.025);transition:box-shadow .2s ease,transform .2s ease}
.tnl-home .tnl-card:hover{box-shadow:0 7px 24px rgba(10,20,35,.09);transform:translateY(-1px)}
.tnl-home .tnl-card h3{color:#171d23}
.tnl-home .tnl-card a:focus-visible,.tnl-home a:focus-visible{outline:3px solid #1673bf;outline-offset:2px}
.tnl-home .tnl-ticker{background:#f9fafb;border:1px solid #eef0f1}
.tnl-home .tnl-hero-overlay{background:linear-gradient(0deg,rgba(0,0,0,.9),rgba(0,0,0,.06) 78%)}
.tnl-home .tnl-topics{background:#fff4f4}
/* Footer finish: keep original dynamic widget/content markup intact. */
#colophon,.cm-footer,.footer-socket-wrapper{border-top:3px solid var(--tb-brand-red)}
#colophon a:hover,.cm-footer a:hover{color:var(--tb-brand-red)}
@media(max-width:767px){.tnl-page-shell{padding-inline:12px}.tnl-page-shell .tnl-home{padding-top:12px}.tnl-home .tnl-card:hover{transform:none}}
@media(prefers-reduced-motion:reduce){.tnl-home .tnl-card{transition:none}}

/* v0.1.2: conservative refinements scoped to the observed ColorMag header. */
@media (min-width: 768px) {
  /* Preserve the configured logo while preventing it from consuming the masthead. */
  #masthead .custom-logo-link img,
  #masthead .site-logo img,
  #masthead .cm-header-logo img,
  #masthead .site-branding img.custom-logo {
    max-height: 80px;
    max-width: min(100%, 380px);
    width: auto;
    height: auto;
    object-fit: contain;
  }
  /* A real logo is present: suppress redundant text title, not the logo. */
  #masthead .site-branding:has(.custom-logo-link) .site-title,
  #masthead .site-branding:has(.custom-logo-link) .site-description,
  #masthead .site-branding:has(.site-logo img) .site-title,
  #masthead .site-branding:has(.site-logo img) .site-description {
    display: none;
  }
  #site-navigation,
  #masthead #site-navigation,
  #masthead .main-navigation,
  #masthead .cm-primary-nav,
  #masthead .cm-header-nav,
  .cm-header .cm-primary-nav {
    background-color: var(--tb-brand-red);
  }
}
/* Only the bespoke full-width page is widened; standard post pages are not touched. */
body:has(.tnl-page-shell) .tnl-page-shell {
    width: min(100%, 1360px);
    max-width: 1360px;
    margin-inline: auto;
    padding-inline: clamp(16px, 3vw, 36px);
}
body:has(.tnl-page-shell) .tnl-page-shell .tnl-home {
    width: 100%;
    max-width: none;
}
@media(max-width:767px) {
  #masthead .custom-logo-link img,
  #masthead .site-logo img,
  #masthead .cm-header-logo img {max-width: min(100%, 270px);max-height: 68px;width:auto;height:auto;}
  body:has(.tnl-page-shell) .tnl-page-shell {padding-inline:12px;}
}

/* v0.1.3: header/branding overrides for current ColorMag variants.
   Do not modify core posts, menus, or ColorMag header PHP. */
@media (min-width: 768px) {
  /* The supplied logo already contains the newspaper name. */
  #masthead .site-branding .site-title,
  #masthead .site-branding .site-description,
  #masthead .cm-site-branding .cm-site-title,
  #masthead .cm-site-branding .cm-site-description,
  #masthead .cm-site-title,
  #masthead .cm-site-description,
  .cm-header .cm-site-title,
  .cm-header .cm-site-description { display:none !important; }
  /* Keep the image proportionate and retain the original logo itself. */
  #masthead .custom-logo,
  #masthead .custom-logo-link img,
  #masthead .site-logo img,
  #masthead .cm-header-logo img,
  .cm-header .custom-logo,
  .cm-header .cm-site-logo img { width:auto !important; height:auto !important; max-width:360px !important; max-height:78px !important; object-fit:contain; }
  /* Different ColorMag header generations use different nav wrappers. */
  #site-navigation,
  #masthead .main-navigation,
  #masthead .cm-primary-nav,
  .cm-header .cm-primary-nav,
  .cm-header .cm-primary-nav-container,
  .cm-header .cm-below-header,
  #masthead .cm-header-bottom,
  .cm-header .cm-header-bottom { background-color:#bc101b !important; }
  #site-navigation a,
  #masthead .main-navigation a,
  .cm-header .cm-primary-nav a,
  .cm-header .cm-primary-nav-container a { color:#fff; }
}
/* Keep the new news landing page visually separate from theme widget CSS. */
.tnl-page-shell .tnl-home { margin-inline:auto; }
@media (max-width:767px) {
  #masthead .custom-logo,
  .cm-header .custom-logo { width:auto !important; height:auto !important; max-width:270px !important; max-height:65px !important; }
}


/* v0.2.0: custom landing-page chrome, scoped to TNL preview template. */
body.tb-news-landing{background:#fff;margin:0}
.tb-news-landing .tb-site-header,.tb-news-landing .tb-site-footer{font-family:inherit;box-sizing:border-box}
.tb-news-landing .tb-site-header *,.tb-news-landing .tb-site-footer *{box-sizing:border-box}
.tb-container{width:min(100% - 36px,1200px);margin-inline:auto}
.tb-util{background:#f6f7f8;border-bottom:1px solid #e5e7eb;color:#444;font-size:12px}
.tb-util-row{display:flex;justify-content:space-between;align-items:center;gap:18px;min-height:35px}
.tb-util a,.tb-footer-links a{text-decoration:none;color:inherit}
.tb-util-links{display:flex;gap:18px;flex-wrap:wrap}
.tb-brand-row{display:flex;align-items:center;justify-content:space-between;gap:24px;min-height:124px;padding-block:18px}
.tb-logo{display:block;max-width:360px;min-width:0}
.tb-logo .custom-logo-link{display:block}
.tb-logo .custom-logo{display:block;max-width:100%;max-height:82px;width:auto;height:auto;object-fit:contain}
.tb-logo-name{font-size:32px;font-weight:800;color:#bd101c;text-decoration:none}
.tb-header-right{display:flex;flex:1;align-items:center;justify-content:flex-end;gap:18px}
.tb-ad-slot{min-height:76px;max-width:520px;flex:1;background:#f5f6f7;border:1px dashed #d5d9de;color:#717784;display:grid;place-items:center;text-align:center;font-size:13px;padding:12px}
.tb-search{display:flex;max-width:250px;border:1px solid #dce0e4;border-radius:3px;overflow:hidden;background:#fff}
.tb-search input{border:0!important;box-shadow:none!important;min-width:0;width:100%;font-size:14px;padding:10px}
.tb-search button{border:0;background:#b80d1a;color:white;padding:0 14px;font-weight:700;cursor:pointer}
.tb-main-nav{background:#bd101c;color:#fff;border-top:1px solid #a30e18}
.tb-menu-row{display:flex;align-items:center;gap:10px}
.tb-menu-toggle{display:none;border:1px solid rgba(255,255,255,.5);background:transparent;color:white;padding:8px 12px;margin:8px 0;cursor:pointer}
.tb-primary-menu{margin:0;padding:0;display:flex;flex-wrap:wrap;list-style:none;align-items:stretch}
.tb-primary-menu li{position:relative;list-style:none;margin:0}
.tb-primary-menu a{display:block;padding:14px 12px;color:#fff!important;font-weight:700;font-size:14px;text-decoration:none}
.tb-primary-menu a:hover,.tb-primary-menu a:focus-visible,.tb-primary-menu .current-menu-item>a{background:#8f101b;color:#fff!important}
.tb-primary-menu ul{display:none;position:absolute;z-index:90;top:100%;left:0;min-width:190px;padding:0;margin:0;list-style:none;background:#a20f1a;box-shadow:0 6px 20px rgba(0,0,0,.12)}
.tb-primary-menu li:hover>ul,.tb-primary-menu li:focus-within>ul{display:block}
.tb-primary-menu ul ul{top:0;left:100%}
body.tb-news-landing .tnl-page-shell{max-width:1240px!important;width:100%!important;padding:0 18px!important;margin:0 auto!important}
body.tb-news-landing .tnl-page-shell .tnl-home{max-width:1200px!important;margin-inline:auto!important;padding-top:27px!important}
.tb-site-footer{background:#191e24;color:#e4e7eb;border-top:4px solid #c41623;padding-top:38px}
.tb-footer-grid{display:grid;grid-template-columns:1.35fr 1fr 1fr;gap:36px;padding-bottom:32px}
.tb-footer-grid h2{color:#fff;font-size:18px;margin:0 0 12px}
.tb-footer-grid p{margin:0 0 11px;font-size:14px;line-height:1.8;color:#d7dce0}
.tb-footer-brand .custom-logo{max-height:54px;max-width:230px;height:auto;width:auto}
.tb-footer-brand .custom-logo-link{display:inline-block;background:#fff;border-radius:4px;padding:5px 9px;margin-bottom:12px}
.tb-footer-links{list-style:none;margin:0;padding:0}
.tb-footer-links li{margin:0 0 9px;font-size:14px}
.tb-site-footer a{color:#e4e7eb}
.tb-site-footer a:hover{color:#fff;text-decoration:underline}
.tb-footer-bottom{border-top:1px solid #363d44;padding:16px 0;font-size:12px;color:#c4cbd0}
@media(max-width:900px){.tb-brand-row{flex-wrap:wrap;min-height:0}.tb-header-right{width:100%;flex-basis:100%;justify-content:space-between}.tb-ad-slot{max-width:none}.tb-footer-grid{grid-template-columns:1fr 1fr}}
@media(max-width:680px){.tb-container{width:min(100% - 24px,1200px)}.tb-util-row{align-items:flex-start;padding-block:7px;flex-direction:column;gap:5px}.tb-util-links{gap:12px}.tb-brand-row{padding:14px 0}.tb-logo .custom-logo{max-height:65px}.tb-header-right{flex-direction:column;align-items:stretch}.tb-ad-slot{min-height:46px}.tb-search{max-width:none}.tb-menu-toggle{display:block}.tb-menu-row{display:block}.tb-primary-menu{display:none;flex-direction:column;width:100%}.tb-primary-menu.tb-menu-open{display:flex}.tb-primary-menu li{width:100%}.tb-primary-menu a{padding:10px 12px}.tb-primary-menu ul,.tb-primary-menu ul ul{display:block;position:static;min-width:0;box-shadow:none;padding-left:15px;background:#a50d19}.tb-footer-grid{grid-template-columns:1fr;gap:22px}body.tb-news-landing .tnl-page-shell{padding:0 12px!important}}
@media(prefers-reduced-motion:reduce){.tb-site-header *{scroll-behavior:auto}}


/* v0.2.1 — scoped responsive refinements and accessible landing controls. */
.tb-news-landing .tb-ad-slot{overflow:hidden;min-width:0}
.tb-news-landing .tb-ad-widget{width:100%;min-width:0;text-align:center}
.tb-news-landing .tb-ad-widget img{display:block;max-width:100%;height:auto;margin-inline:auto}
.tb-news-landing .tb-ad-widget iframe{max-width:100%;border:0}
.tb-news-landing .tb-ad-widget .wp-block-image{margin:0}
.tb-news-landing .tb-search{min-width:0}
.tb-news-landing .tb-search input{max-width:100%}
.tb-news-landing :is(.tb-search button,.tb-menu-toggle,.tb-primary-menu a,.tb-footer-links a):focus-visible{outline:3px solid #ffd54d;outline-offset:3px}
.tb-news-landing .tb-footer-grid{align-items:start}
.tb-news-landing .tb-footer-brand p{overflow-wrap:anywhere}
.tb-news-landing .tb-site-footer a{overflow-wrap:anywhere}
.tb-news-landing .tb-logo .custom-logo{max-width:min(100%,340px)}
@media (min-width:1000px){
 body.tb-news-landing .tnl-page-shell{max-width:1320px!important;padding-inline:24px!important}
 body.tb-news-landing .tnl-page-shell .tnl-home{max-width:1240px!important}
 .tb-news-landing .tb-container{width:min(100% - 48px,1240px)}
}
@media (max-width:900px){
 .tb-news-landing .tb-header-right{gap:12px}
 .tb-news-landing .tb-ad-slot{min-height:56px}
 .tb-news-landing .tb-search{flex:0 1 260px}
 .tb-news-landing .tb-primary-menu a{padding:12px 10px}
}
@media(max-width:680px){
 .tb-news-landing .tb-util{font-size:11px}
 .tb-news-landing .tb-brand-row{gap:12px}
 .tb-news-landing .tb-logo{max-width:100%}
 .tb-news-landing .tb-header-right{gap:10px}
 .tb-news-landing .tb-ad-slot{min-height:46px;padding:7px}
 .tb-news-landing .tb-search{flex:auto;width:100%}
 .tb-news-landing .tb-search input{min-height:42px}
 .tb-news-landing .tb-menu-toggle{min-height:44px}
 .tb-news-landing .tb-primary-menu a{min-height:42px;display:flex;align-items:center}
 .tb-news-landing .tb-footer-grid{padding-bottom:20px}
 .tb-news-landing .tb-site-footer{padding-top:28px}
}
@media(max-width:380px){
 .tb-news-landing .tb-util-links{gap:8px}
 .tb-news-landing .tb-logo .custom-logo{max-height:58px}
}
