/*
Theme Name: فورفوائد
Theme URI: https://4fwaed.com
Author: فورفوائد
Author URI: https://4fwaed.com
Description: قالب فورفوائد - قالب احترافي سريع وخفيف لمواقع تفسير الأحلام. يدعم الوضع الداكن والفاتح مع لوحة تحكم كاملة للتخصيص.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: forfwaed
Tags: rtl-language, arabic, blog, dark-mode, fast, clean
*/

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; }
ul { list-style: none; }

/* === CSS VARIABLES — LIGHT MODE === */
:root {
  --ff-bg: #ffffff;
  --ff-bg2: #f5f5f7;
  --ff-bg3: #ebebed;
  --ff-text: #1a1a1a;
  --ff-text2: #555555;
  --ff-text3: #999999;
  --ff-accent: #6c47ff;
  --ff-accent2: #ede9ff;
  --ff-accent-text: #4a2fcf;
  --ff-border: #e0e0e0;
  --ff-card: #ffffff;
  --ff-radius: 14px;
  --ff-radius-sm: 8px;
  --ff-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Tahoma, Arial, sans-serif;
  --ff-font-size: 16px;
  --ff-line-height: 1.85;
  --ff-content-width: 860px;
  --ff-sidebar-width: 260px;
}

/* === DARK MODE === */
body.dark-mode {
  --ff-bg: #0f0f11;
  --ff-bg2: #1a1a1f;
  --ff-bg3: #242428;
  --ff-text: #f0f0f0;
  --ff-text2: #aaaaaa;
  --ff-text3: #666666;
  --ff-accent: #8b6fff;
  --ff-accent2: #1e1640;
  --ff-accent-text: #c4b0ff;
  --ff-border: #2a2a2f;
  --ff-card: #1a1a1f;
}

/* === BASE === */
body {
  font-family: var(--ff-font);
  font-size: var(--ff-font-size);
  line-height: var(--ff-line-height);
  color: var(--ff-text);
  background: var(--ff-bg);
  direction: rtl;
  transition: background 0.2s, color 0.2s;
}

.container {
  max-width: var(--ff-content-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* === HEADER / NAV === */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--ff-bg);
  border-bottom: 0.5px solid var(--ff-border);
  transition: background 0.2s;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  max-width: 1100px;
  margin: 0 auto;
}
.site-logo {
  font-size: 20px;
  font-weight: 600;
  color: var(--ff-text);
}
.site-logo span { color: var(--ff-accent); }
.site-logo img { height: 36px; width: auto; }

.main-nav { display: flex; align-items: center; gap: 8px; }
.main-nav a {
  font-size: 13px;
  color: var(--ff-text2);
  padding: 6px 12px;
  border-radius: var(--ff-radius-sm);
  transition: color 0.15s, background 0.15s;
}
.main-nav a:hover, .main-nav a.current { color: var(--ff-accent); background: var(--ff-accent2); }
.main-nav ul, .main-nav li { list-style: none; }

.header-actions { display: flex; align-items: center; gap: 10px; }

.btn-dark-mode {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 0.5px solid var(--ff-border);
  background: var(--ff-bg2);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  color: var(--ff-text2);
  transition: background 0.15s;
}
.btn-dark-mode:hover { background: var(--ff-bg3); }

.btn-search-toggle {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 0.5px solid var(--ff-border);
  background: var(--ff-bg2);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  color: var(--ff-text2);
  transition: background 0.15s;
}
.btn-search-toggle:hover { background: var(--ff-bg3); }

/* === MOBILE MENU === */
.btn-menu-toggle {
  display: none;
  width: 36px; height: 36px;
  border-radius: var(--ff-radius-sm);
  border: 0.5px solid var(--ff-border);
  background: var(--ff-bg2);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.btn-menu-toggle span {
  display: block; width: 18px; height: 1.5px;
  background: var(--ff-text2); border-radius: 2px;
  transition: all 0.2s;
}
@media (max-width: 768px) {
  .main-nav { display: none; position: absolute; top: 64px; right: 0; left: 0; background: var(--ff-bg); border-bottom: 0.5px solid var(--ff-border); flex-direction: column; padding: 16px 24px; gap: 4px; }
  .main-nav.open { display: flex; }
  .btn-menu-toggle { display: flex; }
}

/* === SEARCH OVERLAY === */
.search-overlay {
  display: none; position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.5); align-items: flex-start; justify-content: center; padding-top: 80px;
}
.search-overlay.open { display: flex; }
.search-overlay-box {
  width: 100%; max-width: 600px; margin: 0 24px;
  display: flex; background: var(--ff-bg); border: 0.5px solid var(--ff-border);
  border-radius: var(--ff-radius); overflow: hidden;
}
.search-overlay-box input {
  flex: 1; border: none; outline: none; background: transparent;
  font-size: 16px; padding: 16px 20px; color: var(--ff-text);
  font-family: var(--ff-font); direction: rtl;
}
.search-overlay-box button {
  padding: 14px 24px; background: var(--ff-accent); color: #fff;
  border: none; cursor: pointer; font-size: 14px;
}

/* === HERO (Front Page) === */
.hero-section {
  padding: 64px 28px 48px;
  text-align: center;
  background: var(--ff-bg);
}
.hero-badge {
  display: inline-block;
  background: var(--ff-accent2);
  color: var(--ff-accent-text);
  font-size: 12px; padding: 4px 16px;
  border-radius: 20px; margin-bottom: 20px;
}
.hero-title {
  font-size: 30px; font-weight: 600;
  color: var(--ff-text); line-height: 1.3; margin-bottom: 10px;
}
.hero-title span { color: var(--ff-accent); }
.hero-sub { font-size: 15px; color: var(--ff-text2); margin-bottom: 32px; }

.hero-search {
  display: flex; max-width: 580px; margin: 0 auto;
  background: var(--ff-bg2); border: 0.5px solid var(--ff-border);
  border-radius: var(--ff-radius); overflow: hidden;
  transition: border-color 0.15s;
}
.hero-search:focus-within { border-color: var(--ff-accent); }
.hero-search input {
  flex: 1; border: none; outline: none; background: transparent;
  font-size: 15px; padding: 14px 18px; color: var(--ff-text);
  font-family: var(--ff-font); direction: rtl;
}
.hero-search input::placeholder { color: var(--ff-text3); }
.hero-search button {
  padding: 12px 24px; background: var(--ff-accent); color: #fff;
  border: none; cursor: pointer; font-size: 14px; font-family: var(--ff-font);
  transition: opacity 0.15s;
}
.hero-search button:hover { opacity: 0.9; }

/* === STATS BAR === */
.stats-bar {
  display: flex; justify-content: center; gap: 48px;
  padding: 20px 28px;
  border-top: 0.5px solid var(--ff-border);
  border-bottom: 0.5px solid var(--ff-border);
  background: var(--ff-bg2);
}
.stat-item { text-align: center; }
.stat-num { font-size: 20px; font-weight: 600; color: var(--ff-accent); }
.stat-lbl { font-size: 12px; color: var(--ff-text3); margin-top: 2px; }

/* === CATEGORIES GRID === */
.cats-section { padding: 40px 0; }
.section-label {
  font-size: 13px; color: var(--ff-text3);
  text-align: center; margin-bottom: 20px;
  letter-spacing: 0.5px;
}
.cats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 10px;
}
.cat-card {
  background: var(--ff-card);
  border: 0.5px solid var(--ff-border);
  border-radius: var(--ff-radius);
  padding: 20px 16px; text-align: center;
  display: block; transition: border-color 0.15s, transform 0.1s;
}
.cat-card:hover { border-color: var(--ff-accent); transform: translateY(-2px); }
.cat-letter {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--ff-accent2); color: var(--ff-accent-text);
  font-size: 20px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px;
}
.cat-name { font-size: 13px; font-weight: 500; color: var(--ff-text); margin-bottom: 3px; }
.cat-sub { font-size: 11px; color: var(--ff-text3); }

/* === EXTRA CATEGORIES === */
.extra-cats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px; margin-top: 12px;
}
.extra-cat {
  background: var(--ff-bg2); border: 0.5px solid var(--ff-border);
  border-radius: var(--ff-radius-sm); padding: 14px 16px;
  display: flex; align-items: center; gap: 10px;
  transition: border-color 0.15s;
}
.extra-cat:hover { border-color: var(--ff-accent); }
.extra-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ff-accent); flex-shrink: 0; }
.extra-name { font-size: 13px; font-weight: 500; color: var(--ff-text); }

/* === ARTICLE PAGE === */
.page-layout {
  display: grid;
  grid-template-columns: 1fr var(--ff-sidebar-width);
  gap: 28px;
  padding: 0 24px 60px;
  max-width: 1100px;
  margin: 0 auto;
}
.no-sidebar .page-layout { grid-template-columns: 1fr; max-width: var(--ff-content-width); }
@media (max-width: 900px) { .page-layout { grid-template-columns: 1fr; } .sidebar { display: none; } }

/* BREADCRUMB */
.breadcrumb {
  max-width: 1100px; margin: 0 auto;
  padding: 14px 24px;
  display: flex; gap: 6px; align-items: center;
  font-size: 12px; color: var(--ff-text3);
}
.breadcrumb a { color: var(--ff-text3); }
.breadcrumb a:hover { color: var(--ff-accent); }

/* ARTICLE */
.article-header { margin-bottom: 24px; }
.article-cat {
  display: inline-block; background: var(--ff-accent2);
  color: var(--ff-accent-text); font-size: 11px;
  padding: 3px 12px; border-radius: 20px; margin-bottom: 14px;
}
.article-title { font-size: 24px; font-weight: 600; color: var(--ff-text); line-height: 1.4; margin-bottom: 16px; }
.article-meta {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding-bottom: 16px; border-bottom: 0.5px solid var(--ff-border);
}
.meta-item { font-size: 12px; color: var(--ff-text3); }
.meta-sep { width: 3px; height: 3px; border-radius: 50%; background: var(--ff-border); }

/* TOC */
.toc-box {
  background: var(--ff-bg2); border: 0.5px solid var(--ff-border);
  border-radius: var(--ff-radius); padding: 18px 20px; margin-bottom: 28px;
}
.toc-title { font-size: 13px; font-weight: 500; color: var(--ff-text); margin-bottom: 12px; }
.toc-list { display: flex; flex-direction: column; gap: 8px; }
.toc-list a {
  font-size: 13px; color: var(--ff-accent);
  display: flex; align-items: center; gap: 6px;
}
.toc-list a::before { content: ''; width: 4px; height: 4px; border-radius: 50%; background: var(--ff-accent); flex-shrink: 0; }
.toc-list a:hover { opacity: 0.8; }

/* ARTICLE CONTENT */
.entry-content h2 {
  font-size: 18px; font-weight: 600; color: var(--ff-text);
  margin: 28px 0 12px;
  padding-right: 12px;
  border-right: 3px solid var(--ff-accent);
}
.entry-content h3 { font-size: 16px; font-weight: 500; color: var(--ff-text); margin: 20px 0 10px; }
.entry-content p { font-size: 15px; color: var(--ff-text2); line-height: var(--ff-line-height); margin-bottom: 14px; }
.entry-content ul { margin-bottom: 16px; display: flex; flex-direction: column; gap: 8px; }
.entry-content ul li {
  font-size: 14px; color: var(--ff-text2);
  display: flex; align-items: flex-start; gap: 8px; line-height: 1.7;
}
.entry-content ul li::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--ff-accent); flex-shrink: 0; margin-top: 7px;
}
.entry-content table { width: 100%; border-collapse: collapse; margin-bottom: 16px; font-size: 14px; }
.entry-content th { background: var(--ff-accent2); color: var(--ff-accent-text); padding: 10px 14px; text-align: right; }
.entry-content td { padding: 10px 14px; border-bottom: 0.5px solid var(--ff-border); color: var(--ff-text2); }
.entry-content tr:last-child td { border-bottom: none; }

/* AD PLACEHOLDER */
.ad-placeholder {
  background: var(--ff-bg2); border: 0.5px dashed var(--ff-border);
  border-radius: var(--ff-radius-sm); padding: 20px;
  text-align: center; margin: 24px 0;
  font-size: 12px; color: var(--ff-text3);
}

/* FAQ */
.faq-section { margin-top: 28px; }
.faq-title { font-size: 18px; font-weight: 600; color: var(--ff-text); margin-bottom: 16px; padding-right: 12px; border-right: 3px solid var(--ff-accent); }
.faq-item { border: 0.5px solid var(--ff-border); border-radius: var(--ff-radius-sm); margin-bottom: 8px; overflow: hidden; }
.faq-question {
  padding: 14px 16px; font-size: 14px; font-weight: 500; color: var(--ff-text);
  cursor: pointer; display: flex; justify-content: space-between; align-items: center;
  background: var(--ff-card); user-select: none;
}
.faq-question:hover { background: var(--ff-bg2); }
.faq-icon { color: var(--ff-accent); font-size: 18px; font-weight: 300; transition: transform 0.2s; }
.faq-answer {
  padding: 0 16px; font-size: 13px; color: var(--ff-text2);
  line-height: 1.7; max-height: 0; overflow: hidden;
  transition: max-height 0.25s, padding 0.2s;
}
.faq-item.open .faq-answer { max-height: 200px; padding: 0 16px 14px; }
.faq-item.open .faq-icon { transform: rotate(45deg); }

/* RELATED POSTS */
.related-posts { margin-top: 32px; }
.related-title { font-size: 16px; font-weight: 600; color: var(--ff-text); margin-bottom: 14px; }
.related-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.related-card {
  background: var(--ff-bg2); border: 0.5px solid var(--ff-border);
  border-radius: var(--ff-radius-sm); padding: 14px; display: block;
  transition: border-color 0.15s;
}
.related-card:hover { border-color: var(--ff-accent); }
.related-cat { font-size: 10px; color: var(--ff-accent); margin-bottom: 4px; }
.related-name { font-size: 13px; color: var(--ff-text); line-height: 1.4; }

/* === SIDEBAR === */
.sidebar { display: flex; flex-direction: column; gap: 16px; }
.widget {
  background: var(--ff-card); border: 0.5px solid var(--ff-border);
  border-radius: var(--ff-radius); padding: 18px;
}
.widget-title {
  font-size: 13px; font-weight: 600; color: var(--ff-text);
  margin-bottom: 14px; padding-bottom: 10px;
  border-bottom: 0.5px solid var(--ff-border);
}
.widget-search { display: flex; background: var(--ff-bg2); border: 0.5px solid var(--ff-border); border-radius: var(--ff-radius-sm); overflow: hidden; }
.widget-search input { flex: 1; border: none; outline: none; background: transparent; font-size: 13px; padding: 9px 12px; color: var(--ff-text); font-family: var(--ff-font); direction: rtl; }
.widget-search input::placeholder { color: var(--ff-text3); }
.widget-search button { padding: 8px 12px; background: var(--ff-accent); color: #fff; border: none; cursor: pointer; font-size: 12px; }

.widget-cats { display: flex; flex-direction: column; gap: 2px; }
.widget-cat-link { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; border-radius: var(--ff-radius-sm); font-size: 13px; color: var(--ff-text2); transition: all 0.15s; }
.widget-cat-link:hover { background: var(--ff-bg2); color: var(--ff-accent); }

.widget-recent { display: flex; flex-direction: column; gap: 10px; }
.widget-recent-item { padding-bottom: 10px; border-bottom: 0.5px solid var(--ff-border); }
.widget-recent-item:last-child { border-bottom: none; padding-bottom: 0; }
.widget-recent-item a { font-size: 13px; color: var(--ff-text); line-height: 1.4; display: block; margin-bottom: 3px; }
.widget-recent-item a:hover { color: var(--ff-accent); }
.widget-recent-date { font-size: 11px; color: var(--ff-text3); }

.widget-share { display: flex; gap: 8px; flex-wrap: wrap; }
.share-btn { flex: 1; min-width: 60px; padding: 8px; border-radius: var(--ff-radius-sm); border: 0.5px solid var(--ff-border); background: var(--ff-bg2); font-size: 12px; color: var(--ff-text2); cursor: pointer; text-align: center; transition: all 0.15s; font-family: var(--ff-font); }
.share-btn:hover { border-color: var(--ff-accent); color: var(--ff-accent); }

/* === POSTS LOOP (Archive, Blog) === */
.posts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.post-card { background: var(--ff-card); border: 0.5px solid var(--ff-border); border-radius: var(--ff-radius); overflow: hidden; display: flex; flex-direction: column; transition: border-color 0.15s, transform 0.1s; }
.post-card:hover { border-color: var(--ff-accent); transform: translateY(-2px); }
.post-card-img img { width: 100%; height: 180px; object-fit: cover; }
.post-card-body { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.post-card-cat { font-size: 10px; color: var(--ff-accent); margin-bottom: 6px; }
.post-card-title { font-size: 14px; font-weight: 500; color: var(--ff-text); line-height: 1.4; margin-bottom: 8px; flex: 1; }
.post-card-title a { color: inherit; }
.post-card-title a:hover { color: var(--ff-accent); }
.post-card-meta { font-size: 11px; color: var(--ff-text3); }

/* === LATEST POSTS — TITLES ONLY (no images) === */
.latest-posts-list { display: flex; flex-direction: column; gap: 0; }
.latest-post-item { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 0.5px solid var(--ff-border); transition: all 0.15s; }
.latest-post-item:last-child { border-bottom: none; }
.latest-post-item:hover .latest-post-title { color: var(--ff-accent); }
.latest-post-num { width: 28px; height: 28px; border-radius: 8px; background: var(--ff-accent2); color: var(--ff-accent-text); font-size: 12px; font-weight: 600; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.latest-post-info { flex: 1; min-width: 0; }
.latest-post-cat { font-size: 10px; color: var(--ff-accent); margin-bottom: 3px; }
.latest-post-title { font-size: 14px; font-weight: 500; color: var(--ff-text); line-height: 1.35; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.latest-post-date { font-size: 11px; color: var(--ff-text3); margin-top: 2px; }

/* === FAQ COLORED CARDS === */
.faq-cards { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 20px; }
.faq-card { border-radius: var(--ff-radius); overflow: hidden; border: 0.5px solid transparent; transition: transform 0.15s, box-shadow 0.15s; }
.faq-card:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.faq-card-q { padding: 14px 18px; font-size: 14px; font-weight: 600; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; user-select: none; }
.faq-card-icon { font-size: 18px; font-weight: 300; transition: transform 0.2s; flex-shrink: 0; }
.faq-card-a { padding: 0 18px; font-size: 13.5px; line-height: 1.75; max-height: 0; overflow: hidden; transition: max-height 0.3s ease, padding 0.2s; }
.faq-card.open .faq-card-a { max-height: 300px; padding: 0 18px 16px; }
.faq-card.open .faq-card-icon { transform: rotate(45deg); }

/* FAQ Colors */
.faq-card:nth-child(6n+1) { background: linear-gradient(135deg, #ede9ff 0%, #f5f3ff 100%); border-color: #d4caff; }
.faq-card:nth-child(6n+1) .faq-card-q { color: #4a2fcf; }
.faq-card:nth-child(6n+1) .faq-card-a { color: #5a3fd0; background: #f5f3ff; }
.faq-card:nth-child(6n+2) { background: linear-gradient(135deg, #dff6e4 0%, #f0fdf4 100%); border-color: #bbf7c9; }
.faq-card:nth-child(6n+2) .faq-card-q { color: #166534; }
.faq-card:nth-child(6n+2) .faq-card-a { color: #15803d; background: #f0fdf4; }
.faq-card:nth-child(6n+3) { background: linear-gradient(135deg, #fef3c7 0%, #fffbeb 100%); border-color: #fde68a; }
.faq-card:nth-child(6n+3) .faq-card-q { color: #92400e; }
.faq-card:nth-child(6n+3) .faq-card-a { color: #b45309; background: #fffbeb; }
.faq-card:nth-child(6n+4) { background: linear-gradient(135deg, #fce7f3 0%, #fdf2f8 100%); border-color: #f9a8d4; }
.faq-card:nth-child(6n+4) .faq-card-q { color: #831843; }
.faq-card:nth-child(6n+4) .faq-card-a { color: #9d174d; background: #fdf2f8; }
.faq-card:nth-child(6n+5) { background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 100%); border-color: #bfdbfe; }
.faq-card:nth-child(6n+5) .faq-card-q { color: #1e40af; }
.faq-card:nth-child(6n+5) .faq-card-a { color: #1d4ed8; background: #eff6ff; }
.faq-card:nth-child(6n+6) { background: linear-gradient(135deg, #ffedd5 0%, #fff7ed 100%); border-color: #fed7aa; }
.faq-card:nth-child(6n+6) .faq-card-q { color: #9a3412; }
.faq-card:nth-child(6n+6) .faq-card-a { color: #c2410c; background: #fff7ed; }

/* Dark mode FAQ cards */
body.dark-mode .faq-card:nth-child(6n+1) { background: linear-gradient(135deg, #1e1640 0%, #1a1430 100%); border-color: #3d2e8a; }
body.dark-mode .faq-card:nth-child(6n+1) .faq-card-q { color: #c4b0ff; }
body.dark-mode .faq-card:nth-child(6n+1) .faq-card-a { color: #b89eff; background: #1a1430; }
body.dark-mode .faq-card:nth-child(6n+2) { background: linear-gradient(135deg, #052e16 0%, #071f12 100%); border-color: #166534; }
body.dark-mode .faq-card:nth-child(6n+2) .faq-card-q { color: #86efac; }
body.dark-mode .faq-card:nth-child(6n+2) .faq-card-a { color: #6ee7b7; background: #071f12; }
body.dark-mode .faq-card:nth-child(6n+3) { background: linear-gradient(135deg, #2d1a00 0%, #1f1200 100%); border-color: #92400e; }
body.dark-mode .faq-card:nth-child(6n+3) .faq-card-q { color: #fcd34d; }
body.dark-mode .faq-card:nth-child(6n+3) .faq-card-a { color: #fbbf24; background: #1f1200; }
body.dark-mode .faq-card:nth-child(6n+4) { background: linear-gradient(135deg, #2d0a1e 0%, #1f0614 100%); border-color: #831843; }
body.dark-mode .faq-card:nth-child(6n+4) .faq-card-q { color: #f9a8d4; }
body.dark-mode .faq-card:nth-child(6n+4) .faq-card-a { color: #f472b6; background: #1f0614; }
body.dark-mode .faq-card:nth-child(6n+5) { background: linear-gradient(135deg, #0c1e4a 0%, #071230 100%); border-color: #1e40af; }
body.dark-mode .faq-card:nth-child(6n+5) .faq-card-q { color: #93c5fd; }
body.dark-mode .faq-card:nth-child(6n+5) .faq-card-a { color: #60a5fa; background: #071230; }
body.dark-mode .faq-card:nth-child(6n+6) { background: linear-gradient(135deg, #2d1200 0%, #1f0c00 100%); border-color: #9a3412; }
body.dark-mode .faq-card:nth-child(6n+6) .faq-card-q { color: #fdba74; }
body.dark-mode .faq-card:nth-child(6n+6) .faq-card-a { color: #fb923c; background: #1f0c00; }

/* === COMMENTS FORM === */
.comments-area { margin-top: 40px; padding-top: 32px; border-top: 0.5px solid var(--ff-border); }
.comments-title { font-size: 18px; font-weight: 600; color: var(--ff-text); margin-bottom: 20px; padding-right: 12px; border-right: 3px solid var(--ff-accent); }
.comment-list { list-style: none; margin-bottom: 32px; display: flex; flex-direction: column; gap: 16px; }
.comment-body { background: var(--ff-bg2); border: 0.5px solid var(--ff-border); border-radius: var(--ff-radius); padding: 16px; }
.comment-author { font-size: 13px; font-weight: 600; color: var(--ff-text); margin-bottom: 4px; }
.comment-metadata { font-size: 11px; color: var(--ff-text3); margin-bottom: 10px; }
.comment-content p { font-size: 14px; color: var(--ff-text2); line-height: 1.7; }
.comment-reply-link { font-size: 12px; color: var(--ff-accent); margin-top: 8px; display: inline-block; }
.comment-form-wrapper { background: var(--ff-bg2); border: 0.5px solid var(--ff-border); border-radius: var(--ff-radius); padding: 24px; }
.comment-form-title { font-size: 16px; font-weight: 600; color: var(--ff-text); margin-bottom: 20px; }
.comment-form-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.comment-form-field { display: flex; flex-direction: column; gap: 6px; }
.comment-form-field label { font-size: 12px; font-weight: 500; color: var(--ff-text2); }
.comment-form-field input,
.comment-form-field textarea {
  background: var(--ff-bg); border: 0.5px solid var(--ff-border);
  border-radius: var(--ff-radius-sm); padding: 10px 12px;
  font-size: 14px; color: var(--ff-text); font-family: var(--ff-font);
  direction: rtl; outline: none; width: 100%;
  transition: border-color 0.15s;
}
.comment-form-field input:focus,
.comment-form-field textarea:focus { border-color: var(--ff-accent); }
.comment-form-field textarea { resize: vertical; min-height: 110px; }
.comment-form-full { grid-column: 1 / -1; }
.comment-submit-btn {
  padding: 11px 28px; background: var(--ff-accent); color: #fff;
  border: none; border-radius: var(--ff-radius-sm); font-size: 14px;
  font-family: var(--ff-font); cursor: pointer; font-weight: 500;
  transition: opacity 0.15s;
}
.comment-submit-btn:hover { opacity: 0.88; }

/* === FONT SIZE CONTROLS === */
.font-size-ctrl { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.font-size-ctrl span { font-size: 12px; color: var(--ff-text3); }
.font-size-btn { width: 30px; height: 30px; border-radius: 6px; border: 0.5px solid var(--ff-border); background: var(--ff-bg2); cursor: pointer; font-size: 14px; color: var(--ff-text2); display: flex; align-items: center; justify-content: center; font-family: var(--ff-font); transition: all 0.15s; }
.font-size-btn:hover { border-color: var(--ff-accent); color: var(--ff-accent); }
.font-size-label { font-size: 12px; color: var(--ff-text2); min-width: 28px; text-align: center; }

/* === MOBILE APP EXPERIENCE === */
@media (max-width: 768px) {

  /* Mobile header */
  .header-inner { padding: 11px 16px; }
  .site-logo { font-size: 18px; }
  .btn-dark-mode, .btn-search-toggle { width: 32px; height: 32px; font-size: 14px; }

  /* Mobile hero */
  .hero-section { padding: 32px 16px 28px; }
  .hero-title { font-size: 20px; }
  .hero-sub { font-size: 13px; margin-bottom: 20px; }
  .hero-search { border-radius: 12px; }
  .hero-search input { font-size: 14px; padding: 12px 14px; }
  .hero-search button { padding: 10px 16px; font-size: 13px; }

  /* Stats bar - compact */
  .stats-bar { gap: 16px; padding: 14px 16px; }
  .stat-num { font-size: 17px; }
  .stat-lbl { font-size: 11px; }

  /* Cats grid - 2 columns on mobile */
  .cats-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .cat-card { padding: 14px 10px; }
  .cat-letter { width: 36px; height: 36px; font-size: 16px; margin-bottom: 8px; }
  .cat-name { font-size: 12px; }
  .cat-sub { font-size: 10px; }

  /* Latest posts - full width */
  .latest-post-title { white-space: normal; font-size: 13px; }

  /* Article page - full width */
  .page-layout { grid-template-columns: 1fr; padding: 0 16px 40px; }
  .sidebar { display: none; }
  .article-title { font-size: 19px; }

  /* Mobile bottom nav bar */
  .mobile-bottom-nav {
    display: flex !important;
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
    background: var(--ff-bg); border-top: 0.5px solid var(--ff-border);
    padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
  }
  .mobile-nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px; cursor: pointer; text-decoration: none; }
  .mobile-nav-icon { font-size: 18px; }
  .mobile-nav-label { font-size: 9px; color: var(--ff-text3); }
  .mobile-nav-item.active .mobile-nav-label { color: var(--ff-accent); }
  .mobile-nav-item.active .mobile-nav-icon { filter: none; }

  /* Mobile search bar at top */
  .mobile-search-bar { display: flex; margin: 12px 16px 0; background: var(--ff-bg2); border: 0.5px solid var(--ff-border); border-radius: 12px; overflow: hidden; }
  .mobile-search-bar input { flex: 1; border: none; outline: none; background: transparent; font-size: 14px; padding: 10px 14px; color: var(--ff-text); font-family: var(--ff-font); direction: rtl; }
  .mobile-search-bar button { padding: 10px 14px; background: var(--ff-accent); color: #fff; border: none; font-size: 13px; cursor: pointer; }

  /* Add bottom padding for fixed nav */
  body { padding-bottom: 64px; }

  /* FAQ cards on mobile */
  .faq-cards { gap: 8px; }
  .faq-card-q { font-size: 13px; padding: 12px 14px; }
  .faq-card-a { font-size: 13px; }

  /* Comments form mobile */
  .comment-form-fields { grid-template-columns: 1fr; }

  /* Breadcrumb compact */
  .breadcrumb { padding: 10px 16px; font-size: 11px; }
  .breadcrumb span:not(:last-child) { display: none; }
}

/* Hide mobile nav on desktop */
.mobile-bottom-nav { display: none; }
.mobile-search-bar { display: none; }

/* === PAGINATION === */
.pagination { display: flex; justify-content: center; gap: 8px; padding: 32px 0; }
.page-numbers {
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  border: 0.5px solid var(--ff-border); border-radius: var(--ff-radius-sm);
  font-size: 13px; color: var(--ff-text2); background: var(--ff-card);
  transition: all 0.15s;
}
.page-numbers:hover, .page-numbers.current { background: var(--ff-accent); color: #fff; border-color: var(--ff-accent); }

/* === FOOTER === */
.site-footer { border-top: 0.5px solid var(--ff-border); background: var(--ff-bg2); }
.footer-inner { max-width: 1100px; margin: 0 auto; padding: 32px 28px 20px; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 28px; }
.footer-widget-title { font-size: 13px; font-weight: 600; color: var(--ff-text); margin-bottom: 12px; }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links a { font-size: 13px; color: var(--ff-text3); transition: color 0.15s; }
.footer-links a:hover { color: var(--ff-accent); }
.footer-bottom { border-top: 0.5px solid var(--ff-border); padding: 14px 28px; text-align: center; font-size: 12px; color: var(--ff-text3); max-width: 1100px; margin: 0 auto; }

/* === RESPONSIVE === */
@media (max-width: 600px) {
  .hero-title { font-size: 22px; }
  .cats-grid { grid-template-columns: repeat(2, 1fr); }
  .related-grid { grid-template-columns: 1fr; }
  .stats-bar { gap: 24px; }
  .footer-inner { grid-template-columns: 1fr; }
}
