/*
Theme Name: دارکوب آموزشی
Theme URI: https://darkoobedu.ir/
Author: darkoob
Author URI: https://darkoobedu.ir/
Description: قالب عین سایت darkoobedu.ir - فارسی، RTL، رسانسیو، سازگار با ووکامرس و گوتنبرگ، بدون المنتور.
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: darkoob-edu
Domain Path: /languages
*/

/* ==========================================================================
   RESET & BASE (RTL)
   ========================================================================== */
html { scroll-behavior: smooth; }
* { box-sizing: border-box; }
body {
  margin: 0; padding: 0;
  direction: rtl; text-align: right;
  font-family: "Vazirmatn", "IranSans", "Sahel", Tahoma, Arial, sans-serif;
  font-size: 16px; line-height: 1.8;
  color: #222; background: #fff;
}
a { color: #2563eb; text-decoration: none; transition: color 0.25s; }
a:hover { color: #1d4ed8; }
ul, ol { margin: 0 0 1.5rem 0; padding-right: 1.2rem; }
ul li, ol li { margin-bottom: 0.4rem; }
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 1rem 0; font-weight: 800; line-height: 1.4; color: #111827;
}
h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
p { margin: 0 0 1.5rem 0; }
img { max-width: 100%; height: auto; display: block; }
input, select, textarea, button { font-family: inherit; font-size: inherit; }
.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 1.25rem; }
.section { padding: 4rem 0; }
.section-title {
  text-align: center; font-size: 1.75rem; margin-bottom: 3rem;
  position: relative; display: inline-block; margin-left: auto; margin-right: auto;
}
.section-title::after {
  content: ""; position: absolute; bottom: -10px; right: 50%;
  transform: translatex(50%); width: 60px; height: 4px; background: #2563eb; border-radius: 2px;
}
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); border: 0;
}

/* ==========================================================================
   TOP BAR (عین darkoobedu.ir)
   ========================================================================== */
.top-bar {
  background: #ea1d21;
  font-size: 0.875rem;
  color: #fff;
  padding: 0.35rem 0;
  border-bottom: 1px solid #e5e7eb;
}
.top-bar a,
.top-bar .label,
.top-bar .icon {
  color: #fff;
}
.top-bar a:hover {
  color: #ffebee;
}
.top-bar .container {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem;
}
.top-bar .top-menu ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; gap: 1.5rem;
}
.top-bar .top-menu a {
  color: #374151; font-weight: 700; font-size: 0.9rem;
}
.top-bar .top-menu a:hover { color: #2563eb; }
.top-bar .contact-info {
  display: flex; gap: 1.5rem;
}
.top-bar .contact-info .item {
  display: flex; align-items: center; gap: 0.4rem;
}
.top-bar .contact-info .item .icon { font-size: 1rem; }
.top-bar .contact-info .item .label {
  color: #111827; font-weight: 600;
}

/* ==========================================================================
   HEADER (عین darkoobedu.ir)
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; padding: 1rem 0;
}
.site-branding {
  display: flex; align-items: center; gap: 0.75rem; flex-shrink: 0;
}
.site-branding img { width: 48px; height: 48px; border-radius: 6px; }
.site-title {
  font-size: 1.35rem; font-weight: 800; color: #111827; line-height: 1.2;
}
.site-description {
  font-size: 0.8rem; color: #6b7280; line-height: 1.3;
}
.site-nav { flex: 1 1 500px; }
.site-nav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; gap: 0.25rem; justify-content: center; flex-wrap: wrap;
}
.site-nav a {
  display: block; padding: 0.55rem 0.95rem;
  font-size: 0.95rem; font-weight: 600; color: #fff;
  border-radius: 6px; white-space: nowrap;
}
.site-nav a:hover, .site-nav .current-menu-item > a {
  background: #e6e6e6; color: #111827;
}
.header-actions { display: flex; align-items: center; gap: 0.6rem; flex-shrink: 0; }
.icon-btn {
  background: none; border: 1px solid #e5e7eb;
  width: 38px; height: 38px; border-radius: 8px;
  color: #111827; font-size: 1.1rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.25s;
}
.icon-btn:hover {
  background: #2563eb; color: #fff; border-color: #2563eb;
}
.cart-count {
  position: absolute; top: 6px; left: 6px;
  background: #ef4444; color: #fff; font-size: 0.7rem; font-weight: 700;
  width: 16px; height: 16px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; line-height: 1;
}

/* Mobile panel */
.mobile-panel {
  position: fixed; top: 0; right: 0; width: 80%; max-width: 340px;
  height: 100vh; background: #fff;
  box-shadow: -4px 0 20px rgba(0,0,0,0.12); z-index: 2000;
  transform: translatex(105%); transition: transform 0.35s ease;
  display: flex; flex-direction: column; padding-top: 70px;
}
.mobile-panel.open { transform: translatex(0); }
.mobile-panel-header {
  padding: 1rem 1.25rem; border-bottom: 1px solid #e5e7eb;
  display: flex; align-items: center; justify-content: space-between;
}
.mobile-panel-close {
  background: none; border: none; font-size: 1.5rem;
  color: #374151; cursor: pointer;
}
.mobile-nav { padding: 1rem 1.25rem; flex: 1; overflow-y: auto; }
.mobile-nav ul { list-style: none; margin: 0; padding: 0; }
.mobile-nav li { border-bottom: 1px solid #f3f4f6; }
.mobile-nav a {
  display: block; padding: 0.85rem 0;
  font-size: 1rem; color: #111827;
}
.mobile-nav a:hover { color: #2563eb; }
.mobile-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.4);
  z-index: 1900; opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
.mobile-backdrop.open { opacity: 1; pointer-events: auto; }

/* ==========================================================================
   BUTTONS & FORMS
   ========================================================================== */
.btn {
  display: inline-block; padding: 0.7rem 1.5rem;
  border-radius: 8px; font-weight: 700; font-size: 0.95rem;
  cursor: pointer; border: none; transition: all 0.25s; text-align: center;
}
.btn-primary { background: #2563eb; color: #fff; }
.btn-primary:hover { background: #1d4ed8; transform: translatey(-1px); box-shadow: 0 4px 12px rgba(37,99,235,0.3); }
.btn-outline { background: transparent; color: #2563eb; border: 2px solid #2563eb; }
.btn-outline:hover { background: #2563eb; color: #fff; }
.search-form {
  display: flex; gap: 0.5rem; max-width: 420px; width: 100%;
}
.search-form input[type="search"] {
  flex: 1; padding: 0.7rem 1rem; border: 1px solid #d1d5db;
  border-radius: 8px; outline: none;
}
.search-form input[type="search"]:focus { border-color: #2563eb; }
.search-form button {
  padding: 0.7rem 1rem; background: #2563eb; color: #fff;
  border: none; border-radius: 8px; cursor: pointer;
}
.search-form button:hover { background: #1d4ed8; }
input, select, textarea {
  padding: 0.7rem 1rem; border: 1px solid #d1d5db;
  border-radius: 8px; width: 100%; background: #fff; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: #2563eb; }
textarea { min-height: 120px; resize: vertical; }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
  border-bottom: 1px solid #e5e7eb; padding: 4rem 0;
}
.hero .container { display: flex; align-items: center; gap: 2.5rem; flex-wrap: wrap; }
.hero-text { flex: 1 1 420px; text-align: right; }
.hero h1 {
  font-size: clamp(1.8rem, 4vw, 3rem); margin-bottom: 1rem; line-height: 1.3;
}
.hero p { font-size: 1.1rem; color: #4b5563; margin-bottom: 1.75rem; }
.hero-image { flex: 1 1 360px; text-align: center; }
.hero-image img {
  width: 100%; max-width: 420px; border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}

/* ==========================================================================
   STATS
   ========================================================================== */
.stats {
  background: #fff; border-top: 1px solid #e5e7eb; border-bottom: 1px solid #e5e7eb;
  padding: 2.5rem 0;
}
.stats .container {
  display: flex; flex-wrap: wrap; gap: 2rem;
  justify-content: space-between; align-items: center;
}
.stat-item { text-align: center; flex: 1; min-width: 140px; }
.stat-number {
  font-size: 2rem; font-weight: 800; color: #2563eb; display: block;
}
.stat-label { font-size: 0.95rem; color: #6b7280; margin-top: 0.25rem; }

/* ==========================================================================
   SECTION HEADER
   ========================================================================== */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 2rem; flex-wrap: wrap; gap: 1rem;
}
.section-header .section-title {
  position: relative;
}
.section-header .section-title::after {
  display: none;
}

/* Hexagon Icons Section (شبیه darkoobedu.ir) */
.hex-section {
  padding: 3rem 0;
  background: #fff;
}
.hex-title {
  text-align: center;
  font-size: 1.5rem;
  margin-bottom: 2.5rem;
  color: #111827;
}
.hex-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1.5rem;
  justify-items: center;
}
.hex-item {
  width: 130px;
  height: 150px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  transition: all 0.3s;
  padding: 1rem 0.5rem;
}
.hex-item:hover {
  border-color: #2563eb;
  transform: translatey(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.hex-icon {
  width: 55px; height: 55px;
  margin-bottom: 0.75rem;
  object-fit: contain;
}
.hex-label {
  font-size: 0.9rem;
  color: #111827;
  font-weight: 600;
  text-align: center;
  line-height: 1.3;
}

/* City illustration section (چطور شروع شد) */
.city-section {
  padding: 4rem 0;
  background: #f8fafc;
}
.city-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.city-text h2 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
  color: #111827;
}
.city-text p {
  color: #4b5563;
  margin-bottom: 1.5rem;
  line-height: 1.8;
}
.city-image img {
  width: 100%;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}
.section-header .section-title {
  margin-bottom: 0; text-align: right;
}
.section-header .section-title::after { display: none; }
.view-all {
  font-weight: 700; font-size: 0.95rem; color: #2563eb;
  white-space: nowrap;
}
.view-all:hover { color: #1d4ed8; }

/* ==========================================================================
   COURSES / PRODUCT GRID (عین سایت مرجع)
   ========================================================================== */
.courses-grid, .products {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.75rem;
}
.courses-grid.four-cols, .products.four-cols {
  grid-template-columns: repeat(4, 1fr);
}
.courses-grid.four-cols, .products.four-cols {
  grid-template-columns: repeat(4, 1fr);
}
.product-card {
  border: 1px solid #e5e7eb; border-radius: 12px;
  overflow: hidden; background: #fff;
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex; flex-direction: column;
}
.product-card:hover {
  transform: translatey(-4px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.08);
  border-color: #d1d5db;
}
.card-image {
  position: relative; height: 200px; overflow: hidden;
}
.card-image img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.4s ease;
}
.product-card:hover .card-image img { transform: scale(1.05); }
.card-badge {
  position: absolute; top: 10px; left: 10px;
  background: #10b981; color: #fff; font-size: 0.75rem; font-weight: 700;
  padding: 0.25rem 0.6rem; border-radius: 999px; z-index: 2;
}
.card-content {
  padding: 1.25rem; flex: 1; display: flex; flex-direction: column;
}
.card-content h3 {
  font-size: 1.05rem; margin-bottom: 0.5rem; color: #111827;
}
.card-content h3 a { color: inherit; }
.card-content h3 a:hover { color: #2563eb; }
.card-meta {
  display: flex; gap: 0.75rem; font-size: 0.85rem; color: #6b7280;
  margin-bottom: 0.75rem; flex-wrap: wrap;
}
.card-price {
  display: flex; align-items: baseline; gap: 0.4rem; margin-top: auto;
}
.card-price .amount { font-size: 1.2rem; font-weight: 800; color: #111827; }
.card-price .old { font-size: 0.9rem; color: #9ca3af; text-decoration: line-through; }
.card-price .currency { font-size: 0.85rem; color: #6b7280; }

/* ==========================================================================
   FEATURES (آنچه ما را متفاوت می‌کند)
   ========================================================================== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}
.feature-item {
  text-align: center; padding: 1.5rem; border-radius: 12px;
  background: #fff; border: 1px solid #e5e7eb;
  transition: transform 0.3s, box-shadow 0.3s;
}
.feature-item:hover {
  transform: translatey(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}
.feature-icon { font-size: 2rem; margin-bottom: 0.75rem; display: block; }
.feature-item h3 { font-size: 1rem; margin-bottom: 0; color: #111827; }

/* ==========================================================================
   ABOUT SECTION
   ========================================================================== */
.about-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 3rem;
  align-items: center;
}
.about-text h2 { font-size: 1.75rem; margin-bottom: 1rem; }
.about-text p { color: #4b5563; margin-bottom: 1.5rem; }
.about-image img { width: 100%; border-radius: 16px; box-shadow: 0 20px 40px rgba(0,0,0,0.12); }

/* ==========================================================================
   BLOG / ARCHIVE
   ========================================================================== */
.archive-header {
  text-align: center; padding: 2.5rem 0; margin-bottom: 2rem;
}
.archive-header h1 { font-size: 2rem; margin-bottom: 0.5rem; }
.archive-desc { color: #6b7280; max-width: 700px; margin: 0 auto; }
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}
.post-card {
  border: 1px solid #e5e7eb; border-radius: 12px; overflow: hidden; background: #fff;
}
.post-card .post-image { height: 220px; overflow: hidden; }
.post-card .post-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.post-card:hover .post-image img { transform: scale(1.05); }
.post-card .post-body { padding: 1.5rem; }
.post-meta {
  display: flex; gap: 0.75rem; font-size: 0.85rem; color: #6b7280;
  margin-bottom: 0.75rem; flex-wrap: wrap;
}
.post-meta a { color: #6b7280; }
.post-meta a:hover { color: #2563eb; }
.post-card h3 { font-size: 1.15rem; margin-bottom: 0.75rem; }
.post-card h3 a { color: #111827; }
.post-card h3 a:hover { color: #2563eb; }
.read-more {
  display: inline-flex; align-items: center; font-weight: 700; font-size: 0.9rem; color: #2563eb;
}
.read-more:hover { color: #1d4ed8; }

/* ==========================================================================
   SINGLE POST / PAGE
   ========================================================================== */
.single-content { font-size: 1.1rem; color: #374151; }
.single-content p { margin-bottom: 1.5rem; }
.single-content h2, .single-content h3, .single-content h4 { margin-top: 2rem; }
.single-content ul, .single-content ol { margin-right: 1.5rem; }
.single-content blockquote {
  border-right: 4px solid #2563eb; background: #eff6ff;
  padding: 1rem 1.25rem; border-radius: 0 8px 8px 0;
  margin: 1.5rem 0; font-style: italic; color: #1e40af;
}
.single-content img {
  max-width: 100%; height: auto; border-radius: 8px;
  margin: 1.5rem auto; display: block;
}
.single-footer {
  border-top: 1px solid #e5e7eb; padding-top: 2rem;
  margin-top: 2.5rem; display: flex; justify-content: space-between;
  align-items: center; flex-wrap: wrap; gap: 1rem;
}

/* ==========================================================================
   SIDEBAR
   ========================================================================== */
aside.sidebar { order: 1; }
.widget {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 12px;
  padding: 1.5rem; margin-bottom: 2rem;
}
.widget h2.widget-title {
  font-size: 1.15rem; margin-bottom: 1.25rem;
  padding-bottom: 0.75rem; border-bottom: 2px solid #eff6ff; color: #111827;
}
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget li { padding: 0.55rem 0; border-bottom: 1px solid #f3f4f6; }
.widget li a { color: #374151; }
.widget li a:hover { color: #2563eb; }
.widget_search form { display: flex; gap: 0.5rem; }
.widget_search input { flex: 1; padding: 0.7rem 1rem; }
.widget_search button {
  padding: 0.7rem 1rem; background: #2563eb; color: #fff;
  border: none; border-radius: 8px; cursor: pointer;
}
.widget_search button:hover { background: #1d4ed8; }
.tagcloud a {
  display: inline-block; padding: 0.35rem 0.75rem;
  background: #f3f4f6; color: #374151; border-radius: 6px;
  margin: 0 0.35rem 0.5rem 0; font-size: 0.875rem !important;
}
.tagcloud a:hover { background: #2563eb; color: #fff; }

/* ==========================================================================
   FOOTER (عین darkoobedu.ir)
   ========================================================================== */
.site-footer { background: #252525; color: #d1d5db; margin-top: auto; }
.footer-top { padding: 3.5rem 0 2rem; }
.footer-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2.5rem;
}
.footer-widget { animation: fadeIn 0.5s ease; }
@keyframes fadeIn {
  from { opacity: 0; transform: translatey(10px); }
  to { opacity: 1; transform: translatey(0); }
}
.footer-widget h3 {
  color: #fff; font-size: 1.15rem; margin-bottom: 1.25rem;
  position: relative; padding-left: 0.5rem;
}
.footer-widget h3::before {
  content: ""; position: absolute; top: 0; left: 0;
  width: 4px; height: 100%; background: #2563eb; border-radius: 2px;
}
.footer-widget ul { list-style: none; padding: 0; margin: 0; }
.footer-widget li { margin-bottom: 0.7rem; }
.footer-widget a { color: #d1d5db; transition: color 0.2s; }
.footer-widget a:hover { color: #2563eb; margin-left: 4px; }
.footer-bottom {
  border-top: 1px solid #374151; padding: 1.25rem 0;
  font-size: 0.875rem; color: #9ca3af;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1rem;
}
.footer-menu-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; gap: 1.5rem;
}
.footer-menu-list a { color: #9ca3af; font-size: 0.875rem; }
.footer-menu-list a:hover { color: #2563eb; }

/* ==========================================================================
   WOOCOMMERCE
   ========================================================================== */
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button,
.woocommerce #respond input#submit, .woocommerce a.button.alt, .woocommerce button.button.alt {
  background: #2563eb; color: #fff; border: none;
  border-radius: 8px; padding: 0.7rem 1.4rem; font-weight: 700;
  font-family: inherit; cursor: pointer; transition: all 0.25s;
}
.woocommerce a.button:hover, .woocommerce button.button:hover,
.woocommerce #respond input#submit:hover, .woocommerce a.button.alt:hover {
  background: #1d4ed8; color: #fff;
}
.woocommerce ul.products, .woocommerce-page ul.products {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.75rem; list-style: none; padding: 0; margin: 0;
}
.woocommerce ul.products li.product, .woocommerce-page ul.products li.product {
  border: 1px solid #e5e7eb; border-radius: 12px; overflow: hidden;
  background: #fff; padding: 0; margin: 0; text-align: center;
  display: flex; flex-direction: column;
  transition: transform 0.3s, box-shadow 0.3s;
}
.woocommerce ul.products li.product:hover {
  transform: translatey(-4px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.08);
}
.woocommerce ul.products li.product a img {
  width: 100%; height: 220px; object-fit: cover; display: block; margin: 0;
}
.woocommerce ul.products li.product h2 {
  font-size: 1.05rem; font-weight: 700; padding: 1rem 1rem 0.5rem; margin: 0;
}
.woocommerce ul.products li.product h2 a { color: #111827; }
.woocommerce ul.products li.product .price {
  display: block; font-size: 1.15rem; font-weight: 800; color: #111827;
  padding: 0 1rem 0.5rem; margin: 0;
}
.woocommerce ul.products li.product .price del {
  color: #9ca3af; font-weight: 500; margin-left: 0.5rem;
}
.woocommerce ul.products li.product .add_to_cart_button {
  width: 100%; padding: 0.8rem; margin: 0 1rem 1rem;
  background: #2563eb; color: #fff; border: none;
  border-radius: 8px; font-weight: 700;
}
.woocommerce ul.products li.product .add_to_cart_button:hover { background: #1d4ed8; }
.woocommerce ul.products li.product .button {
  margin: 0.5rem 1rem 1rem;
}
.woocommerce .woocommerce-result-count, .woocommerce .woocommerce-ordering {
  font-size: 0.95rem; color: #374151;
}
.woocommerce .woocommerce-ordering select {
  padding: 0.55rem 1rem; border-radius: 8px;
  border: 1px solid #d1d5db; background: #fff; font-family: inherit;
}
.woocommerce-notices-wrapper { margin: 0 0 2rem; }
.woocommerce-error, .woocommerce-info, .woocommerce-message {
  padding: 1rem 1.25rem; border-radius: 8px; margin-bottom: 1.5rem; font-size: 0.95rem;
}
.woocommerce-message { background: #d1fae5; color: #065f46; border-left: 4px solid #10b981; }
.woocommerce-error { background: #fee2e2; color: #991b1b; border-left: 4px solid #ef4444; }
.woocommerce-info { background: #dbeafe; color: #1e40af; border-left: 4px solid #2563eb; }
.woocommerce a.button.wc-forward, .woocommerce button.button.wc-forward {
  padding-right: 2.2rem; position: relative;
}
.woocommerce #payment ul.payment_methods { list-style: none; padding: 0; }
.woocommerce #payment ul.payment_methods li {
  padding: 0.75rem 0; border-bottom: 1px solid #e5e7eb;
}
.woocommerce table.shop_table {
  width: 100%; border-collapse: collapse; margin: 0 0 2rem;
  background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; overflow: hidden;
}
.woocommerce table.shop_table th, .woocommerce table.shop_table td {
  padding: 1rem 1.25rem; text-align: right; border-bottom: 1px solid #f3f4f6;
}
.woocommerce table.shop_table th {
  background: #f9fafb; font-weight: 700; color: #111827;
}
.woocommerce .cart-empty, .woocommerce .cart-coupons, .woocommerce .cart-collaterals { text-align: center; }
.woocommerce .cross-sells, .woocommerce .cart_totals {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 1.5rem;
}
.woocommerce .cart_totals h2, .woocommerce .cross-sells h2 {
  font-size: 1.25rem; margin-bottom: 1rem; border-bottom: 2px solid #eff6ff;
  padding-bottom: 0.5rem; color: #111827;
}
.woocommerce .cart_totals table { width: 100%; }
.woocommerce .cart_totals table td {
  padding: 0.75rem 0; border-bottom: 1px solid #f3f4f6; text-align: right;
}
.woocommerce .cart_totals .total td {
  font-weight: 800; font-size: 1.1rem; color: #111827;
  border-top: 2px solid #2563eb;
}
.woocommerce-checkout .order-review, .woocommerce-checkout .woocommerce-checkout-review-order-table {
  border: 1px solid #e5e7eb; border-radius: 12px; padding: 1.5rem; background: #fff;
}
.woocommerce-account .woocommerce-MyAccount-content, .woocommerce-account .woocommerce-MyAccount-navigation {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 12px;
}
.woocommerce-account .woocommerce-MyAccount-navigation ul {
  list-style: none; padding: 0; margin: 0; border-bottom: 1px solid #e5e7eb;
}
.woocommerce-account .woocommerce-MyAccount-navigation li { padding: 0; border-bottom: none; }
.woocommerce-account .woocommerce-MyAccount-navigation a {
  display: block; padding: 1rem 1.25rem; color: #374151;
  border-bottom: 1px solid #f3f4f6;
}
.woocommerce-account .woocommerce-MyAccount-navigation a:hover,
.woocommerce-account .woocommerce-MyAccount-navigation .is-active a {
  color: #2563eb; background: #f3f4f6;
}
.woocommerce-breadcrumb {
  font-size: 0.875rem; color: #6b7280; margin: 0 0 1rem;
}
.woocommerce-breadcrumb a { color: #2563eb; }

/* ==========================================================================
   WIDGETS
   ========================================================================== */
.widget_shopping_cart .cart_list { list-style: none; padding: 0; margin: 0; }
.widget_shopping_cart .cart_list li {
  padding: 0.75rem 0; border-bottom: 1px solid #f3f4f6;
  font-size: 0.9rem; display: flex; justify-content: space-between; align-items: center;
}
.widget_shopping_cart .total {
  display: flex; justify-content: space-between; font-weight: 800;
  margin-top: 1rem; padding-top: 0.75rem; border-top: 1px solid #e5e7eb; color: #111827;
}

/* ==========================================================================
   GUTENBERG
   ========================================================================== */
.wp-block-alignfull, .wp-block-alignwide { width: 100%; }
.wp-block-alignwide { max-width: 1000px; margin-left: auto; margin-right: auto; }
.wp-block-group, .wp-block-cover, .wp-block-columns { margin-left: auto; margin-right: auto; }
.wp-block-button__link {
  display: inline-block; padding: 0.7rem 1.5rem; background: #2563eb;
  color: #fff !important; border-radius: 8px; font-weight: 700;
  text-align: center; font-family: inherit;
}
.wp-block-button__link:hover { background: #1d4ed8; }
.wp-block-image img, .wp-block-cover-image img { max-width: 100%; height: auto; }
.wp-block-table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; }
.wp-block-table th, .wp-block-table td {
  border: 1px solid #d1d5db; padding: 0.75rem; text-align: right;
}

/* ==========================================================================
   404 & SEARCH
   ========================================================================== */
.error404, .no-results { text-align: center; padding: 4rem 0; }
.error404 h1, .no-results h1 { font-size: 5rem; color: #2563eb; margin-bottom: 1rem; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 900px) {
  .red-nav-bar .container {
    overflow-x: auto;
    padding: 0.6rem 1rem;
  }
  .red-nav-list {
    gap: 0.5rem;
    flex-wrap: nowrap;
  }
  .red-nav-list li {
    border: none;
  }
  .red-nav-list li:first-child {
    border-right: none;
  }
  .red-nav-list a {
    padding: 0.5rem 0.8rem;
    font-size: 0.85rem;
    white-space: nowrap;
  }
  .courses-grid.four-cols, .products.four-cols {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid.footer-3cols {
    grid-template-columns: 1fr;
  }
  .site-nav { display: none; }
  .mobile-menu-btn { display: block; }
  .hero .container { flex-direction: column-reverse; text-align: center; }
  .hero-text, .hero-image { text-align: center; }
  .hero-image { order: -1; }
  .stats .container { flex-direction: column; }
  .header-inner { flex-direction: column; align-items: stretch; gap: 0.75rem; }
  .site-branding { justify-content: center; }
  .header-actions { justify-content: center; width: 100%; }
  .search-form { max-width: 100%; }
  .section-title { font-size: 1.4rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .single-footer { flex-direction: column; align-items: stretch; }
  .single-footer > * { text-align: center; }
  .top-bar .container { flex-direction: column; align-items: stretch; text-align: center; }
  .top-bar .contact-info { margin-left: 0; justify-content: center; width: 100%; }
  .about-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .container { padding: 0 1rem; }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.6rem; }
  .hero h1 { font-size: 1.9rem; }
  .mobile-panel { width: 100%; max-width: 100%; }
  .courses-grid, .products { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
}

/* ==========================================================================
   PRINT
   ========================================================================== */
@media print {
  .site-header, .site-footer, .mobile-panel, .mobile-backdrop, .btn, .search-form { display: none !important; }
  body { background: #fff; color: #000; }
}

/* ==========================================================================
   RED NAV BAR (نوار منوی قرمز با آیکون)
   ========================================================================== */
.red-nav-bar {
  background: #b70012;
  color: #fff;
}
.red-nav-bar .container {
  display: flex;
  justify-content: center;
  gap: 0;
  padding: 0.6rem 0;
}
.red-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0;
}
.red-nav-list li {
  border-left: 1px solid #e53935;
}
.red-nav-list li:first-child {
  border-right: 1px solid #e53935;
}
.red-nav-list a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  transition: background 0.25s;
}
.red-nav-list a:hover {
  background: #b71c1c;
}
.nav-icon {
  font-size: 1.1rem;
}

/* ==========================================================================
   FOOTER 3 COLS (darkoobedu.ir inspired)
   ========================================================================== */
.footer-grid.footer-3cols {
  grid-template-columns: repeat(3, 1fr);
}
.footer-links, .footer-courses {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-links li, .footer-courses li {
  margin-bottom: 0.6rem;
}
.footer-links a, .footer-courses a {
  color: #d1d5db;
}
.footer-links a:hover, .footer-courses a:hover {
  color: #2563eb;
  margin-left: 4px;
}

/* ==========================================================================
   FOUR COLS GRID (فقط یک ردیف چهارتایی)
   ========================================================================== */
.courses-grid.four-cols, .products.four-cols {
  grid-template-columns: repeat(4, 1fr);
}

/* ==========================================================================
   RESPONSIVE FOR RED NAV & FOOTER & FOUR COLS
   ========================================================================== */
@media (max-width: 900px) {
  .red-nav-bar .container {
    overflow-x: auto;
    padding: 0.6rem 1rem;
  }
  .red-nav-list {
    gap: 0.5rem;
    flex-wrap: nowrap;
  }
  .red-nav-list li {
    border: none;
  }
  .red-nav-list li:first-child {
    border-right: none;
  }
  .red-nav-list a {
    padding: 0.5rem 0.8rem;
    font-size: 0.85rem;
    white-space: nowrap;
  }
  .courses-grid.four-cols, .products.four-cols {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid.footer-3cols {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   SECTION 1: TOP BAR + RED NAV (like image-1 / darkoobedu.ir)
   ========================================================================== */
.top-bar {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  padding: 0.5rem 0;
  font-size: 0.875rem;
}
.top-bar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.top-left {
  display: flex;
  gap: 0.75rem;
}
.top-icon {
  display: flex;
  align-items: center;
  color: #374151;
  text-decoration: none;
  transition: color 0.25s;
}
.top-icon:hover {
  color: #b70012;
}
.top-center {
  text-align: center;
  flex: 1;
}
.top-site-title {
  font-weight: 800;
  color: #111827;
  font-size: 1.1rem;
  margin-bottom: 0.15rem;
}
.top-site-desc {
  font-size: 0.85rem;
  color: #6b7280;
  line-height: 1.4;
}
.top-right {
  display: flex;
  justify-content: flex-end;
}
.top-logo {
  height: 32px;
  width: auto;
  display: block;
}

/* Red nav bar */
.red-nav-bar {
  background: #b70012;
  color: #fff;
}
.red-nav-bar .container {
  display: flex;
  justify-content: center;
  padding: 0.55rem 0;
}
.red-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0;
}
.red-nav-list li {
  border-left: 1px solid #e53935;
}
.red-nav-list li:first-child {
  border-right: 1px solid #e53935;
}
.red-nav-list a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.1rem;
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  transition: background 0.25s;
}
.red-nav-list a:hover {
  background: #9a0010;
}
.nav-icon {
  font-size: 1.05rem;
}

/* Responsive for top bar */
@media (max-width: 900px) {
  .top-bar .container {
    flex-wrap: wrap;
    text-align: center;
    justify-content: center;
  }
  .top-left { order: 1; width: 100%; justify-content: center; margin-bottom: 0.5rem; }
  .top-center { order: 2; width: 100%; }
  .top-right { order: 3; width: 100%; justify-content: center; }
  .red-nav-bar .container {
    overflow-x: auto;
    padding: 0.55rem 1rem;
  }
  .red-nav-list {
    gap: 0.5rem;
    flex-wrap: nowrap;
  }
  .red-nav-list li { border: none; }
  .red-nav-list li:first-child { border-right: none; }
  .red-nav-list a {
    padding: 0.5rem 0.8rem;
    font-size: 0.85rem;
    white-space: nowrap;
  }
}

/* ==========================================================================
   TOP BAR - Exact layout like image-1
   Left: آموزشی دارکوب | Center: Title + Desc | Right: Login + Cart
   ========================================================================== */
.top-bar {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  padding: 0.55rem 0;
}
.top-bar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* Left side: two words */
.top-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.top-site-words {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.word-amuzeshi {
  font-size: 0.95rem;
  font-weight: 700;
  color: #111827;
}
.word-darkoob {
  font-size: 0.95rem;
  font-weight: 700;
  color: #b70012;
}

/* Center side: title center-aligned with description below */
.top-center {
  text-align: center;
  flex: 1;
}
.top-site-title {
  font-weight: 800;
  color: #111827;
  font-size: 1.15rem;
  margin-bottom: 0.15rem;
  display: block;
}
.top-site-desc {
  font-size: 0.85rem;
  color: #6b7280;
  line-height: 1.4;
  display: block;
}

/* Right side: Login + Cart */
.top-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.top-action {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  color: #374151;
  font-size: 0.9rem;
  font-weight: 600;
  transition: color 0.25s;
}
.top-action:hover {
  color: #b70012;
}
.top-action-icon {
  width: 22px;
  height: 22px;
  display: block;
}
.top-action-label {
  white-space: nowrap;
}

/* Red nav bar */
.red-nav-bar {
  background: #b70012;
  color: #fff;
}
.red-nav-bar .container {
  display: flex;
  justify-content: center;
  padding: 0.55rem 0;
}
.red-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0;
}
.red-nav-list li {
  border-left: 1px solid #e53935;
}
.red-nav-list li:first-child {
  border-right: 1px solid #e53935;
}
.red-nav-list a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.1rem;
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  transition: background 0.25s;
}
.red-nav-list a:hover {
  background: #9a0010;
}
.nav-icon {
  font-size: 1.05rem;
}

/* Main header logo */
.main-logo {
  height: 40px;
  width: auto;
  display: block;
}

/* Responsive */
@media (max-width: 900px) {
  .top-bar .container {
    flex-wrap: wrap;
    text-align: center;
    justify-content: center;
  }
  .top-left { order: 1; width: 100%; justify-content: center; margin-bottom: 0.5rem; }
  .top-center { order: 2; width: 100%; }
  .top-right { order: 3; width: 100%; justify-content: center; }
  .red-nav-bar .container {
    overflow-x: auto;
    padding: 0.55rem 1rem;
  }
  .red-nav-list {
    gap: 0.5rem;
    flex-wrap: nowrap;
  }
  .red-nav-list li { border: none; }
  .red-nav-list li:first-child { border-right: none; }
  .red-nav-list a {
    padding: 0.5rem 0.8rem;
    font-size: 0.85rem;
    white-space: nowrap;
  }
}

/* ==========================================================================
   TOP BAR - Corrected layout per user request
   Left: Login + Cart | Right: Logo + Title + Description
   Removed: "آموزشی" and "دارکوب" words
   ========================================================================== */
.top-bar {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  padding: 0.55rem 0;
}
.top-bar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* Left side: Login + Cart */
.top-left-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.top-action {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  color: #374151;
  font-size: 0.9rem;
  font-weight: 600;
  transition: color 0.25s;
}
.top-action:hover {
  color: #b70012;
}
.top-action-icon {
  width: 22px;
  height: 22px;
  display: block;
}
.top-action-label {
  white-space: nowrap;
}

/* Right side: Logo + Title + Description */
.top-right-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto; /* push to right edge in RTL */
}
.top-logo {
  height: 36px;
  width: auto;
  display: block;
}
.top-brand-text {
  text-align: right;
}
.top-site-title {
  font-weight: 800;
  color: #111827;
  font-size: 1.15rem;
  line-height: 1.2;
  margin-bottom: 0.15rem;
  display: block;
}
.top-site-desc {
  font-size: 0.85rem;
  color: #6b7280;
  line-height: 1.4;
  display: block;
}

/* Red nav bar - thinner ~30% */
.red-nav-bar {
  background: #b70012;
  color: #fff;
}
.red-nav-bar .container {
  display: flex;
  justify-content: center;
  padding: 0.4rem 0; /* reduced from 0.55rem (~27% thinner) */
}
.red-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0;
}
.red-nav-list li {
  border-left: 1px solid #e53935;
}
.red-nav-list li:first-child {
  border-right: 1px solid #e53935;
}
.red-nav-list a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1rem; /* reduced padding for thinner bar */
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem; /* slightly smaller text */
  transition: background 0.25s;
}
.red-nav-list a:hover {
  background: #9a0010;
}
.nav-icon {
  font-size: 1rem;
}

/* Responsive */
@media (max-width: 900px) {
  .top-bar .container {
    flex-wrap: wrap;
    text-align: center;
    justify-content: center;
  }
  .top-left-actions { order: 1; width: 100%; justify-content: center; margin-bottom: 0.5rem; }
  .top-right-brand { order: 2; width: 100%; justify-content: center; margin-left: 0; text-align: center; }
  .top-brand-text { text-align: center; }
  .red-nav-bar .container {
    overflow-x: auto;
    padding: 0.4rem 1rem;
  }
  .red-nav-list {
    gap: 0.5rem;
    flex-wrap: nowrap;
  }
  .red-nav-list li { border: none; }
  .red-nav-list li:first-child { border-right: none; }
  .red-nav-list a {
    padding: 0.4rem 0.7rem;
    font-size: 0.85rem;
    white-space: nowrap;
  }
}
