/*
Theme Name: SmartMag Child
Template: smart-mag
Version: 1.1
*/

/* ==========================================================================
   1. RisingBD Style Social Share Section
   ========================================================================== */
.rbd-share-wrapper { margin-top: 30px; position: relative; }
.rbd-share-label { font-size: 18px; font-weight: bold; margin-bottom: 12px; color: #333; }
.rbd-share-footer { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; align-items: center; }

.rbd-box {
    width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
    border: 1px solid #ddd; border-radius: 10px; background: #fff; transition: all 0.3s ease;
}
.rbd-box img { width: 18px; height: 18px; object-fit: contain; }
.rbd-box:hover { transform: scale(1.15); border-color: #999; box-shadow: 0 4px 8px rgba(0,0,0,0.1); }

.rbd-more-grid {
    display: none; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px; background: #f9f9f9; padding: 20px; border: 1px solid #eee; border-radius: 8px; margin-bottom: 20px;
}
.rbd-more-grid.rbd-show { display: grid; animation: rbdFadeIn 0.4s ease; }
.rbd-more-grid a { color: #fff !important; padding: 10px; text-align: center; border-radius: 5px; font-size: 14px; font-weight: bold; text-decoration: none !important; }

.rbd-bottom-line { border-top: 1px solid #eee; margin-top: 15px; width: 100%; }

/* /* ==========================================================================
   2. Ad Widget Layouts - Dynamic Flex
   ========================================================================== */

/* উইজেট কন্টেইনার */
.nbd-ad-wrapper { 
    margin: 15px 0; 
    text-align: center; 
}

.nbd-ad-wrapper img { 
    max-width: 100% !important; 
    height: auto !important; 
    display: block; 
    margin: 0 auto; 
    border-radius: 4px; 
}

/* ডাইনামিক বিজ্ঞাপন এরিয়া - ১টি হলে ফুল, ২টি হলে পাশাপাশি */
.nbd-ad-area-flex { 
    display: flex !important; 
    flex-wrap: wrap !important; 
    gap: 15px !important; 
    justify-content: center !important; 
    margin: 20px 0 !important;
    width: 100% !important;
}

/* ডাইনামিক উইথ লজিক */
.nbd-ad-area-flex .nbd-ad-wrapper { 
    flex: 1 1 300px !important; /* ৩০০ পিক্সেল এর বেশি জায়গা থাকলে বড় হবে */
    max-width: 100% !important; /* ডিফল্ট ফুল উইথ */
    margin: 0 !important; 
}

/* স্লাইডবারের বিজ্ঞাপন */
.nbd-sidebar-ad-top { 
    display: block !important; 
    visibility: visible !important; 
    opacity: 1 !important;
    margin-bottom: 25px; 
    text-align: center; 
}

/* মোবাইল রেসপন্সিভ */
@media only screen and (max-width: 600px) {
    .nbd-ad-area-flex .nbd-ad-wrapper { 
        flex: 1 1 100% !important; 
    }
}

/* স্লাইডবারের উপরের বিজ্ঞাপনের ঝিলিক বন্ধ করা */
.nbd-sidebar-ad-top { 
    display: block !important; 
    visibility: visible !important; 
    opacity: 1 !important;
    margin-bottom: 25px; 
    text-align: center; 
}

@keyframes rbdFadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* মোবাইল রেসপন্সিভ - মোবাইলে বিজ্ঞাপন নিচে নিচে আসবে */
@media only screen and (max-width: 600px) {
    .nbd-ad-area-flex { flex-wrap: wrap !important; }
    .nbd-ad-area-flex .nbd-ad-wrapper { max-width: 100% !important; flex: 1 1 100% !important; }
.lazyload, .lazyloading {
    opacity: 1 !important;
    transition: none !important;
}
}
/* স্মার্টম্যাগ সিঙ্গেল পেজের মূল গ্রিড রেস্ট্রিকশন */
body.single-post div.main-wrap > div.ts-contain,
body.single-post div.main-wrap > div.container,
body.single-post .site-content .ts-contain {
    max-width: 1200px !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
}
/* কাস্টম কন্টেইনার সাইজ অ্যাডজাস্টমেন্ট */
.nbd-custom-container {
    max-width: 1240px !important; /* এটি হোমপেজের সাথে মিলিয়ে ১২০০px, ১২৪০px বা ১২৮০px করে নিতে পারেন */
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
}
/* কন্টেন্ট এরিয়ার পুরো চওড়া জুড়ে ফিচার্ড ইমেজ স্কেল করার ফিক্স */
div.nbd-featured-img,
.nbd-featured-img a {
    display: block !important;
    width: 100% !important;
}

div.nbd-featured-img img,
.nbd-featured-img a img {
    min-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
}
/* কন্টেন্ট এলাকার সব প্যারাগ্রাফ জোরপূর্বক জাস্টিফাই করার শতভাগ কার্যকরী কোড */
.nbd-article-content p,
#nbd-article-body p,
.entry-content p,
.post-content p {
    text-align: justify !important;
    text-justify: inter-word !important;
    -webkit-text-align-last: left;
    text-align-last: left;
}
/* ফুটারের নিচের অনাকাঙ্ক্ষিত বিশাল ফাঁকা জায়গা দূর করার স্ট্রাকচারাল ফিক্স */
#page, 
#main, 
.main-wrap, 
.site-content {
    min-height: auto !important;
    height: auto !important;
    flex-grow: 0 !important;
}

body.single-post footer.main-footer,
body.single-post .site-footer {
    margin-top: 30px !important;
    position: relative !important;
}