/*
Theme Name: LekhokBD Theme
Theme URI: https://lekhokbd.me
Author: LekhokBD Team
Author URI: https://lekhokbd.me
Description: A fully responsive WordPress theme for LekhokBD.me - Bangladesh's trusted information source
Version: 1.0.0
License: GPL v2 or later
Text Domain: lekhokbd
*/

/* =========================================
   CSS Variables & Reset
   ========================================= */
:root {
  --bg: #F8FAFC;
  --card-bg: #FFFFFF;
  --primary: #0F766E;
  --secondary: #0F172A;
  --accent: #D97706;
  --border: #E2E8F0;
  --text: #1E293B;
  --muted: #64748B;
  --radius: 6px;
  --transition: 0.2s ease;
  --font-bn: 'Hind Siliguri', sans-serif;
  --font-en: 'Inter', sans-serif;
}

[data-theme="dark"] {
  --bg: #0F172A;
  --card-bg: #111827;
  --primary: #14B8A6;
  --secondary: #F8FAFC;
  --accent: #14B8A6;
  --border: #334155;
  --text: #F8FAFC;
  --muted: #94A3B8;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-bn);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background-color var(--transition), color var(--transition);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition);
}

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary);
  color: white;
  padding: 8px;
  z-index: 1000;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.75rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background-color: var(--primary);
  border-radius: 2px;
}

/* =========================================
   Header & Navigation
   ========================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--card-bg);
  border-bottom: 1px solid var(--border);
  transition: background-color var(--transition), border-color var(--transition);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-family: var(--font-en);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--secondary);
  letter-spacing: -0.02em;
}

.logo span {
  font-weight: 400;
  font-size: 1rem;
  color: var(--primary);
}

.logo img {
  max-height: 40px;
  width: auto;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  transition: background-color var(--transition), border-color var(--transition);
}

.theme-toggle:hover {
  background-color: var(--bg);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

.menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 24px;
  padding: 8px 0;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--text);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.main-nav {
  position: fixed;
  top: 64px;
  left: 0;
  width: 280px;
  height: calc(100vh - 64px);
  background-color: var(--card-bg);
  border-right: 1px solid var(--border);
  border-bottom: none;
  transform: translateX(-100%);
  transition: transform 0.3s ease-in-out;
  z-index: 99;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
}

.main-nav::-webkit-scrollbar { display: none; }

.main-nav.is-open {
  transform: translateX(0);
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 1rem 0;
  min-width: auto;
}

.nav-link {
  display: block;
  padding: 1rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  border-left: 3px solid transparent;
  transition: all var(--transition);
}

.nav-link:hover, .nav-link.active, .current-menu-item .nav-link {
  background-color: var(--bg);
  color: var(--primary);
  border-left-color: var(--primary);
}

.nav-backdrop {
  position: fixed;
  inset: 0;
  top: 64px;
  background-color: rgba(15, 23, 42, 0.5);
  z-index: 98;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  backdrop-filter: blur(2px);
}

.nav-backdrop.is-visible {
  opacity: 1;
  visibility: visible;
}

@media (min-width: 768px) {
  .menu-toggle {
    display: none;
  }

  .main-nav {
    position: sticky;
    top: 64px;
    width: 100%;
    height: auto;
    transform: none;
    border-right: none;
    border-bottom: 1px solid var(--border);
    overflow-y: hidden;
    overflow-x: auto;
    z-index: 90;
  }

  .nav-list {
    flex-direction: row;
    gap: 0.5rem;
    padding: 0.75rem 0;
    min-width: max-content;
  }

  .nav-link {
    padding: 0.5rem 1rem;
    border-bottom: 2px solid transparent;
    border-left: none;
  }

  .nav-link:hover, .nav-link.active, .current-menu-item .nav-link {
    background-color: transparent;
    border-left-color: transparent;
    border-bottom-color: var(--primary);
  }

  .nav-backdrop {
    display: none;
  }
}

/* =========================================
   Search Section
   ========================================= */
.search-section {
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}

.search-form {
  display: flex;
  max-width: 700px;
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: 9999px;
  overflow: hidden;
  background-color: var(--card-bg);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.search-form:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}

.search-input {
  flex: 1;
  border: none;
  padding: 0.875rem 1.5rem;
  font-size: 1rem;
  background: transparent;
  color: var(--text);
  outline: none;
  font-family: var(--font-bn);
}

.search-input::placeholder {
  color: var(--muted);
}

.search-button {
  padding: 0 1.5rem;
  background-color: var(--primary);
  color: white;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: background-color var(--transition);
}

.search-button:hover {
  background-color: #0d5e58;
}

/* =========================================
   Posts Grid
   ========================================= */
.latest-posts {
  margin-bottom: 3rem;
}

.posts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

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

.post-thumbnail {
  aspect-ratio: 16/9;
  width: 100%;
  object-fit: cover;
  background-color: var(--border);
}

.post-content {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.post-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background-color: var(--primary);
  color: white;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  width: fit-content;
}

.post-title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.75rem;
  color: var(--secondary);
}

.post-title a {
  color: var(--secondary);
  transition: color var(--transition);
}

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

.post-excerpt {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 1.25rem;
  flex: 1;
}

.read-more {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.95rem;
  border-bottom: 1px solid transparent;
  width: fit-content;
  transition: border-color var(--transition);
}

.read-more:hover {
  border-bottom-color: var(--primary);
}

/* =========================================
   Pagination
   ========================================= */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin: 3rem 0;
  flex-wrap: wrap;
}

.page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-weight: 500;
  transition: all var(--transition);
}

.page-link:hover {
  background-color: var(--bg);
  border-color: var(--muted);
}

.page-link.active, .page-link.current {
  background-color: var(--primary);
  color: white;
  border-color: var(--primary);
}

.page-link.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* =========================================
   Content Grid (Popular + Categories)
   ========================================= */
.content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

@media (min-width: 1024px) {
  .content-grid {
    grid-template-columns: 1.2fr 0.8fr;
  }
}

.popular-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.popular-item {
  display: flex;
  gap: 1rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background-color: var(--card-bg);
  transition: border-color var(--transition);
}

.popular-item:hover {
  border-color: var(--primary);
}

.popular-thumb {
  width: 100px;
  height: 75px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
  background-color: var(--border);
}

.popular-title {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--secondary);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* =========================================
   Categories
   ========================================= */
.category-list {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background-color: var(--card-bg);
  overflow: hidden;
}

.category-item {
  border-bottom: 1px solid var(--border);
}

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

.category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1rem 1.25rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  text-align: left;
  transition: background-color var(--transition);
}

.category-header:hover {
  background-color: var(--bg);
}

.category-toggle-icon {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease;
}

.category-item.open .category-toggle-icon {
  transform: rotate(180deg);
}

.category-children {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease-out;
}

.category-item.open .category-children {
  grid-template-rows: 1fr;
}

.category-children-inner {
  overflow: hidden;
}

.category-sublist {
  padding: 0 1.25rem 1rem 1.25rem;
}

.category-sublink {
  display: block;
  padding: 0.5rem 0;
  font-size: 0.9rem;
  color: var(--muted);
  border-left: 2px solid var(--border);
  padding-left: 1rem;
  transition: color var(--transition), border-color var(--transition);
}

.category-sublink:hover {
  color: var(--primary);
  border-left-color: var(--primary);
}

.category-single {
  padding: 1rem 1.25rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  display: block;
  transition: background-color var(--transition), color var(--transition);
  border-bottom: 1px solid var(--border);
}

.category-single:last-child {
  border-bottom: none;
}

.category-single:hover {
  background-color: var(--bg);
  color: var(--primary);
}

/* =========================================
   Social Connect
   ========================================= */
.social-connect {
  margin-bottom: 3rem;
}

.social-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .social-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.social-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  background-color: var(--card-bg);
  transition: border-color var(--transition), transform var(--transition);
}

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

.social-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--secondary);
}

.social-desc {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.social-btn {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  background-color: var(--primary);
  color: white;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  transition: background-color var(--transition);
}

.social-btn:hover {
  background-color: #0d5e58;
}

/* =========================================
   Site Description
   ========================================= */
.site-description {
  margin-bottom: 3rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  background-color: var(--card-bg);
  text-align: center;
}

.site-desc-logo {
  font-family: var(--font-en);
  font-size: 2rem;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 1rem;
}

.site-desc-logo span {
  font-weight: 400;
  color: var(--primary);
}

.site-desc-text {
  max-width: 700px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.8;
}

/* =========================================
   Footer
   ========================================= */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0 2rem;
  background-color: var(--card-bg);
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  margin-bottom: 2rem;
}

.footer-link {
  font-size: 0.95rem;
  color: var(--muted);
  transition: color var(--transition);
}

.footer-link:hover {
  color: var(--primary);
}

.footer-info {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.footer-info a {
  color: var(--primary);
}

.footer-copyright {
  font-size: 0.85rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
}

/* =========================================
   Breadcrumbs
   ========================================= */
.breadcrumbs {
  padding: 1rem 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.breadcrumbs li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

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

.breadcrumbs .sep {
  color: var(--border);
}

.breadcrumbs .current {
  color: var(--text);
  font-weight: 600;
}

/* =========================================
   Single Post Styles
   ========================================= */
.post-header {
  padding-bottom: 1.5rem;
}

.post-title-main {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--secondary);
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .post-title-main {
    font-size: 2.5rem;
  }
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.25rem;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.post-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.post-meta svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.post-meta .cat-badge {
  background-color: var(--primary);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.post-featured-image {
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 2rem;
  background-color: var(--border);
}

.post-featured-image img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.post-content-body {
  font-size: 1.05rem;
  line-height: 1.9;
  color: var(--text);
}

.post-content-body > * + * {
  margin-top: 1.25rem;
}

.post-content-body p {
  color: var(--text);
}

.post-content-body h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--secondary);
  margin-top: 2.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
}

.post-content-body h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--secondary);
  margin-top: 2rem;
}

.post-content-body h3::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: var(--primary);
  border-radius: 50%;
  margin-right: 0.6rem;
  vertical-align: middle;
}

.post-content-body h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary);
  margin-top: 1.5rem;
}

.post-content-body h5 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-top: 1.25rem;
}

.post-content-body h6 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  margin-top: 1rem;
}

.post-content-body ol,
.post-content-body ul {
  padding-left: 1.5rem;
  list-style: decimal;
}

.post-content-body ul {
  list-style: disc;
}

.post-content-body li {
  margin-bottom: 0.5rem;
}

.post-content-body li::marker {
  color: var(--primary);
  font-weight: 700;
}

.post-content-body blockquote {
  border-left: 4px solid var(--accent);
  background-color: var(--card-bg);
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--muted);
  font-style: italic;
}

.post-content-body strong {
  color: var(--secondary);
  font-weight: 700;
}

/* Table - horizontally scrollable on mobile */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  -webkit-overflow-scrolling: touch;
}

.post-content-body table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.post-content-body th,
.post-content-body td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.post-content-body thead th {
  background-color: var(--primary);
  color: white;
  font-weight: 600;
}

.post-content-body tbody tr:nth-child(even) {
  background-color: var(--bg);
}

/* Tags */
.tags-section {
  margin: 2.5rem 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}

.tags-section .tags-label {
  font-weight: 700;
  color: var(--secondary);
  margin-right: 0.25rem;
}

.tag-pill {
  padding: 0.4rem 0.9rem;
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--muted);
  transition: all var(--transition);
}

.tag-pill:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Author Box */
.author-box {
  display: flex;
  gap: 1.25rem;
  padding: 1.5rem;
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 2.5rem 0;
}

.author-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background-color: var(--border);
}

.author-name {
  font-weight: 700;
  color: var(--secondary);
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}

.author-name a {
  color: var(--secondary);
}

.author-name a:hover {
  color: var(--primary);
}

.author-role {
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.author-bio {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.7;
}

@media (max-width: 480px) {
  .author-box {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }
}

/* Next / Prev */
.nav-posts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 2.5rem 0;
}

@media (min-width: 640px) {
  .nav-posts {
    grid-template-columns: 1fr 1fr;
  }
}

.nav-post-card {
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background-color: var(--card-bg);
  transition: border-color var(--transition), transform var(--transition);
}

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

.nav-post-card.next {
  text-align: right;
  align-items: flex-end;
}

.nav-direction {
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-post-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--secondary);
  line-height: 1.4;
}

/* Comments */
.comments-section {
  margin: 3rem 0;
}

.comment-form {
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.comment-form h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--secondary);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

@media (min-width: 640px) {
  .form-row.two-col {
    grid-template-columns: 1fr 1fr;
  }
}

.form-row input,
.form-row textarea {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-bn);
  font-size: 0.95rem;
}

.form-row textarea {
  min-height: 100px;
  resize: vertical;
}

.comment-submit {
  padding: 0.7rem 1.5rem;
  background-color: var(--primary);
  color: white;
  border-radius: var(--radius);
  font-weight: 600;
  transition: background-color var(--transition);
}

.comment-submit:hover {
  background-color: #0d5e58;
}

.comment-thread {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.comment {
  display: flex;
  gap: 1rem;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background-color: var(--card-bg);
}

.comment-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  flex-shrink: 0;
  background-color: var(--border);
  object-fit: cover;
}

.comment-body {
  flex: 1;
  min-width: 0;
}

.comment-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.35rem;
}

.comment-author {
  font-weight: 700;
  color: var(--secondary);
  font-size: 0.95rem;
}

.comment-time {
  font-size: 0.8rem;
  color: var(--muted);
}

.comment-text {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 0.5rem;
}

.comment-reply-btn {
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 600;
}

.comment-replies {
  margin-top: 1rem;
  margin-left: 1.25rem;
  padding-left: 1.25rem;
  border-left: 2px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Related Posts */
.related-posts {
  margin: 3rem 0;
}

.related-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .related-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.related-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background-color: var(--card-bg);
  transition: border-color var(--transition), transform var(--transition);
}

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

.related-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background-color: var(--border);
}

.related-body {
  padding: 1rem;
}

.related-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.4rem;
}

.related-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--secondary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Sidebar */
.sidebar-box {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background-color: var(--card-bg);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.sidebar-box h2.section-title {
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.archive-list {
  display: flex;
  flex-direction: column;
}

.archive-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

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

.archive-item:hover {
  color: var(--primary);
}

.archive-count {
  background-color: var(--bg);
  color: var(--muted);
  font-size: 0.75rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
}

.popular-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Share Box */
.share-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background-color: var(--card-bg);
  margin: 2rem 0;
}

.share-label {
  font-weight: 700;
  color: var(--secondary);
  font-size: 0.95rem;
  margin-right: 0.25rem;
}

.share-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: transform var(--transition), opacity var(--transition);
}

.share-icon:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

.share-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.share-icon.facebook {
  background-color: #1877F2;
}

.share-icon.whatsapp {
  background-color: #25D366;
}

.share-icon.twitter {
  background-color: #000000;
}

.share-icon.telegram {
  background-color: #26A5E4;
}

.share-icon.linkedin {
  background-color: #0A66C2;
}

.share-icon.copy {
  background-color: var(--muted);
}

/* Join Bar */
.join-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  border: 1px dashed var(--primary);
  border-radius: var(--radius);
  background-color: var(--card-bg);
  margin-bottom: 2rem;
  text-align: center;
}

.join-bar p {
  width: 100%;
  font-weight: 600;
  color: var(--secondary);
  margin-bottom: 0.25rem;
}

.join-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  color: white;
  transition: opacity var(--transition), transform var(--transition);
}

.join-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.join-btn.fb {
  background-color: #1877F2;
}

.join-btn.wa {
  background-color: #25D366;
}

.join-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  stroke: none;
}

/* Author Profile */
.author-hero {
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

.author-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 90px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  opacity: 0.9;
}

.author-hero-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
}

.author-hero-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--card-bg);
  margin-top: 20px;
  background-color: var(--border);
}

.author-hero-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--secondary);
}

.author-hero-role {
  display: inline-block;
  background-color: var(--primary);
  color: white;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

.author-hero-bio {
  max-width: 640px;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.8;
  margin-top: 0.25rem;
}

.author-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  width: 100%;
}

.author-stat {
  text-align: center;
}

.author-stat strong {
  display: block;
  font-size: 1.3rem;
  color: var(--secondary);
  font-weight: 700;
}

.author-stat span {
  font-size: 0.8rem;
  color: var(--muted);
}

.author-social {
  display: flex;
  gap: 0.6rem;
  margin-top: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.author-social a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: transform var(--transition), opacity var(--transition);
}

.author-social a:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

.author-social svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.author-social .facebook {
  background-color: #1877F2;
}

.author-social .whatsapp {
  background-color: #25D366;
}

.author-social .twitter {
  background-color: #000000;
}

.author-social .linkedin {
  background-color: #0A66C2;
}

.author-social .website {
  background-color: var(--primary);
}

.author-follow-btn {
  margin-top: 1.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.75rem;
  background-color: var(--primary);
  color: white;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  transition: background-color var(--transition), transform var(--transition);
}

.author-follow-btn:hover {
  background-color: #0d5e58;
  transform: translateY(-1px);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-chip {
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--muted);
  transition: all var(--transition);
  background: transparent;
}

.filter-chip:hover,
.filter-chip.active {
  background-color: var(--primary);
  border-color: var(--primary);
  color: white;
}

.filter-count {
  font-size: 0.9rem;
  color: var(--muted);
}

/* Responsive */
@media (max-width: 639px) {
  .section-title {
    font-size: 1.25rem;
  }
  
  .post-title {
    font-size: 1.1rem;
  }
  
  .search-form {
    border-radius: var(--radius);
  }

  .post-title-main {
    font-size: 1.5rem;
  }

  .author-hero {
    padding: 1.5rem 1rem;
  }
}
/* =========================================
   Logo Styles - Updated
   ========================================= */
.logo {
    display: flex;
    align-items: center;
    font-family: var(--font-en);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary);
    letter-spacing: -0.02em;
    text-decoration: none;
    flex-shrink: 0;
    max-width: 60%;
}

.logo .logo-text {
    display: inline-block;
    color: var(--secondary);
    transition: color var(--transition);
}

.logo .logo-dot {
    font-weight: 400;
    font-size: 1.2rem;
    color: var(--primary);
    transition: color var(--transition);
}

/* Custom Logo Images */
.logo-img {
    display: block;
    height: auto;
    width: auto;
    max-height: 60px;
    max-width: 200px;
    object-fit: contain;
    transition: opacity 0.3s ease;
}

/* Light/Dark Logo Toggle */
.logo-light {
    display: block;
}

.logo-dark {
    display: none;
}

[data-theme="dark"] .logo-light {
    display: none;
}

[data-theme="dark"] .logo-dark {
    display: block;
}

/* Logo container to prevent overflow */
.logo {
    overflow: hidden;
    max-width: 100%;
}

/* Responsive Logo */
@media (max-width: 768px) {
    .logo {
        max-width: 50%;
        font-size: 1.2rem;
    }
    
    .logo .logo-dot {
        font-size: 1rem;
    }
    
    .logo-img {
        max-height: 48px;
        max-width: 160px;
    }
}

@media (max-width: 480px) {
    .logo {
        max-width: 45%;
        font-size: 1rem;
    }
    
    .logo .logo-dot {
        font-size: 0.85rem;
    }
    
    .logo-img {
        max-height: 36px;
        max-width: 120px;
    }
}

/* Header actions alignment */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

@media (max-width: 480px) {
    .header-actions {
        gap: 0.5rem;
    }
}
/* =========================================
   Site Description / About Section Logo
   ========================================= */
.site-description {
    margin-bottom: 3rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    background-color: var(--card-bg);
    text-align: center;
}

.site-desc-logo {
    font-family: var(--font-en);
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.site-desc-logo span {
    font-weight: 400;
    color: var(--primary);
}

/* About Section Logo Images */
.about-logo-img {
    display: block;
    height: auto;
    width: auto;
    max-height: 80px;
    max-width: 300px;
    object-fit: contain;
    margin: 0 auto;
    transition: opacity 0.3s ease;
}

/* Light logo visible by default */
.about-logo-light {
    display: block;
}

.about-logo-dark {
    display: none;
}

/* Dark mode logo switching */
[data-theme="dark"] .about-logo-light {
    display: none !important;
}

[data-theme="dark"] .about-logo-dark {
    display: block !important;
}

/* If no dark logo uploaded, show light logo in dark mode too */
[data-theme="dark"] .about-logo-dark:not([src]),
[data-theme="dark"] .about-logo-dark[src=""],
[data-theme="dark"] .about-logo-dark[src="#"] {
    display: none !important;
}

[data-theme="dark"] .about-logo-light:only-child {
    display: block !important;
}

.site-desc-text {
    max-width: 700px;
    margin: 0 auto;
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.8;
}

/* Responsive About Logo */
@media (max-width: 768px) {
    .about-logo-img {
        max-height: 60px;
        max-width: 220px;
    }
    
    .site-desc-logo {
        font-size: 1.5rem;
    }
    
    .site-desc-text {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .about-logo-img {
        max-height: 45px;
        max-width: 160px;
    }
    
    .site-desc-logo {
        font-size: 1.2rem;
    }
    
    .site-description {
        padding: 1.5rem 1rem;
    }
    
    .site-desc-text {
        font-size: 0.9rem;
    }
}