/* =========================================================
   1. Base Grid & Card Styles (Layout 3 & 4)
   ========================================================= */
.jemim-grid-wrapper {
    display: grid !important;
    gap: 30px !important; 
    width: 100% !important;
}

.jemim-item {
    background: #fff !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05) !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important; 
}

/* =========================================================
   2. Image Settings (Layout 3 & 4)
   ========================================================= */
.jemim-thumb {
    width: 100% !important;
    background: #f8f9fa !important;
    position: relative !important;
    aspect-ratio: 16 / 10 !important; 
    overflow: hidden !important;
}

.jemim-thumb a {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
}

.jemim-thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important; 
    object-position: center !important;
    display: block !important;
}

.jemim-content {
    padding: 20px !important; 
    flex-grow: 1 !important;
    display: flex !important;
    flex-direction: column !important;
}

/* =========================================================
   3. Typography & Line Clamp (টাইটেল ফিক্স করা হয়েছে)
   ========================================================= */
   
/* author name কালার*/
   
   
.jemim-meta {
    font-size: 0.8rem !important;
    color: #120d3e !important;
    margin-bottom: 10px !important;
    text-transform: uppercase !important;
    font-weight: 600 !important;
}

.jemim-meta span {
    margin-right: 10px !important;
    display: inline-block !important;
}

.meta-cat { color: #0073aa !important; }
.meta-tag {
    background: #eee !important;
    padding: 2px 6px !important;
    border-radius: 4px !important;
    color: #555 !important;
}

/* 🟢 টাইটেল এখন ৪ লাইন পর্যন্ত স্পষ্টভাবে দেখাবে (৭-১০ শব্দের বেশি ধরবে) */
.jemim-title {
    margin: 0 0 10px 0 !important;
    font-size: 1.15rem !important; /* ফন্ট সাইজ সামান্য অপটিমাইজ করা হয়েছে যেন বেশি শব্দ ধরে */
    line-height: 1.5 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 4 !important; /* ২ এর বদলে ৪ লাইন করে দেওয়া হয়েছে */
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

.jemim-title a {
    color: #222 !important;
    text-decoration: none !important;
}

.jemim-excerpt {
    color: #111114 !important;
    margin-bottom: 15px !important;
    font-size: 0.95rem !important; 
    line-height: 1.6 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important; 
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

.jemim-read-more {
    display: inline-block !important;
    padding: 8px 16px !important;
    background: #0073aa !important;
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    align-self: flex-start !important;
    margin-top: auto !important; 
    transition: 0.2s background !important;
}

.jemim-read-more:hover {
    background: #005177 !important;
}

/* =========================================================
   4. Layout 4 Specifics (Zig-Zag Design)
   ========================================================= */
.jemim-layout4 {
    grid-template-columns: repeat(2, 1fr) !important; 
    gap: 30px !important; 
}
.jemim-layout4 .jemim-item {
    flex-direction: row !important; 
    align-items: center !important;
}
.jemim-layout4 .jemim-item:nth-child(4n-1),
.jemim-layout4 .jemim-item:nth-child(4n) {
    flex-direction: row-reverse !important; 
}
.jemim-layout4 .jemim-thumb {
    flex: 0 0 50% !important; 
    max-width: 50% !important; 
    aspect-ratio: 16 / 9 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}
.jemim-layout4 .jemim-thumb::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-image: inherit !important; 
    background-size: cover !important;
    background-position: center !important;
    filter: blur(10px) !important; 
    opacity: 0.3 !important; 
    transform: scale(1.1) !important; 
}
.jemim-layout4 .jemim-thumb a {
    position: relative !important;
    z-index: 1 !important;
}
.jemim-layout4 .jemim-thumb img {
    object-fit: contain !important; 
}
.jemim-layout4 .jemim-content {
    flex: 0 0 50% !important; 
    max-width: 50% !important; 
    padding: 25px !important;
}

/* =========================================================
   5. Layout 5 Specifics (Clean Creative Grid - No BG, Large Image)
   ========================================================= */
.jemim-layout5 {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 30px !important;
}
.jemim-layout5 .jemim-item {
    background: #fff !important;
    padding: 20px !important;
    border-radius: 8px !important;
    display: flex !important;
    flex-direction: column !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05) !important; 
}
.jemim-layout5-top {
    display: flex !important;
    gap: 20px !important;
    margin-bottom: 15px !important;
    align-items: center !important; 
}
.jemim-layout5 .jemim-item:nth-child(4n-1) .jemim-layout5-top,
.jemim-layout5 .jemim-item:nth-child(4n) .jemim-layout5-top {
    flex-direction: row-reverse !important;
}
.jemim-layout5 .jemim-thumb {
    flex: 0 0 55% !important; 
    max-width: 55% !important;
    border-radius: 8px !important;
    aspect-ratio: 16 / 10 !important;
    background: #f8f9fa !important;
}
.jemim-layout5 .jemim-title-wrap {
    flex: 1 !important; 
    background: transparent !important; 
    padding: 0 !important; 
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
}
.jemim-layout5 .jemim-excerpt-wrap {
    flex-grow: 1 !important;
    display: flex !important;
    flex-direction: column !important;
}








/* =========================================================
   6. Responsive Settings (মোবাইলে কেটে যাওয়া সমস্যার সমাধান)
   ========================================================= */
@media (max-width: 768px) {
    /* কন্টেইনারের সাইজ ১০০% ফিক্স করা হলো যেন বাইরে না যায় */
    .jemim-grid-wrapper {
        margin: 0 !important; 
        padding: 0 10px !important; 
        width: 100% !important;
        gap: 20px !important; 
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important; /* ডান পাশে বাড়তি অংশ দেখাবে না */
    }

    /* কার্ডের প্যাডিং এডজাস্টমেন্ট */
    .jemim-content, .jemim-layout4 .jemim-content, .jemim-layout5 .jemim-item {
        padding: 15px !important; 
    }

    /* লেআউট ৪ ও ৫ এর জন্য কলাম ফিক্স */
    .jemim-layout4, .jemim-layout5 {
        grid-template-columns: 1fr !important; 
    }
    
    /* মোবাইলে ছবি উপরে এবং লেখা নিচে থাকবে */
    .jemim-layout4 .jemim-item,
    .jemim-layout4 .jemim-item:nth-child(4n-1),
    .jemim-layout4 .jemim-item:nth-child(4n),
    .jemim-layout5 .jemim-layout5-top,
    .jemim-layout5 .jemim-item:nth-child(4n-1) .jemim-layout5-top,
    .jemim-layout5 .jemim-item:nth-child(4n) .jemim-layout5-top {
        flex-direction: column !important; 
        align-items: stretch !important;
        gap: 15px !important;
    }

    /* সব এলিমেন্টের উইডথ ১০০% নিশ্চিত করা */
    .jemim-layout4 .jemim-thumb,
    .jemim-layout4 .jemim-content,
    .jemim-layout5 .jemim-thumb,
    .jemim-layout5 .jemim-title-wrap,
    .jemim-item {
        flex: 0 0 auto !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    /* ইমেজের সাইজ ঠিক রাখা */
    .jemim-thumb img {
        aspect-ratio: 16 / 9 !important;
        object-fit: cover !important;
    }
}











/* TPG Custom Pagination Styles */
.tpg-custom-pagination {
    margin-top: 40px;
    text-align: center;
    width: 100%;
    clear: both;
}

.tpg-custom-pagination ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

.tpg-custom-pagination ul li {
    margin: 0;
    padding: 0;
}

.tpg-custom-pagination ul li a,
.tpg-custom-pagination ul li span.current {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    color: #4a5568;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.tpg-custom-pagination ul li a:hover {
    background-color: #f7fafc;
    border-color: #cbd5e0;
    color: #2d3748;
}

.tpg-custom-pagination ul li span.current {
    background-color: #3182ce;
    border-color: #3182ce;
    color: #ffffff;
}

.tpg-custom-pagination ul li span.dots {
    border: none;
    background: transparent;
    color: #a0aec0;
}





