/*
Theme Name: Wazaef Theme
Description: قالب وظائف سريع - Classic Theme - SEO محسّن مع Schema Markup وAdSense
Author: Abanob Gerges
Version: 1.0.0
Text Domain: wazaef
Tags: rtl-language, arabic, jobs, news, adsense, seo
License: GPL-2.0-or-later
*/

/* ============================================================
   CSS CUSTOM PROPERTIES — Theme Colors (controlled via Theme Options)
   ============================================================ */
:root {
  --color-primary:    #1a56db;
  --color-secondary:  #1e429f;
  --color-accent:     #e74c3c;
  --color-bg:         #f8f9fa;
  --color-surface:    #ffffff;
  --color-text:       #1a1a2e;
  --color-text-muted: #6b7280;
  --color-border:     #e5e7eb;
  --color-social-bar: #1a1a2e;
  --font-main:        'Tajawal', system-ui, -apple-system, sans-serif;
  --radius-sm:        4px;
  --radius-md:        8px;
  --radius-lg:        12px;
  --shadow-sm:        0 1px 3px rgba(0,0,0,.08);
  --shadow-md:        0 4px 12px rgba(0,0,0,.10);
  --container-width:  1200px;
  --container-pad:    clamp(12px, 4vw, 24px);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

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

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

a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

ul, ol { list-style: none; }

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

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

.site-main {
  flex: 1;
  padding-block: 24px;
}

/* Two column layout */
.content-area {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  align-items: start;
}

@media (max-width: 900px) {
  .content-area { grid-template-columns: 1fr; }
}

/* ============================================================
   HEADER — Two-row layout
   Row 1: Logo (right-aligned)
   Row 2: Nav links + Search
   ============================================================ */
.site-header {
  background: var(--color-surface);
  border-bottom: 2px solid var(--color-primary);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

/* ── Row 1: Logo bar ── */
.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 10px;
  border-bottom: 1px solid var(--color-border);
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.site-logo img {
  height: 44px;
  width: auto;
}

.site-logo-text {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--color-primary);
  white-space: nowrap;
  letter-spacing: -.01em;
}

/* ── Row 2: Nav + Search ── */
.header-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 44px;
}

/* Main Navigation */
.main-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  flex: 1;
}

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

.main-nav a {
  display: block;
  padding: 8px 13px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--color-text);
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: background .15s, color .15s;
  text-decoration: none;
}

.main-nav a:hover,
.main-nav a.current-menu-item {
  background: var(--color-primary);
  color: #fff;
  text-decoration: none;
}

/* Search */
.header-search {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.header-search form {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--color-border);
  border-radius: 22px;
  overflow: hidden;
  background: var(--color-bg);
  transition: border-color .15s;
}

.header-search form:focus-within { border-color: var(--color-primary); }

.header-search input[type="search"] {
  border: none;
  background: transparent;
  padding: 6px 14px;
  font-size: .85rem;
  font-family: var(--font-main);
  width: 180px;
  direction: rtl;
  outline: none;
  color: var(--color-text);
}

.header-search button {
  background: var(--color-primary);
  border: none;
  color: #fff;
  padding: 7px 13px;
  cursor: pointer;
  font-size: .85rem;
  transition: background .15s;
  display: flex;
  align-items: center;
}

.header-search button:hover { background: var(--color-secondary); }

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  color: var(--color-text);
  margin-inline-start: auto;
}

@media (max-width: 768px) {
  .header-top { justify-content: space-between; }
  .menu-toggle { display: flex; align-items: center; }

  .header-bottom {
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 8px 0;
    gap: 4px;
  }
  .header-bottom.is-open { display: flex; }

  .main-nav {
    flex-direction: column;
    align-items: stretch;
    overflow-x: visible;
    gap: 2px;
  }
  .main-nav a { padding: 10px 14px; }

  .header-search { width: 100%; }
  .header-search form { width: 100%; border-radius: 8px; }
  .header-search input[type="search"] { flex: 1; width: 100%; }
}

/* ============================================================
   SOCIAL BAR — below header
   Dark background, text right, pill buttons left
   ============================================================ */
.social-bar {
  background: var(--color-social-bar);
  padding: 10px 0;
}

.social-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.social-bar-label {
  font-size: .88rem;
  color: rgba(255,255,255,.9);
  white-space: nowrap;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.social-bar-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.social-bar-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  transition: transform .15s, filter .15s;
  white-space: nowrap;
  border: 1.5px solid rgba(255,255,255,.15);
}

.social-bar-links a:hover {
  transform: translateY(-2px);
  filter: brightness(1.15);
  text-decoration: none;
}

.social-bar-links a svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
  flex-shrink: 0;
}

/* Platform colors — same brand colors, slightly muted for dark bg */
.social-telegram   { background: #2CA5E0; border-color: #2CA5E0; }
.social-whatsapp   { background: #25D366; border-color: #25D366; }
.social-facebook   { background: #1877F2; border-color: #1877F2; }
.social-twitter    { background: #1DA1F2; border-color: #1DA1F2; }
.social-snapchat   { background: #FFFC00; border-color: #FFFC00; color: #111 !important; }
.social-snapchat svg { fill: #111; }
.social-tiktok     { background: #111; border-color: rgba(255,255,255,.3); }
.social-instagram  { background: linear-gradient(45deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888); border-color: transparent; }
.social-linkedin   { background: #0A66C2; border-color: #0A66C2; }
.social-youtube    { background: #FF0000; border-color: #FF0000; }

@media (max-width: 768px) {
  .social-bar-inner { gap: 10px; }
  .social-bar-label { font-size: .78rem; }
  .social-bar-links { gap: 5px; }
  .social-bar-links a { padding: 4px 10px; font-size: .75rem; }
}

@media (max-width: 500px) {
  .social-bar-label { display: none; }
  .social-bar-links { gap: 4px; }
  .social-bar-links a {
    padding: 6px 10px;
    border-radius: 50%;
    min-width: 36px;
    min-height: 36px;
    justify-content: center;
    border: none;
  }
  .social-bar-links a span { display: none; }
  .social-bar-links a svg {
    width: 16px;
    height: 16px;
    margin: 0;
  }
}

/* ============================================================
   BREADCRUMBS
   ============================================================ */
.breadcrumb-wrap {
  padding: 8px 0;
  margin-bottom: 16px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: .8rem;
  color: var(--color-text-muted);
}

.breadcrumb a {
  color: var(--color-text-muted);
  transition: color .15s;
}

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

.breadcrumb-sep { color: var(--color-border); font-size: .7rem; }

.breadcrumb .current { color: var(--color-text); font-weight: 500; }

/* ============================================================
   HERO SECTION (Homepage)
   ============================================================ */
.hero-section {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  padding: 60px 0;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(255,255,255,.06) 0%, transparent 50%),
              radial-gradient(circle at 70% 50%, rgba(255,255,255,.04) 0%, transparent 50%);
  pointer-events: none;
}

.hero-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 700px;
}

.hero-text h1 {
  font-size: clamp(1.35rem, 3.5vw, 2rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.4;
  margin-bottom: 10px;
}

.hero-text p {
  font-size: 1rem;
  color: rgba(255,255,255,.85);
  margin-bottom: 24px;
}

.hero-stat {
  text-align: center;
  color: #fff;
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(4px);
  padding: 14px 32px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255,255,255,.2);
  display: inline-block;
}

.hero-stat strong {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
}

.hero-stat span {
  font-size: .8rem;
  opacity: .85;
  margin-top: 4px;
  display: block;
}

@media (max-width: 768px) {
  .hero-section { padding: 40px 0; }
}

@media (max-width: 480px) {
  .hero-section { padding: 32px 0; }
}

/* ============================================================
   SECTION TITLES
   ============================================================ */
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--color-primary);
}

.section-title h2 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title h2::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 18px;
  background: var(--color-primary);
  border-radius: 2px;
}

.section-title a {
  font-size: .8rem;
  color: var(--color-primary);
  font-weight: 500;
}

/* ============================================================
   POSTS LIST (Main listing style)
   ============================================================ */
.posts-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.post-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border);
  transition: background .1s;
}

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

.post-item:hover { background: rgba(0,0,0,.015); }

.post-item-thumb {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.post-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}

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

.post-item-title {
  font-size: .9rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 3px;
  color: var(--color-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-item-title a {
  color: inherit;
  text-decoration: none;
}

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

.post-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.post-item-org {
  font-size: .75rem;
  color: var(--color-primary);
  font-weight: 500;
}

.post-item-cat {
  font-size: .68rem;
  background: var(--color-primary);
  color: #fff;
  padding: 1px 7px;
  border-radius: 10px;
  font-weight: 500;
}

/* ============================================================
   QUICK LINKS GRID
   ============================================================ */
.quick-links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin-block: 24px;
}

.quick-link-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: .82rem;
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}

.quick-link-item:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
  color: var(--color-primary);
  transform: translateY(-1px);
  text-decoration: none;
}

.quick-link-item .ql-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* ============================================================
   SINGLE POST
   ============================================================ */
.single-post-header {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 20px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.single-post-org-logo {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}

.single-post-org-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.single-post-header-body { flex: 1; min-width: 0; }

.single-post-title {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  font-weight: 700;
  line-height: 1.45;
  margin-bottom: 8px;
  color: var(--color-text);
}

.single-post-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: .78rem;
  color: var(--color-text-muted);
}

.single-post-meta a { color: var(--color-primary); }

.single-post-meta .post-cat-badge {
  background: var(--color-primary);
  color: #fff;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: .72rem;
  font-weight: 600;
  text-decoration: none;
}

.single-post-meta .post-cat-badge:hover { text-decoration: none; color: #fff; }

/* Single content */
.single-post-content {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
}

.single-post-content h2,
.single-post-content h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-block: 18px 8px;
  color: var(--color-text);
}

.single-post-content p { margin-bottom: 14px; font-size: .92rem; }

.single-post-content ul,
.single-post-content ol {
  list-style: disc;
  padding-inline-start: 20px;
  margin-bottom: 14px;
}

.single-post-content ol { list-style: decimal; }

.single-post-content li {
  margin-bottom: 6px;
  font-size: .92rem;
  line-height: 1.6;
}

.single-post-content strong { font-weight: 700; }

.single-post-content a {
  color: var(--color-primary);
  text-decoration: underline;
}

.single-post-content a.apply-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--color-primary);
  color: #fff;
  padding: 10px 22px;
  border-radius: 20px;
  text-decoration: none;
  font-weight: 600;
  font-size: .9rem;
  margin-top: 16px;
  transition: background .15s;
}

.single-post-content a.apply-btn:hover { background: var(--color-secondary); }

/* Share buttons */
.share-box {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 20px;
}

.share-box-label {
  font-size: .8rem;
  font-weight: 700;
  color: var(--color-text-muted);
  margin-bottom: 10px;
}

.share-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: .8rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  transition: opacity .15s;
}

.share-btn:hover { opacity: .85; text-decoration: none; }
.share-btn-tw  { background: #1DA1F2; }
.share-btn-wa  { background: #25D366; }
.share-btn-tg  { background: #2CA5E0; }
.share-btn-em  { background: #6b7280; }

/* ============================================================
   SINGLE POST — ENHANCED PROFESSIONAL DESIGN
   ============================================================ */

/* ── Header Card ── */
.single-post-header {
  border-top: 4px solid var(--color-primary);
  box-shadow: var(--shadow-md);
  padding: 24px;
}

.single-post-org-logo {
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  width: 80px;
  height: 80px;
}

.single-post-title {
  font-size: clamp(1.15rem, 3vw, 1.5rem);
  line-height: 1.5;
  margin-bottom: 10px;
}

.single-post-meta .post-cat-badge {
  padding: 3px 12px;
  font-size: .75rem;
  font-weight: 700;
}

/* ── Content Area ── */
.single-post-content {
  box-shadow: var(--shadow-sm);
  padding: 28px;
}

.single-post-content h2 {
  font-size: 1.15rem;
  border-bottom: 2px solid var(--color-primary);
  padding-bottom: 8px;
  margin-block: 24px 12px;
}

.single-post-content h3 {
  font-size: 1.05rem;
  margin-block: 20px 10px;
}

.single-post-content p {
  font-size: .95rem;
  line-height: 1.85;
  margin-bottom: 16px;
}

.single-post-content ul,
.single-post-content ol {
  padding-inline-start: 24px;
  margin-bottom: 16px;
}

.single-post-content li {
  margin-bottom: 8px;
  line-height: 1.7;
}

.single-post-content a.apply-btn {
  padding: 12px 28px;
  font-size: .95rem;
  border-radius: 24px;
  transition: background .15s, transform .15s, box-shadow .15s;
}

.single-post-content a.apply-btn:hover {
  background: var(--color-secondary);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(26,86,219,.35);
}

/* ── Share Section ── */
.share-box {
  box-shadow: var(--shadow-sm);
  padding: 18px 24px;
}

.share-box-label {
  font-size: .85rem;
  margin-bottom: 12px;
  color: var(--color-text);
}

.share-btns {
  gap: 10px;
}

.share-btn {
  padding: 8px 20px;
  border-radius: 24px;
  font-size: .82rem;
  font-weight: 700;
  transition: opacity .15s, transform .15s, box-shadow .15s;
}

.share-btn:hover {
  opacity: 1;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
}

/* ── Related Posts Grid ── */
.related-posts .posts-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

/* ── Mobile Responsive ── */
@media (max-width: 600px) {
  .single-post-header {
    padding: 16px;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .single-post-org-logo {
    width: 64px;
    height: 64px;
  }

  .single-post-meta {
    justify-content: center;
  }

  .single-post-content {
    padding: 20px;
  }

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

  .share-box {
    padding: 14px 16px;
  }

  .share-btn {
    padding: 7px 16px;
    font-size: .78rem;
  }

  .related-posts .posts-list {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   INLINE CTA BANNERS
   ============================================================ */
.cta-banner {
  background: var(--color-primary);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.cta-banner-text {
  font-size: .85rem;
  font-weight: 600;
  color: #fff;
}

.cta-banner-btn {
  display: inline-block;
  background: #fff;
  color: var(--color-primary);
  padding: 5px 14px;
  border-radius: 16px;
  font-size: .8rem;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
  transition: opacity .15s;
  flex-shrink: 0;
}

.cta-banner-btn:hover { opacity: .9; text-decoration: none; }

/* New badge */
.cta-new-badge {
  background: var(--color-accent);
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 8px;
  vertical-align: middle;
  margin-inline-end: 4px;
}

/* ============================================================
   ADSENSE ZONES
   ============================================================ */
.ad-zone {
  width: 100%;
  text-align: center;
  overflow: hidden;
  margin-block: 16px;
  position: relative;
}

.ad-zone-label {
  font-size: .65rem;
  color: var(--color-text-muted);
  display: block;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* Named zones */
.ad-zone--after-header  { margin-block: 0 16px; background: transparent; }
.ad-zone--in-content    { margin-block: 20px; }
.ad-zone--before-related { margin-block: 20px; }
.ad-zone--sidebar-top   { margin-bottom: 20px; }
.ad-zone--sidebar-sticky { position: sticky; top: 80px; margin-bottom: 20px; }

/* Responsive Ad slots */
.ad-slot-responsive {
  display: block;
  width: 100%;
  height: auto;
  min-height: 90px;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar { display: flex; flex-direction: column; gap: 20px; }

.widget {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.widget-title {
  font-size: .85rem;
  font-weight: 700;
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text);
}

.widget-body { padding: 12px 16px; }

/* Sidebar post list */
.widget-posts-list { display: flex; flex-direction: column; gap: 0; }

.widget-post-item {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
  align-items: center;
}

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

.widget-post-thumb {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  overflow: hidden;
  background: var(--color-bg);
}

.widget-post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 2px;
}

.widget-post-title {
  font-size: .78rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--color-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.widget-post-title a { color: inherit; }
.widget-post-title a:hover { color: var(--color-primary); text-decoration: none; }

/* Category links widget */
.widget-cats { display: flex; flex-direction: column; gap: 2px; }

.widget-cat-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 0;
  font-size: .82rem;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border);
  text-decoration: none;
  transition: color .15s;
}

.widget-cat-link:last-child { border-bottom: none; }
.widget-cat-link:hover { color: var(--color-primary); text-decoration: none; }

.widget-cat-count {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  font-size: .7rem;
  padding: 1px 7px;
  border-radius: 10px;
  color: var(--color-text-muted);
}

/* ============================================================
   RELATED POSTS
   ============================================================ */
.related-posts { margin-top: 20px; }

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  padding-block: 24px;
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: .85rem;
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
  transition: background .1s, border-color .1s, color .1s;
}

.pagination a:hover { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }

.pagination .current {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--color-social-bar);
  color: rgba(255,255,255,.75);
  margin-top: 32px;
}

.footer-widgets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 24px;
  padding-block: 32px;
}

.footer-widget-title {
  font-size: .85rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,.15);
}

.footer-widget-links { display: flex; flex-direction: column; gap: 6px; }

.footer-widget-links a {
  font-size: .8rem;
  color: rgba(255,255,255,.65);
  text-decoration: none;
  transition: color .15s;
}

.footer-widget-links a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-block: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: .78rem;
}

.footer-credit {
  opacity: .7;
  font-size: .75rem;
}

.footer-credit strong {
  color: rgba(255,255,255,.9);
}

.footer-social-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.footer-social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  color: #fff;
  text-decoration: none;
  transition: background .15s;
}

.footer-social-links a:hover { background: var(--color-primary); }
.footer-social-links a svg { width: 14px; height: 14px; fill: currentColor; }

@media (max-width: 500px) {
  .footer-bottom { flex-direction: column; text-align: center; }
}

/* ============================================================
   SEARCH RESULTS PAGE
   ============================================================ */
.search-header {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 20px;
}

.search-header h1 { font-size: 1.1rem; font-weight: 700; margin-bottom: 12px; }

.search-form-big {
  display: flex;
  gap: 8px;
}

.search-form-big input[type="search"] {
  flex: 1;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  font-size: .95rem;
  font-family: var(--font-main);
  direction: rtl;
  outline: none;
  transition: border-color .15s;
}

.search-form-big input:focus { border-color: var(--color-primary); }

.search-form-big button {
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  padding: 10px 20px;
  font-size: .9rem;
  font-family: var(--font-main);
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
  white-space: nowrap;
}

.search-form-big button:hover { background: var(--color-secondary); }

/* ============================================================
   404 PAGE
   ============================================================ */
.not-found-wrap {
  text-align: center;
  padding-block: 60px;
  max-width: 500px;
  margin-inline: auto;
}

.not-found-wrap .error-code {
  font-size: 5rem;
  font-weight: 800;
  color: var(--color-border);
  line-height: 1;
  margin-bottom: 12px;
}

.not-found-wrap h1 { font-size: 1.3rem; margin-bottom: 10px; }
.not-found-wrap p { font-size: .9rem; color: var(--color-text-muted); margin-bottom: 20px; }

/* ============================================================
   UTILITIES
   ============================================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border-width: 0;
}

.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-16 { margin-bottom: 16px; }
.view-all-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 10px;
  margin-top: 12px;
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-md);
  font-size: .85rem;
  font-weight: 600;
  color: var(--color-primary);
  transition: background .15s, color .15s;
}

.view-all-btn:hover {
  background: var(--color-primary);
  color: #fff;
  text-decoration: none;
}

/* ============================================================
   PRINT
   ============================================================ */
@media print {
  .site-header, .social-bar, .sidebar, .ad-zone,
  .share-box, .related-posts, .site-footer { display: none; }
  .content-area { grid-template-columns: 1fr; }
}
