/* ===== রুট ভেরিয়েবল ===== */
:root {
    --primary: #0b57cf;
    --primary-dark: #204ecf;
    --primary-light: #2e51a2;
    --bg-color: #fffdfc;
    --text-color: #08102b;
    --text-light: #767676;
    --border-color: #eceff1;
    --header-bg: #fffdfc;
    --footer-bg: #fffdfc;
    --shadow: 0 2px 10px rgba(0,0,0,0.08);
    --radius: 8px;
    --transition: all 0.3s ease;
}

/* ডার্ক মোড ভেরিয়েবল */
.dark-mode {
    --bg-color: #1e1e1e;
    --text-color: #fffdfc;
    --text-light: #989b9f;
    --border-color: #2d2d30;
    --header-bg: #1e1e1e;
    --footer-bg: #1e1e1e;
    --shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* ===== বেসিক স্টাইল ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    transition: var(--transition);
    line-height: 1.6;
    padding-bottom: 70px;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    opacity: 0.8;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ===== নোটিফিকেশন বার ===== */
.notification-bar {
    background: #e8f0fe;
    color: #3c4043;
    padding: 10px 0;
    font-size: 13px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.notification-bar a {
    color: var(--primary);
    font-weight: 600;
}

/* ===== হেডার ===== */
.header {
    background: var(--header-bg);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 10px 0;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo h1 {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
    align-items: center;
    margin: 0;
    padding: 0;
}

.main-nav ul li a {
    color: var(--text-color);
    font-size: 14px;
    font-weight: 500;
    padding: 5px 0;
    border-bottom: 2px solid transparent;
}

.main-nav ul li a:hover {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.header-actions button {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 20px;
    padding: 5px;
    color: var(--text-color);
    transition: var(--transition);
}

.header-actions button:hover {
    color: var(--primary);
}

/* ===== স্লাইডার ===== */
.slider {
    padding: 20px 0;
    background: var(--bg-color);
}

.slider-wrapper {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 10px 0;
    scroll-behavior: smooth;
}

.slide {
    flex: 0 0 100%;
    scroll-snap-align: start;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.slide img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

/* ===== মেইন কন্টেন্ট ===== */
.main-content {
    padding: 20px 0;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 30px;
}

/* ===== ব্লগ পোস্ট ===== */
.section-header {
    margin-bottom: 25px;
}

.section-header h2 {
    font-size: 22px;
    font-weight: 700;
    position: relative;
    padding-bottom: 10px;
    color: var(--text-color);
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--primary);
}

.post-item {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.post-item:last-child {
    border-bottom: none;
}

.post-item:hover {
    transform: translateX(5px);
}

.post-thumb {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
}

.post-thumb img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: var(--transition);
}

.post-item:hover .post-thumb img {
    transform: scale(1.05);
}

.post-label {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--primary);
    color: #fff;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    z-index: 2;
}

.post-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.post-title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 10px;
}

.post-title a {
    color: var(--text-color);
}

.post-title a:hover {
    color: var(--primary);
}

.post-snippet {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-light);
}

.read-more {
    color: var(--primary);
    font-weight: 600;
}

/* ===== পেজিনেশন ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.pagination a {
    padding: 8px 16px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    font-size: 14px;
    transition: var(--transition);
}

.pagination a:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.pagination a.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* ===== সাইডবার ===== */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.widget {
    background: var(--bg-color);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.widget-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
}

/* জনপ্রিয় পোস্ট */
.popular-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.popular-list li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.popular-list li:last-child {
    border-bottom: none;
}

.popular-list li a {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-color);
}

.popular-list .rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--border-color);
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-light);
    flex-shrink: 0;
}

.popular-list li:first-child .rank {
    background: #FFD700;
    color: #000;
}

.popular-list li:nth-child(2) .rank {
    background: #C0C0C0;
    color: #000;
}

.popular-list li:nth-child(3) .rank {
    background: #CD7F32;
    color: #fff;
}

.popular-title {
    font-size: 14px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ট্যাগ ক্লাউড */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    padding: 5px 14px;
    border-radius: 20px;
    background: var(--border-color);
    color: var(--text-color);
    font-size: 12px;
    transition: var(--transition);
}

.tag:hover {
    background: var(--primary);
    color: #fff;
}

/* অ্যাড */
.ad-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100px;
    background: var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
}

.ad-container img {
    width: 100%;
}

/* ===== ফুটার ===== */
.footer {
    background: var(--footer-bg);
    border-top: 1px solid var(--border-color);
    padding: 30px 0;
    margin-top: 20px;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-info {
    font-size: 14px;
    color: var(--text-light);
}

.footer-info a {
    color: var(--text-color);
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    font-size: 14px;
    color: var(--text-light);
}

.footer-links a:hover {
    color: var(--primary);
}

.back-to-top {
    background: var(--primary);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    transition: var(--transition);
    opacity: 0;
    pointer-events: none;
}

.back-to-top.show {
    opacity: 1;
    pointer-events: auto;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(11, 87, 207, 0.3);
}

/* ===== মোবাইল মেনু ===== */
.mobile-menu {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--header-bg);
    border-top: 1px solid var(--border-color);
    padding: 8px 0;
    z-index: 999;
    justify-content: space-around;
}

.menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 10px;
    color: var(--text-light);
    padding: 4px 12px;
    border-radius: var(--radius);
    transition: var(--transition);
    cursor: pointer;
}

.menu-item span:first-child {
    font-size: 20px;
}

.menu-item.active {
    color: var(--primary);
}

.menu-item:hover {
    background: var(--border-color);
}

/* ===== রেস্পন্সিভ ডিজাইন ===== */

/* ট্যাবলেট */
@media (max-width: 1024px) {
    .content-wrapper {
        grid-template-columns: 1fr 280px;
    }
    
    .post-item {
        grid-template-columns: 250px 1fr;
    }
}

/* মোবাইল */
@media (max-width: 768px) {
    .main-nav {
        display: none;
    }
    
    .content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .post-item {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .post-thumb img {
        height: 180px;
    }
    
    .slide img {
        height: 200px;
    }
    
    .mobile-menu {
        display: flex;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .sidebar {
        order: -1;
    }
}

/* ছোট মোবাইল */
@media (max-width: 480px) {
    .logo h1 {
        font-size: 16px;
    }
    
    .post-title {
        font-size: 17px;
    }
    
    .slide img {
        height: 150px;
    }
    
    .header-actions button {
        font-size: 16px;
    }
    
    .container {
        padding: 0 12px;
    }
}