/* ==========================================
   ১. মেইন লেআউট (সাইডবার ডানপাশে ফিক্স করার জন্য)
   ========================================== */

/* মেইন র‍্যাপার */
.mi-main-wrapper {
    display: flex;
    gap: 25px; /* কন্টেন্ট ও সাইডবারের দূরত্ব */
    align-items: flex-start;
    width: 100%;
    margin-top: 20px;
}

/* বাম পাশের মেইন কন্টেন্ট এলাকা (৭০% জায়গা নিবে) */
.mi-content {
    flex: 0 0 70%;
    max-width: 70%;
    min-width: 0; /* গ্রিডের কারণে সাইডবার যেন নিচে না নেমে যায় */
}

/* ডান পাশের সাইডবার এলাকা (৩০% জায়গা নিবে) */
#sidebarContainer {
    flex: 0 0 30%;
    max-width: 30%;
}


/* ==========================================
   ২. ক্যাটাগরি হেডার ও ফিল্টার বার
   ========================================== */

.mi-category-header {
    background: linear-gradient(135deg, #1a73e8 0%, #1557b0 100%);
    color: white;
    padding: 30px 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    text-align: center;
}

.mi-category-header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.mi-category-header p {
    font-size: 1rem;
    opacity: 0.9;
    margin: 0;
}

.mi-filter-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

.mi-filter-btn {
    padding: 8px 18px;
    border: 1px solid #dadce0;
    background: white;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.mi-filter-btn:hover,
.mi-filter-btn.active {
    background: #1a73e8;
    color: white;
    border-color: #1a73e8;
}


/* ==========================================
   ৩. গ্রিড কন্টেন্ট লেআউট (ছবি অনুযায়ী)
   ========================================== */

.mi-cat-top-grid, 
.mi-cat-bottom-grid {
    width: 100%;
    box-sizing: border-box;
}

/* ৩.১ প্রথম সারি: ২ কলামের গ্রিড (হেডলাইন ১ ও ২) */
.mi-cat-top-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid #e2e8f0;
}

/* টপ নিউজ ১: ছবির ওপরে লেখার ওভারলে */
.mi-top-news-overlay {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    height: 380px;
    background: #000;
}

.mi-top-news-overlay img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.85;
    transition: transform 0.4s ease;
}

.mi-top-news-overlay:hover img {
    transform: scale(1.03);
}

.mi-overlay-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    color: #fff;
}

.mi-overlay-content h2 {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 8px;
}

.mi-overlay-content h2 a {
    color: #fff;
    text-decoration: none;
}

.mi-overlay-content h2 a:hover {
    color: #38bdf8;
}

.mi-overlay-content .mi-time {
    font-size: 0.8rem;
    color: #cbd5e1;
}

/* টপ নিউজ ২: সাধারণ কার্ড */
.mi-top-news-card {
    background: #fff;
    display: flex;
    flex-direction: column;
}

.mi-top-news-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 12px;
}

.mi-top-news-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 8px;
}

.mi-top-news-card h3 a {
    color: #1e293b;
    text-decoration: none;
}

.mi-top-news-card h3 a:hover {
    color: #e11d48;
}

.mi-top-news-card p {
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.5;
    margin-bottom: 10px;
}

/* ৩.২ দ্বিতীয় সারি: ৩ কলামের বটম গ্রিড */
.mi-cat-bottom-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.mi-grid-card {
    background: #fff;
    display: flex;
    flex-direction: column;
}

.mi-grid-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 10px;
}

.mi-grid-card h4 {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 8px;
}

.mi-grid-card h4 a {
    color: #0f172a;
    text-decoration: none;
}

.mi-grid-card h4 a:hover {
    color: #e11d48;
}

.mi-grid-card p {
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.4;
    margin-bottom: 8px;
}

.mi-cat-time {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-top: auto;
}


/* ==========================================
   ৪. রেসপনসিভ (মোবাইল ও ট্যাবলেট ডিভাইসের জন্য)
   ========================================== */

@media (max-width: 991px) {
    .mi-main-wrapper {
        flex-direction: column;
    }
    
    .mi-content,
    #sidebarContainer {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .mi-cat-top-grid {
        grid-template-columns: 1fr;
    }

    .mi-top-news-overlay {
        height: 300px;
    }

    .mi-cat-bottom-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .mi-cat-bottom-grid {
        grid-template-columns: 1fr;
    }
}
