/*
Theme Name: الموسوعة العُمانية
Theme URI: https://oman22.com
Author: فهد الحاتمي
Author URI: https://oman22.com
Description: قالب موسوعي عُماني احترافي متوافق مع SEO وGoogle Discovery، مع لوحة تحكم متكاملة ودعم كامل للغة العربية
Version: 2.1.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: omani-encyclopedia
Tags: rtl-language, arabic, news, magazine, responsive, seo-optimized, custom-colors, custom-logo, featured-images, two-columns, three-columns, flexible-header, custom-menu, threaded-comments, microdata
*/

/* ================================================
   CSS VARIABLES — الألوان والمتغيرات
================================================ */
:root {
  --oe-blue:       #1B4F72;
  --oe-blue-dark:  #0F2D42;
  --oe-blue-light: #2874A6;
  --oe-gold:       #C9A84C;
  --oe-gold-light: #E8C96A;
  --oe-gold-pale:  #FDF6E3;
  --oe-white:      #FAFAFA;
  --oe-gray-50:    #F8F9FA;
  --oe-gray-100:   #F0F2F5;
  --oe-gray-200:   #E4E8EC;
  --oe-gray-400:   #9DAABB;
  --oe-gray-600:   #596475;
  --oe-gray-800:   #2C3A47;
  --oe-dark:       #1A1A2E;
  --oe-red:        #C0392B;
  --oe-green:      #1E8449;

  --oe-font-heading: 'Cairo', 'Tajawal', sans-serif;
  --oe-font-body:    'Noto Sans Arabic', 'Cairo', sans-serif;
  --oe-font-mono:    'Courier New', monospace;

  --oe-radius-sm:  4px;
  --oe-radius:     8px;
  --oe-radius-lg:  16px;
  --oe-radius-xl:  24px;

  --oe-shadow-sm:  0 1px 4px rgba(27,79,114,.08);
  --oe-shadow:     0 4px 20px rgba(27,79,114,.12);
  --oe-shadow-lg:  0 8px 40px rgba(27,79,114,.18);

  --oe-transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);

  --oe-container:  1240px;
  --oe-sidebar:    320px;
}

/* ================================================
   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(--oe-font-body);
  font-size: 1rem;
  line-height: 1.8;
  color: var(--oe-gray-800);
  background: var(--oe-white);
  direction: rtl;
  text-align: right;
  overflow-x: hidden;
}

a { color: var(--oe-blue); text-decoration: none; transition: color var(--oe-transition); }
a:hover { color: var(--oe-gold); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

/* ================================================
   TYPOGRAPHY
================================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--oe-font-heading);
  font-weight: 700;
  line-height: 1.4;
  color: var(--oe-dark);
}

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.4rem,  3vw, 2rem);   }
h3 { font-size: clamp(1.2rem,  2.5vw, 1.5rem); }
h4 { font-size: 1.2rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem;   }

p { margin-bottom: 1.2rem; }

/* ================================================
   UTILITY CLASSES
================================================ */
.container {
  max-width: var(--oe-container);
  margin: 0 auto;
  padding: 0 20px;
}

.oe-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--oe-radius);
  font-family: var(--oe-font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--oe-transition);
  text-align: center;
}

.oe-btn-primary {
  background: var(--oe-blue);
  color: #fff;
  border-color: var(--oe-blue);
}
.oe-btn-primary:hover {
  background: var(--oe-blue-dark);
  color: #fff;
  border-color: var(--oe-blue-dark);
  transform: translateY(-2px);
  box-shadow: var(--oe-shadow);
}

.oe-btn-gold {
  background: var(--oe-gold);
  color: var(--oe-dark);
  border-color: var(--oe-gold);
}
.oe-btn-gold:hover {
  background: var(--oe-gold-light);
  color: var(--oe-dark);
  transform: translateY(-2px);
  box-shadow: var(--oe-shadow);
}

.oe-btn-outline {
  background: transparent;
  color: var(--oe-blue);
  border-color: var(--oe-blue);
}
.oe-btn-outline:hover {
  background: var(--oe-blue);
  color: #fff;
}

.section-title {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  padding-bottom: 14px;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--oe-gray-200);
}

.section-title::before {
  content: '';
  width: 4px;
  height: 28px;
  background: linear-gradient(180deg, var(--oe-blue) 0%, var(--oe-gold) 100%);
  border-radius: 2px;
  order: -1;
  flex-shrink: 0;
}

.section-title h2, .section-title h3 {
  font-size: 1.25rem;
  margin: 0;
}

.tag-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: var(--oe-font-heading);
}

.tag-badge-blue   { background: rgba(27,79,114,.1);  color: var(--oe-blue); }
.tag-badge-gold   { background: rgba(201,168,76,.15); color: #9a7322; }
.tag-badge-red    { background: rgba(192,57,43,.1);   color: var(--oe-red); }
.tag-badge-green  { background: rgba(30,132,73,.1);   color: var(--oe-green); }

/* ================================================
   TOP BAR — الشريط العلوي
================================================ */
#oe-topbar {
  background: var(--oe-blue-dark);
  color: rgba(255,255,255,.8);
  font-size: 0.8rem;
  padding: 7px 0;
  border-bottom: 2px solid var(--oe-gold);
}

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

.topbar-date {
  display: flex;
  align-items: center;
  gap: 6px;
}

.topbar-date::before {
  content: '🗓';
  font-size: 0.85rem;
}

.topbar-links { display: flex; gap: 16px; align-items: center; }
.topbar-links a {
  color: rgba(255,255,255,.75);
  font-size: 0.8rem;
  transition: color var(--oe-transition);
}
.topbar-links a:hover { color: var(--oe-gold-light); }

.topbar-social { display: flex; gap: 10px; }
.topbar-social a {
  color: rgba(255,255,255,.7);
  font-size: 0.85rem;
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.2);
  transition: all var(--oe-transition);
}
.topbar-social a:hover {
  background: var(--oe-gold);
  color: var(--oe-dark);
  border-color: var(--oe-gold);
}

/* ================================================
   HEADER — رأس الصفحة
================================================ */
#oe-header {
  background: var(--oe-white);
  box-shadow: var(--oe-shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: box-shadow var(--oe-transition);
}

#oe-header.scrolled {
  box-shadow: var(--oe-shadow);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 24px;
}

/* Logo */
.oe-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.oe-logo-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--oe-blue) 0%, var(--oe-blue-light) 100%);
  border-radius: var(--oe-radius);
  display: flex; align-items: center; justify-content: center;
  position: relative;
  overflow: hidden;
}

.oe-logo-icon::after {
  content: '';
  position: absolute;
  bottom: 0; right: 0;
  width: 60%; height: 3px;
  background: var(--oe-gold);
}

.oe-logo-icon svg { width: 28px; height: 28px; fill: #fff; }

.oe-logo-text { line-height: 1.2; }
.oe-logo-text .site-name {
  display: block;
  font-family: var(--oe-font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--oe-blue);
  letter-spacing: -0.02em;
}
.oe-logo-text .site-tagline {
  display: block;
  font-size: 0.72rem;
  color: var(--oe-gray-600);
  font-weight: 400;
}

/* Search Bar */
.header-search {
  flex: 1;
  max-width: 460px;
  position: relative;
}

.header-search input {
  width: 100%;
  padding: 10px 18px 10px 48px;
  border: 2px solid var(--oe-gray-200);
  border-radius: 100px;
  font-family: var(--oe-font-body);
  font-size: 0.9rem;
  background: var(--oe-gray-50);
  transition: all var(--oe-transition);
  direction: rtl;
}

.header-search input:focus {
  outline: none;
  border-color: var(--oe-blue-light);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(27,79,114,.08);
}

.header-search button {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--oe-gray-400);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color var(--oe-transition);
}

.header-search button:hover { color: var(--oe-blue); }

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

/* Mobile menu toggle */
.oe-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--oe-blue);
}

.oe-menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: currentColor;
  margin: 5px 0;
  transition: all var(--oe-transition);
  border-radius: 2px;
}

/* ================================================
   NAVIGATION — التنقل الرئيسي
================================================ */
#oe-nav {
  background: var(--oe-blue);
  border-top: 3px solid var(--oe-gold);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.oe-primary-nav {
  display: flex;
  align-items: center;
}

.oe-primary-nav > li {
  position: relative;
}

.oe-primary-nav > li > a {
  display: flex;
  align-items: center;
  gap: 5px;
  color: rgba(255,255,255,.9);
  font-family: var(--oe-font-heading);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 14px 16px;
  transition: all var(--oe-transition);
  position: relative;
}

.oe-primary-nav > li > a::after {
  content: '';
  position: absolute;
  bottom: 0; right: 0; left: 0;
  height: 3px;
  background: var(--oe-gold);
  transform: scaleX(0);
  transition: transform var(--oe-transition);
}

.oe-primary-nav > li > a:hover,
.oe-primary-nav > li.current-menu-item > a {
  color: #fff;
  background: rgba(255,255,255,.08);
}

.oe-primary-nav > li > a:hover::after,
.oe-primary-nav > li.current-menu-item > a::after {
  transform: scaleX(1);
}

/* Mega Dropdown */
.oe-primary-nav .has-dropdown > a::before {
  content: '▾';
  font-size: 0.7rem;
  order: -1;
  transition: transform var(--oe-transition);
}

.oe-primary-nav .has-dropdown:hover > a::before {
  transform: rotate(180deg);
}

.oe-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 220px;
  background: #fff;
  border-radius: 0 0 var(--oe-radius) var(--oe-radius);
  box-shadow: var(--oe-shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--oe-transition);
  z-index: 999;
  border-top: 3px solid var(--oe-gold);
}

.oe-primary-nav .has-dropdown:hover .oe-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.oe-dropdown li a {
  display: block;
  padding: 10px 18px;
  color: var(--oe-gray-800);
  font-size: 0.875rem;
  border-bottom: 1px solid var(--oe-gray-100);
  transition: all var(--oe-transition);
}

.oe-dropdown li:last-child a { border: none; }
.oe-dropdown li a:hover {
  background: var(--oe-gray-50);
  color: var(--oe-blue);
  padding-right: 24px;
}

/* Breaking news ticker */
.breaking-ticker {
  display: flex;
  align-items: center;
  gap: 0;
  overflow: hidden;
  max-width: 360px;
}

.ticker-label {
  background: var(--oe-gold);
  color: var(--oe-dark);
  font-family: var(--oe-font-heading);
  font-weight: 700;
  font-size: 0.75rem;
  padding: 5px 12px;
  white-space: nowrap;
  flex-shrink: 0;
}

.ticker-content {
  flex: 1;
  overflow: hidden;
  position: relative;
  color: rgba(255,255,255,.85);
  font-size: 0.8rem;
}

.ticker-scroll {
  display: inline-flex;
  gap: 60px;
  animation: ticker-rtl 30s linear infinite;
  white-space: nowrap;
  padding: 5px 12px;
}

@keyframes ticker-rtl {
  from { transform: translateX(-50%); }
  to   { transform: translateX(0); }
}

/* ================================================
   HERO — البطل الرئيسي
================================================ */
#oe-hero {
  background: var(--oe-gray-100);
  padding: 30px 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  grid-template-rows: auto auto;
  gap: 16px;
}

/* Featured Post Large */
.hero-main {
  grid-row: 1 / 3;
  position: relative;
  border-radius: var(--oe-radius-lg);
  overflow: hidden;
  background: var(--oe-dark);
}

.hero-main a { display: block; height: 100%; }

.hero-main img {
  width: 100%;
  height: 480px;
  object-fit: cover;
  transition: transform 0.6s ease;
  opacity: 0.85;
}

.hero-main:hover img { transform: scale(1.03); opacity: 1; }

.hero-main-overlay {
  position: absolute;
  bottom: 0; right: 0; left: 0;
  background: linear-gradient(0deg, rgba(10,20,40,.95) 0%, rgba(10,20,40,.5) 60%, transparent 100%);
  padding: 30px 28px 28px;
}

.hero-main-overlay .tag-badge { margin-bottom: 10px; }

.hero-main-overlay h2 {
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  color: #fff;
  margin-bottom: 10px;
  line-height: 1.5;
}

.hero-main-overlay h2 a { color: inherit; }
.hero-main-overlay h2 a:hover { color: var(--oe-gold-light); }

.post-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.8rem;
  color: rgba(255,255,255,.7);
  flex-wrap: wrap;
}

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

/* Hero Side Articles */
.hero-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero-side-item {
  background: #fff;
  border-radius: var(--oe-radius);
  overflow: hidden;
  display: flex;
  gap: 0;
  box-shadow: var(--oe-shadow-sm);
  transition: box-shadow var(--oe-transition);
  flex: 1;
}

.hero-side-item:hover { box-shadow: var(--oe-shadow); }

.hero-side-item img {
  width: 120px;
  min-width: 120px;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.hero-side-item:hover img { transform: scale(1.05); }

.hero-side-content {
  padding: 14px 14px 14px 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hero-side-content .tag-badge { align-self: flex-start; margin-bottom: 2px; }

.hero-side-content h3 {
  font-size: 0.92rem;
  line-height: 1.5;
  margin: 0;
}

.hero-side-content h3 a { color: var(--oe-dark); }
.hero-side-content h3 a:hover { color: var(--oe-blue); }

.hero-side-content .post-meta {
  color: var(--oe-gray-400);
  font-size: 0.75rem;
  margin-top: auto;
}

/* ================================================
   CATEGORY TABS — تبويبات الأقسام
================================================ */
.oe-category-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--oe-gray-200);
  margin-bottom: 24px;
  overflow-x: auto;
  scrollbar-width: none;
}
.oe-category-tabs::-webkit-scrollbar { display: none; }

.oe-tab {
  padding: 10px 20px;
  font-family: var(--oe-font-heading);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--oe-gray-600);
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all var(--oe-transition);
  background: none;
  border-top: none;
  border-right: none;
  border-left: none;
}

.oe-tab:hover  { color: var(--oe-blue); }
.oe-tab.active {
  color: var(--oe-blue);
  border-bottom-color: var(--oe-blue);
}

/* ================================================
   MAIN CONTENT AREA — المنطقة الرئيسية
================================================ */
#oe-content {
  padding: 36px 0 48px;
}

.content-with-sidebar {
  display: grid;
  grid-template-columns: 1fr var(--oe-sidebar);
  gap: 32px;
  align-items: start;
}

/* ================================================
   POST CARDS — بطاقات المقالات
================================================ */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.posts-grid-2 { grid-template-columns: repeat(2, 1fr); }
.posts-grid-4 { grid-template-columns: repeat(4, 1fr); }

.oe-post-card {
  background: #fff;
  border-radius: var(--oe-radius-lg);
  overflow: hidden;
  box-shadow: var(--oe-shadow-sm);
  transition: all var(--oe-transition);
  display: flex;
  flex-direction: column;
}

.oe-post-card:hover {
  box-shadow: var(--oe-shadow);
  transform: translateY(-4px);
}

.oe-post-card-thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/9;
}

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

.oe-post-card:hover .oe-post-card-thumb img {
  transform: scale(1.06);
}

.oe-post-card-thumb .card-cat {
  position: absolute;
  top: 12px;
  right: 12px;
}

.oe-post-card-thumb .card-views {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(0,0,0,.6);
  color: #fff;
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 100px;
  display: flex; align-items: center; gap: 4px;
  backdrop-filter: blur(4px);
}

.oe-post-card-body {
  padding: 18px 18px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.oe-post-card-body h3 {
  font-size: 1rem;
  line-height: 1.55;
  margin-bottom: 10px;
  flex: 1;
}
.oe-post-card-body h3 a { color: var(--oe-dark); }
.oe-post-card-body h3 a:hover { color: var(--oe-blue); }

.oe-post-card-body p {
  font-size: 0.85rem;
  color: var(--oe-gray-600);
  line-height: 1.65;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--oe-gray-100);
  margin-top: auto;
}

.card-footer .post-meta { color: var(--oe-gray-400); font-size: 0.78rem; }

.card-read-more {
  font-family: var(--oe-font-heading);
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--oe-blue);
  display: flex; align-items: center; gap: 4px;
}
.card-read-more:hover { color: var(--oe-gold); }
.card-read-more::before { content: '←'; }

/* List style card */
.oe-post-list-item {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--oe-gray-100);
  align-items: flex-start;
}

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

.oe-post-list-item .thumb {
  width: 90px;
  min-width: 90px;
  height: 70px;
  border-radius: var(--oe-radius);
  overflow: hidden;
}
.oe-post-list-item .thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.oe-post-list-item:hover .thumb img { transform: scale(1.08); }

.oe-post-list-item .content h4 {
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 5px;
}
.oe-post-list-item .content h4 a { color: var(--oe-dark); }
.oe-post-list-item .content h4 a:hover { color: var(--oe-blue); }
.oe-post-list-item .content .post-meta { font-size: 0.75rem; color: var(--oe-gray-400); }

/* Numbered list */
.oe-numbered-list { counter-reset: item; }
.oe-numbered-list .oe-post-list-item { position: relative; padding-right: 44px; }
.oe-numbered-list .oe-post-list-item::before {
  counter-increment: item;
  content: counter(item, decimal-leading-zero);
  position: absolute;
  right: 0; top: 14px;
  font-family: var(--oe-font-heading);
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--oe-gray-200);
  line-height: 1;
}

/* ================================================
   SIDEBAR — الشريط الجانبي
================================================ */
#oe-sidebar {
  position: sticky;
  top: 100px;
}

.oe-widget {
  background: #fff;
  border-radius: var(--oe-radius-lg);
  padding: 22px;
  margin-bottom: 24px;
  box-shadow: var(--oe-shadow-sm);
}

.oe-widget-title {
  font-family: var(--oe-font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--oe-blue);
  padding-bottom: 12px;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--oe-gray-200);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Search widget */
.widget-search {
  display: flex;
  gap: 8px;
}
.widget-search input {
  flex: 1;
  padding: 9px 14px;
  border: 2px solid var(--oe-gray-200);
  border-radius: var(--oe-radius);
  font-family: var(--oe-font-body);
  font-size: 0.875rem;
  direction: rtl;
}
.widget-search input:focus { outline: none; border-color: var(--oe-blue-light); }
.widget-search button {
  padding: 9px 16px;
  background: var(--oe-blue);
  color: #fff;
  border: none;
  border-radius: var(--oe-radius);
  cursor: pointer;
  font-family: var(--oe-font-heading);
  font-size: 0.85rem;
  transition: background var(--oe-transition);
}
.widget-search button:hover { background: var(--oe-blue-dark); }

/* Category list widget */
.widget-cat-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--oe-gray-100);
  font-size: 0.875rem;
}
.widget-cat-list li:last-child { border: none; }
.widget-cat-list li a { color: var(--oe-gray-800); transition: color var(--oe-transition); }
.widget-cat-list li a:hover { color: var(--oe-blue); }
.widget-cat-list li .count {
  background: var(--oe-gray-100);
  color: var(--oe-gray-600);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 100px;
}

/* Tags widget */
.widget-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.widget-tags a {
  display: inline-block;
  padding: 5px 12px;
  background: var(--oe-gray-50);
  border: 1px solid var(--oe-gray-200);
  border-radius: 100px;
  font-size: 0.8rem;
  color: var(--oe-gray-600);
  transition: all var(--oe-transition);
}
.widget-tags a:hover {
  background: var(--oe-blue);
  color: #fff;
  border-color: var(--oe-blue);
}

/* Ad banner widget */
.widget-ad {
  text-align: center;
  overflow: hidden;
  border-radius: var(--oe-radius);
}
.widget-ad img { border-radius: var(--oe-radius); }

/* Newsletter widget */
.widget-newsletter {
  background: linear-gradient(135deg, var(--oe-blue) 0%, var(--oe-blue-light) 100%);
  padding: 24px;
  border-radius: var(--oe-radius-lg);
  text-align: center;
  margin-bottom: 24px;
}
.widget-newsletter h3 { color: #fff; font-size: 1.1rem; margin-bottom: 8px; }
.widget-newsletter p { color: rgba(255,255,255,.8); font-size: 0.85rem; margin-bottom: 16px; }
.widget-newsletter input {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid rgba(255,255,255,.3);
  border-radius: var(--oe-radius);
  background: rgba(255,255,255,.15);
  color: #fff;
  font-family: var(--oe-font-body);
  font-size: 0.875rem;
  margin-bottom: 10px;
  direction: rtl;
}
.widget-newsletter input::placeholder { color: rgba(255,255,255,.6); }
.widget-newsletter input:focus { outline: none; border-color: var(--oe-gold); }
.widget-newsletter button {
  width: 100%;
  padding: 10px;
  background: var(--oe-gold);
  color: var(--oe-dark);
  border: none;
  border-radius: var(--oe-radius);
  font-family: var(--oe-font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background var(--oe-transition);
}
.widget-newsletter button:hover { background: var(--oe-gold-light); }

/* ================================================
   SINGLE POST — المقال المفرد
================================================ */
.oe-single-header {
  background: var(--oe-gray-50);
  padding: 36px 0;
  border-bottom: 1px solid var(--oe-gray-200);
  margin-bottom: 36px;
}

.oe-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--oe-gray-400);
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.oe-breadcrumb a { color: var(--oe-blue); }
.oe-breadcrumb span.sep::before { content: '›'; margin: 0 2px; }

.oe-post-title {
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  line-height: 1.4;
  color: var(--oe-dark);
  margin-bottom: 16px;
}

.oe-post-excerpt {
  font-size: 1.05rem;
  color: var(--oe-gray-600);
  border-right: 4px solid var(--oe-gold);
  padding-right: 16px;
  margin-bottom: 20px;
  font-style: italic;
}

.oe-post-meta-bar {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--oe-gray-600);
}

.oe-post-meta-bar .author {
  display: flex;
  align-items: center;
  gap: 8px;
}

.oe-post-meta-bar .author img {
  width: 36px; height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--oe-gold);
}

.oe-post-meta-bar .author span { font-weight: 700; color: var(--oe-blue); }

.oe-share-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
}

.oe-share-bar span { font-size: 0.85rem; color: var(--oe-gray-600); }

.oe-share-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 0.8rem;
  transition: transform var(--oe-transition);
}
.oe-share-btn:hover { transform: scale(1.1); color: #fff; }
.share-facebook { background: #1877f2; }
.share-twitter  { background: #000; }
.share-whatsapp { background: #25d366; }
.share-telegram { background: #2ca5e0; }
.share-copy     { background: var(--oe-gray-600); }

/* Article Content */
.oe-article-content {
  font-size: 1.05rem;
  line-height: 1.9;
  color: var(--oe-gray-800);
}

.oe-article-content p { margin-bottom: 1.4rem; }
.oe-article-content h2 { font-size: 1.5rem; color: var(--oe-blue); margin: 2rem 0 1rem; padding-bottom: 8px; border-bottom: 2px solid var(--oe-gray-200); }
.oe-article-content h3 { font-size: 1.25rem; margin: 1.6rem 0 0.8rem; }
.oe-article-content img { border-radius: var(--oe-radius); margin: 1.6rem 0; box-shadow: var(--oe-shadow-sm); }
.oe-article-content blockquote {
  background: var(--oe-gold-pale);
  border-right: 4px solid var(--oe-gold);
  padding: 20px 24px;
  border-radius: 0 var(--oe-radius) var(--oe-radius) 0;
  margin: 1.6rem 0;
  font-size: 1.1rem;
  font-style: italic;
  color: var(--oe-gray-800);
}
.oe-article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.6rem 0;
  border-radius: var(--oe-radius);
  overflow: hidden;
  box-shadow: var(--oe-shadow-sm);
}
.oe-article-content th {
  background: var(--oe-blue);
  color: #fff;
  padding: 12px 16px;
  text-align: right;
  font-family: var(--oe-font-heading);
}
.oe-article-content td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--oe-gray-100);
}
.oe-article-content tr:nth-child(even) td { background: var(--oe-gray-50); }

/* TOC */
.oe-toc {
  background: var(--oe-gray-50);
  border: 1px solid var(--oe-gray-200);
  border-radius: var(--oe-radius-lg);
  padding: 20px 24px;
  margin: 1.6rem 0;
}

.oe-toc-title {
  font-family: var(--oe-font-heading);
  font-weight: 700;
  color: var(--oe-blue);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.oe-toc ol {
  list-style: decimal;
  padding-right: 20px;
}
.oe-toc li { margin-bottom: 6px; }
.oe-toc li a { color: var(--oe-blue); font-size: 0.9rem; }
.oe-toc li a:hover { color: var(--oe-gold); }

/* Tags & Share at bottom */
.oe-article-tags {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2rem 0;
  flex-wrap: wrap;
}
.oe-article-tags span { font-weight: 700; font-size: 0.875rem; color: var(--oe-gray-600); }

/* Related posts */
.oe-related {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--oe-gray-200);
}

/* Author box */
.oe-author-box {
  background: var(--oe-gray-50);
  border-radius: var(--oe-radius-lg);
  padding: 28px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin: 2.5rem 0;
  border: 1px solid var(--oe-gray-200);
}

.oe-author-box img {
  width: 80px; height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--oe-gold);
  flex-shrink: 0;
}

.oe-author-box h4 { font-size: 1.1rem; margin-bottom: 6px; color: var(--oe-blue); }
.oe-author-box p { font-size: 0.875rem; color: var(--oe-gray-600); margin: 0; }

/* ================================================
   CATEGORIES SECTION — أقسام الموسوعة
================================================ */
.oe-category-showcase {
  background: var(--oe-gray-100);
  padding: 48px 0;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.cat-card {
  background: #fff;
  border-radius: var(--oe-radius-lg);
  padding: 24px 16px;
  text-align: center;
  box-shadow: var(--oe-shadow-sm);
  transition: all var(--oe-transition);
  border-bottom: 3px solid transparent;
}

.cat-card:hover {
  box-shadow: var(--oe-shadow);
  transform: translateY(-4px);
  border-bottom-color: var(--oe-gold);
}

.cat-card-icon {
  width: 56px; height: 56px;
  border-radius: var(--oe-radius);
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
}

.cat-card h4 {
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.cat-card span {
  font-size: 0.75rem;
  color: var(--oe-gray-400);
}

/* ================================================
   STATS BAR — إحصائيات
================================================ */
.oe-stats-bar {
  background: var(--oe-blue-dark);
  padding: 28px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}

.stat-item { color: rgba(255,255,255,.9); }
.stat-item .number {
  display: block;
  font-family: var(--oe-font-heading);
  font-size: 2rem;
  font-weight: 800;
  color: var(--oe-gold);
  line-height: 1.2;
}
.stat-item .label {
  font-size: 0.85rem;
  color: rgba(255,255,255,.65);
}

/* ================================================
   PAGINATION — الصفحات
================================================ */
.oe-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin: 40px 0;
  flex-wrap: wrap;
}

.oe-pagination a,
.oe-pagination span {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--oe-radius);
  font-family: var(--oe-font-heading);
  font-weight: 600;
  font-size: 0.875rem;
  border: 2px solid var(--oe-gray-200);
  color: var(--oe-gray-600);
  transition: all var(--oe-transition);
}

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

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

/* ================================================
   FOOTER — التذييل
================================================ */
#oe-footer {
  background: var(--oe-dark);
  color: rgba(255,255,255,.75);
  padding: 56px 0 0;
  margin-top: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.footer-about .oe-logo { margin-bottom: 16px; }
.footer-about .oe-logo .site-name { color: #fff; }
.footer-about p { font-size: 0.875rem; line-height: 1.75; margin-bottom: 20px; }

.footer-social { display: flex; gap: 10px; }
.footer-social a {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,.2);
  color: rgba(255,255,255,.7);
  font-size: 0.85rem;
  transition: all var(--oe-transition);
}
.footer-social a:hover {
  background: var(--oe-gold);
  color: var(--oe-dark);
  border-color: var(--oe-gold);
}

.footer-col h5 {
  color: #fff;
  font-family: var(--oe-font-heading);
  font-size: 1rem;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--oe-gold);
  display: inline-block;
}

.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a {
  color: rgba(255,255,255,.65);
  font-size: 0.875rem;
  transition: all var(--oe-transition);
  display: flex;
  align-items: center;
  gap: 6px;
}
.footer-links a::before { content: '›'; color: var(--oe-gold); }
.footer-links a:hover { color: var(--oe-gold); padding-right: 4px; }

.footer-bottom {
  background: rgba(0,0,0,.3);
  padding: 18px 0;
}

.footer-bottom-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: rgba(255,255,255,.45);
  gap: 20px;
  flex-wrap: wrap;
}

.footer-bottom-links { display: flex; gap: 16px; }
.footer-bottom-links a { color: rgba(255,255,255,.45); }
.footer-bottom-links a:hover { color: var(--oe-gold-light); }

/* ================================================
   GEOMETRIC ORNAMENT — الزخرفة الهندسية العُمانية
================================================ */
.oman-ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 40px 0;
}

.oman-ornament::before,
.oman-ornament::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--oe-gold), transparent);
}

.oman-ornament-icon {
  width: 36px; height: 36px;
  border: 2px solid var(--oe-gold);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transform: rotate(45deg);
  color: var(--oe-gold);
  font-size: 0.7rem;
}

/* ================================================
   READING PROGRESS BAR
================================================ */
#oe-reading-progress {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: var(--oe-gray-200);
  z-index: 9999;
}

#oe-reading-progress .bar {
  height: 100%;
  background: linear-gradient(90deg, var(--oe-blue) 0%, var(--oe-gold) 100%);
  width: 0%;
  transition: width 0.1s linear;
}

/* ================================================
   BACK TO TOP
================================================ */
#oe-back-top {
  position: fixed;
  bottom: 28px;
  left: 28px;
  width: 44px; height: 44px;
  background: var(--oe-blue);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--oe-shadow);
  opacity: 0;
  transform: translateY(20px);
  transition: all var(--oe-transition);
  z-index: 999;
  font-size: 1rem;
}

#oe-back-top.visible { opacity: 1; transform: translateY(0); }
#oe-back-top:hover { background: var(--oe-gold); color: var(--oe-dark); }

/* ================================================
   DARK MODE
================================================ */
@media (prefers-color-scheme: dark) {
  body.auto-dark {
    --oe-white:    #0F1923;
    --oe-gray-50:  #151F2A;
    --oe-gray-100: #1C2837;
    --oe-gray-200: #263445;
    --oe-gray-800: #E0E8F0;
    --oe-dark:     #F0F4F8;
  }
}

body.dark-mode {
  --oe-white:    #0F1923;
  --oe-gray-50:  #151F2A;
  --oe-gray-100: #1C2837;
  --oe-gray-200: #263445;
  --oe-gray-800: #E0E8F0;
  --oe-dark:     #F0F4F8;
}

/* ================================================
   RESPONSIVE — التجاوب
================================================ */
@media (max-width: 1100px) {
  .posts-grid     { grid-template-columns: repeat(2, 1fr); }
  .categories-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid    { grid-template-columns: 1fr 1fr; gap: 32px; }
  .stats-grid     { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .hero-grid              { grid-template-columns: 1fr; }
  .hero-main              { grid-row: auto; }
  .hero-main img          { height: 320px; }
  .hero-side              { flex-direction: row; flex-wrap: wrap; }
  .hero-side-item         { flex: 1; min-width: 200px; }
  .content-with-sidebar   { grid-template-columns: 1fr; }
  #oe-sidebar             { position: static; }
  .oe-primary-nav         { display: none; }
  .oe-menu-toggle         { display: flex; flex-direction: column; }
  .oe-primary-nav.open    { display: flex; flex-direction: column; width: 100%; }
  .oe-primary-nav.open > li > a { border-bottom: 1px solid rgba(255,255,255,.1); }
  /* إصلاح تداخل البحث: إزالة من header-inner ووضعه في شريط منفصل */
  .header-search          { display: none; } /* مخفي داخل header-inner في الجوال */
  .categories-grid { grid-template-columns: repeat(3, 1fr); }

  /* شريط البحث المنفصل للجوال — يظهر تحت الهيدر */
  .mobile-search-bar {
    display: block;
    background: var(--oe-bg);
    border-bottom: 1px solid var(--oe-gray-200);
    padding: 10px 16px;
  }
  .mobile-search-bar form {
    position: relative;
    display: flex;
    align-items: center;
  }
  .mobile-search-bar input {
    width: 100%;
    padding: 10px 18px 10px 44px;
    border: 2px solid var(--oe-gray-200);
    border-radius: 100px;
    font-family: var(--oe-font-body);
    font-size: 0.9rem;
    background: var(--oe-gray-50);
    direction: rtl;
    transition: all var(--oe-transition);
  }
  .mobile-search-bar input:focus {
    outline: none;
    border-color: var(--oe-blue-light);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(27,79,114,.08);
  }
  .mobile-search-bar button {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--oe-gray-400);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
  }
  /* نتائج البحث الحي للجوال */
  .mobile-search-bar #oe-live-results-mobile {
    position: absolute;
    top: calc(100% + 6px);
    right: 0; left: 0;
    background: #fff;
    border-radius: var(--oe-radius-lg);
    box-shadow: var(--oe-shadow-lg);
    z-index: 9999;
    max-height: 60vh;
    overflow-y: auto;
    border: 1px solid var(--oe-gray-200);
  }
  /* header-inner في الجوال: شعار + أزرار فقط */
  .header-inner {
    flex-wrap: nowrap;
    gap: 12px;
  }
}

/* شريط البحث المنفصل مخفي على الشاشات الكبيرة */
.mobile-search-bar { display: none; }

@media (max-width: 600px) {
  :root { --oe-container: 100%; }
  .posts-grid     { grid-template-columns: 1fr; }
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid    { grid-template-columns: 1fr; }
  .stats-grid     { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .topbar-links   { display: none; }
  .hero-side      { flex-direction: column; }
  .posts-grid-4   { grid-template-columns: repeat(2, 1fr); }
  /* تقليل padding الهيدر في الشاشات الصغيرة جداً */
  .header-inner   { padding: 10px 0; }
  .oe-logo-text .site-tagline { display: none; }
  .oe-logo-icon   { width: 38px; height: 38px; }
}

/* Print */
@media print {
  #oe-topbar, #oe-nav, #oe-sidebar, #oe-footer,
  #oe-reading-progress, #oe-back-top { display: none !important; }
  .content-with-sidebar { grid-template-columns: 1fr; }
  body { font-size: 12pt; }
}

/* ================================================
   LIVE SEARCH RESULTS
================================================ */
.live-search-results {
  position: absolute;
  top: calc(100% + 8px);
  right: 0; left: 0;
  background: #fff;
  border-radius: var(--oe-radius-lg);
  box-shadow: var(--oe-shadow-lg);
  z-index: 9999;
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid var(--oe-gray-200);
}

.live-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--oe-gray-100);
  text-decoration: none;
  transition: background var(--oe-transition);
}

.live-result-item:last-child { border: none; }
.live-result-item:hover { background: var(--oe-gray-50); }

.live-result-item img {
  width: 52px; min-width: 52px; height: 40px;
  object-fit: cover;
  border-radius: var(--oe-radius-sm);
}

.live-result-text { flex: 1; }
.live-result-text strong { display: block; font-size: .875rem; color: var(--oe-dark); line-height: 1.4; }
.live-result-text small  { font-size: .75rem; color: var(--oe-gray-400); }

/* Mobile hide */
@media (max-width: 600px) {
  .hide-mobile { display: none !important; }
}

/* ================================================
   ADVANCED SEO & PERFORMANCE IMPROVEMENTS
   تحسينات متقدمة لـ SEO وأداء الموقع
================================================ */

/* ── Breadcrumbs — فتات الخبز ────────────────── */
.oe-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 0;
  font-size: 0.8rem;
  color: var(--oe-gray-500);
  direction: rtl;
}
.oe-breadcrumb a {
  color: var(--oe-blue-light);
  text-decoration: none;
  transition: color var(--oe-transition);
}
.oe-breadcrumb a:hover { color: var(--oe-blue); text-decoration: underline; }
.oe-breadcrumb .sep { color: var(--oe-gray-300); font-size: 0.7rem; }
.oe-breadcrumb .current { color: var(--oe-dark); font-weight: 600; }

/* ── Article Table of Contents — جدول المحتويات ── */
.oe-toc {
  background: var(--oe-gray-50);
  border: 1px solid var(--oe-gray-200);
  border-radius: var(--oe-radius-lg);
  padding: 20px 24px;
  margin: 28px 0;
  border-right: 4px solid var(--oe-blue);
}
.oe-toc-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--oe-dark);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}
.oe-toc-title i { color: var(--oe-blue); }
.oe-toc-title .toc-toggle { margin-right: auto; margin-left: 0; font-size: 0.75rem; color: var(--oe-gray-400); }
.oe-toc ol, .oe-toc ul { margin: 0; padding-right: 20px; padding-left: 0; }
.oe-toc li { margin: 6px 0; font-size: 0.875rem; line-height: 1.5; }
.oe-toc a { color: var(--oe-blue-light); text-decoration: none; }
.oe-toc a:hover { color: var(--oe-blue); text-decoration: underline; }
.oe-toc.collapsed .oe-toc-body { display: none; }

/* ── Reading Time & Meta enriched ───────────────── */
.oe-read-time {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  color: var(--oe-gray-500);
  background: var(--oe-gray-100);
  padding: 3px 10px;
  border-radius: 100px;
}
.oe-read-time i { color: var(--oe-blue-light); }

/* ── Article Tags ────────────────────────────── */
.oe-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0;
  direction: rtl;
}
.oe-tag-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  background: var(--oe-gray-100);
  border-radius: 100px;
  font-size: 0.78rem;
  color: var(--oe-gray-600);
  text-decoration: none;
  transition: all var(--oe-transition);
  border: 1px solid transparent;
}
.oe-tag-item:hover {
  background: rgba(27,79,114,.08);
  border-color: var(--oe-blue-light);
  color: var(--oe-blue);
}
.oe-tag-item i { font-size: 0.65rem; }

/* ── Author Box ──────────────────────────────── */
.oe-author-box {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  background: var(--oe-gray-50);
  border: 1px solid var(--oe-gray-200);
  border-radius: var(--oe-radius-lg);
  padding: 24px;
  margin: 32px 0;
  direction: rtl;
}
.oe-author-box .author-avatar {
  width: 72px; min-width: 72px; height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--oe-blue-light);
}
.oe-author-box .author-info h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--oe-dark);
  margin-bottom: 4px;
}
.oe-author-box .author-info .author-role {
  font-size: 0.75rem;
  color: var(--oe-blue-light);
  margin-bottom: 8px;
  font-weight: 600;
}
.oe-author-box .author-info p {
  font-size: 0.875rem;
  color: var(--oe-gray-600);
  line-height: 1.6;
  margin: 0;
}
@media (max-width: 600px) {
  .oe-author-box { flex-direction: column; }
}

/* ── FAQ Accordion (Schema-ready) ────────────── */
.oe-faq-section { margin: 32px 0; }
.oe-faq-item {
  border: 1px solid var(--oe-gray-200);
  border-radius: var(--oe-radius);
  margin-bottom: 8px;
  overflow: hidden;
}
.oe-faq-question {
  width: 100%;
  text-align: right;
  padding: 16px 20px;
  background: var(--oe-gray-50);
  border: none;
  cursor: pointer;
  font-family: var(--oe-font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--oe-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: background var(--oe-transition);
}
.oe-faq-question:hover, .oe-faq-question[aria-expanded="true"] {
  background: rgba(27,79,114,.06);
  color: var(--oe-blue);
}
.oe-faq-question .faq-icon {
  width: 22px; min-width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--oe-blue);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem;
  transition: transform var(--oe-transition);
}
.oe-faq-question[aria-expanded="true"] .faq-icon { transform: rotate(45deg); background: var(--oe-gold); }
.oe-faq-answer {
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.2s;
  font-size: 0.9rem;
  color: var(--oe-gray-600);
  line-height: 1.8;
}
.oe-faq-answer.open { max-height: 600px; padding: 16px 20px; }

/* ── Related Posts ──────────────────────────── */
.oe-related-posts { margin: 40px 0; }
.oe-related-posts .section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--oe-dark);
  border-right: 4px solid var(--oe-gold);
  padding-right: 12px;
  margin-bottom: 20px;
}
.oe-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 768px) {
  .oe-related-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .oe-related-grid { grid-template-columns: 1fr; }
}
.oe-related-card {
  border-radius: var(--oe-radius);
  overflow: hidden;
  background: var(--oe-bg);
  border: 1px solid var(--oe-gray-200);
  transition: box-shadow var(--oe-transition), transform var(--oe-transition);
  text-decoration: none;
  display: block;
}
.oe-related-card:hover {
  box-shadow: var(--oe-shadow);
  transform: translateY(-3px);
}
.oe-related-card img {
  width: 100%; height: 130px;
  object-fit: cover;
}
.oe-related-card .related-body {
  padding: 12px;
  direction: rtl;
}
.oe-related-card .related-cat {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--oe-blue-light);
  text-transform: uppercase;
  margin-bottom: 4px;
}
.oe-related-card .related-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--oe-dark);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Image Lazy Loading Placeholder ─────────── */
img[loading="lazy"] {
  background: var(--oe-gray-100);
}
img.loaded { animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ── Skip Link (Accessibility) ───────────────── */
.skip-link:focus {
  position: fixed;
  top: 8px;
  right: 8px;
  left: auto;
  z-index: 99999;
  background: var(--oe-blue);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--oe-radius);
  font-weight: 600;
  text-decoration: none;
  clip: auto !important;
  width: auto !important;
  height: auto !important;
}

/* ── Social Share Buttons ────────────────────── */
.oe-share-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 24px 0;
  direction: rtl;
}
.oe-share-bar .share-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--oe-gray-500);
}
.oe-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--oe-transition);
  border: none;
  cursor: pointer;
  color: #fff;
}
.oe-share-btn.share-twitter   { background: #000; }
.oe-share-btn.share-facebook  { background: #1877F2; }
.oe-share-btn.share-whatsapp  { background: #25D366; }
.oe-share-btn.share-telegram  { background: #2AABEE; }
.oe-share-btn.share-copy      { background: var(--oe-gray-600); }
.oe-share-btn:hover { opacity: 0.85; transform: translateY(-1px); }

/* ── View Count Badge ──────────────────────── */
.oe-views-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: var(--oe-gray-400);
}
.oe-views-badge i { font-size: 0.65rem; }

/* ── Inline Search Page Results ───────────── */
.oe-search-results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--oe-gray-200);
  margin-bottom: 24px;
  direction: rtl;
}
.oe-search-results-header h1 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--oe-dark);
}
.oe-search-results-header .results-count {
  font-size: 0.85rem;
  color: var(--oe-gray-500);
}

/* ── Print Styles Enhanced ───────────────── */
@media print {
  #oe-topbar, #oe-nav, #oe-sidebar, #oe-footer,
  #oe-reading-progress, #oe-back-top,
  .oe-share-bar, .oe-related-posts,
  .mobile-search-bar, .header-search,
  .header-actions { display: none !important; }
  .content-with-sidebar { grid-template-columns: 1fr; }
  body { font-size: 12pt; color: #000; }
  a { color: #000; text-decoration: underline; }
  .oe-article-content img { max-width: 100%; }
}
