/*
Theme Name:        Dealnt Blog
Theme URI:         https://blog.dealnt.net
Author:            Dealnt Team
Author URI:        https://www.dealnt.net
Description:       قالب مدونة ديل نت التعليمية — مصمم خصيصًا لنشر مقالات الاستيراد من الصين وأسرار التجارة. يدعم RTL والعربية بالكامل مع تصميم مطابق لهوية ديل نت.
Version:           1.0.0
Requires at least: 6.2
Tested up to:      6.5
Requires PHP:      8.0
License:           GPL-2.0-or-later
License URI:       https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:       dealnt-blog
Tags:              rtl-language, arabic, blog, education, custom-menu, custom-logo, featured-images, threaded-comments, translation-ready
*/

/* ══════════════════════════════════════════
   CSS Variables — هوية ديل نت الكاملة
══════════════════════════════════════════ */
:root {
  /* Brand Colors */
  --accent:        #4b76b5;
  --accent-dark:   #2c4a7a;
  --accent-deep:   #1a2d4a;
  --accent-hover:  #77b6ca;
  --accent-tint:   rgba(75,118,181,.10);
  --accent-tint2:  rgba(75,118,181,.06);

  /* Text Colors */
  --color-heading: #3e5055;
  --color-text:    #3d4348;
  --color-muted:   #5c6b7a;
  --color-subtle:  #8a9ab5;

  /* Surfaces */
  --color-surface:     #ffffff;
  --color-bg:          #ffffff;
  --color-bg-light:    #f4f7fb;
  --color-bg-lighter:  #f8fafd;

  /* Borders */
  --color-border:      #dde4ef;
  --color-border-light:#eef2f8;

  /* Functional */
  --color-green:   #25d366;
  --color-red:     #e53e3e;
  --color-orange:  #d97706;
  --color-purple:  #7c3aed;

  /* Spacing */
  --section-py: 72px;
  --card-p:     24px;

  /* Radii */
  --r-sm:  6px;
  --r-md:  12px;
  --r-lg:  18px;
  --r-xl:  24px;
  --r-pill:50px;

  /* Shadows */
  --shadow-xs: 0 1px 4px rgba(0,0,0,.05);
  --shadow-sm: 0 2px 12px rgba(0,0,0,.06);
  --shadow-md: 0 4px 24px rgba(75,118,181,.10);
  --shadow-lg: 0 8px 36px rgba(75,118,181,.14);
  --shadow-xl: 0 16px 48px rgba(75,118,181,.18);

  /* Typography */
  --font-body:    'Cairo', 'Segoe UI', Tahoma, sans-serif;
  --font-heading: 'Cairo', 'Segoe UI', Tahoma, sans-serif;

  /* Transitions */
  --t-fast:   .15s ease;
  --t-normal: .25s ease;
  --t-slow:   .4s ease;
}

/* ══════════════════════════════════════════
   Reset & Base
══════════════════════════════════════════ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  direction: rtl;
  text-align: right;
  line-height: 1.78;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-heading);
  line-height: 1.3;
  font-weight: 700;
}
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem);   }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }

/* Links */
a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--t-normal);
}
a:hover { color: var(--accent-hover); }

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

/* Lists */
ul, ol { padding-right: 1.5rem; }
li { margin-bottom: .4rem; }

/* Paragraphs */
p { margin-bottom: 1.1rem; }

/* HR */
hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 32px 0;
}

/* ══════════════════════════════════════════
   Layout
══════════════════════════════════════════ */
.site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-main {
  flex: 1;
  padding-top: 74px;   /* offset for fixed header */
}

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

.container--narrow { max-width: 860px;  margin: 0 auto; padding: 0 24px; }
.container--wide   { max-width: 1400px; margin: 0 auto; padding: 0 24px; }

/* ══════════════════════════════════════════
   HEADER
══════════════════════════════════════════ */
.site-header {
  position: fixed;
  top: 0; right: 0; left: 0;
  z-index: 9999;
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  height: 74px;
  transition: box-shadow var(--t-normal);
}
.site-header.scrolled { box-shadow: 0 4px 20px rgba(0,0,0,.09); }

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

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.site-logo img    { height: 38px; width: auto; }
.site-logo-text   { display: flex; flex-direction: column; }
.site-logo-name   { font-size: 1.3rem; font-weight: 800; color: var(--color-heading); line-height: 1; }
.site-logo-sub    { font-size: .65rem; color: var(--accent); font-weight: 600; letter-spacing: .3px; margin-top: 2px; }

/* Main Nav */
.main-nav { flex: 1; }
.main-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  justify-content: center;
}
.main-nav li { position: relative; }

.main-nav a {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 14px;
  color: var(--color-heading);
  font-weight: 600;
  font-size: .9rem;
  border-radius: var(--r-sm);
  transition: all var(--t-normal);
  white-space: nowrap;
}
.main-nav a:hover,
.main-nav .current-menu-item > a,
.main-nav .current-menu-ancestor > a {
  color: var(--accent);
  background: var(--accent-tint);
}
.main-nav .current-menu-item > a {
  font-weight: 700;
}

/* Category badge in nav */
.main-nav .menu-cat-badge {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: .6rem;
  padding: 1px 6px;
  border-radius: 10px;
  margin-right: 4px;
  font-weight: 700;
  vertical-align: middle;
}

/* Dropdown */
.main-nav .sub-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--color-surface);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  min-width: 210px;
  padding: 10px 0;
  border: 1px solid var(--color-border-light);
  z-index: 9999;
}
.main-nav .sub-menu::before {
  content: '';
  position: absolute;
  top: -6px;
  right: 20px;
  width: 12px; height: 12px;
  background: var(--color-surface);
  border-right: 1px solid var(--color-border-light);
  border-top: 1px solid var(--color-border-light);
  transform: rotate(-45deg);
}
.main-nav .sub-menu li a {
  padding: 9px 18px;
  border-radius: 0;
  font-size: .875rem;
  font-weight: 500;
  color: var(--color-text);
  gap: 8px;
}
.main-nav .sub-menu li a:hover {
  background: var(--color-bg-light);
  color: var(--accent);
}
.main-nav li:hover > .sub-menu { display: block; }

/* Dropdown arrow */
.menu-item-has-children > a > .nav-arrow {
  font-size: .6rem;
  opacity: .5;
  transition: transform var(--t-normal);
}
.menu-item-has-children:hover > a > .nav-arrow { transform: rotate(180deg); opacity: 1; }

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-header-search {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--color-border);
  border-radius: var(--r-sm);
  color: var(--color-muted);
  font-size: .95rem;
  transition: all var(--t-normal);
  cursor: pointer;
  background: none;
}
.btn-header-search:hover { border-color: var(--accent); color: var(--accent); }

.btn-header-main {
  background: var(--accent);
  color: #fff !important;
  padding: 9px 18px;
  border-radius: var(--r-sm);
  font-weight: 700;
  font-size: .85rem;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--t-normal);
}
.btn-header-main:hover { background: var(--accent-dark); color: #fff !important; }

.btn-header-wa {
  background: var(--color-green);
  color: #fff !important;
  padding: 9px 16px;
  border-radius: var(--r-sm);
  font-weight: 700;
  font-size: .85rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background var(--t-normal);
}
.btn-header-wa:hover { background: #1ebc57; color: #fff !important; }

/* Mobile Toggle */
.mobile-toggle {
  display: none;
  background: none;
  border: 1.5px solid var(--color-border);
  border-radius: var(--r-sm);
  padding: 8px 11px;
  font-size: 1.15rem;
  color: var(--color-heading);
  cursor: pointer;
  transition: all var(--t-normal);
  line-height: 1;
}
.mobile-toggle:hover { border-color: var(--accent); color: var(--accent); }

/* Search Overlay */
.search-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26,45,74,.92);
  z-index: 99999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.search-overlay.active { display: flex; }
.search-overlay-inner { width: 100%; max-width: 640px; }
.search-overlay input {
  width: 100%;
  padding: 18px 22px;
  font-size: 1.2rem;
  border: none;
  border-radius: var(--r-md);
  font-family: var(--font-body);
  color: var(--color-text);
  outline: none;
  text-align: right;
}
.search-overlay-close {
  position: absolute;
  top: 24px; left: 24px;
  background: rgba(255,255,255,.15);
  border: none;
  width: 42px; height: 42px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: #fff;
  font-size: 1.1rem;
  transition: background var(--t-normal);
}
.search-overlay-close:hover { background: rgba(255,255,255,.25); }

/* ══════════════════════════════════════════
   BREADCRUMB
══════════════════════════════════════════ */
.breadcrumb-wrap {
  background: var(--color-bg-light);
  border-bottom: 1px solid var(--color-border-light);
  padding: 12px 0;
}
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: .82rem;
  color: var(--color-muted);
}
.breadcrumb a { color: var(--accent); }
.breadcrumb a:hover { color: var(--accent-dark); }
.breadcrumb .sep { opacity: .4; }
.breadcrumb .current { color: var(--color-text); }

/* ══════════════════════════════════════════
   HERO — Blog Header
══════════════════════════════════════════ */
.blog-hero {
  background: linear-gradient(135deg, var(--accent-deep) 0%, var(--accent-dark) 52%, var(--accent) 100%);
  padding: 64px 0 52px;
  color: #fff;
  position: relative;
  overflow: hidden;
  text-align: right;
}
.blog-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 75% 50%, rgba(119,182,202,.14) 0%, transparent 65%);
  pointer-events: none;
}
.blog-hero h1 {
  color: #fff;
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  margin-bottom: 10px;
}
.blog-hero p {
  color: rgba(255,255,255,.85);
  font-size: 1rem;
  max-width: 580px;
  margin-bottom: 0;
}
.blog-hero .hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.25);
  color: rgba(255,255,255,.92);
  padding: 4px 14px;
  border-radius: var(--r-pill);
  font-size: .78rem;
  font-weight: 600;
  margin-bottom: 14px;
}

/* Single post hero */
.post-hero {
  background: linear-gradient(135deg, var(--accent-deep) 0%, var(--accent-dark) 52%, var(--accent) 100%);
  padding: 60px 0 44px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.post-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 50%, rgba(119,182,202,.12) 0%, transparent 65%);
}
.post-hero h1 { color: #fff; font-size: clamp(1.5rem, 3.5vw, 2.1rem); }
.post-hero .post-meta-hero {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: .82rem;
  color: rgba(255,255,255,.75);
  margin-top: 14px;
}
.post-hero .post-meta-hero i { margin-left: 4px; }

/* ══════════════════════════════════════════
   SECTION UTILITIES
══════════════════════════════════════════ */
.section        { padding: var(--section-py) 0; }
.section--sm    { padding: 44px 0; }
.section--lg    { padding: 88px 0; }
.section-light  { background: var(--color-bg-light); }
.section-white  { background: var(--color-surface); }

.section-header { text-align: center; margin-bottom: 44px; }
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-tint);
  color: var(--accent);
  padding: 5px 16px;
  border-radius: var(--r-pill);
  font-size: .78rem;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: .2px;
}
.section-title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  margin-bottom: 10px;
}
.section-sub {
  font-size: .95rem;
  color: var(--color-muted);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ══════════════════════════════════════════
   POSTS GRID
══════════════════════════════════════════ */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 900px) { .posts-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 580px) { .posts-grid { grid-template-columns: 1fr; } }

.posts-grid--wide {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

/* ══════════════════════════════════════════
   POST CARD
══════════════════════════════════════════ */
.post-card {
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--t-slow);
}
.post-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
  transform: translateY(-5px);
}

.post-card__thumb-wrap {
  display: block;
  overflow: hidden;
  position: relative;
}
.post-card__thumb {
  width: 100%;
  height: 195px;
  object-fit: cover;
  transition: transform .5s ease;
}
.post-card:hover .post-card__thumb { transform: scale(1.04); }

.post-card__placeholder {
  height: 195px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  background: linear-gradient(135deg, var(--accent-dark), var(--accent));
  position: relative;
  overflow: hidden;
}
.post-card__placeholder::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.05) 0%, rgba(255,255,255,.12) 100%);
}

.post-card__cat {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255,255,255,.93);
  color: var(--accent);
  font-size: .7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  text-transform: uppercase;
  letter-spacing: .3px;
}

.post-card__body {
  padding: var(--card-p);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-card__title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.45;
  margin-bottom: 10px;
}
.post-card__title a {
  color: var(--color-heading);
  transition: color var(--t-normal);
}
.post-card__title a:hover { color: var(--accent); }

.post-card__excerpt {
  font-size: .855rem;
  color: var(--color-muted);
  line-height: 1.7;
  flex: 1;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid var(--color-border-light);
  margin-top: auto;
}

.post-card__meta {
  display: flex;
  gap: 10px;
  font-size: .75rem;
  color: var(--color-subtle);
}
.post-card__meta i { margin-left: 3px; }

.post-card__btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--accent);
  color: #fff;
  padding: 7px 16px;
  border-radius: var(--r-sm);
  font-size: .8rem;
  font-weight: 700;
  transition: background var(--t-normal);
  white-space: nowrap;
}
.post-card__btn:hover { background: var(--accent-dark); color: #fff; }

/* Featured Card (large first post) */
.post-card--featured {
  grid-column: 1 / -1;
  flex-direction: row;
  max-height: 300px;
}
.post-card--featured .post-card__thumb-wrap,
.post-card--featured .post-card__placeholder {
  width: 45%;
  flex-shrink: 0;
  height: 300px;
}
.post-card--featured .post-card__thumb { height: 300px; }
.post-card--featured .post-card__body  { justify-content: center; }
.post-card--featured .post-card__title { font-size: 1.2rem; }
.post-card--featured .post-card__excerpt { -webkit-line-clamp: 4; }
@media (max-width: 720px) {
  .post-card--featured { flex-direction: column; max-height: none; }
  .post-card--featured .post-card__thumb-wrap,
  .post-card--featured .post-card__placeholder { width: 100%; }
}

/* ══════════════════════════════════════════
   SINGLE POST
══════════════════════════════════════════ */
.single-post-wrap {
  padding: 52px 0 72px;
}
.post-content-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  align-items: start;
}
@media (max-width: 960px) { .post-content-layout { grid-template-columns: 1fr; } }

/* Article */
.entry-content h2 {
  font-size: 1.35rem;
  font-weight: 800;
  margin: 36px 0 14px;
  color: var(--color-heading);
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent-tint);
}
.entry-content h3 {
  font-size: 1.12rem;
  font-weight: 700;
  margin: 28px 0 10px;
  color: var(--accent);
}
.entry-content h4 { font-size: 1rem; margin: 22px 0 8px; }
.entry-content p  { line-height: 1.88; margin-bottom: 18px; }
.entry-content ul, .entry-content ol { margin-bottom: 18px; }
.entry-content ul li, .entry-content ol li { margin-bottom: 8px; line-height: 1.75; }
.entry-content strong { color: var(--color-heading); font-weight: 700; }
.entry-content a { font-weight: 600; border-bottom: 1px solid var(--accent-tint); }
.entry-content a:hover { border-bottom-color: var(--accent); }

.entry-content img {
  border-radius: var(--r-md);
  margin: 24px 0;
  box-shadow: var(--shadow-md);
}

.entry-content blockquote {
  border-right: 4px solid var(--accent);
  padding: 18px 22px;
  background: var(--accent-tint2);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  margin: 24px 0;
  font-size: 1rem;
  font-style: italic;
  color: var(--color-heading);
}
.entry-content blockquote cite { display: block; font-size: .82rem; margin-top: 8px; opacity: .65; font-style: normal; }

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  border-radius: var(--r-md);
  overflow: hidden;
  margin: 24px 0;
  font-size: .9rem;
}
.entry-content table thead tr { background: var(--accent); color: #fff; }
.entry-content table th, .entry-content table td { padding: 11px 14px; text-align: right; }
.entry-content table tbody tr { border-bottom: 1px solid var(--color-border-light); }
.entry-content table tbody tr:hover { background: var(--color-bg-light); }

.entry-content code {
  background: var(--color-bg-light);
  border: 1px solid var(--color-border);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: .88em;
  font-family: 'Courier New', monospace;
  direction: ltr;
  display: inline-block;
}
.entry-content pre {
  background: var(--accent-deep);
  color: #e8f0fb;
  padding: 20px;
  border-radius: var(--r-md);
  overflow-x: auto;
  font-size: .88rem;
  direction: ltr;
  text-align: left;
  margin: 20px 0;
}
.entry-content pre code { background: none; border: none; color: inherit; padding: 0; }

/* Post featured image */
.post-featured-img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: var(--r-xl);
  margin-bottom: 40px;
  box-shadow: var(--shadow-xl);
}

/* Author box */
.author-box {
  background: var(--color-bg-light);
  border: 1.5px solid var(--color-border);
  border-radius: var(--r-lg);
  padding: 24px;
  display: flex;
  gap: 18px;
  align-items: flex-start;
  margin: 40px 0;
}
.author-avatar {
  width: 70px; height: 70px;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent-dark), var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem;
  color: rgba(255,255,255,.6);
  overflow: hidden;
}
.author-avatar img { width: 100%; height: 100%; object-fit: cover; }
.author-name  { font-weight: 700; font-size: 1rem; margin-bottom: 4px; }
.author-role  { font-size: .78rem; color: var(--accent); font-weight: 600; margin-bottom: 8px; }
.author-bio   { font-size: .875rem; color: var(--color-muted); line-height: 1.7; }

/* Tags */
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 28px 0;
}
.post-tags a {
  background: var(--color-bg-light);
  border: 1.5px solid var(--color-border);
  color: var(--color-text);
  padding: 5px 14px;
  border-radius: var(--r-pill);
  font-size: .8rem;
  font-weight: 600;
  transition: all var(--t-normal);
}
.post-tags a:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Share bar */
.share-bar {
  background: var(--color-bg-light);
  border: 1.5px solid var(--color-border);
  border-radius: var(--r-md);
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin: 28px 0;
}
.share-bar__label { font-weight: 700; font-size: .9rem; }
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: var(--r-sm);
  font-size: .8rem;
  font-weight: 700;
  transition: all var(--t-normal);
}
.share-btn--wa      { background: #25d366; color: #fff; }
.share-btn--wa:hover { background: #1ebc57; color: #fff; }
.share-btn--tw      { background: #000; color: #fff; }
.share-btn--tw:hover { background: #222; color: #fff; }
.share-btn--fb      { background: #1877f2; color: #fff; }
.share-btn--fb:hover { background: #0d65d8; color: #fff; }
.share-btn--copy    { background: var(--color-bg); border: 1.5px solid var(--color-border); color: var(--color-text); }
.share-btn--copy:hover { border-color: var(--accent); color: var(--accent); }

/* Post Navigation */
.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 40px 0;
}
@media (max-width: 580px) { .post-nav { grid-template-columns: 1fr; } }

.post-nav__item {
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--r-md);
  padding: 16px 18px;
  transition: all var(--t-normal);
  display: block;
}
.post-nav__item:hover { border-color: var(--accent); box-shadow: var(--shadow-md); }
.post-nav__dir {
  font-size: .72rem;
  color: var(--color-subtle);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.post-nav__title {
  font-size: .9rem;
  font-weight: 700;
  color: var(--color-heading);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-nav__item--next { text-align: left; }

/* Related Posts */
.related-posts { margin: 48px 0; }
.related-posts__title {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent-tint);
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}

/* ══════════════════════════════════════════
   SIDEBAR
══════════════════════════════════════════ */
.sidebar { position: sticky; top: 92px; }

.widget {
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--r-lg);
  padding: 22px;
  margin-bottom: 22px;
}
.widget:last-child { margin-bottom: 0; }

.widget-title {
  font-size: .95rem;
  font-weight: 800;
  color: var(--color-heading);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent);
  display: flex;
  align-items: center;
  gap: 8px;
}
.widget-title i { color: var(--accent); }

/* Search widget */
.widget-search form {
  display: flex;
  gap: 8px;
}
.widget-search input {
  flex: 1;
  padding: 9px 12px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--r-sm);
  font-size: .9rem;
  font-family: var(--font-body);
  outline: none;
  transition: border-color var(--t-normal);
  text-align: right;
  color: var(--color-text);
}
.widget-search input:focus { border-color: var(--accent); }
.widget-search button {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--r-sm);
  padding: 9px 14px;
  cursor: pointer;
  font-size: .9rem;
  transition: background var(--t-normal);
}
.widget-search button:hover { background: var(--accent-dark); }

/* Category widget */
.widget-cats ul { list-style: none; padding: 0; }
.widget-cats li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--color-border-light);
  font-size: .875rem;
}
.widget-cats li:last-child { border: none; }
.widget-cats li a { color: var(--color-text); font-weight: 500; }
.widget-cats li a:hover { color: var(--accent); }
.widget-cats .cat-count {
  background: var(--accent-tint);
  color: var(--accent);
  font-size: .7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--r-pill);
}

/* Recent posts widget */
.widget-recent ul { list-style: none; padding: 0; }
.widget-recent li {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border-light);
}
.widget-recent li:last-child { border: none; }
.widget-recent__thumb {
  width: 58px; height: 58px;
  border-radius: var(--r-sm);
  object-fit: cover;
  flex-shrink: 0;
}
.widget-recent__placeholder {
  width: 58px; height: 58px;
  border-radius: var(--r-sm);
  background: linear-gradient(135deg, var(--accent-dark), var(--accent));
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.4);
  font-size: 1rem;
}
.widget-recent__info .title {
  font-size: .855rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 3px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.widget-recent__info .title a { color: var(--color-heading); }
.widget-recent__info .title a:hover { color: var(--accent); }
.widget-recent__info .date {
  font-size: .72rem;
  color: var(--color-subtle);
}

/* CTA Widget */
.widget-cta {
  background: linear-gradient(135deg, var(--accent-deep), var(--accent));
  border: none;
  text-align: center;
  color: #fff;
}
.widget-cta .widget-title { color: #fff; border-bottom-color: rgba(255,255,255,.25); }
.widget-cta .widget-title i { color: rgba(255,255,255,.8); }
.widget-cta p { font-size: .875rem; opacity: .88; margin-bottom: 16px; }
.widget-cta .btn-cta {
  display: block;
  background: #fff;
  color: var(--accent) !important;
  padding: 10px;
  border-radius: var(--r-sm);
  font-weight: 700;
  font-size: .875rem;
  text-align: center;
  margin-bottom: 8px;
  transition: background var(--t-normal);
}
.widget-cta .btn-cta:hover { background: #ddeeff; }
.widget-cta .btn-wa {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--color-green);
  color: #fff !important;
  padding: 10px;
  border-radius: var(--r-sm);
  font-weight: 700;
  font-size: .875rem;
  transition: background var(--t-normal);
}
.widget-cta .btn-wa:hover { background: #1ebc57; }

/* Tags widget */
.widget-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.widget-tags a {
  background: var(--color-bg-light);
  border: 1.5px solid var(--color-border);
  color: var(--color-text);
  padding: 4px 12px;
  border-radius: var(--r-pill);
  font-size: .78rem;
  font-weight: 600;
  transition: all var(--t-normal);
}
.widget-tags a:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ══════════════════════════════════════════
   COMMENTS
══════════════════════════════════════════ */
.comments-section { margin-top: 52px; padding-top: 40px; border-top: 2px solid var(--color-border); }
.comments-title { font-size: 1.1rem; font-weight: 800; margin-bottom: 28px; display: flex; align-items: center; gap: 10px; }
.comments-title i { color: var(--accent); }

.comment-list { list-style: none; padding: 0; }
.comment-item { margin-bottom: 18px; }
.comment-body {
  background: var(--color-bg-light);
  border: 1px solid var(--color-border-light);
  border-radius: var(--r-md);
  padding: 18px 20px;
}
.comment-header { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.comment-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-dark), var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  color: rgba(255,255,255,.7);
  font-size: .85rem;
  flex-shrink: 0;
  overflow: hidden;
}
.comment-avatar img { width: 100%; height: 100%; object-fit: cover; }
.comment-author-name { font-weight: 700; font-size: .9rem; }
.comment-date       { font-size: .75rem; color: var(--color-subtle); }
.comment-text       { font-size: .9rem; line-height: 1.75; }
.comment-reply-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .78rem;
  color: var(--accent);
  font-weight: 600;
  margin-top: 8px;
}
.comment-reply-link:hover { color: var(--accent-dark); }

/* Comment form */
.comment-form-wrap { margin-top: 36px; }
.comment-form-wrap h3 { font-size: 1rem; font-weight: 800; margin-bottom: 20px; }
.comment-form label { display: block; font-weight: 600; font-size: .875rem; margin-bottom: 5px; color: var(--color-heading); }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--r-sm);
  font-size: .9rem;
  font-family: var(--font-body);
  color: var(--color-text);
  outline: none;
  transition: border-color var(--t-normal);
  text-align: right;
  margin-bottom: 14px;
}
.comment-form input:focus,
.comment-form textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
.comment-form textarea { min-height: 120px; resize: vertical; }
.comment-form input[type="submit"] {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 11px 28px;
  border-radius: var(--r-sm);
  font-weight: 700;
  font-family: var(--font-body);
  font-size: .9rem;
  cursor: pointer;
  transition: background var(--t-normal);
}
.comment-form input[type="submit"]:hover { background: var(--accent-dark); }

/* ══════════════════════════════════════════
   PAGINATION
══════════════════════════════════════════ */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 52px 0;
  flex-wrap: wrap;
}
.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--r-sm);
  font-size: .88rem;
  font-weight: 600;
  color: var(--color-text);
  transition: all var(--t-normal);
}
.pagination a:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-tint); }
.pagination .current {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.pagination .dots { border: none; color: var(--color-subtle); }

/* ══════════════════════════════════════════
   FOOTER
══════════════════════════════════════════ */
.site-footer {
  background: var(--color-bg-light);
  border-top: 1px solid var(--color-border);
  padding: 56px 0 0;
  direction: rtl;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2.2fr 1fr 1fr;
  gap: 44px;
  margin-bottom: 44px;
}

.footer-logo-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  text-decoration: none;
}
.footer-logo-wrap img  { max-width: 130px; }
.footer-logo-wrap span { font-size: 1.4rem; font-weight: 800; color: var(--color-heading); }

.footer-desc  { font-size: .875rem; color: var(--color-muted); line-height: 1.8; margin-bottom: 6px; }
.footer-desc strong { color: var(--color-text); font-weight: 600; }

.social-links {
  display: flex;
  gap: 9px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.social-link {
  width: 36px; height: 36px;
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--color-muted);
  font-size: .9rem;
  text-decoration: none;
  transition: all var(--t-normal);
}
.social-link:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

.footer-col-title {
  font-size: .95rem;
  font-weight: 800;
  color: var(--color-heading);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent);
}
.footer-col ul { list-style: none; padding: 0; }
.footer-col li { padding: 5px 0; }
.footer-col a  { font-size: .875rem; color: var(--color-muted); transition: color var(--t-normal); }
.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  border-top: 1px solid var(--color-border);
  padding: 18px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: .82rem;
  color: var(--color-subtle);
}
.footer-bottom a { color: var(--color-subtle); }
.footer-bottom a:hover { color: var(--accent); }

/* WhatsApp Float */
.wa-float {
  position: fixed;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  width: 52px; height: 52px;
  background: var(--color-green);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 18px rgba(37,211,102,.38);
  z-index: 9998;
  transition: all var(--t-normal);
  text-decoration: none;
}
.wa-float:hover { transform: translateY(-50%) scale(1.1); background: #1ebc57; }
.wa-float svg   { width: 28px; height: 28px; fill: #fff; }

/* ══════════════════════════════════════════
   404 & Empty States
══════════════════════════════════════════ */
.empty-state { text-align: center; padding: 80px 20px; }
.empty-state .empty-icon  { font-size: 5rem; opacity: .12; line-height: 1; margin-bottom: 16px; color: var(--accent); }
.empty-state h2           { font-size: 1.5rem; margin-bottom: 10px; }
.empty-state p            { color: var(--color-muted); margin-bottom: 24px; }
.error-404 .error-num     { font-size: 9rem; font-weight: 900; color: var(--accent); opacity: .1; line-height: 1; margin-bottom: -16px; }

/* ══════════════════════════════════════════
   Inline CTA Banner
══════════════════════════════════════════ */
.cta-banner {
  background: linear-gradient(135deg, var(--accent-deep), var(--accent));
  border-radius: var(--r-xl);
  padding: 40px 36px;
  color: #fff;
  text-align: center;
  margin: 44px 0;
}
.cta-banner h3 { color: #fff; font-size: 1.3rem; margin-bottom: 8px; }
.cta-banner p  { opacity: .88; margin-bottom: 20px; }
.cta-banner .cta-btns { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.btn-cta-solid {
  background: #fff;
  color: var(--accent) !important;
  padding: 11px 24px;
  border-radius: var(--r-sm);
  font-weight: 700;
  font-size: .9rem;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: background var(--t-normal);
}
.btn-cta-solid:hover { background: #ddeeff; }
.btn-cta-outline-w {
  background: transparent;
  color: #fff !important;
  border: 2px solid rgba(255,255,255,.6);
  padding: 9px 22px;
  border-radius: var(--r-sm);
  font-weight: 600;
  font-size: .9rem;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all var(--t-normal);
}
.btn-cta-outline-w:hover { border-color: #fff; background: rgba(255,255,255,.12); }

/* ══════════════════════════════════════════
   Progress Bar (Reading)
══════════════════════════════════════════ */
.reading-progress {
  position: fixed;
  top: 74px;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-dark), var(--accent));
  z-index: 9998;
  width: 0%;
  transition: width .1s linear;
}

/* ══════════════════════════════════════════
   Back to Top
══════════════════════════════════════════ */
.back-to-top {
  position: fixed;
  bottom: 28px;
  left: 28px;
  width: 42px; height: 42px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--r-sm);
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  text-decoration: none;
  transition: all var(--t-normal);
  z-index: 9997;
  box-shadow: var(--shadow-md);
}
.back-to-top.visible { display: flex; }
.back-to-top:hover { background: var(--accent-dark); color: #fff; transform: translateY(-2px); }

/* ══════════════════════════════════════════
   Responsive
══════════════════════════════════════════ */
@media (max-width: 1100px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid .footer-about { grid-column: 1 / -1; }
}

@media (max-width: 960px) {
  .post-content-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
}

@media (max-width: 768px) {
  .main-nav     { display: none; }
  .mobile-toggle { display: block; }
  .btn-header-main { display: none; }

  .main-nav.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 74px; right: 0; left: 0;
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    box-shadow: var(--shadow-xl);
    padding: 16px;
    gap: 4px;
    z-index: 9998;
    max-height: calc(100vh - 74px);
    overflow-y: auto;
  }
  .main-nav.open ul { flex-direction: column; width: 100%; }
  .main-nav.open > ul > li > a { padding: 11px 14px; border-bottom: 1px solid var(--color-border-light); }
  .main-nav.open .sub-menu {
    display: none;
    position: static;
    box-shadow: none;
    border: none;
    background: var(--color-bg-light);
    border-radius: var(--r-sm);
    padding: 8px 0 8px 14px;
  }
  .main-nav.open .sub-menu.open { display: block; }

  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { justify-content: center; text-align: center; }
  .wa-float { right: 14px; width: 46px; height: 46px; }
  .wa-float svg { width: 24px; height: 24px; }
  .back-to-top { left: 14px; bottom: 14px; }
  .posts-grid { grid-template-columns: 1fr; }
  .blog-hero, .post-hero { padding: 44px 0 36px; }
}

@media (max-width: 480px) {
  :root { --section-py: 48px; }
  .cta-banner { padding: 28px 20px; }
  .btn-cta-solid, .btn-cta-outline-w { width: 100%; justify-content: center; }
}

/* ══════════════════════════════════════════
   WordPress Core
══════════════════════════════════════════ */
.alignleft    { float: right; margin-left: 24px; margin-bottom: 12px; }
.alignright   { float: left;  margin-right: 24px; margin-bottom: 12px; }
.aligncenter  { display: block; margin: 0 auto 24px; }
.alignwide    { max-width: 1000px; margin-right: auto; margin-left: auto; }
.alignfull    { max-width: 100%; margin-right: -24px; margin-left: -24px; }
.wp-caption   { max-width: 100%; }
.wp-caption-text { text-align: center; font-size: .82rem; color: var(--color-subtle); margin-top: 6px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.sticky {}
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.gallery-item img { width: 100%; height: 160px; object-fit: cover; border-radius: var(--r-sm); }
