/*
Theme Name: PersianBlog - Dadhoosh Style
Theme URI: https://dadhoosh.com
Author: Dadhoosh Team
Author URI: https://dadhoosh.com
Description: قالب وبلاگی فارسی با طراحی مدرن مشابه سایت dadhoosh.com - مناسب برای سایت‌های حقوقی و مشاوره
Version: 2.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: persianblog
Tags: blog, legal, consultation, dadhoosh, rtl-language-support, responsive
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.0
*/

:root {
  --primary: #2d3a8c; /* آبی اصلی dadhoosh */
  --primary-light: #40bfaa; /* سبز آبی روشن */
  --secondary: #40bfaa; /* سبز آبی اصلی */
  --secondary-light: #5fcfbc; /* سبز آبی کمرنگ */
  --dark-blue: #19216c; /* آبی تیره */
  --accent: #b0a8b9; /* بنفش خاکستری */
  --bg-light: #f7f9fc; /* پس‌زمینه روشن */
  --bg-white: #ffffff; /* پس‌زمینه سفید */
  --text-dark: #1a1b25; /* متن تیره */
  --text-light: #ffffff; /* متن سفید */
  --text-muted: #6b7280; /* متن خاکستری */
  --border-color: #e2e8f0; /* خط خاکستری روشن */
  --card-bg: rgba(255, 255, 255, 0.95);
  --success: #40bfaa;
  --warning: #f1c40f;
  --danger: #e74c3c;
  --info: #5fcfbc;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.2);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Vazirmatn", "Tahoma", sans-serif;
}

body {
  background-color: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.6;
  direction: rtl;
  font-size: 16px;
}

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

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

a:hover {
  color: var(--secondary);
}

ul {
  list-style: none;
}

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

/* ----- دکمه‌های اصلی ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  line-height: 1;
}

.btn-primary {
  background: linear-gradient(45deg, var(--secondary), var(--primary));
  color: white;
  box-shadow: 0 4px 15px rgba(64, 191, 170, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(64, 191, 170, 0.4);
  color: white;
}

.btn-secondary {
  background-color: white;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-secondary:hover {
  background-color: var(--primary);
  color: white;
}

.btn-outline {
  background-color: transparent;
  color: var(--primary);
  border: 2px solid var(--border-color);
}

.btn-outline:hover {
  background-color: var(--primary);
  color: white;
  border-color: var(--primary);
}

.btn-block {
  width: 100%;
}

.btn i {
  margin-left: 8px;
}

/* ----- هدر سایت ----- */
.main-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--dark-blue) 100%);
  box-shadow: var(--shadow);
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.main-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 45px;
  margin-left: 12px;
}

.logo span {
  font-size: 1.6rem;
  font-weight: 700;
  color: white;
}

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 25px;
}

.main-nav a {
  padding: 10px 16px;
  border-radius: 8px;
  transition: all 0.3s ease;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
}

.main-nav a:hover,
.main-nav a.active {
  background-color: rgba(255, 255, 255, 0.15);
  color: white;
}

.user-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.user-credit {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  background: linear-gradient(45deg, var(--secondary), var(--primary));
  border-radius: 20px;
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
}

.user-credit i {
  margin-left: 8px;
  color: #ffd700;
}

.user-menu {
  position: relative;
}

.user-menu-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background-color: rgba(255, 255, 255, 0.15);
  border: none;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
}

.user-menu-btn:hover {
  background-color: rgba(255, 255, 255, 0.25);
}

.user-menu-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: white;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  min-width: 220px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
  box-shadow: var(--shadow-lg);
  margin-top: 8px;
}

.user-menu-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-menu-dropdown ul {
  list-style: none;
  padding: 10px 0;
}

.user-menu-dropdown li {
  padding: 0;
}

.user-menu-dropdown li.divider {
  height: 1px;
  background-color: var(--border-color);
  margin: 10px 0;
}

.user-menu-dropdown a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  color: var(--text-dark);
  transition: all 0.3s ease;
}

.user-menu-dropdown a:hover {
  background-color: rgba(64, 191, 170, 0.1);
  color: var(--secondary);
}

.history-mobile-toggle {
  display: none;
  width: 40px;
  height: 40px;
  background-color: var(--secondary);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
}

.history-mobile-toggle:hover {
  background-color: var(--primary);
}

.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
}

/* ----- منوی موبایل ----- */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 300px;
  height: 100vh;
  background-color: white;
  z-index: 1001;
  transition: right 0.3s ease;
  box-shadow: var(--shadow-xl);
}

.mobile-menu.active {
  right: 0;
}

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.mobile-menu-header img {
  height: 35px;
}

.mobile-menu-header .logo span {
  color: white;
}

.close-menu {
  background: transparent;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
}

.mobile-menu ul {
  padding: 20px 0;
}

.mobile-menu li {
  margin: 0;
}

.mobile-menu li.divider {
  height: 1px;
  background-color: var(--border-color);
  margin: 15px 20px;
}

.mobile-menu a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 20px;
  color: var(--text-dark);
  transition: all 0.3s ease;
}

.mobile-menu a:hover {
  background-color: rgba(64, 191, 170, 0.1);
  color: var(--secondary);
}

/* بک‌گراند تیره هنگام باز بودن منوی موبایل */
body.menu-open::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

/* ----- فوتر سایت ----- */
.main-footer {
  background: linear-gradient(135deg, var(--dark-blue) 0%, var(--primary) 100%);
  color: white;
  padding: 50px 0 20px;
  margin-top: 60px;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 30px;
}

.footer-about .footer-logo {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.footer-about .footer-logo img {
  height: 40px;
  margin-left: 10px;
}

.footer-about .footer-logo span {
  font-size: 1.3rem;
  font-weight: 700;
  color: white;
}

.footer-about p {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 20px;
  line-height: 1.8;
}

.footer-links h3 {
  color: var(--secondary);
  margin-bottom: 20px;
  font-size: 1.2rem;
}

.footer-links ul li {
  margin-bottom: 10px;
}

.footer-links ul li a {
  color: rgba(255, 255, 255, 0.8);
  transition: all 0.3s ease;
}

.footer-links ul li a:hover {
  color: var(--secondary);
  padding-right: 5px;
}

.footer-contact p {
  margin-bottom: 10px;
  color: rgba(255, 255, 255, 0.8);
}

.footer-contact i {
  margin-left: 8px;
  color: var(--secondary);
}

.social-links {
  display: flex;
  gap: 15px;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transition: all 0.3s ease;
  color: white;
}

.social-links a:hover {
  background-color: var(--secondary);
  transform: translateY(-3px);
  color: white;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
}

.footer-links-bottom {
  display: flex;
  gap: 20px;
}

.footer-links-bottom a {
  color: rgba(255, 255, 255, 0.8);
  transition: color 0.3s ease;
}

.footer-links-bottom a:hover {
  color: var(--secondary);
}

/* ----- مودال ورود و ثبت‌نام ----- */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background-color: white;
  border-radius: 15px;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border-color);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 30px;
  border-bottom: 1px solid var(--border-color);
  background: linear-gradient(45deg, var(--primary), var(--secondary));
  color: white;
  border-radius: 15px 15px 0 0;
}

.modal-header h3 {
  color: white;
  font-size: 1.5rem;
}

.modal-close {
  background: transparent;
  border: none;
  color: white;
  font-size: 1.8rem;
  cursor: pointer;
  transition: color 0.3s ease;
}

.modal-close:hover {
  color: var(--danger);
}

.modal-body {
  padding: 30px;
}

.tabs .tab-header {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 30px;
}

.tabs .tab {
  flex: 1;
  padding: 15px;
  text-align: center;
  background-color: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

.tabs .tab.active {
  color: var(--secondary);
  border-bottom: 2px solid var(--secondary);
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-dark);
  font-weight: 500;
}

.form-group input {
  width: 100%;
  padding: 12px 15px;
  background-color: white;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-dark);
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-group input:focus {
  border-color: var(--secondary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(64, 191, 170, 0.1);
}

.form-remember {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.form-remember label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
}

.forgot-password {
  color: var(--secondary);
  font-size: 0.9rem;
}

.form-agree {
  margin-bottom: 20px;
}

.form-agree label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.required {
  color: var(--danger);
}

/* ----- صفحه اصلی - قسمت هیرو ----- */
.hero-section {
  padding: 80px 0;
  text-align: center;
  position: relative;
  background: linear-gradient(135deg, var(--bg-light) 0%, rgba(64, 191, 170, 0.05) 100%);
}

.hero-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, rgba(45, 58, 140, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: 3rem;
  margin-bottom: 20px;
  background: linear-gradient(45deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
}

.hero-subtitle {
  font-size: 1.3rem;
  color: var(--text-muted);
  margin-bottom: 40px;
}

.search-container {
  max-width: 700px;
  margin: 0 auto 30px;
  position: relative;
}

.search-input {
  width: 100%;
  padding: 15px 25px;
  background-color: white;
  border: 2px solid var(--border-color);
  border-radius: 15px;
  color: var(--text-dark);
  font-size: 1.1rem;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  outline: none;
}

.search-input:focus {
  border-color: var(--secondary);
  box-shadow: 0 5px 25px rgba(64, 191, 170, 0.2);
}

.search-btn {
  position: absolute;
  top: 50%;
  left: 15px;
  transform: translateY(-50%);
  background: transparent;
  color: var(--text-muted);
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.search-btn:hover {
  color: var(--secondary);
}

/* ----- دسته‌بندی‌ها ----- */
.categories-section {
  padding: 50px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 40px;
  font-size: 2rem;
  background: linear-gradient(45deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 600;
}

.categories-tabs {
  margin-bottom: 30px;
}

.tabs-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 30px;
}

.tab-btn {
  padding: 12px 24px;
  background-color: white;
  border: 2px solid var(--border-color);
  border-radius: 10px;
  color: var(--text-dark);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
  font-weight: 500;
}

.tab-btn:hover,
.tab-btn.active {
  background-color: var(--secondary);
  color: white;
  border-color: var(--secondary);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(64, 191, 170, 0.3);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.view-more {
  text-align: center;
  margin-top: 30px;
}

/* ----- گرید مقالات ----- */
.blog-section {
  padding: 50px 0;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
}

.blog-card {
  background-color: white;
  border-radius: 15px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.blog-card:hover {
  transform: translateY(-8px);
  border-color: var(--secondary);
  box-shadow: var(--shadow-lg);
}

.blog-card-img {
  width: 100%;
  height: 220px;
  overflow: hidden;
  position: relative;
}

.blog-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.blog-card:hover .blog-card-img img {
  transform: scale(1.1);
}

.blog-card-category {
  position: absolute;
  top: 15px;
  right: 15px;
  background: linear-gradient(45deg, var(--secondary), var(--primary));
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  z-index: 1;
}

.blog-card-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.blog-card-title {
  font-size: 1.3rem;
  margin-bottom: 15px;
  line-height: 1.4;
}

.blog-card-title a {
  color: var(--text-dark);
  transition: color 0.3s ease;
}

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

.blog-card-excerpt {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 20px;
  line-height: 1.7;
  flex-grow: 1;
}

.blog-card-meta {
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border-color);
  padding-top: 15px;
}

.blog-card-meta i {
  margin-left: 5px;
  color: var(--secondary);
}

/* ----- پاپیولار پست ----- */
.popular-posts {
  margin-bottom: 60px;
  padding: 50px 0;
  background: linear-gradient(to bottom, rgba(64, 191, 170, 0.05), transparent);
}

.popular-posts-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
}

.popular-posts-title {
  font-size: 2rem;
  background: linear-gradient(45deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 600;
}

.popular-slider-controls {
  display: flex;
  gap: 10px;
}

.slider-btn {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background-color: white;
  border: 2px solid var(--border-color);
  color: var(--text-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.slider-btn:hover {
  background-color: var(--secondary);
  color: white;
  border-color: var(--secondary);
  transform: translateY(-2px);
}

.popular-posts-slider {
  display: flex;
  gap: 25px;
  overflow-x: auto;
  padding: 15px 0;
  scroll-behavior: smooth;
  scrollbar-width: none; /* Firefox */
}

.popular-posts-slider::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.popular-post-card {
  min-width: 320px;
  flex: 0 0 320px;
}

/* ----- ستون کناری ----- */
.sidebar {
  background-color: white;
  border-radius: 15px;
  padding: 30px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
  margin-bottom: 30px;
}

.sidebar-title {
  font-size: 1.4rem;
  color: var(--primary);
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--border-color);
}

.sidebar-categories ul li {
  margin-bottom: 12px;
}

.sidebar-categories ul li a {
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
  padding: 8px 0;
  transition: all 0.3s ease;
  border-radius: 5px;
}

.sidebar-categories ul li a:hover {
  color: var(--secondary);
  padding-right: 10px;
  background-color: rgba(64, 191, 170, 0.1);
}

.sidebar-posts-item {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-posts-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.sidebar-post-img {
  width: 80px;
  height: 80px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
}

.sidebar-post-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar-post-content {
  flex: 1;
}

.sidebar-post-title {
  font-size: 1rem;
  margin-bottom: 8px;
  line-height: 1.4;
}

.sidebar-post-title a {
  color: var(--text-dark);
}

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

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

.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-item {
  padding: 6px 12px;
  background-color: rgba(64, 191, 170, 0.1);
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: all 0.3s ease;
}

.tag-item:hover {
  background-color: var(--secondary);
  color: white;
  transform: translateY(-2px);
}

/* ----- صفحه مقاله ----- */
.single-post {
  padding: 50px 0;
}

.post-header {
  margin-bottom: 40px;
}

.post-categories {
  margin-bottom: 15px;
}

.post-category {
  display: inline-block;
  padding: 5px 12px;
  background: linear-gradient(45deg, var(--secondary), var(--primary));
  color: white;
  border-radius: 15px;
  font-size: 0.85rem;
  margin-left: 8px;
}

.post-title {
  font-size: 2.8rem;
  margin-bottom: 25px;
  line-height: 1.3;
  color: var(--text-dark);
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 25px;
  margin-bottom: 30px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.post-meta span {
  display: flex;
  align-items: center;
}

.post-meta i {
  margin-left: 8px;
  color: var(--secondary);
}

.post-featured-img {
  margin-bottom: 40px;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.post-featured-img img {
  width: 100%;
  height: auto;
  display: block;
}

.post-thumbnail-caption {
  padding: 15px 20px;
  background-color: rgba(0, 0, 0, 0.05);
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
}

.post-content {
  line-height: 1.8;
  margin-bottom: 40px;
  color: var(--text-dark);
  font-size: 1.1rem;
}

.post-content p {
  margin-bottom: 25px;
}

.post-content h2,
.post-content h3,
.post-content h4 {
  margin: 40px 0 25px;
  color: var(--primary);
}

.post-content h2 {
  font-size: 2rem;
}

.post-content h3 {
  font-size: 1.6rem;
}

.post-content h4 {
  font-size: 1.3rem;
}

.post-content ul,
.post-content ol {
  margin: 25px 0;
  padding-right: 25px;
}

.post-content ul li,
.post-content ol li {
  margin-bottom: 12px;
  list-style-position: inside;
}

.post-content a {
  color: var(--secondary);
  border-bottom: 1px dotted var(--secondary);
  transition: all 0.3s ease;
}

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

.post-content blockquote {
  border-right: 4px solid var(--secondary);
  padding: 25px;
  background-color: rgba(64, 191, 170, 0.05);
  margin: 30px 0;
  border-radius: 10px;
  font-style: italic;
  position: relative;
}

.post-content blockquote::before {
  content: '"';
  font-size: 4rem;
  color: var(--secondary);
  position: absolute;
  top: -10px;
  right: 20px;
}

.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  margin: 30px 0;
  box-shadow: var(--shadow);
}

.post-content figure {
  margin: 30px 0;
}

.post-content figcaption {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 10px;
  font-style: italic;
}

.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 30px 0;
  background-color: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.post-content table th,
.post-content table td {
  padding: 15px 20px;
  border: 1px solid var(--border-color);
  text-align: right;
}

.post-content table th {
  background-color: var(--secondary);
  color: white;
  font-weight: 600;
}

.post-content table tr:nth-child(even) {
  background-color: rgba(64, 191, 170, 0.05);
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 40px 0;
  padding: 20px;
  background-color: rgba(64, 191, 170, 0.05);
  border-radius: 10px;
}

.tags-title {
  font-weight: 600;
  color: var(--primary);
}

.post-tag {
  padding: 6px 15px;
  background-color: white;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: all 0.3s ease;
}

.post-tag:hover {
  background-color: var(--secondary);
  color: white;
  border-color: var(--secondary);
  transform: translateY(-2px);
}

.post-sharing {
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 40px 0;
  padding: 25px;
  background-color: white;
  border-radius: 15px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
}

.share-title {
  font-weight: 600;
  color: var(--primary);
}

.share-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background-color: rgba(64, 191, 170, 0.1);
  color: var(--text-dark);
  transition: all 0.3s ease;
}

.share-link:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.share-link.facebook:hover {
  background-color: #3b5998;
  color: white;
}

.share-link.twitter:hover {
  background-color: #1da1f2;
  color: white;
}

.share-link.telegram:hover {
  background-color: #0088cc;
  color: white;
}

.share-link.whatsapp:hover {
  background-color: #25d366;
  color: white;
}

.share-link.email:hover {
  background-color: #ea4335;
  color: white;
}

/* ----- رسپانسیو ----- */
@media (max-width: 992px) {
  .container {
    padding: 0 20px;
  }

  .main-nav {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .blog-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
  }

  .post-title {
    font-size: 2.2rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .blog-grid {
    grid-template-columns: 1fr;
  }

  .history-mobile-toggle {
    display: inline-flex;
  }

  .chat-history-sidebar {
    position: fixed;
    top: 80px;
    right: -280px;
    height: calc(100vh - 80px);
    z-index: 1000;
    transition: right 0.3s ease;
    box-shadow: var(--shadow-xl);
    background-color: white;
  }

  .chat-history-sidebar.mobile-active {
    right: 0;
  }

  body.sidebar-open::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
  }
}

@media (max-width: 576px) {
  .tabs-nav {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 10px;
    gap: 8px;
  }

  .tab-btn {
    white-space: nowrap;
    min-width: 120px;
  }

  .modal-content {
    margin: 20px;
    width: calc(100% - 40px);
  }

  .modal-body {
    padding: 20px;
  }

  .post-title {
    font-size: 1.8rem;
  }

  .section-title {
    font-size: 1.6rem;
  }
}

@media (min-width: 769px) {
  .history-mobile-toggle {
    display: none;
  }
}

/* انیمیشن‌های اضافی */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.blog-card.animate {
  animation: slideInUp 0.6s ease forwards;
}

/* بهبود اسکرول‌بار */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
  background: var(--secondary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* فوکوس قابل دسترسی */
button:focus,
input:focus,
textarea:focus,
a:focus {
  outline: 2px solid var(--secondary);
  outline-offset: 2px;
}

/* بهبود عملکرد */
.blog-card,
.sidebar,
.modal,
.author-bio,
.post-sharing {
  will-change: transform;
}

/* لودینگ */
.loading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
}

.loading::after {
  content: "";
  width: 16px;
  height: 16px;
  border: 2px solid var(--border-color);
  border-top: 2px solid var(--secondary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* استایل‌های پرینت */
@media print {
  .main-header,
  .main-footer,
  .chat-history-sidebar,
  .post-sharing,
  .comments-section,
  .related-posts {
    display: none !important;
  }

  body {
    background: white !important;
    color: black !important;
  }

  .post-content {
    color: black !important;
  }

  .post-title {
    color: #333 !important;
  }
}
/* ----- سرچ بار هدر ----- */
.header-search {
  min-width: 280px;
}

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

.header-search-input {
  width: 100%;
  padding: 10px 45px 10px 15px;
  background-color: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 25px;
  color: white;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.header-search-input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.header-search-input:focus {
  background-color: rgba(255, 255, 255, 0.25);
  border-color: var(--secondary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(64, 191, 170, 0.2);
}

.header-search-btn {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: linear-gradient(45deg, var(--secondary), var(--primary));
  border: none;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-search-btn:hover {
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 4px 15px rgba(64, 191, 170, 0.4);
}

.header-search-btn i {
  font-size: 0.9rem;
}

/* رسپانسیو سرچ بار */
@media (max-width: 992px) {
  .header-search {
    display: none;
  }
}

/* سرچ بار موبایل - در منوی موبایل */
.mobile-search {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
}

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

.mobile-search-input {
  width: 100%;
  padding: 12px 45px 12px 15px;
  background-color: var(--bg-light);
  border: 2px solid var(--border-color);
  border-radius: 25px;
  color: var(--text-dark);
  font-size: 1rem;
  transition: all 0.3s ease;
}

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

.mobile-search-input:focus {
  border-color: var(--secondary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(64, 191, 170, 0.1);
}

.mobile-search-btn {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: linear-gradient(45deg, var(--secondary), var(--primary));
  border: none;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-search-btn:hover {
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 4px 15px rgba(64, 191, 170, 0.4);
}

.mobile-search-btn i {
  font-size: 0.9rem;
}

/* پایان فایل CSS */
