/*
 Theme Name:  ColorMag Child
 Theme URI:   https://themegrill.com/themes/colormag/
 Description: Child theme for ColorMag
 Author:      Asif Mohiuddin
 Template:    colormag
 Version:     1.0.0
 Text Domain: colormag-child
*/

/* ---------------------------------------------------------
   PRIMARY TEST FONT: Tiro Bangla (Google Fonts)
   ---------------------------------------------------------
   HEAD উদাহরণ:
   <link rel="preconnect" href="https://fonts.googleapis.com">
   <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
   <link href="https://fonts.googleapis.com/css2?family=Tiro+Bangla:ital@0;1&display=swap" rel="stylesheet">
   - Tiro Bangla: Regular (400) + Italic (400)
   - Bold নেই; ব্রাউজার সিন্থেটিক বোল্ড করবে (600/700 দিলে)
*/

/* === Bengali fonts kept === */
/* 1) Tiro Bangla — self-hosted fallback (Google Fonts থাকলে ঐচ্ছিক) */
@font-face{
  font-family:'Tiro Bangla';
  src:url('https://assets.shongshoy.com/Fonts/tiro-bangla-bengali-400-normal.woff2') format('woff2');
  font-weight:400; font-style:normal; font-display:swap;
}
@font-face{
  font-family:'Tiro Bangla';
  src:url('https://assets.shongshoy.com/Fonts/tiro-bangla-bengali-400-italic.woff2') format('woff2');
  font-weight:400; font-style:italic; font-display:swap;
}

/* 2) Li Shobuj Nolua (local, WOFF2) */
@font-face {
  font-family: 'ShobujNolua';
  src:
    local('Li Shobuj Nolua Unicode'),
    url('https://assets.shongshoy.com/Fonts/Li%20Shobuj%20Nolua%20Unicode.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* --------------------------------
   Root variables — Tiro Bangla first
----------------------------------- */
:root{
  --bn-sans: "Tiro Bangla",
             -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;

  --shongshoy-font: var(--bn-sans);
  --font-shobuj: 'ShobujNolua', var(--bn-sans);
}

/* --------------------------------
   Tiro Bangla utilities
----------------------------------- */
.font-tiro, .tiro, .font-bn {
  font-family: "Tiro Bangla", sans-serif !important;
  font-style: normal;
  font-weight: 400;
}
.tiro-regular { font-family:"Tiro Bangla", sans-serif; font-weight:400; font-style:normal; }
.tiro-italic  { font-family:"Tiro Bangla", sans-serif; font-weight:400; font-style:italic; }
.tiro-bold    { font-family:"Tiro Bangla", sans-serif; font-weight:700; } /* synthetic bold */

/* Generic weight helpers */
.fw-400 { font-weight:400; }
.fw-500 { font-weight:500; } /* synthesizes on Tiro */
.fw-600 { font-weight:600; } /* synthesizes on Tiro */
.fw-700 { font-weight:700; } /* synthesizes on Tiro */
.fw-800 { font-weight:800; } /* synthesizes on Tiro */

/* --------------------------------
   Base typography
----------------------------------- */
body{
  font-size:1.8rem;
  font-family: var(--shongshoy-font) !important;
}
h2{font-size:3.2rem;}
h3{font-size:2.8rem;}
h4{font-size:2.4rem;}

/* Headline weights — synthetic bold acceptable */
h1, .entry-title, .pmb-posts .entry-title { font-weight:700; }
h2, h3 { font-weight:600; }
h4, h5, h6 { font-weight:600; }

/* Keep italics ON (Tiro Bangla supports italic) */
em, i { font-style: italic; font-weight: 400; }

/* Layout width */
#page { max-width:1250px; margin:0 auto; }
@media (min-width:1366px){ #page{ max-width:1400px; } }
@media (min-width:1600px){ #page{ max-width:1440px; } }
.cm-container{ max-width:95%; }
.bpress-wrap{ max-width:99%; }

/* Apply Bengali fonts broadly */
.cm-primary-nav li, h1,h2,h3,h4,h5,h6, p, pre, span, sup, ol.footnotes li,
.main-navigation a, div, li, blockquote p, abbr, acronym, address, big, cite, code, del, dfn, em, font,
ins, kbd, q, s, samp, small, strike, sub, tt, var, dl, dt, dd, ol, ul, fieldset, form, label, legend,
table, caption, tbody, thead, tr, th, td, .wp-block-quote p, .wp-block-quote.is-style-large p,
.wp-block-quote.has-text-align-right p, h1.entry-title, h2.entry-title,
h2.entry-title a:hover, h2.entry-title a:active, .footer-column-three h3, article h1, article h2,
article h3, article h4, article h5, article h6, .login label, .login #backtoblog a, .login #nav a,
.site-title, .site-title h1 {
  font-family: var(--shongshoy-font);
}

/* Code & quotes */
.wp-block-code code { font-size:1.6rem; font-family: var(--shongshoy-font); }
blockquote p, .wp-block-quote p { line-height:1.6; }
.wp-block-quote{ margin-bottom:1.5em; }

/* Buttons */
.wp-block-button .wp-block-button__link{ border-radius:8px; }
.wp-block-button__link{ background-color:#cc3d64; padding:0 1rem; }
.pmb-print-this-page.wp-block-button{ margin-bottom:20px; display:block; width:fit-content; }

/* Navigation */
#cm-primary-nav{ border-top-color:#de1303; }
.main-navigation ul li .sub-arrow,
.super-menu .toggle-mobile-menu,
.toggle-mobile-menu:before,
.mobile-menu-active .smenu-hide { font-size:1.8rem; }
.cm-primary-nav a{ font-size:2rem; }

/* --------------------------------
   Quick helpers
----------------------------------- */
.font-ssui    { font-family: var(--shongshoy-font) !important; }
.font-shobuj  { font-family: 'ShobujNolua', var(--bn-sans) !important; }

/* TOC */
#toc_container{
  background-color:#f9f9f9; line-height:1.2; border-radius:10px;
  box-shadow:0 3px 6px rgba(0,0,0,.15);
}
#toc_container li{ line-height:1.4; }
.toc_title{ padding:10px 0 0 20px; }
#toc_container p.toc_title{ font-size:2.8rem; }

/* Blockquotes */
.wp-block-quote{ margin-left:-1rem; padding-left:1rem; }
blockquote, .wp-block-quote, .wp-block-quote.is-style-large, .wp-block-quote.has-text-align-right{
  border-radius:8px; border-left:1px solid #428bca; color:#0e0f0e; background:#E5E4E2;
  box-shadow:0 2px 6px rgba(70,130,180,.35);
}
blockquote a, .wp-block-quote a, .wp-block-quote.is-style-large a, .wp-block-quote.has-text-align-right a{ color:#13952f; }
blockquote p, .wp-block-quote p{ font-size:1.8rem; padding:2rem !important; }
blockquote p::before, .wp-block-quote p::before{ display:none; }
blockquote a:link{ color:green; }
blockquote a:hover{ color:red; }

/* Footer */
.footer-socket-wrapper .copyright{ color:#cc3d64; }
.footer-socket-wrapper .copyright a{ color:#64c1ff; }
.footer-socket-left-section{ float:left !important; }

/* Responsive tweaks */

@media print{
  .pmb-image::after{ content:""; display:block; width:100%; height:1px; background-color:#428bca; margin-top:20px; }
  .pmb-image img{ max-height:none !重要; }
  .wp-block-image{ max-height:auto !important; }
  blockquote, .wp-block-quote, .wp-block-quote.is-style-large, .wp-block-quote.has-text-align-right{
    border-radius:8px; border:2px solid #428bca; color:#0e0f0e; background:#E5E4E2;
    box-shadow:0 2px 6px rgba(70,130,180,.35); padding:15px; margin:20px 0;
  }
  blockquote p, .wp-block-quote p{ font-size:1em; }
  .wp-dark-mode-floating-switch{ display:none !important; }
  .pmb-video-wrapper, .wp-block-embed, .wp-block-embed.is-type-video,
  iframe[src*="youtube.com"], iframe[src*="vimeo.com"], iframe[src*="canva.com"], iframe[src*="facebook.com"],
  .pmb-video-inner-wrapper{ display:none !important; }
}

/* Misc */
.quotes_box_and_tips{ padding-bottom:4rem; }
.slider-featured-image a img, .widget_highlighted_posts img, .widget_featured_posts img,
.single-related-posts img, .comment-content, .author-box{ border-radius:10px; }
#content .post img{ border-radius:10px; }

/* Lighter widget shadows for performance */
.cm-secondary .widget,
#secondary .widget,
.widget_featured_posts,
.tg-footer-main-widget, .tg-footer-other-widgets,
.footer-socket-left-section, .footer-socket-right-section,
#eu-cookie-law {
  padding:12px; border-radius:5px;
  box-shadow:0 1px 3px rgba(0,0,0,.2);
  -webkit-box-shadow:0 1px 3px rgba(0,0,0,.2);
  -moz-box-shadow:0 1px 3px rgba(0,0,0,.2);
}

.cm-entry-summary p{ font-size:1.8rem; }
.pmb-posts-header{
  margin-bottom:2em; border-radius:10px; box-shadow:0 3px 8px rgba(0,0,0,.2);
  border:1px solid #aaa; padding:20px; font-size:95%; text-align:center; background-color:#fff;
}
.pmb-posts .entry-title{
  color:#de6060; border-radius:10px; box-shadow:0 3px 8px rgba(0,0,0,.2);
  border:1px solid #aaa; padding:17px; font-size:4rem !important; text-align:center;
}
.footnote-identifier-link{ font-size:1.6rem; }

@media screen and (min-width:62em){
  .cm-lower-footer-cols .cm-lower-footer-col--1,
  .cm-lower-footer-cols .cm-lower-footer-col{ border-right:1px solid #7691ad; width:40%; }
}
figure{ text-align:left; }
.cm-secondary .widget{ background-color:azure; }

@media only screen and (max-width:768px){ .cm-site-branding img{ width:70%; } }
#header-right-sidebar{ width:220px; }
#cm-site-branding{ width:240px; }
ol.footnotes li{ font-style:italic; }
@media (max-width:768px){ .bpress-wrap{ padding:2px; } }

.asif-footnote { position: relative; }
.asif-footnote a[data-asif-note]{ cursor: inherit; }

/* Footnotes block cosmetics */
.asif-footnotes { margin-top: 2rem; border-top: 1px solid rgba(0,0,0,.1); padding-top: 1rem; }
.asif-footnotes ol { margin: .5rem 0 0 1.25rem; }
.asif-footnote-backref { text-decoration: none; }

/* ===== KB only: indent Asif footnotes to the right ===== */
#page .bpress-wrap section.asif-footnotes,
#page .bpress-wrap .asif-footnotes,
body.post-type-bp_article section.asif-footnotes,
body.single-bp_article section.asif-footnotes,
body.post-type-knowledgebase section.asif-footnotes,
body.single-knowledgebase section.asif-footnotes {
  margin-left: 24px !important;
  padding-left: 12px;
}

/* ভিতরের তালিকাকে থিমের মার্জিন ওভাররাইড করে সুন্দর ইন্ডেন্ট দিন */
#page .bpress-wrap section.asif-footnotes > ol {
  margin-left: 0 !important;
  padding-left: 1.25rem !important;
  list-style-position: outside;
}

/* মোবাইলে একটু কম ইন্ডেন্ট */
@media (max-width: 768px){
  #page .bpress-wrap section.asif-footnotes { margin-left: 14px !important; }
}

/* Child theme override */
.cm-footer-menu ul {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	column-gap: 16px;
	row-gap: 4px;
	list-style: none;
}
.selector-name { 
  opacity: 0.7;
}
