/* assets/css/style.css */
:root {
    --primary-color: #0a4c6a;
    --text-dark: #333;
    --bg-light: #f4f6f9;
    --accent-red: #cc0000;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'SolaimanLipi', Arial, sans-serif; }

body { background: #fff; color: var(--text-dark); }

/* Header & Topbar */
.top-bar { background: var(--primary-color); color: #fff; padding: 10px 0; display: flex; justify-content: space-between; align-items: center; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 15px; }

/* ==========================================================================
   NAVIGATION & DROPDOWN MENU (Desktop)
   ========================================================================== */
.main-menu ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.main-menu a {
    color: var(--white);
    font-weight: 600;
    font-size: 16px;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.main-menu a:hover {
    color: #d1e7f5;
}

/* Dropdown Styles */
.has-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    min-width: 200px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 99;
    display: flex;
    flex-direction: column;
    padding: 0;
    border-radius: 0 0 4px 4px;
}

.has-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    width: 100%;
    border-bottom: 1px solid var(--border-color);
}

.dropdown-menu li:last-child {
    border-bottom: none;
}

.dropdown-menu a {
    color: var(--text-dark) !important;
    padding: 12px 15px;
    display: block;
    font-size: 14px;
}

.dropdown-menu a i {
    color: var(--primary-blue);
    font-size: 12px;
}

.dropdown-menu a:hover {
    background: var(--light-bg);
    color: var(--primary-blue) !important;
    padding-left: 20px; /* Slight indent on hover */
}

/* Hide Mobile Elements on Desktop */
.mobile-menu-header, .menu-overlay {
    display: none;
}

/* ==========================================================================
   OFFCANVAS MOBILE MENU (Tablet & Mobile)
   ========================================================================== */
@media (max-width: 991px) {
    .mobile-menu-toggle {
        display: block;
    }

    /* Overlay */
    .menu-overlay {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.6);
        z-index: 998;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .menu-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    /* Mobile Sidebar */
    .main-menu {
        position: fixed;
        top: 0;
        left: -300px;
        width: 280px;
        height: 100vh;
        background: var(--white);
        z-index: 999;
        flex-direction: column;
        transition: left 0.3s ease;
        overflow-y: auto;
        box-shadow: 2px 0 15px rgba(0, 0, 0, 0.2);
    }

    .main-menu.active {
        left: 0;
    }

    /* Mobile Header & Close Button */
    .mobile-menu-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 20px;
        background: var(--primary-blue);
        color: var(--white);
    }

    .mobile-menu-header h3 {
        font-size: 18px;
        margin: 0;
    }

    .close-menu-btn {
        background: transparent;
        border: none;
        color: var(--white);
        font-size: 24px;
        cursor: pointer;
    }

    /* Mobile Menu List Reset */
    .main-menu ul {
        flex-direction: column;
        width: 100%;
        gap: 0;
    }

    .main-menu > ul > li {
        width: 100%;
        border-bottom: 1px solid var(--border-color);
    }

    .main-menu a {
        color: var(--text-dark) !important;
        padding: 15px 20px;
        display: flex;
        justify-content: space-between;
    }

    /* Differentiating Subcategories clearly in Mobile */
    .has-dropdown {
        display: flex;
        flex-direction: column;
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: var(--light-bg);
        width: 100%;
        display: block; /* Always show subcategories elegantly indented */
        border-top: 1px solid var(--border-color);
    }

    .dropdown-menu li {
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    .dropdown-menu a {
        padding-left: 40px; /* Deep indentation for subcategory */
        font-size: 14px;
        font-weight: 400;
        border-left: 3px solid var(--primary-blue); /* Visual indicator */
        justify-content: flex-start;
    }
}

/* Breaking News Ticker */
.breaking-news { border: 1px solid #ddd; padding: 10px; margin: 15px 0; background: var(--bg-light); border-radius: 4px; display: flex; align-items: center; }
.breaking-badge { background: var(--primary-color); color: #fff; padding: 4px 8px; border-radius: 3px; margin-right: 15px; }

/* Main Layout Grid */
.main-wrapper { display: grid; grid-template-columns: 70% 30%; gap: 20px; margin-top: 20px; }

/* Lead News */
.lead-news { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; border: 1px solid #eee; padding: 15px; }
.lead-news img { width: 100%; border-radius: 4px; }
.lead-title { color: var(--accent-red); font-size: 24px; margin-bottom: 10px; }

/* Right Sidebar Tabs */
.sidebar-tabs { border: 1px solid #ddd; }
.tab-headers { display: flex; background: #f9f9f9; border-bottom: 1px solid #ddd; }
.tab-headers div { padding: 10px; cursor: pointer; flex: 1; text-align: center; font-weight: bold; }

/* Responsive */
@media (max-width: 768px) {
    .main-wrapper, .lead-news { grid-template-columns: 1fr; }
    .navbar { flex-wrap: wrap; }
}

/* File: assets/css/style.css
    Description: 100% Responsive and Clean CSS
*/

/* Base Reset & Variables */
:root {
    --primary-blue: #094b69;
    --light-bg: #f5f6f8;
    --white: #ffffff;
    --text-dark: #222222;
    --text-muted: #666666;
    --border-color: #e5e5e5;
    --pill-bg: #e9ecef;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans Bengali', sans-serif;
    background-color: var(--white);
    color: var(--text-dark);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ================= HEADER & NAV ================= */
.main-header {
    background: var(--white);
    /* Replacing border-bottom with box-shadow as requested */
    box-shadow: 0 1px 0 0 var(--border-color); 
}

.top-nav {
    background-color: var(--primary-blue);
    color: var(--white);
    padding: 10px 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-img {
    height: 40px;
    width: auto;
}

.main-menu ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

.main-menu a {
    color: var(--white);
    font-weight: 600;
    font-size: 16px;
}

.main-menu a:hover {
    color: #d1e7f5;
}

.nav-actions {
    display: flex;
    gap: 15px;
}

.action-btn {
    background: transparent;
    border: 0;
    color: var(--white);
    font-size: 18px;
    cursor: pointer;
}

.mobile-menu-toggle {
    display: none;
}

/* ================= TICKER SECTION ================= */
.ticker-section {
    padding: 12px 0;
    background: var(--light-bg);
}

.ticker-container {
    display: flex;
    align-items: center;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 5px;
}

.ticker-badge {
    background-color: var(--primary-blue);
    color: var(--white);
    padding: 5px 15px;
    border-radius: 3px;
    font-weight: 700;
    white-space: nowrap;
    margin-right: 15px;
}

.ticker-content {
    flex-grow: 1;
    overflow: hidden;
}

.ticker-item {
    margin-right: 30px;
    font-weight: 600;
}

.ticker-icon {
    color: #00b0f0;
    font-size: 12px;
    margin-right: 5px;
}

/* ================= TRENDING TAGS ================= */
.trending-section {
    padding: 10px 0 15px 0;
    background: var(--light-bg);
}

.trending-container {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.trending-badge {
    background-color: var(--primary-blue);
    color: var(--white);
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.trending-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-pill {
    background-color: var(--pill-bg);
    color: var(--text-dark);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid transparent;
}

.tag-pill:hover {
    border: 1px solid var(--primary-blue);
    background-color: var(--white);
}

/* ================= FOOTER ================= */
.main-footer {
    background-color: var(--primary-blue);
    color: var(--white);
    padding-top: 40px;
    margin-top: 40px;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    padding-bottom: 30px;
}

.footer-column h3 {
    margin-bottom: 15px;
    font-size: 18px;
    box-shadow: 0 2px 0 0 rgba(255,255,255,0.2);
    padding-bottom: 10px;
    display: inline-block;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column ul a:hover {
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}

.social-links a:hover {
    background: var(--white);
    color: var(--primary-blue);
}

.footer-bottom {
    background: rgba(0,0,0,0.2);
    text-align: center;
    padding: 15px 0;
    font-size: 14px;
}

/* ================= RESPONSIVE DESIGN (100% Device Compatible) ================= */

/* Tablet Optimization */
@media (max-width: 991px) {
    .main-menu ul {
        gap: 10px;
    }
    .main-menu a {
        font-size: 14px;
    }
    .footer-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile Optimization */
@media (max-width: 768px) {
    .main-menu {
        display: none; /* Can be toggled via JS */
    }
    
    .mobile-menu-toggle {
        display: block;
    }

    .ticker-container {
        flex-direction: column;
        align-items: flex-start;
        padding: 0;
        border: 0;
    }

    .ticker-badge {
        width: 100%;
        text-align: center;
        border-radius: 0;
        margin-right: 0;
    }

    .ticker-content {
        width: 100%;
        padding: 10px;
        background: var(--white);
    }

    .trending-container {
        justify-content: center;
    }

    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-column h3 {
        display: block;
    }
    
    .social-links {
        justify-content: center;
    }
}

/* ==========================================================================
   SIDEBAR & WIDGET STYLES (100% Responsive)
   ========================================================================== */

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.sidebar-widget {
    background: var(--white, #ffffff);
    border: 1px solid #eeeeee;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.widget-title {
    background: var(--primary-color, #0a4c6a);
    color: #ffffff;
    padding: 12px 15px;
    font-size: 16px;
    margin: 0;
    text-align: center;
}

/* --- Tabs Widget Styling --- */
.tab-headers {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #eeeeee;
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    padding: 12px 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    color: #555555;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: var(--primary-color, #0a4c6a);
}

.tab-btn.active {
    background: #ffffff;
    color: var(--primary-color, #0a4c6a);
    box-shadow: inset 0 -3px 0 0 var(--accent-red, #cc0000); /* Sleek bottom highlight */
}

/* --- News List Styling --- */
.sidebar-news-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-news-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #f1f1f1;
    transition: background 0.3s ease;
}

.sidebar-news-item:last-child {
    border-bottom: none;
}

.sidebar-news-item:hover {
    background: #fafafa;
}

.sidebar-thumb {
    width: 80px;
    height: 60px;
    flex-shrink: 0;
    margin-right: 12px;
    border-radius: 4px;
    overflow: hidden;
}

.sidebar-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.sidebar-thumb:hover img {
    transform: scale(1.1);
}

.sidebar-info {
    flex-grow: 1;
}

.sidebar-title {
    font-size: 15px;
    color: var(--text-dark, #333333);
    line-height: 1.4;
    font-weight: 600;
    transition: color 0.3s;
}

.sidebar-title:hover {
    color: var(--accent-red, #cc0000);
}

.popular-rank {
    font-size: 28px;
    font-weight: 700;
    color: #e0e0e0;
    min-width: 35px;
    text-align: center;
    line-height: 1;
}

/* --- Social Follow Widget --- */
.social-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: #eeeeee; /* Creates thin borders between grid items */
}

.social-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 10px;
    background: #ffffff;
    color: #555555;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.social-box i {
    font-size: 24px;
    margin-bottom: 8px;
}

.social-box.fb:hover { background: #1877F2; color: #fff; }
.social-box.tw:hover { background: #1DA1F2; color: #fff; }
.social-box.yt:hover { background: #FF0000; color: #fff; }
.social-box.in:hover { background: #E4405F; color: #fff; }

/* --- Responsive Adjustments --- */
@media (max-width: 991px) {
    /* Stack main content and sidebar on tablets and mobiles */
    .main-wrapper {
        display: flex;
        flex-direction: column;
    }
    
    .sidebar {
        margin-top: 30px;
    }
}

/* ==========================================================================
   CATEGORY PAGE & SMART PAGINATION STYLES
   ========================================================================== */

/* Category Header styling */
.category-page-header {
    background: var(--light-bg, #f4f6f9);
    padding: 25px 30px;
    border-radius: 6px;
    margin: 20px 0 30px 0;
    border: 1px solid var(--border-color, #e0e0e0);
}

.breadcrumb {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.breadcrumb a {
    color: var(--primary-blue, #094b69);
    font-weight: 600;
}

.breadcrumb a:hover {
    color: var(--accent-red, #cc0000);
}

.breadcrumb .separator {
    font-size: 10px;
    color: #999;
}

.category-main-title {
    font-size: 32px;
    color: var(--text-dark, #333);
    margin: 0 0 5px 0;
}

.category-meta {
    font-size: 14px;
    color: #777;
    margin: 0;
}

/* Empty State */
.empty-state {
    grid-column: 1 / -1; /* Spans across all grid columns */
    text-align: center;
    padding: 60px 20px;
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 6px;
    color: #666;
}

/* Frontend Smart Pagination */
.frontend-pagination-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color, #e0e0e0); /* Clean shorthand */
}

.frontend-pagination {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0;
    margin: 0;
}

.frontend-pagination li a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: var(--white, #fff);
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: 4px;
    color: var(--text-dark, #333);
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.frontend-pagination li a:hover,
.frontend-pagination li a.active {
    background: var(--primary-blue, #094b69);
    color: var(--white, #fff);
    border-color: var(--primary-blue, #094b69);
    box-shadow: 0 4px 10px rgba(9, 75, 105, 0.2);
}

/* Responsive category header */
@media (max-width: 768px) {
    .category-page-header {
        padding: 20px;
        text-align: center;
    }
    .breadcrumb {
        justify-content: center;
    }
    .category-main-title {
        font-size: 26px;
    }
}

/* ==========================================================================
   SINGLE POST PAGE STYLES (100% Responsive & Clean)
   ========================================================================== */

.single-post-wrapper {
    background: var(--white, #ffffff);
    padding: 30px;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    border: 1px solid var(--border-color, #eeeeee);
    margin-bottom: 30px;
}

/* Post Header */
.post-header {
    margin-bottom: 25px;
}

.post-title {
    font-size: 34px;
    line-height: 1.4;
    color: var(--text-dark, #222222);
    margin-bottom: 15px;
    font-weight: 700;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eeeeee;
    color: #666666;
    font-size: 14px;
}

.meta-left, .meta-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.meta-item i {
    color: var(--primary-blue, #094b69);
    margin-right: 5px;
}

.meta-item.author {
    font-weight: 600;
    color: var(--text-dark);
}

/* Social Share Bar */
.social-share-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
}

.share-text {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-dark);
    margin-right: 5px;
}

.share-btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    color: #ffffff !important;
    transition: transform 0.3s ease, opacity 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 15px;
}

.share-btn:hover {
    transform: translateY(-3px);
    opacity: 0.9;
}

.share-btn.fb { background: #1877F2; }
.share-btn.tw { background: #1DA1F2; }
.share-btn.wa { background: #25D366; }
.share-btn.cp { background: #6c757d; }

/* Featured Image */
.post-featured-image {
    margin-bottom: 25px;
    border-radius: 6px;
    overflow: hidden;
}

.post-featured-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-height: 500px; /* Prevents overly tall images */
}

/* Post Content Formatting */
.post-content {
    font-size: 18px;
    line-height: 1.8;
    color: #333333;
}

.post-content p {
    margin-bottom: 20px;
    text-align: justify;
}

.post-content img {
    max-width: 100%;
    height: auto !important;
    border-radius: 4px;
    margin: 15px 0;
}

.post-content h2, .post-content h3, .post-content h4 {
    margin: 25px 0 15px 0;
    color: var(--text-dark);
}

.post-content ul, .post-content ol {
    margin-bottom: 20px;
    padding-left: 20px;
}

.post-content li {
    margin-bottom: 8px;
}

.post-content blockquote {
    background: #f9f9f9;
    border-left: 4px solid var(--primary-blue, #094b69); /* Using border-left here is standard for quotes */
    padding: 15px 20px;
    margin: 20px 0;
    font-style: italic;
    color: #555;
}

/* Related Posts */
.related-posts-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #eeeeee; /* Clean shorthand */
}

.section-title {
    font-size: 20px;
    color: var(--primary-blue, #094b69);
    margin-bottom: 20px;
    display: inline-block;
    padding-bottom: 5px;
    box-shadow: 0 2px 0 0 var(--accent-red, #cc0000); /* Replacing border-bottom for sleek look */
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .single-post-wrapper {
        padding: 15px;
    }
    
    .post-title {
        font-size: 26px;
    }
    
    .post-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .post-content {
        font-size: 17px;
    }
}

/* ==========================================================================
   FRONTEND NEWS GRID & CARD STYLES (100% FIXED)
   ========================================================================== */

/* News Grid Layout */
.news-grid {
    display: grid;
    /* auto-fill ensures a single item doesn't stretch to fill the whole screen */
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); 
    gap: 20px;
    margin-top: 20px;
}

/* Individual News Card */
.news-card {
    background: var(--white, #fff);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 1px solid #eee;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

/* STRICT IMAGE HEIGHT FIX */
.card-img-link {
    display: block;
    width: 100%;
    height: 190px; /* Fixed height to prevent breaking */
    overflow: hidden;
    position: relative;
    background-color: #f4f4f4; /* Placeholder color while loading */
}

.card-img-link img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Prevents image stretching */
    transition: transform 0.5s ease;
}

.news-card:hover .card-img-link img {
    transform: scale(1.05);
}

.news-card-content {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-category {
    font-size: 12px;
    color: var(--primary-color, #0a4c6a);
    font-weight: 700;
    margin-bottom: 8px;
    display: inline-block;
}

.card-title {
    font-size: 18px;
    line-height: 1.4;
    color: var(--text-dark, #333);
    margin-bottom: 12px;
    transition: color 0.3s;
}

.card-title:hover {
    color: var(--accent-red, #cc0000);
}

.news-card-content .text-muted {
    margin-top: auto; 
    font-size: 13px;
    color: #777;
}

/* Responsive adjustment for extra small screens */
@media (max-width: 480px) {
    .news-grid {
        grid-template-columns: 1fr;
    }
    .card-img-link {
        height: 220px;
    }
}