/*
Theme Name: Mukto Desh News
Theme URI: https://example.com/mukto-desh
Author: Custom WordPress Developer
Author URI: https://example.com
Description: বাংলা অনলাইন নিউজ পোর্টাল ও পত্রিকার জন্য কাস্টম ওয়ার্ডপ্রেস থিম ('মুক্তদেশ' লেআউট অনুপ্রাণিত)।
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mukto-desh
Tags: news, blog, custom-menu, featured-images, right-sidebar, translation-ready
*/

:root {
  --md-navy: #0c3363;
  --md-navy-dark: #072244;
  --md-blue: #1657a5;
  --md-red: #d9232e;
  --md-bg: #f4f6f9;
  --md-white: #ffffff;
  --md-text: #1b222c;
  --md-muted: #5c6773;
  --md-border: #dce2ea;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Hind Siliguri', 'Noto Sans Bengali', Arial, sans-serif;
  background-color: var(--md-bg);
  color: var(--md-text);
  line-height: 1.55;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--md-blue);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.md-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Top Utility Bar */
.md-topbar {
  background-color: var(--md-navy-dark);
  color: #e6ecf5;
  font-size: 13px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.md-topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.md-social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-radius: 3px;
  font-size: 12px;
  margin-left: 4px;
}

.md-social-links a:hover {
  background: var(--md-red);
  color: #fff;
}

/* Header Main */
.md-header-main {
  background: linear-gradient(180deg, var(--md-navy) 0%, #092952 100%);
  color: #fff;
  padding: 14px 0;
}

.md-header-main-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.md-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.md-menu-toggle {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
}

.md-date-sub {
  font-size: 13px;
  color: #d6e4f5;
}

.md-site-branding {
  text-align: center;
}

.md-site-title {
  margin: 0;
  font-size: 36px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.5px;
}

.md-site-title a {
  color: #fff;
}

.md-site-tagline {
  font-size: 12px;
  color: #c5d7ee;
  margin-top: 2px;
}

.md-subscribe-btn {
  background-color: var(--md-red);
  color: #fff;
  padding: 7px 14px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  display: inline-block;
}

.md-subscribe-btn:hover {
  background-color: #b81923;
  color: #fff;
}

/* Primary Navigation */
.md-nav-bar {
  background-color: var(--md-blue);
  border-bottom: 3px solid var(--md-navy-dark);
}

.md-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.md-primary-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.md-primary-menu li {
  position: relative;
}

.md-primary-menu li a {
  display: block;
  padding: 10px 13px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}

.md-primary-menu li a:hover,
.md-primary-menu li.current-menu-item > a {
  background-color: var(--md-navy-dark);
  color: #fff;
}

.md-primary-menu ul.sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 180px;
  background: var(--md-navy-dark);
  list-style: none;
  margin: 0;
  padding: 0;
  z-index: 999;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.md-primary-menu li:hover > ul.sub-menu {
  display: block;
}

/* Breaking News Ticker */
.md-ticker-wrap {
  background: #fff;
  border-bottom: 1px solid var(--md-border);
  padding: 8px 0;
}

.md-ticker-box {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}

.md-ticker-badge {
  background: var(--md-red);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 3px;
  white-space: nowrap;
}

.md-ticker-list {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 500;
}

.md-ticker-list a {
  color: var(--md-text);
}

.md-ticker-list a:hover {
  color: var(--md-red);
}

/* Top Strip Cards */
.md-top-strip {
  padding: 14px 0 6px;
}

.md-strip-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.md-strip-card {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  min-height: 92px;
  background: var(--md-navy-dark);
}

.md-strip-card img {
  width: 100%;
  height: 92px;
  object-fit: cover;
  opacity: 0.72;
}

.md-strip-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 34, 68, 0.15) 0%, rgba(7, 34, 68, 0.88) 100%);
  display: flex;
  align-items: flex-end;
  padding: 8px;
}

.md-strip-title {
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.3;
}

/* Main Content + Sidebar Grid */
.md-main-section {
  padding: 16px 0 28px;
}

.md-hero-layout {
  display: grid;
  grid-template-columns: 1fr 1.35fr 320px;
  gap: 18px;
  background: #fff;
  padding: 16px;
  border: 1px solid var(--md-border);
  border-radius: 5px;
}

.md-cat-pill {
  display: inline-block;
  background: var(--md-blue);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 3px;
  margin-bottom: 10px;
}

.md-lead-headline {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.28;
  margin: 0 0 12px;
  color: var(--md-navy-dark);
}

.md-meta-line {
  font-size: 12.5px;
  color: var(--md-muted);
  margin-bottom: 12px;
}

.md-excerpt {
  font-size: 15px;
  color: #2c3540;
  margin-bottom: 16px;
}

.md-readmore-btn {
  display: inline-block;
  background: var(--md-blue);
  color: #fff;
  padding: 7px 14px;
  border-radius: 4px;
  font-size: 13.5px;
  font-weight: 600;
}

.md-readmore-btn:hover {
  background: var(--md-navy-dark);
  color: #fff;
}

.md-lead-image-wrap img {
  width: 100%;
  height: 310px;
  object-fit: cover;
  border-radius: 4px;
}

/* Latest Sidebar */
.md-latest-box {
  border: 1px solid var(--md-border);
  border-radius: 4px;
  overflow: hidden;
  background: #fafbfd;
}

.md-box-header {
  background: var(--md-navy);
  color: #fff;
  padding: 9px 12px;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.md-latest-item {
  display: flex;
  gap: 10px;
  padding: 10px;
  border-bottom: 1px solid var(--md-border);
}

.md-latest-item:last-child {
  border-bottom: none;
}

.md-latest-item img {
  width: 76px;
  height: 54px;
  object-fit: cover;
  border-radius: 3px;
  flex-shrink: 0;
}

.md-latest-item h4 {
  margin: 0 0 4px;
  font-size: 13.5px;
  line-height: 1.32;
  font-weight: 600;
}

.md-time-meta {
  font-size: 11.5px;
  color: var(--md-muted);
}

/* Section Blocks */
.md-section-block {
  margin-top: 22px;
  background: #fff;
  border: 1px solid var(--md-border);
  border-radius: 5px;
  padding: 16px;
}

.md-section-heading-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--md-navy);
  padding-bottom: 8px;
  margin-bottom: 14px;
}

.md-section-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--md-navy-dark);
}

.md-more-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--md-blue);
}

.md-grid-5 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.md-post-card img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 8px;
}

.md-post-card h3 {
  margin: 0 0 5px;
  font-size: 14.5px;
  line-height: 1.35;
  font-weight: 600;
}

/* Video Section */
.md-video-section {
  background: linear-gradient(180deg, #0b2d57 0%, #071e3b 100%);
  color: #fff;
  border-color: #071e3b;
}

.md-video-section .md-section-heading-row {
  border-bottom-color: rgba(255, 255, 255, 0.22);
}

.md-video-section .md-section-title,
.md-video-section .md-more-link {
  color: #fff;
}

.md-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.md-video-thumb {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.md-video-thumb img {
  width: 100%;
  height: 145px;
  object-fit: cover;
}

.md-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(217, 35, 46, 0.92);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

.md-video-duration {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 2px;
}

.md-video-card h3 {
  margin: 0;
  font-size: 14px;
  line-height: 1.35;
  color: #fff;
}

/* Category Columns */
.md-cat-columns {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 22px;
}

.md-cat-box {
  background: #fff;
  border: 1px solid var(--md-border);
  border-radius: 5px;
  overflow: hidden;
}

.md-cat-box-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
}

.md-cat-list {
  list-style: none;
  margin: 0;
  padding: 12px 14px;
}

.md-cat-list li {
  padding: 6px 0;
  border-bottom: 1px dashed var(--md-border);
  font-size: 13.5px;
}

.md-cat-list li:last-child {
  border-bottom: none;
}

.md-cat-list li::before {
  content: "• ";
  color: var(--md-red);
  font-weight: bold;
}

/* Single & Archive Layout */
.md-content-sidebar-wrap {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
  padding: 22px 0 32px;
}

.md-article-box,
.md-sidebar-box {
  background: #fff;
  border: 1px solid var(--md-border);
  border-radius: 5px;
  padding: 18px;
}

.md-article-title {
  font-size: 28px;
  line-height: 1.3;
  margin: 0 0 10px;
  color: var(--md-navy-dark);
}

.md-article-content {
  font-size: 16px;
  line-height: 1.75;
  margin-top: 16px;
}

/* Footer */
.md-footer {
  background: var(--md-navy-dark);
  color: #dbe6f5;
  margin-top: 24px;
}

.md-footer-top {
  padding: 24px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.md-footer-top-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.md-footer-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 14px;
}

.md-footer-bottom {
  padding: 14px 0;
  font-size: 13px;
  color: #aec2dc;
}

.md-footer-bottom-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 1024px) {
  .md-hero-layout {
    grid-template-columns: 1fr 1fr;
  }
  .md-latest-box {
    grid-column: 1 / -1;
  }
  .md-strip-grid,
  .md-grid-5 {
    grid-template-columns: repeat(3, 1fr);
  }
  .md-grid-4,
  .md-cat-columns {
    grid-template-columns: repeat(2, 1fr);
  }
  .md-content-sidebar-wrap {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .md-hero-layout,
  .md-strip-grid,
  .md-grid-5,
  .md-grid-4,
  .md-cat-columns {
    grid-template-columns: 1fr;
  }
  .md-site-title {
    font-size: 28px;
  }
  .md-primary-menu {
    display: none;
  }
  .md-primary-menu.is-open {
    display: flex;
    flex-direction: column;
    width: 100%;
  }
}
