/* ==========================================
   SHONGBAD 360 - Fixed Layout CSS
   ========================================== */

:root {
    --primary: #1a56db;
    --primary-dark: #1e40af;
    --text-dark: #111827;
    --text-light: #6b7280;
    --bg-light: #f3f4f6;
    --bg-white: #ffffff;
    --border: #e5e7eb;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Noto Sans Bengali', 'Roboto', sans-serif; background: var(--bg-light); color: var(--text-dark); line-height: 1.6; }
a { text-decoration: none; color: inherit; transition: 0.2s; }
img { max-width: 100%; height: auto; display: block; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; width: 100%; }
.material-icons { font-family: 'Material Icons' !important; vertical-align: middle; }

/* --- Header Fixes --- */
.top-bar { background: var(--text-dark); color: #fff; padding: 8px 0; font-size: 13px; }
.top-bar .container { display: flex; justify-content: space-between; align-items: center; }
.top-bar-right { display: flex; align-items: center; gap: 20px; }
.social-icons { display: flex; gap: 12px; }
.social-icons a { color: #d1d5db; }
.social-icons a:hover { color: #fff; }

.main-header { background: var(--bg-white); box-shadow: 0 2px 10px rgba(0,0,0,0.1); padding: 15px 0; position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.logo { display: flex; align-items: center; gap: 12px; color: var(--primary); }
.logo-icon { width: 40px; height: 40px; background: var(--primary); color: #fff; border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.logo-text h1 { font-size: 22px; font-weight: 800; line-height: 1.1; margin: 0; }
.logo-text .tagline { font-size: 11px; color: var(--text-light); }

/* Navigation - Reset Button Styles */
.main-nav ul { display: flex; list-style: none; gap: 5px; margin: 0; padding: 0; }
.main-nav a { 
    display: flex; align-items: center; gap: 6px; 
    padding: 8px 12px; 
    font-size: 14px; font-weight: 500; 
    color: var(--text-dark); 
    border-radius: 6px; 
    background: transparent !important; /* Force remove background */
}
.main-nav a:hover, .main-nav a.active { background: var(--primary) !important; color: #fff !important; }
.main-nav .material-icons { font-size: 18px !important; }

.mobile-menu-btn { display: none; background: none; border: none; font-size: 24px; cursor: pointer; color: var(--text-dark); }
.subscribe-btn { background: var(--primary); color: #fff; padding: 10px 20px; border-radius: 6px; font-weight: 600; display: flex; align-items: center; gap: 8px; }

/* Breaking News */
.breaking-news-bar { background: #dc2626; color: #fff; padding: 10px 0; overflow: hidden; }
.breaking-inner { display: flex; align-items: center; gap: 15px; }
.breaking-label { background: rgba(0,0,0,0.2); padding: 5px 15px; border-radius: 4px; font-weight: 700; font-size: 12px; text-transform: uppercase; white-space: nowrap; }

/* --- Hero Section Fixes --- */
.hero-section { margin: 30px 0; }
.hero-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 25px; width: 100%; }

.hero-main { 
    position: relative; border-radius: 12px; overflow: hidden; 
    background: #1e1b4b; min-height: 400px; /* Fallback color */
    display: flex; flex-direction: column; justify-content: flex-end;
}
.hero-main .hero-image { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.hero-main .hero-overlay { position: relative; z-index: 2; padding: 30px; background: linear-gradient(to top, rgba(0,0,0,0.9), transparent); color: #fff; }
.hero-main .hero-category { background: var(--primary); color: #fff; padding: 4px 12px; border-radius: 20px; font-size: 11px; font-weight: 600; text-transform: uppercase; display: inline-block; margin-bottom: 10px; }
.hero-main .hero-title { font-size: 28px; font-weight: 800; line-height: 1.2; margin-bottom: 10px; }
.hero-main .hero-meta { font-size: 13px; color: #d1d5db; display: flex; gap: 15px; }

.hero-side { display: flex; flex-direction: column; gap: 20px; }
.hero-side-card { background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.05); flex: 1; display: flex; flex-direction: column; }
.hero-side-card .side-image { height: 120px; overflow: hidden; }
.hero-side-card .side-image img { width: 100%; height: 100%; object-fit: cover; }
.hero-side-card .side-content { padding: 15px; flex: 1; display: flex; flex-direction: column; justify-content: center; }
.hero-side-card .side-category { font-size: 11px; color: var(--primary); font-weight: 600; text-transform: uppercase; margin-bottom: 5px; }
.hero-side-card .side-title { font-size: 15px; font-weight: 700; line-height: 1.3; color: var(--text-dark); }

/* --- Main Content Layout --- */
.main-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; margin-bottom: 50px; }

.section-header { display: flex; align-items: center; gap: 10px; margin-bottom: 25px; border-bottom: 2px solid var(--primary); padding-bottom: 10px; }
.section-header h2 { font-size: 24px; font-weight: 700; color: var(--text-dark); }
.section-header .material-icons { color: var(--primary); font-size: 24px !important; }

/* --- News Grid & Cards Fixes --- */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 25px; }

.news-card { 
    background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.05); 
    transition: transform 0.2s; display: flex; flex-direction: column; height: 100%;
}
.news-card:hover { transform: translateY(-3px); box-shadow: 0 5px 15px rgba(0,0,0,0.1); }

.news-card .card-image { position: relative; height: 200px; overflow: hidden; flex-shrink: 0; }
.news-card .card-image img { width: 100%; height: 100%; object-fit: cover; }
.news-card .card-category { position: absolute; top: 10px; left: 10px; background: var(--primary); color: #fff; padding: 3px 10px; border-radius: 15px; font-size: 10px; font-weight: 600; text-transform: uppercase; }

/* Placeholder for missing images */
.news-card .card-image-placeholder { 
    height: 200px; 
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%); 
    display: flex; align-items: center; justify-content: center; 
    flex-shrink: 0;
}
.news-card .card-image-placeholder .material-icons { font-size: 50px !important; color: #6366f1; opacity: 0.5; }

.news-card .card-content { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.news-card .card-title { font-size: 17px; font-weight: 700; line-height: 1.4; color: var(--text-dark); margin-bottom: 10px; }
.news-card .card-excerpt { font-size: 13px; color: var(--text-light); line-height: 1.5; margin-bottom: 15px; flex: 1; }
.news-card .card-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #9ca3af; border-top: 1px solid #f3f4f6; padding-top: 12px; }

/* --- Sidebar Fixes --- */
.sidebar-widget { background: #fff; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); margin-bottom: 25px; overflow: hidden; }
.widget-header { padding: 15px 20px; border-bottom: 2px solid var(--primary); font-weight: 700; font-size: 18px; color: var(--text-dark); display: flex; align-items: center; gap: 8px; }
.widget-content { padding: 15px 20px; }
.ad-placeholder { background: #f0f9ff; border: 2px dashed #3b82f6; color: #1d4ed8; padding: 40px 20px; text-align: center; border-radius: 8px; }

.most-read-item { display: flex; gap: 15px; padding: 12px 0; border-bottom: 1px solid #f3f4f6; }
.most-read-item:last-child { border-bottom: none; }
.most-read-rank { font-size: 24px; font-weight: 800; color: var(--primary); line-height: 1; min-width: 30px; text-align: center; }
.most-read-info h4 { font-size: 14px; font-weight: 600; line-height: 1.3; margin-bottom: 5px; }
.most-read-info h4 a:hover { color: var(--primary); }
.most-read-info small { font-size: 11px; color: #9ca3af; }

/* --- Footer --- */
.site-footer { background: #111827; color: #fff; padding: 50px 0 20px; margin-top: 50px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 30px; margin-bottom: 40px; }
.footer-brand h3 { font-size: 24px; font-weight: 800; margin-bottom: 15px; display: flex; align-items: center; gap: 10px; }
.footer-brand p { color: #9ca3af; font-size: 14px; line-height: 1.6; margin-bottom: 20px; }
.footer-social { display: flex; gap: 10px; }
.footer-social a { width: 36px; height: 36px; background: rgba(255,255,255,0.1); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; }
.footer-social a:hover { background: var(--primary); }
.footer-links h4 { font-size: 16px; font-weight: 700; margin-bottom: 20px; }
.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: #9ca3af; font-size: 14px; display: flex; align-items: center; gap: 6px; }
.footer-links a:hover { color: #fff; }
.footer-newsletter h4 { font-size: 16px; font-weight: 700; margin-bottom: 15px; }
.footer-newsletter p { color: #9ca3af; font-size: 14px; margin-bottom: 15px; }
.newsletter-form input { width: 100%; padding: 10px; border: 1px solid #374151; background: #1f2937; color: #fff; border-radius: 6px; margin-bottom: 10px; }
.newsletter-form button { width: 100%; padding: 10px; background: var(--primary); color: #fff; border: none; border-radius: 6px; cursor: pointer; font-weight: 600; }
.footer-bottom { border-top: 1px solid #374151; padding-top: 20px; text-align: center; color: #6b7280; font-size: 13px; }

/* --- Mobile Responsive --- */
@media (max-width: 992px) {
    .hero-grid, .main-layout { grid-template-columns: 1fr; }
    .hero-side { flex-direction: row; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
    .main-nav { display: none; } /* Hide desktop menu */
    .mobile-menu-btn { display: block; } /* Show mobile button */
    .hero-main { min-height: 300px; }
    .hero-main .hero-title { font-size: 20px; }
    .hero-side { flex-direction: column; }
    .footer-grid { grid-template-columns: 1fr; }
    .news-grid { grid-template-columns: 1fr; }
}