/* ১. ডার্ক মোড সাপোর্টেড ভেরিয়েবল */
:root {
    --card-bg: #ffffff;
    --card-text: #333333;
    --card-shadow: rgba(0, 0, 0, 0.1);
    --card-border: #f0f0f0;
    --overlay-gradient: linear-gradient(to top, rgba(0, 0, 0, 0.9) 10%, rgba(0, 0, 0, 0.4) 60%, transparent 100%);
}

/* ডার্ক থিম অ্যাক্টিভ হলে ভেরিয়েবল পরিবর্তন */
body.dark-theme .news-item, 
body.dark .news-item {
    --card-bg: #1e1e1e;
    --card-text: #e0e0e0;
    --card-shadow: rgba(0, 0, 0, 0.5);
    --card-border: #333333;
}

/* ২. স্লাইডার কন্টেইনার */
.slider-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    overflow: hidden;
    position: relative;
    padding: 15px 5px;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); 
    gap: 15px;
}

@media (min-width: 1024px) {
    .news-grid {
        grid-template-columns: repeat(3, 1fr); 
        gap: 20px;
    }
}

/* ৩. নিউজ কার্ড (Overlay Style) */
.news-item {
    display: flex; /* স্লাইডার লজিকের জন্য flex ব্যবহার করা ভালো */
    position: relative; /* টেক্সট বক্সকে ছবির ওপর আনার জন্য জরুরি */
    flex-direction: column;
    background: #000; /* ইমেজের পেছনে ডার্ক ব্যাকগ্রাউন্ড */
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px var(--card-shadow) !important; 
    border: none;
    height: 280px; /* আপনার প্রয়োজনমতো হাইট সেট করুন */
}

.news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px var(--card-shadow) !important;
}

/* ৪. ইমেজ সেটআপ - এটি পুরো কার্ড জুড়ে থাকবে */
.news-img { 
    position: absolute; 
    top: 0;
    left: 0;
    width: 100%; 
    height: 100%; 
    z-index: 1;
}

.news-img img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    transition: 0.6s; 
}

.news-item:hover .news-img img { 
    transform: scale(1.1); 
}

/* ৫. টেক্সট কন্টেন্ট (ওভারলে বক্স) */
.card-content { 
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px 15px; 
    background: var(--overlay-gradient);
    z-index: 2; /* ইমেজের উপরে রাখার জন্য */
    box-sizing: border-box;
}

.news-cat a { 
    font-size: 11px; 
    font-weight: bold; 
    color: #fff !important; /* ওভারলেতে সবসময় সাদা */
    background: #ed1c24; /* লাল ব্যাকগ্রাউন্ড */
    padding: 2px 8px;
    border-radius: 3px;
    text-decoration: none; 
    text-transform: uppercase;
}

.news-title { 
    font-size: 16px; 
    font-weight: bold; 
    line-height: 1.4; 
    max-height: 45px; 
    overflow: hidden; 
    margin-top: 8px;
}

.news-title a { 
    color: #ffffff !important; /* ওভারলেতে সবসময় সাদা ভালো লাগে */
    text-decoration: none; 
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
}

/* ৬. স্লাইডার কন্ট্রোল এরিয়া */
.slider-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
}

.nav-btn { 
    width: 40px; height: 40px; border-radius: 50%; 
    border: 1px solid var(--card-border); 
    background: var(--card-bg); 
    cursor: pointer; 
    color: var(--card-text); 
    transition: 0.3s; 
}

.bar-bg { flex-grow: 1; height: 4px; background: var(--card-border); margin: 0 15px; position: relative; }
.bar-fill { position: absolute; height: 100%; background: #ed1c24; width: 0%; transition: width 0.6s ease; }
