/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Hind Siliguri', sans-serif;
    transition: background 0.3s, color 0.3s, transform 0.3s, box-shadow 0.3s;
}

body {
    background: #f8fafc; /* Soft White/Slate Background */
    color: #1e293b; /* Deep Slate Text */
    line-height: 1.7;
}

a {
    text-decoration: none;
    color: inherit;
}

.main-container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 60px 20px;
}

/* BRAND COLORS */
.brand-kotha { color: #4f46e5; } /* Modern Indigo */
.brand-ly { color: #ec4899; } /* Soft Rose */

/* ==========================================================================
   NAVIGATION BAR & NEW SEARCH/THEME LAYOUT
   ========================================================================== */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 8%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px); /* Glassmorphism Effect */
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo-link {
    display: inline-block;
}

.logo-main { font-size: 28px; font-weight: 700; line-height: 1.2; }
.logo-sub { font-size: 11px; font-weight: 600; letter-spacing: 3px; text-transform: uppercase; }

.nav { display: flex; gap: 24px; }
.nav a { font-size: 16px; font-weight: 500; color: #64748b; padding: 6px 0; position: relative; }
.nav a:hover, .nav a.active { color: #1e293b; font-weight: 600; }
.nav a.active::after {
    content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 2.5px;
    background: linear-gradient(to right, #4f46e5, #ec4899); border-radius: 10px;
}

/* অ্যাকশন এরিয়া (সার্চ ও ডার্ক মোড বাটন পাশাপাশি রাখার জন্য) */
.nav-actions { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
}

.icon-btn { 
    background: #f1f5f9; 
    border: none; 
    padding: 10px; 
    border-radius: 50%; 
    cursor: pointer; 
    color: #475569; 
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}
.icon-btn:hover { background: #e2e8f0; color: #0f172a; }

/* 🔍 নতুন ডাইনামিক স্লাইড সার্চ বার স্টাইল */
.search-wrapper {
    display: flex;
    align-items: center;
    position: relative;
}

.header-search-bar {
    position: absolute;
    right: 45px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 6px 15px;
    border-radius: 30px;
    width: 0;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: all 0.3s ease;
    font-family: 'Hind Siliguri';
    font-size: 14px;
    outline: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* সার্চ আইকনে ক্লিক করলে এই ক্লাসটি জাভাস্ক্রিপ্ট দিয়ে যুক্ত হবে */
.header-search-bar.active {
    width: 220px;
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

/* ==========================================================================
   HERO SECTION (UPDATED FOR CLEAN & COMPACT LOOK)
   ========================================================================== */
.hero {
    text-align: center;
    padding: 35px 20px 20px 20px; /* ওপরে ৯০px থেকে কমিয়ে ৩৫px এবং নিচে ২০px করা হলো */
    /* ডার্ক মোডের সাথে সামঞ্জস্য রাখতে ব্যাকগ্রাউন্ডে ট্রান্সপারেন্ট রেডিয়াল গ্রেডিয়েন্ট ব্যবহার করা হয়েছে */
    background: radial-gradient(circle at top, rgba(239, 246, 255, 0.1) 0%, rgba(248, 250, 252, 0) 80%);
}

.hero h1 { 
    font-size: 36px; /* পিসিতে দেখার জন্য কিছুটা স্লিম (৪৪px থেকে ৩৬px) করা হলো */
    font-weight: 700; 
    color: #0f172a; 
    margin-bottom: 10px; /* টাইটেলের নিচের গ্যাপ ১৬px থেকে কমিয়ে ১০px করা হলো */
}

.hero p { 
    font-size: 16px; /* ১৮px থেকে কমিয়ে ১৬px করা হলো */
    color: #64748b; 
    max-width: 620px; 
    margin: 0 auto 0; /* সার্চ বক্স না থাকায় নিচের ৩৫px মার্জিন সম্পূর্ণ জিরো (০) করা হলো */
    line-height: 1.6;
}

/* 🗑️ পুরানো .search-container, .search-icon, .search-btn এর সমস্ত কোড এখান থেকে রিমুভ করা হয়েছে */

/* TITLES */
.section-title { font-size: 24px; font-weight: 700; color: #0f172a; margin-bottom: 25px; text-align: center; }
.section-title.left-align { text-align: left; margin-bottom: 20px; border-left: 4px solid #4f46e5; padding-left: 12px; }

/* ==========================================================================
   📱 বিশেষ করে মোবাইলের জন্য গ্যাপ এবং ফন্ট সাইজ ফিক্স
   ========================================================================== */
@media (max-width: 768px) {
    .hero {
        padding: 25px 15px 15px 15px; /* মোবাইলে ওপরে-নিচের ফাঁকা জায়গা আরও কমবে */
    }
    
    .hero h1 {
        font-size: 24px; /* মোবাইলের স্ক্রিন অনুযায়ী চমৎকার ও পারফেক্ট ফন্ট সাইজ */
        line-height: 1.3;
        margin-bottom: 8px;
    }

    .hero p {
        font-size: 14px; /* মোবাইলে লেখাটি খুব সুন্দর ও স্লিম দেখাবে */
        padding: 0 5px;
    }

    .section-title {
        margin-bottom: 20px; /* মোবাইলে ক্যাটাগরি টাইটেলের নিচের গ্যাপও কিছুটা কমানো হলো */
    }
}
/* ==========================================================================
   HOMEPAGE CATEGORY CARDS
   ========================================================================== */
.categories-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 20px; }
.card {
    background: rgba(255, 255, 255, 0.7); border: 1px solid rgba(241, 245, 249, 0.9);
    padding: 25px 20px; text-align: center; border-radius: 16px; cursor: pointer; box-shadow: 0 4px 15px rgba(0,0,0,0.01);
}
.card-icon { font-size: 24px; margin-bottom: 12px; color: #64748b; }
.card h3 { font-size: 18px; font-weight: 600; color: #1e293b; margin-bottom: 4px; }
.card p { font-size: 13px; color: #94a3b8; }

/* CARD HOVER EFFECTS */
.card:hover { transform: translateY(-5px); box-shadow: 0 12px 24px rgba(0,0,0,0.04); background: #fff; }
.islamic:hover .card-icon { color: #10b981; } 
.story:hover .card-icon { color: #4f46e5; }
.love:hover .card-icon { color: #ec4899; }
.sad:hover .card-icon { color: #3b82f6; }
.motivation:hover .card-icon { color: #f59e0b; }
.quotes:hover .card-icon { color: #8b5cf6; }

/* ==========================================================================
   HOMEPAGE POSTS LAYOUT
   ========================================================================== */
.post-section-flex { display: flex; gap: 40px; }
.latest-posts { flex: 2; }
.trending-sidebar { flex: 1; }

.post-card { background: #fff; padding: 28px; border-radius: 16px; margin-bottom: 20px; border: 1px solid #f1f5f9; }
.post-tag { display: inline-block; padding: 3px 12px; font-size: 12px; font-weight: 600; border-radius: 30px; margin-bottom: 12px; }
.tag-story { background: #eff6ff; color: #2563eb; }
.tag-islamic { background: #e6f4ea; color: #137333; }

.post-title { font-size: 22px; font-weight: 700; margin-bottom: 10px; color: #0f172a; }
.post-title a:hover { color: #4f46e5; }
.post-excerpt { color: #64748b; font-size: 15px; margin-bottom: 15px; }
.post-meta { display: flex; gap: 15px; font-size: 13px; color: #94a3b8; }

/* TRENDING SIDEBAR */
.trending-box { background: #fff; padding: 25px; border-radius: 16px; border: 1px solid #f1f5f9; }
.trending-item { display: flex; gap: 15px; margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid #f1f5f9; }
.trending-item:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.trend-number { font-size: 24px; font-weight: 700; color: #cbd5e1; line-height: 1; }
.trending-item p { font-size: 15px; color: #334155; font-weight: 500; }
.trend-cat { font-size: 12px; font-weight: 600; color: #8b5cf6; }

/* ==========================================================================
   CATEGORY PAGE SPECIFIC STYLES
   ========================================================================== */
.category-header {
    text-align: center;
    padding: 60px 0 20px 0;
    background: #ffffff;
    border-bottom: 1px solid #f1f5f9;
}

.category-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 50px;
    margin-bottom: 15px;
}

.category-header h1 {
    font-size: 36px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 12px;
}

.category-header p {
    font-size: 16px;
    color: #64748b;
    max-width: 600px;
    margin: 0 auto;
}

.content-masonry {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
    align-items: start;
}

.quote-card {
    background: #ffffff;
    padding: 30px;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.01);
    position: relative;
    display: flex;
    flex-direction: column;
}

.quote-icon {
    font-size: 20px;
    margin-bottom: 15px;
    opacity: 0.3;
}

.quote-text {
    font-size: 18px;
    font-weight: 500;
    color: #1e293b;
    line-height: 1.8;
    margin-bottom: 15px;
}

.quote-source {
    font-size: 14px;
    color: #64748b;
    font-weight: 400;
    margin-bottom: 25px;
}

.card-footer-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #f1f5f9;
    font-size: 13px;
    color: #94a3b8;
}

.share-btn {
    background: none;
    border: none;
    color: #64748b;
    font-size: 15px;
    cursor: pointer;
    padding: 5px;
}

.share-btn:hover {
    color: #4f46e5;
}

/* PAGINATION */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 50px;
}

.page-link {
    padding: 8px 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #475569;
}

.page-link:hover:not(.disabled), .page-link.active {
    background: #4f46e5;
    color: #ffffff;
    border-color: #4f46e5;
}

.page-link.disabled {
    background: #f1f5f9;
    color: #cbd5e1;
    cursor: not-allowed;
}

/* ==========================================================================
   THEME SPECIFIC OVERRIDES (Islamic Theme)
   ========================================================================== */
.islamic-theme .category-badge {
    background: #e6f4ea;
    color: #137333;
}

.islamic-theme .quote-icon {
    color: #10b981;
}

.islamic-theme .quote-card:hover {
    border-color: #10b981;
    transform: none; /* No vertical movement for Islamic clean feel */
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.05);
}

.islamic-theme .page-link.active {
    background: #10b981;
    border-color: #10b981;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
footer { background: #fff; border-top: 1px solid #e2e8f0; padding: 30px 20px; margin-top: 50px; }
.footer-content { max-width: 1140px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; color: #64748b; font-size: 14px; }
.social-links { display: flex; gap: 15px; }
.social-links a { color: #94a3b8; font-size: 16px; }
.social-links a:hover { color: #4f46e5; }

/* ==========================================================================
   RESPONSIVE DESIGN (⚡ MOBILE & TABLET UPDATED LOOK ⚡)
   ========================================================================== */
@media (max-width: 768px) {
    .header { 
        flex-direction: row; /* ওপরে লোগো আর বাটন এক লাইনে থাকবে ভাই */
        justify-content: space-between; 
        padding: 12px 20px; 
    }
    .nav { 
        display: none; /* মোবাইলে অতিরিক্ত হিজিবিজি এড়াতে নরমাল টেক্সট মেনু হাইড */
    }
    .nav-actions {
        gap: 8px; /* বাটন দুটির মাঝের স্পেস মোবাইলের জন্য পারফেক্ট */
    }
    .icon-btn {
        width: 36px; /* মোবাইলে আইকন বাটন একটু স্লিম ও সুন্দর লাগবে */
        height: 36px;
        font-size: 14px;
    }
    .header-search-bar.active {
        width: 150px; /* মোবাইল স্ক্রিনের জন্য পারফেক্ট উইডথ */
        right: 40px;
    }
    .hero h1 { font-size: 32px; }
    .hero p { font-size: 15px; }
    .post-section-flex { flex-direction: column; gap: 30px; }
    .categories-grid { grid-template-columns: repeat(2, 1fr); }
    .content-masonry { grid-template-columns: 1fr; } 
}

/* ==========================================================================
   SINGLE POST PAGE STYLES 
   ========================================================================== */
.single-post-container {
    max-width: 760px; 
    padding-top: 40px;
}

.single-post {
    background: #ffffff;
    padding: 40px;
    border-radius: 24px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
}

.post-header {
    margin-bottom: 35px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 25px;
}

.post-full-title {
    font-size: 32px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.4;
    margin-top: 10px;
    margin-bottom: 20px;
}

.post-author-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.author-info {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: #64748b;
}

.author-info span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.post-share-actions {
    display: flex;
    gap: 10px;
}

.action-btn-circle {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    cursor: pointer;
    font-size: 14px;
}

.action-btn-circle:hover {
    background: #4f46e5;
    color: #ffffff;
    border-color: #4f46e5;
}

.post-body {
    color: #334155;
    font-size: 19px; 
    line-height: 1.9;
}

.post-body p {
    margin-bottom: 25px;
}

.post-body p.drop-cap-p::first-letter {
    font-size: 45px;
    font-weight: 700;
    float: left;
    color: #4f46e5;
    line-height: 1;
    margin-right: 10px;
    margin-top: 5px;
}

.post-body blockquote {
    background: #f8fafc;
    border-left: 4px solid #ec4899;
    padding: 20px 25px;
    margin: 35px 0;
    font-style: italic;
    font-size: 18px;
    color: #475569;
    border-radius: 0 16px 16px 0;
    line-height: 1.8;
}

.post-footer-section {
    margin-top: 40px;
    padding-top: 25px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.post-tags-list {
    display: flex;
    gap: 10px;
}

.post-tags-list a {
    font-size: 14px;
    color: #64748b;
    background: #f1f5f9;
    padding: 4px 12px;
    border-radius: 6px;
}

.post-tags-list a:hover {
    color: #4f46e5;
    background: #eff6ff;
}

.like-btn {
    background: #fff0f6;
    color: #ec4899;
    border: 1px solid #fbcfe8;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.like-btn:hover {
    background: #ec4899;
    color: #ffffff;
    border-color: #ec4899;
}

@media (max-width: 768px) {
    .single-post {
        padding: 25px 20px;
        border-radius: 16px;
    }
    .post-full-title {
        font-size: 26px;
    }
    .post-body {
        font-size: 17px;
    }
}

/* ==========================================================================
   UPDATED DARK MODE COLORS 
   ========================================================================== */
body.dark-theme {
    background: #0f172a; 
    color: #cbd5e1; 
}

.dark-theme .hero {
    background: radial-gradient(circle at top, #1e293b 0%, #0f172a 80%) !important;
}

.dark-theme .header,
.dark-theme footer,
.dark-theme .category-header,
.dark-theme .post-card,
.dark-theme .trending-box,
.dark-theme .card,
.dark-theme .quote-card,
.dark-theme .single-post,
.dark-theme .page-link {
    background: #1e293b; 
    border-color: #334155;
    color: #cbd5e1;
}

.dark-theme .hero h1,
.dark-theme .category-header h1,
.dark-theme .section-title,
.dark-theme .post-title,
.dark-theme .post-full-title,
.dark-theme .quote-text,
.dark-theme .trending-item p,
.dark-theme .card h3 {
    color: #f8fafc;
}

.dark-theme .hero p,
.dark-theme .category-header p,
.dark-theme .post-excerpt,
.dark-theme .quote-source,
.dark-theme .author-info {
    color: #94a3b8; 
}

.dark-theme .nav a:hover, 
.dark-theme .nav a.active {
    color: #f8fafc;
}

.dark-theme .search-container,
.dark-theme .header-search-bar {
    background: #1e293b;
    border-color: #334155;
    color: #f8fafc;
}

.dark-theme .search-container input {
    background: transparent;
    color: #f8fafc;
}

.dark-theme .icon-btn {
    background: #334155;
    color: #f8fafc;
}

.dark-theme .icon-btn:hover {
    background: #475569;
}

.dark-theme .post-body blockquote {
    background: #111827;
    color: #94a3b8;
}

.dark-theme .post-tags-list a {
    background: #334155;
    color: #cbd5e1;
}

.dark-theme .action-btn-circle {
    background: #334155;
    border-color: #475569;
    color: #cbd5e1;
}

/* ক্যাটাগরি ব্যাজ থিম */
.islamic-theme #dynamic-badge { background-color: #ebf8f2; color: #0f766e; border: 1px solid #ccfbf1; padding: 6px 16px; border-radius: 20px; display: inline-block; }
.story-theme #dynamic-badge { background-color: #eff6ff; color: #1d4ed8; border: 1px solid #dbeafe; padding: 6px 16px; border-radius: 20px; display: inline-block; }
.love-theme #dynamic-badge { background-color: #fff1f2; color: #be123c; border: 1px solid #ffe4e6; padding: 6px 16px; border-radius: 20px; display: inline-block; }
.sad-theme #dynamic-badge { background-color: #f8fafc; color: #475569; border: 1px solid #e2e8f0; padding: 6px 16px; border-radius: 20px; display: inline-block; }
.motivation-theme #dynamic-badge { background-color: #fffbeb; color: #b45309; border: 1px solid #fef3c7; padding: 6px 16px; border-radius: 20px; display: inline-block; }
.quotes-theme #dynamic-badge { background-color: #f5f3ff; color: #6d28d9; border: 1px solid #ede9fe; padding: 6px 16px; border-radius: 20px; display: inline-block; }
/* ==========================================================================
   📱 মোবাইল স্ক্রিনে মেনুবার ফিক্স (Responsive Menu) - ১০০% ওয়ার্কিং কোড
   ========================================================================== */
@media screen and (max-width: 768px) {
    /* ১. হেডার লেআউট ঠিক করা */
    .header {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 10px 15px !important;
        position: relative !important; /* ড্রপডাউন মেনু পজিশন ঠিক রাখার জন্য */
    }

    /* ২. মোবাইল স্ক্রিনে ডিফল্টভাবে মেনুবার হাইড থাকবে (important ছাড়া) */
    .nav {
        display: none; 
        width: 100%;
        flex-direction: column;
        background: #ffffff;
        position: absolute;
        top: 100%; /* হেডারের ঠিক নিচ থেকে শুরু হবে */
        left: 0;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        padding: 10px 0;
        z-index: 999;
    }

    /* ৩. বাটনে ক্লিক করলে ড্রপডাউন মেনুটি দেখানোর আসল চাবি */
    .nav.mobile-show {
        display: flex !important; /* এবার এটি কাজ করবেই করবে */
    }

    /* ডার্ক মোডে মোবাইল মেনুর ব্যাকগ্রাউন্ড */
    body.dark-theme .nav {
        background: #1e293b;
    }

    .nav a {
        padding: 12px 20px;
        display: block;
        border-bottom: 1px solid rgba(0,0,0,0.05);
    }
    
    body.dark-theme .nav a {
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }
}

.read-more-btn {
    display: inline-block;
    margin-top: 12px;
    color: #6366f1; /* আপনার থিমের বেগুনি কালার */
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    transition: 0.2s ease;
}

.read-more-btn:hover {
    color: #4f46e5;
    text-decoration: underline;
    padding-left: 4px; /*Hover করলে হালকা একটু ডানদিকে সরবে*/
}