/*
Theme Name: Swarborno Edu Blog
Theme URI: https://swarborno.com.bd
Author: Swarborno Team
Author URI: https://swarborno.com.bd
Description: একটি দ্রুতগতির, পরিচ্ছন্ন এবং বাংলা এডুকেশনাল ব্লগের জন্য বিশেষভাবে নির্মিত ওয়ার্ডপ্রেস থিম। এতে রয়েছে ডার্ক/লাইট মোড, স্বয়ংক্রিয় সূচিপত্র (TOC), রিডিং টাইম, ডান-থেকে-বামে স্ক্রলার, অপশনাল পিডিএফ ডাউনলোড বক্স এবং AdSense ও কাস্টম স্পনসর অ্যাড সাপোর্ট।
Version: 1.6.0
Requires at least: 5.8
Tested up to: 6.7
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: swarborno
Tags: blog, education, two-columns, right-sidebar, custom-logo, custom-menu, featured-images, theme-options
*/

:root {
  --bg-body: #f8fafc;
  --bg-card: #ffffff;
  --bg-subtle: #f1f5f9;
  --text-main: #0f172a;
  --text-body: #334155;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --accent-primary: #0f766e;
  --accent-primary-hover: #115e59;
  --accent-soft: #f0fdfa;
  --brand-green: #007a33;
  --brand-blue: #0047ab;
  --brand-red: #e11d48;
  --brand-orange: #ea580c;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 6px 20px rgba(15, 23, 42, 0.06);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --font-bangla: 'Hind Siliguri', 'Noto Sans Bengali', -apple-system, BlinkMacSystemFont, sans-serif;
  --content-font-size: 18px;
}

[data-theme="dark"] {
  --bg-body: #0b1120;
  --bg-card: #111827;
  --bg-subtle: #1e293b;
  --text-main: #f8fafc;
  --text-body: #cbd5e1;
  --text-muted: #94a3b8;
  --border-color: #1f2937;
  --accent-primary: #14b8a6;
  --accent-primary-hover: #2dd4bf;
  --accent-soft: rgba(20, 184, 166, 0.12);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-bangla);
  background-color: var(--bg-body);
  color: var(--text-body);
  line-height: 1.75;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.2s ease, color 0.2s ease;
}

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-primary-hover);
}

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

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 18px;
}

/* Reading Progress Bar */
.reading-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--brand-green), var(--accent-primary), var(--brand-blue));
  z-index: 9999;
  transition: width 0.1s linear;
}

/* Header */
.site-header {
  position: relative;
  z-index: 1000;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 66px;
  padding: 10px 0;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.site-branding .custom-logo {
  max-height: 44px;
  width: auto;
}

.brand-wordmark {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1;
  display: inline-flex;
  align-items: baseline;
}
.brand-wordmark .c-g { color: var(--brand-green); }
.brand-wordmark .c-b { color: var(--brand-blue); }
.brand-wordmark .c-k { color: var(--text-main); }
.brand-wordmark .c-r { color: var(--brand-red); }
.brand-wordmark .c-ext {
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-orange);
  margin-left: 2px;
}

.header-search {
  flex: 1;
  max-width: 440px;
}

.search-form-inline {
  position: relative;
  display: flex;
  align-items: center;
}

.search-form-inline input[type="search"] {
  width: 100%;
  padding: 9px 42px 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--bg-subtle);
  color: var(--text-main);
  font-family: var(--font-bangla);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.search-form-inline input[type="search"]:focus {
  border-color: var(--accent-primary);
  background: var(--bg-card);
}

.search-form-inline button {
  position: absolute;
  right: 6px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-form-inline button:hover {
  color: var(--accent-primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--bg-subtle);
  color: var(--text-main);
  font-family: var(--font-bangla);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

/* Category Bar (Hover Dropdown Menu) */
.category-nav-bar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  position: relative;
  z-index: 950;
}

.cat-mobile-header {
  display: none;
}

.cat-dropdown-menu {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 10px 0;
  list-style: none;
}

.cat-dropdown-menu > li {
  position: relative;
  display: flex;
  align-items: center;
}

.cat-dropdown-menu > li > a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-body);
  background: var(--bg-subtle);
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.cat-dropdown-menu > li.menu-item-has-children > a::after {
  content: "▾";
  font-size: 12px;
  line-height: 1;
  opacity: 0.75;
  transition: transform 0.2s ease;
}

.cat-dropdown-menu > li.menu-item-has-children:hover > a::after,
.cat-dropdown-menu > li.menu-item-has-children.is-open > a::after {
  transform: rotate(180deg);
}

.cat-dropdown-menu > li > a:hover,
.cat-dropdown-menu > li:hover > a,
.cat-dropdown-menu > li.current-menu-item > a,
.cat-dropdown-menu > li.current-menu-ancestor > a,
.cat-dropdown-menu > li.current-cat > a,
.cat-dropdown-menu > li.active > a {
  background: var(--accent-primary);
  color: #ffffff;
}

.submenu-toggle-btn {
  display: none;
}

/* Sub-menu Dropdown Panel */
.cat-dropdown-menu .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  padding: 6px;
  margin: 6px 0 0;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
  z-index: 1050;
}

/* Invisible hover bridge between pill and dropdown */
.cat-dropdown-menu .sub-menu::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 0;
  right: 0;
  height: 8px;
}

.cat-dropdown-menu li:hover > .sub-menu,
.cat-dropdown-menu li:focus-within > .sub-menu,
.cat-dropdown-menu li.is-open > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.cat-dropdown-menu .sub-menu li {
  position: relative;
}

.cat-dropdown-menu .sub-menu li a {
  display: block;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-body);
  background: transparent;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.cat-dropdown-menu .sub-menu li a:hover,
.cat-dropdown-menu .sub-menu li.active > a,
.cat-dropdown-menu .sub-menu li.current-menu-item > a {
  background: var(--accent-soft);
  color: var(--accent-primary);
}

/* 3rd level submenu (if created via WP Menus) */
.cat-dropdown-menu .sub-menu .sub-menu {
  top: 0;
  left: 100%;
  margin: 0 0 0 6px;
}

@media (max-width: 768px) {
  .cat-mobile-header {
    display: block;
    padding: 8px 0;
  }

  .cat-mobile-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-subtle);
    color: var(--text-main);
    font-family: var(--font-bangla);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
  }

  .cat-dropdown-wrap {
    display: none;
    padding-bottom: 12px;
  }

  .cat-dropdown-wrap.is-open {
    display: block;
  }

  .cat-dropdown-menu {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 4px 0 0;
  }

  .cat-dropdown-menu > li {
    flex-wrap: wrap;
    justify-content: space-between;
    background: var(--bg-subtle);
    border-radius: var(--radius-sm);
  }

  .cat-dropdown-menu > li > a {
    flex: 1;
    border-radius: var(--radius-sm);
    background: transparent;
    padding: 9px 12px;
  }

  .cat-dropdown-menu > li.menu-item-has-children > a::after {
    display: none;
  }

  .submenu-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 38px;
    background: transparent;
    border: none;
    border-left: 1px solid var(--border-color);
    color: var(--text-main);
    font-size: 15px;
    cursor: pointer;
  }

  .cat-dropdown-menu .sub-menu {
    position: static;
    width: 100%;
    box-shadow: none;
    border: none;
    border-top: 1px solid var(--border-color);
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    margin: 0;
    padding: 4px 8px 8px 16px;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
  }

  .cat-dropdown-menu .sub-menu::before {
    display: none;
  }

  .cat-dropdown-menu li.is-open > .sub-menu {
    display: block;
  }
}

/* All Posts Right-to-Left Scroller */
.posts-ticker-wrap {
  margin: 20px 0 6px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.ticker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-subtle);
}

.ticker-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}

.ticker-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-red);
  display: inline-block;
  animation: pulseDot 1.6s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}

.ticker-control-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-body);
  font-family: var(--font-bangla);
  font-size: 13px;
  padding: 4px 12px;
  border-radius: 999px;
  cursor: pointer;
}

.ticker-control-btn:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.ticker-viewport {
  overflow: hidden;
  padding: 14px 0;
  position: relative;
}

.ticker-track {
  display: flex;
  gap: 16px;
  width: max-content;
  animation: swarbornoScroll 45s linear infinite;
}

.ticker-viewport:hover .ticker-track,
.ticker-track.is-paused {
  animation-play-state: paused;
}

@keyframes swarbornoScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.ticker-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 290px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-body);
  color: var(--text-main);
  flex-shrink: 0;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.ticker-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.ticker-thumb {
  width: 68px;
  height: 52px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-subtle);
}

.ticker-card-info {
  min-width: 0;
}

.ticker-card-cat {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-primary);
  display: block;
  margin-bottom: 2px;
}

.ticker-card-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Main Layout */
.main-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  padding: 24px 0 48px;
  align-items: start;
}

/* Ad Slots */
.ad-slot-wrap {
  margin: 18px 0;
  text-align: center;
}

.ad-slot-inner {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  overflow: hidden;
}

.ad-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

/* Featured Post Card */
.featured-post-card {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 26px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.featured-post-card:hover {
  box-shadow: var(--shadow-md);
}

.featured-thumb-link {
  display: block;
  height: 100%;
  min-height: 270px;
  background: var(--bg-subtle);
  overflow: hidden;
}

.featured-thumb-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.featured-post-card:hover .featured-thumb-link img {
  transform: scale(1.03);
}

.featured-content {
  padding: 24px 26px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.post-cat-badge {
  display: inline-block;
  align-self: flex-start;
  padding: 3px 11px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-primary);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 10px;
}

.featured-title {
  margin: 0 0 10px;
  font-size: 25px;
  line-height: 1.35;
  font-weight: 700;
  color: var(--text-main);
}

.featured-title a {
  color: var(--text-main);
}

.featured-title a:hover {
  color: var(--accent-primary);
}

.post-excerpt {
  margin: 0 0 14px;
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.65;
}

.post-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--text-muted);
}

/* Section Heading */
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

.section-heading h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
}

/* Post Grid */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.post-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-primary);
}

.post-card-thumb {
  aspect-ratio: 16 / 10;
  background: var(--bg-subtle);
  overflow: hidden;
  display: block;
}

.post-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.post-card:hover .post-card-thumb img {
  transform: scale(1.04);
}

.post-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent-soft), var(--bg-subtle));
  color: var(--accent-primary);
  font-weight: 700;
  font-size: 22px;
}

.post-card-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.post-card-title {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.4;
  font-weight: 700;
}

.post-card-title a {
  color: var(--text-main);
}

.post-card-title a:hover {
  color: var(--accent-primary);
}

.post-card-body .post-excerpt {
  font-size: 14px;
  margin-bottom: 14px;
  flex: 1;
}

.in-feed-ad-item {
  grid-column: 1 / -1;
}

/* Pagination */
.pagination-wrap {
  margin-top: 32px;
  display: flex;
  justify-content: center;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-weight: 600;
  font-size: 15px;
}

.page-numbers.current,
.page-numbers:hover {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #ffffff;
}

/* Sidebar */
.site-sidebar {
  position: sticky;
  top: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-widget {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

.widget-title {
  margin: 0 0 14px;
  font-size: 17px;
  font-weight: 700;
  color: var(--text-main);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-post-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sidebar-post-item a {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: var(--text-main);
}

.sidebar-post-item a:hover .sidebar-post-title {
  color: var(--accent-primary);
}

.sidebar-post-thumb {
  width: 72px;
  height: 54px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-subtle);
}

.sidebar-post-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  display: block;
  margin-bottom: 3px;
}

.sidebar-post-date {
  font-size: 12px;
  color: var(--text-muted);
}

.sidebar-cat-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-cat-list li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  color: var(--text-body);
  font-size: 14px;
  font-weight: 500;
}

.sidebar-cat-list li a:hover {
  background: var(--accent-soft);
  color: var(--accent-primary);
}

.cat-count-badge {
  font-size: 12px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--bg-card);
  color: var(--text-muted);
}

/* Custom Paid Sponsor Card */
.sponsor-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-top: 3px solid var(--brand-orange);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.sponsor-card-inner {
  padding: 16px;
}

.sponsor-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(234, 88, 12, 0.12);
  color: var(--brand-orange);
  margin-bottom: 8px;
}

.sponsor-img {
  width: 100%;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  object-fit: cover;
  max-height: 180px;
}

.sponsor-title {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.35;
}

.sponsor-desc {
  margin: 0 0 14px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.55;
}

.sponsor-cta {
  display: inline-block;
  width: 100%;
  text-align: center;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  background: var(--accent-primary);
  color: #ffffff;
  font-weight: 600;
  font-size: 14px;
}

.sponsor-cta:hover {
  background: var(--accent-primary-hover);
  color: #ffffff;
}

/* Single Article Page */
.article-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px 36px;
  box-shadow: var(--shadow-sm);
}

.article-breadcrumb {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.article-breadcrumb a {
  color: var(--text-muted);
}

.article-breadcrumb a:hover {
  color: var(--accent-primary);
}

.article-title {
  margin: 8px 0 14px;
  font-size: 32px;
  line-height: 1.32;
  font-weight: 700;
  color: var(--text-main);
}

.article-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  margin-bottom: 22px;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.font-size-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.font-size-controls span {
  font-size: 13px;
  color: var(--text-muted);
  margin-right: 4px;
}

.font-btn {
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: var(--bg-subtle);
  color: var(--text-main);
  font-family: var(--font-bangla);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.font-btn:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.article-featured-image {
  margin: 0 0 24px;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.article-featured-image img {
  width: 100%;
  max-height: 460px;
  object-fit: cover;
}

/* Auto Table of Contents */
.toc-box {
  display: none;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--accent-primary);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin: 0 0 24px;
}

.toc-box.has-items {
  display: block;
}

.toc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.toc-header strong {
  font-size: 16px;
  color: var(--text-main);
}

.toc-list {
  margin: 0;
  padding-left: 20px;
  font-size: 15px;
}

.toc-list li {
  margin-bottom: 5px;
}

.toc-list li.toc-sub {
  margin-left: 16px;
  list-style-type: circle;
  font-size: 14px;
}

/* Entry Content Typography & Media */
.entry-content {
  font-size: var(--content-font-size);
  line-height: 1.85;
  color: var(--text-body);
}

.entry-content h2 {
  font-size: 1.45em;
  color: var(--text-main);
  margin: 1.6em 0 0.6em;
  line-height: 1.35;
}

.entry-content h3 {
  font-size: 1.2em;
  color: var(--text-main);
  margin: 1.4em 0 0.5em;
}

.entry-content p {
  margin: 0 0 1.2em;
}

.entry-content ul, .entry-content ol {
  margin: 0 0 1.3em;
  padding-left: 24px;
}

.entry-content blockquote {
  margin: 1.5em 0;
  padding: 14px 20px;
  border-left: 4px solid var(--accent-primary);
  background: var(--bg-subtle);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--text-main);
}

.entry-content figure,
.entry-content .wp-caption {
  margin: 24px 0;
  max-width: 100%;
}

.entry-content img {
  border-radius: var(--radius-sm);
  margin: 16px auto;
}

.entry-content figcaption,
.entry-content .wp-caption-text {
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 8px;
}

/* Responsive Embedded Videos */
.responsive-embed-wrap,
.wp-block-embed__wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius-sm);
  margin: 22px 0;
  background: #000;
}

.responsive-embed-wrap iframe,
.wp-block-embed__wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Optional PDF Download Box */
.pdf-download-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin: 28px 0;
  padding: 18px 22px;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  border: 1px solid var(--accent-primary);
}

.pdf-box-info h4 {
  margin: 0 0 4px;
  font-size: 17px;
  color: var(--text-main);
}

.pdf-box-info p {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
}

.pdf-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  background: var(--accent-primary);
  color: #ffffff;
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
}

.pdf-download-btn:hover {
  background: var(--accent-primary-hover);
  color: #ffffff;
}

/* Share & Tags */
.article-footer-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--border-color);
}

.article-tags a {
  display: inline-block;
  padding: 3px 10px;
  margin: 0 6px 6px 0;
  border-radius: 6px;
  background: var(--bg-subtle);
  color: var(--text-body);
  font-size: 13px;
}

.share-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--border-color);
  background: var(--bg-subtle);
  color: var(--text-main);
  cursor: pointer;
  font-family: var(--font-bangla);
}

.share-btn:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

/* Related Posts */
.related-posts-section {
  margin-top: 32px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

/* Comments */
.comments-area {
  margin-top: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 26px 30px;
}

.comments-title {
  margin: 0 0 18px;
  font-size: 20px;
  color: var(--text-main);
}

.comment-list {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
}

.comment-body {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  margin-bottom: 12px;
}

.comment-respond input[type="text"],
.comment-respond input[type="email"],
.comment-respond input[type="url"],
.comment-respond textarea {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-body);
  color: var(--text-main);
  font-family: var(--font-bangla);
  font-size: 15px;
  margin-top: 6px;
}

.comment-respond .submit {
  padding: 10px 22px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--accent-primary);
  color: #ffffff;
  font-family: var(--font-bangla);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

/* Footer */
.site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  padding: 44px 0 24px;
  margin-top: 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 36px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--border-color);
}

.footer-logo-link {
  display: inline-block;
  margin-bottom: 12px;
}

.footer-logo-link .custom-logo {
  max-height: 40px;
  width: auto;
}

.footer-about-text {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 380px;
}

.footer-contact-email {
  margin: 0 0 16px;
  font-size: 14px;
  color: var(--text-body);
}

.footer-social-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.footer-social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-body);
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.footer-social-btn:hover {
  transform: translateY(-2px);
  color: #ffffff;
  border-color: transparent;
}

.footer-social-btn.social-facebook:hover { background: #1877f2; }
.footer-social-btn.social-youtube:hover { background: #ff0000; }
.footer-social-btn.social-instagram:hover { background: #e1306c; }
.footer-social-btn.social-x:hover { background: #0f172a; }
.footer-social-btn.social-telegram:hover { background: #0088cc; }
.footer-social-btn.social-whatsapp:hover { background: #25d366; }
.footer-social-btn.social-linkedin:hover { background: #0a66c2; }

.footer-col-title {
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}

.footer-link-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.footer-link-list li a {
  font-size: 14px;
  color: var(--text-muted);
  transition: color 0.2s ease, padding-left 0.2s ease;
  display: inline-block;
}

.footer-link-list li a:hover {
  color: var(--accent-primary);
  padding-left: 3px;
}

.footer-bottom-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 20px;
}

.footer-copy {
  font-size: 14px;
  color: var(--text-muted);
}

.back-to-top-btn {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--bg-subtle);
  color: var(--text-body);
  font-family: var(--font-bangla);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.back-to-top-btn:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

@media (max-width: 768px) {
  .site-footer {
    padding: 34px 0 20px;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }
  .footer-bottom-bar {
    flex-direction: column;
    text-align: center;
  }
}

/* Archive & Search Headers */
.archive-header-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-bottom: 22px;
}

.archive-header-box h1 {
  margin: 0 0 6px;
  font-size: 24px;
  color: var(--text-main);
}

.archive-header-box p {
  margin: 0;
  color: var(--text-muted);
  font-size: 15px;
}

/* Responsive */
@media (max-width: 960px) {
  .main-layout {
    grid-template-columns: 1fr;
  }
  .site-sidebar {
    position: static;
  }
  .featured-post-card {
    grid-template-columns: 1fr;
  }
  .featured-thumb-link {
    min-height: 220px;
    max-height: 280px;
  }
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 12px;
  }
  .header-inner {
    flex-wrap: wrap;
    gap: 10px;
    min-height: auto;
    padding: 10px 0;
  }
  .header-search {
    order: 3;
    flex-basis: 100%;
    max-width: 100%;
  }
  .main-layout {
    padding: 16px 0 36px;
    gap: 20px;
  }
  .featured-content {
    padding: 18px 16px;
  }
  .featured-title {
    font-size: 21px;
  }
  .posts-grid,
  .related-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .article-container {
    padding: 18px 14px;
    border-radius: var(--radius-md);
  }
  .article-title {
    font-size: 23px;
  }
  .brand-wordmark {
    font-size: 24px;
  }
}

/* Prevent AdSense / Third-party embeds from breaking layout */
.site-sidebar,
.sidebar-widget,
.post-card,
.ad-slot-wrap,
.ad-slot-inner {
  overflow: hidden;
  max-width: 100%;
}

.site-sidebar ins.adsbygoogle,
.site-sidebar iframe,
.ad-slot-inner ins.adsbygoogle,
.ad-slot-inner iframe {
  max-width: 100% !important;
}


/* Homepage All Categories Section */
.home-categories-section {
  margin: 12px 0 36px;
}

.section-meta-count {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-subtle);
  padding: 4px 12px;
  border-radius: 999px;
}

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

.home-cat-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 15px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.home-cat-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-md);
  color: var(--accent-primary);
}

.home-cat-card-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.home-cat-name {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-main);
  transition: color 0.2s ease;
}

.home-cat-card:hover .home-cat-name {
  color: var(--accent-primary);
}

.home-cat-count {
  font-size: 13px;
  color: var(--text-muted);
}

.home-cat-arrow {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform 0.2s ease, color 0.2s ease;
}

.home-cat-card:hover .home-cat-arrow {
  transform: translateX(3px);
  color: var(--accent-primary);
}

/* Weekly Newsletter Section (beehiiv) */
.newsletter-section {
  margin: 0 0 40px;
}

.newsletter-box {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  align-items: center;
  gap: 28px;
  padding: 34px 36px;
  background: linear-gradient(135deg, var(--accent-soft) 0%, var(--bg-card) 65%);
  border: 1px solid var(--accent-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.newsletter-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--accent-primary);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 10px;
}

.newsletter-title {
  margin: 0 0 8px;
  font-size: 25px;
  line-height: 1.35;
  font-weight: 700;
  color: var(--text-main);
}

.newsletter-desc {
  margin: 0;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-muted);
}

.newsletter-form {
  display: flex;
  gap: 10px;
  width: 100%;
}

.newsletter-input {
  flex: 1;
  min-width: 0;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-main);
  font-family: var(--font-bangla);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s ease;
}

.newsletter-input:focus {
  border-color: var(--accent-primary);
}

.newsletter-submit-btn {
  padding: 12px 22px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--accent-primary);
  color: #ffffff;
  font-family: var(--font-bangla);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.2s ease;
}

.newsletter-submit-btn:hover {
  background: var(--accent-primary-hover);
}

.newsletter-note {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

.newsletter-embed-wrap {
  width: 100%;
  overflow: hidden;
}

.newsletter-embed-wrap iframe {
  max-width: 100% !important;
}

@media (max-width: 960px) {
  .all-categories-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .newsletter-box {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 26px 22px;
  }
}

@media (max-width: 640px) {
  .all-categories-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .home-cat-card {
    padding: 12px 14px;
  }
  .home-cat-name {
    font-size: 14px;
  }
  .newsletter-box {
    padding: 22px 16px;
  }
  .newsletter-title {
    font-size: 21px;
  }
  .newsletter-form {
    flex-direction: column;
  }
  .newsletter-submit-btn {
    width: 100%;
  }
}
