/**
 * om-home-shyahia — RTL homepage (brown / gold palette, sh-yahia-inspired layout)
 * Tokens: primary brown ~#281b16–#5d4037, gold #c5a059
 */
@import url("https://fonts.googleapis.com/css2?family=Amiri:wght@400;700&family=Tajawal:wght@400;500;700;800&display=swap");

:root {
  --om-ink: #1a120f;
  --om-brown-deep: #281b16;
  --om-brown: #3e2723;
  --om-brown-mid: #5d4037;
  --om-gold: #c5a059;
  --om-gold-bright: #d4b978;
  --om-gold-dim: rgba(197, 160, 89, 0.28);
  --om-paper: #f7f4ef;
  --om-paper-dim: #ede8e0;
  --om-card: #ffffff;
  --om-text: #2a211c;
  --om-muted: #6d5c54;
  --om-white: #fffaf5;
  --om-radius: 14px;
  --om-radius-sm: 10px;
  --om-shadow: 0 10px 40px rgba(40, 27, 22, 0.12);
  --om-max: 1200px;
  --om-header-h: auto;
  --om-transition: 0.22s ease;
  --om-side-red: #c62828;
  --om-side-orange: #e65100;
  --om-side-brown: #5d4037;
}

html.om-dark {
  --om-paper: #1e1815;
  --om-paper-dim: #161210;
  --om-card: #252018;
  --om-text: #f0e8e0;
  --om-muted: #a8988c;
  --om-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.om-sh-body {
  margin: 0;
  direction: rtl;
  font-family: "Tajawal", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--om-text);
  background: var(--om-paper-dim);
  overflow-x: hidden;
  padding-bottom: 24px;
}

#om-sh-root {
  max-width: 100%;
  overflow-x: clip;
}

.om-sh {
  min-height: 100vh;
}

.om-sh a {
  color: var(--om-brown-mid);
  text-decoration: none;
  transition: color var(--om-transition);
}

html.om-dark .om-sh a {
  color: var(--om-gold-bright);
}

.om-sh a:hover {
  color: var(--om-gold);
}

/* ——— Top bar ——— (header فقط: لا تُطبَّق على div.om-header داخل صفحة أقسام الدروس) */
header.om-header {
  background: linear-gradient(
      165deg,
      rgba(40, 27, 22, 0.97) 0%,
      rgba(62, 39, 35, 0.95) 45%,
      rgba(40, 27, 22, 0.98) 100%
    ),
    url("https://omabdullahalwadeai.com/wp-content/uploads/2022/09/D8B4D8B1D8ADD8B20D985D8AED8AAD8B5D8B120D8A7D984D8ADD8AFD98AD8AB-3.jpg")
      center / cover;
  background-blend-mode: normal, multiply;
  border-bottom: 1px solid var(--om-gold-dim);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  position: relative;
  z-index: 50;
}

header.om-header::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--om-gold) 20%,
    var(--om-gold-bright) 50%,
    var(--om-gold) 80%,
    transparent
  );
  pointer-events: none;
}

header.om-header.om-header--pattern::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
      -14deg,
      transparent,
      transparent 10px,
      rgba(197, 160, 89, 0.045) 10px,
      rgba(197, 160, 89, 0.045) 11px
    ),
    radial-gradient(ellipse 90% 55% at 15% 0%, rgba(197, 160, 89, 0.14) 0%, transparent 52%);
  pointer-events: none;
  z-index: 0;
}

header.om-header .om-header-inner {
  max-width: var(--om-max);
  margin: 0 auto;
  padding: 12px 18px 10px;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 14px 18px;
  position: relative;
  z-index: 1;
}

/* صف واحد: شعار (يمين) | قائمة رئيسية (وسط) | بحث + ليلي + تواصل (يسار) — كمرجع sh-yahia */
.om-header--bar .om-brand {
  flex: 0 1 min(340px, 38vw);
  min-width: 0;
}

.om-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--om-white);
}

.om-brand img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 12px;
  border: 2px solid var(--om-gold-dim);
  flex-shrink: 0;
}

.om-brand-text {
  min-width: 0;
}

.om-brand-eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--om-gold);
  opacity: 0.95;
}

.om-brand-name {
  font-family: "Amiri", serif;
  font-size: clamp(13px, 2.5vw, 17px);
  font-weight: 700;
  line-height: 1.45;
  color: var(--om-white);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

header.om-header .om-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: nowrap;
}

header.om-header .om-header-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  border-radius: 8px;
  text-decoration: none !important;
  color: rgba(255, 250, 245, 0.95) !important;
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: none;
  transition: background var(--om-transition), border-color var(--om-transition),
    color var(--om-transition);
}

header.om-header .om-header-cta__icon {
  flex-shrink: 0;
  opacity: 0.9;
}

header.om-header .om-header-cta:hover {
  background: rgba(197, 160, 89, 0.22);
  border-color: var(--om-gold-bright);
  color: #fff !important;
}

.om-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--om-gold-dim);
  background: rgba(255, 255, 255, 0.06);
  color: var(--om-white);
  cursor: pointer;
  transition: background var(--om-transition), border-color var(--om-transition);
}

.om-icon-btn:hover {
  background: var(--om-gold-dim);
  border-color: var(--om-gold);
}

.om-header--bar .om-nav-wrap {
  flex: 1 1 0;
  min-width: 0;
  order: 0;
  width: auto;
  padding-top: 0;
  margin-top: 0;
  border-top: none;
}

/* قائمة رئيسية أفقية — عناوين مرجعية بيضاء، صف واحد مع التفاف خفيف عند الضيق */
.om-nav.om-nav--ref {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 2px 4px;
  padding: 0;
  margin: 0;
  width: 100%;
  min-width: 0;
  background: transparent;
  border: none;
}

.om-nav--ref .om-nav__link {
  display: inline-block;
  color: rgba(255, 250, 245, 0.96) !important;
  text-decoration: none !important;
  font-size: clamp(12px, 1.2vw, 14px);
  font-weight: 600;
  padding: 8px 11px;
  border-radius: 8px;
  line-height: 1.35;
  white-space: nowrap;
  transition: background var(--om-transition), color var(--om-transition);
}

.om-nav--ref .om-nav__link:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff !important;
}

.om-nav--ref .om-nav__link.is-active {
  background: rgba(197, 160, 89, 0.32);
  color: #fff !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

@media (max-width: 1100px) {
  .om-nav--ref .om-nav__link {
    white-space: normal;
    text-align: center;
    max-width: 10.5rem;
  }
}

.om-nav-toggle {
  display: none;
  width: 100%;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--om-gold-dim);
  background: rgba(255, 255, 255, 0.06);
  color: var(--om-white);
  font-family: inherit;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
}

/* شريط سفلي زخرفي خفيف (أقرب لمرجع sh-yahia) */
header.om-header .om-header-accent {
  height: 5px;
  margin: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 5px,
    rgba(197, 160, 89, 0.35) 5px,
    rgba(197, 160, 89, 0.35) 6px
  );
  opacity: 0.85;
  position: relative;
  z-index: 1;
}

header.om-header .om-header-accent::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(197, 160, 89, 0.25) 30%,
    rgba(197, 160, 89, 0.25) 70%,
    transparent
  );
  pointer-events: none;
}

@media (max-width: 900px) {
  header.om-header .om-header-inner {
    flex-wrap: wrap;
  }

  .om-header--bar .om-brand {
    flex: 1 1 auto;
    min-width: 0;
  }

  .om-header-actions {
    margin-inline-start: auto;
  }

  .om-header--bar .om-nav-wrap {
    flex: 1 1 100%;
    order: 3;
    width: 100%;
  }

  .om-nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
  }

  .om-nav-wrap:not(.is-open) .om-nav--ref {
    display: none;
  }

  .om-nav-wrap.is-open .om-nav--ref {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    margin-top: 8px;
    padding: 6px 4px 8px;
    background: rgba(0, 0, 0, 0.28);
    border-radius: var(--om-radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.1);
    gap: 0;
    width: 100%;
    box-sizing: border-box;
  }

  .om-nav-wrap.is-open .om-nav--ref .om-nav__link {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    box-sizing: border-box;
    text-align: right;
    padding: 12px 14px;
    max-width: none;
    white-space: normal;
    line-height: 1.4;
    font-size: 14px;
    font-weight: 700;
    border-radius: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .om-nav-wrap.is-open .om-nav--ref .om-nav__link:last-child {
    border-bottom: none;
  }

  .om-nav-wrap.is-open .om-nav--ref .om-nav__link.is-active {
    background: rgba(197, 160, 89, 0.28);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  }
}

@media (min-width: 901px) {
  .om-nav-toggle {
    display: none !important;
  }

  .om-nav-wrap .om-nav--ref {
    display: flex !important;
  }
}

/* ——— Search overlay ——— */
.om-search-overlay[hidden] {
  display: none !important;
}

.om-search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 18, 15, 0.92);
  z-index: 200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--om-transition), visibility var(--om-transition);
}

.om-search-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.om-search-box {
  width: min(560px, 100%);
  margin-top: 12vh;
  background: var(--om-card);
  border-radius: var(--om-radius);
  padding: 20px;
  box-shadow: var(--om-shadow);
  border: 1px solid var(--om-gold-dim);
}

.om-search-box label {
  display: block;
  font-weight: 800;
  margin-bottom: 10px;
  color: var(--om-brown-deep);
}

html.om-dark .om-search-box label {
  color: var(--om-gold);
}

.om-search-box input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--om-paper-dim);
  border-radius: var(--om-radius-sm);
  font-family: inherit;
  font-size: 16px;
  direction: rtl;
}

.om-search-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  justify-content: flex-end;
}

.om-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: var(--om-radius-sm);
  font-family: inherit;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  border: none;
  transition: transform 0.15s ease, opacity var(--om-transition);
}

.om-btn:active {
  transform: scale(0.98);
}

.om-btn--gold {
  background: linear-gradient(135deg, #b8924f, var(--om-gold));
  color: #1a120f;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.om-btn--ghost {
  background: transparent;
  color: var(--om-muted);
  border: 1px solid var(--om-paper-dim);
}

/* ——— Hero slider ——— */
.om-hero {
  position: relative;
  width: 100%;
  min-height: 380px;
  max-height: min(52vh, 520px);
  overflow: hidden;
  background: #0d0a08;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  margin-bottom: 28px;
}

.om-hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.7s ease;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.om-hero-slide__img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  /* أوضح من background-image في كثير من الشاشات */
  image-rendering: auto;
}

.om-hero-slide.active {
  opacity: 1;
  z-index: 1;
}

.om-hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to top,
    rgba(26, 18, 15, 0.88) 0%,
    rgba(40, 27, 22, 0.45) 45%,
    rgba(26, 18, 15, 0.55) 100%
  );
}

.om-hero-content {
  position: relative;
  z-index: 10;
  max-width: var(--om-max);
  margin: 0 auto;
  padding: clamp(32px, 8vw, 72px) 20px 48px;
  text-align: center;
  min-height: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.om-hero-pill {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, #a67c2e, var(--om-gold));
  color: #1a120f;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.om-hero-title {
  margin: 0 0 20px;
  font-family: "Amiri", serif;
  font-size: clamp(1.35rem, 4.2vw, 2.65rem);
  font-weight: 700;
  line-height: 1.45;
  color: var(--om-white);
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.5);
  max-width: 900px;
}

.om-hero-title a {
  color: inherit;
}

.om-hero-title a:hover {
  color: var(--om-gold-bright);
}

.om-hero-cta {
  display: inline-block;
  padding: 12px 28px;
  border-radius: var(--om-radius-sm);
  background: var(--om-gold);
  color: #1a120f !important;
  font-weight: 800;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
}

.om-hero-cta:hover {
  filter: brightness(1.08);
  color: #1a120f !important;
}

.om-hero-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--om-transition);
  direction: ltr;
  unicode-bidi: isolate;
}

.om-hero-nav:hover {
  background: rgba(0, 0, 0, 0.65);
}

/* SVG ثابت الاتجاه — لا ينعكس مع RTL مثل › ‹ */
.om-hero-nav__icon {
  display: block;
  flex-shrink: 0;
}

/* موضع ثابت بصرياً: يسار الشاشة = سابق (←) ، يمين = تالي (→) — يعمل مع dir=rtl للصفحة */
.om-hero-prev {
  left: 12px;
}

.om-hero-next {
  right: 12px;
}

@media (max-width: 640px) {
  .om-hero-nav {
    width: 38px;
    height: 38px;
  }

  .om-hero-prev {
    left: 6px;
  }

  .om-hero-next {
    right: 6px;
  }
}

.om-hero-dots {
  position: absolute;
  bottom: 18px;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.om-hero-dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  padding: 0;
  transition: transform 0.2s, background var(--om-transition);
}

.om-hero-dots button.active {
  background: #fff;
  transform: scale(1.15);
}

/* ——— Main grid ——— */
.om-wrap {
  max-width: var(--om-max);
  margin: 0 auto;
  padding: 0 18px 48px;
}

.om-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  margin-bottom: 28px;
}

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

.om-card {
  background: var(--om-card);
  border-radius: var(--om-radius);
  box-shadow: var(--om-shadow);
  border: 1px solid rgba(197, 160, 89, 0.18);
  overflow: hidden;
}

.om-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: linear-gradient(135deg, var(--om-brown) 0%, var(--om-brown-mid) 100%);
  color: var(--om-white);
  position: relative;
}

.om-card-head::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 0l5 15h15L25 23l5 15-10-10-10 10 5-15L0 15h15z' fill='none' stroke='%23fff' stroke-width='0.8'/%3E%3C/svg%3E");
  pointer-events: none;
}

.om-card-icon {
  font-size: 1.35rem;
  position: relative;
  z-index: 1;
}

.om-card-title {
  flex: 1;
  font-size: 1.15rem;
  font-weight: 800;
  position: relative;
  z-index: 1;
}

.om-card-more {
  color: rgba(255, 250, 245, 0.92) !important;
  font-size: 13px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  position: relative;
  z-index: 1;
}

.om-card-more:hover {
  color: var(--om-gold-bright) !important;
}

.om-card-body {
  padding: 6px 0;
  border-top: 2px solid var(--om-gold-dim);
}

.om-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.om-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px dashed rgba(109, 92, 84, 0.35);
  transition: background var(--om-transition);
}

html.om-dark .om-list li {
  border-bottom-color: rgba(168, 152, 140, 0.28);
}

.om-list li:last-child {
  border-bottom: none;
}

.om-list li:hover {
  background: rgba(197, 160, 89, 0.06);
}

.om-list-item-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.om-list a {
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.5;
  color: #842b2b !important;
}

html.om-dark .om-list a {
  color: #e8b4b4 !important;
}

.om-list-excerpt {
  display: block;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--om-muted);
}

.om-list .om-date {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--om-muted);
  margin-top: 4px;
}

@media (max-width: 640px) {
  #om-sh-root .om-list li,
  .om-grid .om-list li {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px 12px;
  }

  #om-sh-root .om-list .om-list-item-text,
  .om-grid .om-list .om-list-item-text {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  #om-sh-root .om-list .om-date,
  .om-grid .om-list .om-date {
    margin-top: 0;
    align-self: flex-end;
  }

  #om-sh-root .om-list a,
  .om-grid .om-list a,
  .om-list-excerpt {
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  .om-card-head {
    flex-wrap: wrap;
    padding: 12px 14px;
    row-gap: 8px;
  }

  .om-card-more {
    margin-inline-start: auto;
    flex-shrink: 0;
  }

  .om-wrap {
    padding-left: 14px;
    padding-right: 14px;
  }
}

.om-play {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: rgba(183, 28, 28, 0.12);
  color: #b71c1c;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--om-transition), color var(--om-transition);
}

.om-play:hover {
  background: #b71c1c;
  color: #fff;
}

.om-audio-hint {
  margin: 0;
  padding: 10px 16px 0;
  font-size: 13px;
  color: var(--om-muted);
  line-height: 1.5;
}

/* ——— دليل المقالات (قالب: دليل المقالات بالتصنيفات) ——— */
.om-articles-directory__intro {
  margin-bottom: 0.5em;
}

.om-articles-directory__intro > *:last-child {
  margin-bottom: 0.35em;
}

.om-articles-directory__sections {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 4px;
}

.om-articles-directory__block {
  background: var(--om-card);
  border: 1px solid rgba(197, 160, 89, 0.22);
  border-radius: var(--om-radius);
  box-shadow: var(--om-shadow);
  padding: 12px 14px 14px;
  overflow: hidden;
  max-width: 100%;
}

.om-articles-directory__block-head {
  margin: 0 0 10px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--om-gold-dim);
}

.om-articles-directory__block-title {
  margin: 0 0 6px;
  font-family: "Amiri", serif;
  font-size: clamp(1.05rem, 3vw, 1.25rem);
  line-height: 1.4;
}

.om-articles-directory__block-title a {
  color: var(--om-brown-deep) !important;
  text-decoration: none !important;
  word-break: break-word;
}

html.om-dark .om-articles-directory__block-title a {
  color: var(--om-gold-bright) !important;
}

.om-articles-directory__desc {
  margin: 0;
  font-size: 0.9rem;
  color: var(--om-muted);
  line-height: 1.55;
}

.om-articles-directory__subcats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
  padding: 0 0 10px;
  border-bottom: 1px dashed rgba(197, 160, 89, 0.25);
}

.om-articles-directory__subcat-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(197, 160, 89, 0.14);
  color: var(--om-brown-deep) !important;
  text-decoration: none !important;
  border: 1px solid rgba(197, 160, 89, 0.35);
  transition: background var(--om-transition), transform var(--om-transition);
  max-width: 100%;
  word-break: break-word;
}

.om-articles-directory__subcat-pill:hover {
  background: rgba(197, 160, 89, 0.26);
  transform: translateY(-1px);
}

html.om-dark .om-articles-directory__subcat-pill {
  color: var(--om-gold-bright) !important;
  border-color: rgba(197, 160, 89, 0.4);
}

.om-dir-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.om-dir-item {
  padding: 9px 0;
  border-bottom: 1px dashed rgba(109, 92, 84, 0.25);
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: stretch;
  max-width: 100%;
}

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

.om-dir-item__title {
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1.5;
  color: #842b2b !important;
  text-decoration: none !important;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

html.om-dark .om-dir-item__title {
  color: #e8b4b4 !important;
}

.om-dir-item__date {
  font-size: 12px;
  color: var(--om-muted);
}

.om-dir-item__excerpt {
  margin: 0;
  font-size: 0.86rem;
  color: var(--om-muted);
  line-height: 1.55;
}

.om-articles-directory__more-wrap {
  margin: 10px 0 0;
  text-align: center;
}

.om-articles-directory__cat-more {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 18px !important;
  min-width: min(100%, 280px);
  text-align: center;
}

.om-articles-directory__more-primary {
  font-size: 1rem;
  font-weight: 800;
}

.om-articles-directory__more-sub {
  font-size: 12px;
  font-weight: 600;
  opacity: 0.88;
  line-height: 1.35;
}

.om-articles-directory__empty {
  text-align: center;
  color: var(--om-muted);
  padding: 14px;
}

/* ——— YouTube / excerpts ——— */
.om-yt {
  margin-bottom: 28px;
}

.om-yt-head {
  font-size: 1.25rem;
  font-weight: 800;
  margin: 0 0 8px;
  color: var(--om-brown-deep);
}

html.om-dark .om-yt-head {
  color: var(--om-gold);
}

.om-yt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.om-yt-card {
  background: var(--om-card);
  border-radius: var(--om-radius-sm);
  overflow: hidden;
  border: 1px solid var(--om-gold-dim);
  box-shadow: var(--om-shadow);
}

.om-yt-card iframe,
.om-yt-card .om-yt-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  display: block;
  background: #000;
}

.om-yt-caption {
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 700;
}

/* ——— Promo banners ——— */
.om-promos {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-bottom: 36px;
}

@media (max-width: 720px) {
  .om-promos {
    grid-template-columns: 1fr;
  }
}

.om-promo {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 20px;
  border-radius: var(--om-radius);
  text-decoration: none;
  color: var(--om-white) !important;
  min-height: 120px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--om-shadow);
  transition: transform var(--om-transition);
}

.om-promo:hover {
  transform: translateY(-3px);
  color: var(--om-white) !important;
}

.om-promo::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(40, 27, 22, 0.92), rgba(93, 64, 55, 0.75));
  z-index: 0;
}

.om-promo--quran::before {
  background: linear-gradient(135deg, rgba(61, 45, 31, 0.94), rgba(120, 84, 48, 0.78));
}

.om-promo > * {
  position: relative;
  z-index: 1;
}

.om-promo-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.om-promo h3 {
  margin: 0 0 4px;
  font-size: 1.1rem;
  font-weight: 800;
}

.om-promo p {
  margin: 0;
  font-size: 13px;
  opacity: 0.92;
  line-height: 1.45;
}

.om-promo-cta {
  margin-right: auto;
  font-weight: 800;
  font-size: 13px;
  white-space: nowrap;
}

/* مشغّل صوتي بلا واجهة (تشغيل من القوائم فقط) */
.om-global-audio-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ——— Footer ——— */
.om-footer {
  background: linear-gradient(180deg, var(--om-brown-deep) 0%, #1a120f 100%);
  color: rgba(255, 250, 245, 0.88);
  padding: 40px 18px 20px;
  margin-top: 20px;
  border-top: 3px solid var(--om-gold-dim);
}

.om-footer a {
  color: var(--om-gold-bright) !important;
}

.om-footer-inner {
  max-width: var(--om-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

@media (max-width: 900px) {
  .om-footer-inner {
    grid-template-columns: 1fr;
  }
}

.om-footer h4 {
  margin: 0 0 12px;
  font-size: 1rem;
  color: var(--om-gold);
}

.om-footer p {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  opacity: 0.92;
}

.om-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.om-footer li {
  margin-bottom: 8px;
}

.om-footer-logo img {
  margin-top: 12px;
  max-width: 100px;
  border-radius: 10px;
  border: 2px solid var(--om-gold-dim);
}

.om-footer-bottom {
  max-width: var(--om-max);
  margin: 28px auto 0;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 13px;
  opacity: 0.85;
}

.om-loading {
  color: var(--om-muted);
  font-style: italic;
}

.om-scroll-top {
  position: fixed;
  bottom: 20px;
  right: 18px;
  z-index: 90;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--om-gold);
  color: #1a120f;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  box-shadow: var(--om-shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--om-transition);
}

.om-scroll-top.visible {
  opacity: 1;
  pointer-events: auto;
}

/* ========== Inner templates: archive, single, page, search, 404 ========== */
.om-main-inner {
  padding-top: 8px;
}

.om-page-hero {
  margin-bottom: 24px;
}

.om-archive-head {
  background: var(--om-card);
  border-radius: var(--om-radius);
  box-shadow: var(--om-shadow);
  border: 1px solid rgba(197, 160, 89, 0.18);
  padding: 14px 16px;
  margin-bottom: 16px;
}

@media (min-width: 768px) {
  .om-archive-head {
    padding: 18px 20px;
    margin-bottom: 20px;
  }
}

.om-archive-head h1 {
  margin: 0 0 8px;
  font-family: "Amiri", serif;
  font-size: clamp(1.1rem, 3.2vw, 1.65rem);
  line-height: 1.35;
  color: var(--om-brown-deep);
}

.om-archive-head h1:last-child {
  margin-bottom: 0;
}

html.om-dark .om-archive-head h1 {
  color: var(--om-gold);
}

.om-archive-desc {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--om-muted);
  line-height: 1.55;
}

.om-archive-desc:empty {
  display: none;
}

.om-post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

.om-post-card {
  background: var(--om-card);
  border-radius: var(--om-radius);
  overflow: hidden;
  border: 1px solid rgba(197, 160, 89, 0.18);
  box-shadow: var(--om-shadow);
  transition: transform var(--om-transition), box-shadow var(--om-transition);
}

.om-post-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 48px rgba(40, 27, 22, 0.14);
}

.om-post-card a {
  color: inherit !important;
  text-decoration: none;
}

.om-post-card-thumb {
  display: block;
  aspect-ratio: 16 / 10;
  background: var(--om-paper-dim) center/cover no-repeat;
  border-bottom: 2px solid var(--om-gold-dim);
}

@media (min-width: 901px) {
  .om-archive-head ~ .om-post-grid .om-post-card-thumb {
    aspect-ratio: 3 / 2;
    max-height: 200px;
  }
}

/* بلا صورة مميزة: أيقونة + خلفية ملوّنة خفيفة حسب نوع المحتوى */
.om-post-card-thumb--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background-image: none !important;
  background: linear-gradient(
    160deg,
    var(--om-paper-dim) 0%,
    rgba(197, 160, 89, 0.14) 48%,
    var(--om-paper-dim) 100%
  );
}

.om-post-card-icon {
  font-size: clamp(2.75rem, 8vw, 3.5rem);
  line-height: 1;
  user-select: none;
  filter: drop-shadow(0 3px 10px rgba(40, 27, 22, 0.12));
  transition: transform var(--om-transition);
}

.om-post-card:hover .om-post-card-thumb--placeholder .om-post-card-icon {
  transform: scale(1.06);
}

.om-post-card-thumb--placeholder.om-post-card-thumb--qa {
  background: linear-gradient(160deg, #efe8e6 0%, rgba(198, 40, 40, 0.12) 50%, #f2ebe8 100%);
}

.om-post-card-thumb--placeholder.om-post-card-thumb--fatwa {
  background: linear-gradient(160deg, #ede8e5 0%, rgba(93, 64, 55, 0.15) 50%, #f0eae6 100%);
}

.om-post-card-thumb--placeholder.om-post-card-thumb--sermons {
  background: linear-gradient(160deg, #f0ebe6 0%, rgba(197, 160, 89, 0.22) 50%, #f5f0ea 100%);
}

.om-post-card-thumb--placeholder.om-post-card-thumb--audio {
  background: linear-gradient(160deg, #e8eef2 0%, rgba(62, 39, 35, 0.12) 50%, #eef1f4 100%);
}

.om-post-card-thumb--placeholder.om-post-card-thumb--books {
  background: linear-gradient(160deg, #f2efe8 0%, rgba(139, 90, 43, 0.14) 50%, #f7f4ed 100%);
}

.om-post-card-thumb--placeholder.om-post-card-thumb--lessons,
.om-post-card-thumb--placeholder.om-post-card-thumb--lesson,
.om-post-card-thumb--placeholder.om-post-card-thumb--bio {
  background: linear-gradient(160deg, #eef0ea 0%, rgba(76, 99, 58, 0.12) 50%, #f2f4ee 100%);
}

.om-post-card-thumb--placeholder.om-post-card-thumb--hadith {
  background: linear-gradient(160deg, #f3f1ec 0%, rgba(121, 85, 72, 0.14) 50%, #f7f5f0 100%);
}

.om-post-card-thumb--placeholder.om-post-card-thumb--quran {
  background: linear-gradient(160deg, #e8f0ec 0%, rgba(46, 125, 50, 0.12) 50%, #edf4ef 100%);
}

.om-post-card-thumb--placeholder.om-post-card-thumb--fiqh {
  background: linear-gradient(160deg, #ebe8f2 0%, rgba(81, 45, 168, 0.1) 50%, #f0edf5 100%);
}

.om-post-card-thumb--placeholder.om-post-card-thumb--articles {
  background: linear-gradient(160deg, #eae8e5 0%, rgba(97, 97, 97, 0.1) 50%, #f0eeeb 100%);
}

.om-post-card-thumb--placeholder.om-post-card-thumb--lang {
  background: linear-gradient(160deg, #e8eef5 0%, rgba(25, 118, 210, 0.1) 50%, #edf2f8 100%);
}

.om-post-card-thumb--placeholder.om-post-card-thumb--advice {
  background: linear-gradient(160deg, #faf6ef 0%, rgba(197, 160, 89, 0.2) 55%, #fcf9f3 100%);
}

html.om-dark .om-post-card-thumb--placeholder {
  background: linear-gradient(
    160deg,
    var(--om-paper-dim) 0%,
    rgba(197, 160, 89, 0.18) 50%,
    var(--om-card) 100%
  );
}

html.om-dark .om-post-card-thumb--placeholder.om-post-card-thumb--qa {
  background: linear-gradient(160deg, #2a2220 0%, rgba(198, 40, 40, 0.2) 50%, #252018 100%);
}

.om-post-card-body {
  padding: 14px 16px 18px;
}

.om-post-card-body h2 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.45;
  color: var(--om-text) !important;
}

.om-post-card-meta {
  font-size: 12px;
  color: var(--om-muted);
}

/* أرشيف / بحث — موبايل: بطاقة أفقية (صورة جانب النص) — لا يشمل «مقالات ذات صلة» */
@media (max-width: 640px) {
  .om-archive-head ~ .om-post-grid {
    grid-template-columns: 1fr;
    gap: 11px;
    margin-bottom: 18px;
  }

  .om-archive-head ~ .om-post-grid .om-post-card {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    min-height: 0;
  }

  .om-archive-head ~ .om-post-grid .om-post-card-thumb {
    width: 92px;
    min-width: 92px;
    max-width: 92px;
    aspect-ratio: 1;
    border-bottom: none;
    border-inline-end: 2px solid var(--om-gold-dim);
    align-self: stretch;
  }

  .om-archive-head ~ .om-post-grid .om-post-card-thumb--placeholder .om-post-card-icon {
    font-size: clamp(1.65rem, 7vw, 2.1rem);
  }

  .om-archive-head ~ .om-post-grid .om-post-card-body {
    flex: 1;
    min-width: 0;
    padding: 9px 10px 11px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .om-archive-head ~ .om-post-grid .om-post-card-body h2 {
    font-size: 0.92rem;
    margin: 0 0 3px;
    line-height: 1.38;
  }

  .om-archive-head ~ .om-post-grid .om-post-card-excerpt {
    margin: 4px 0 0;
    font-size: 0.8rem;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

.om-single {
  background: var(--om-card);
  border-radius: var(--om-radius);
  border: 1px solid rgba(197, 160, 89, 0.18);
  box-shadow: var(--om-shadow);
  padding: clamp(16px, 2.5vw, 24px);
  margin-bottom: 20px;
}

.om-single-header {
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--om-gold-dim);
}

.om-single-header h1 {
  margin: 0 0 10px;
  font-family: "Amiri", serif;
  font-size: clamp(1.35rem, 3.5vw, 2rem);
  line-height: 1.45;
  color: var(--om-brown-deep);
}

html.om-dark .om-single-header h1 {
  color: var(--om-gold-bright);
}

.om-single-meta {
  font-size: 14px;
  color: var(--om-muted);
}

.om-single-meta a {
  font-weight: 700;
}

.entry-content {
  font-size: 1.05rem;
  line-height: 1.85;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

.entry-content p {
  margin: 0 0 1em;
}

.entry-content img,
.entry-content video,
.entry-content iframe {
  max-width: 100%;
  height: auto;
}

.entry-content a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ——— مقال/صفحة منفردة: تقليل الفراغات البيضاء (فقرات فارغة، هوامش، مقالات ذات صلة) ——— */
.om-single .entry-content p {
  margin: 0 0 0.65em;
}

.om-single .entry-content > *:last-child {
  margin-bottom: 0 !important;
}

.om-single .entry-content p:empty {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  min-height: 0 !important;
}

.om-single .entry-content p:has(> br:only-child) {
  display: none !important;
  margin: 0 !important;
  line-height: 0 !important;
}

.om-single .entry-content .wp-block-spacer {
  max-height: min(100px, 18vw) !important;
}

.om-single .entry-content .wp-block-separator {
  margin-block: 0.75em !important;
}

.om-single .entry-content .alignwide,
.om-single .entry-content .alignfull {
  margin-top: 0.75em;
  margin-bottom: 0.75em;
}

.om-related {
  margin-top: 20px;
  margin-bottom: 12px;
}

/* موبايل: منع النص بجانب الصورة في عمود ضيق (كلاسيك / Gutenberg) */
@media (max-width: 640px) {
  .entry-content .alignleft,
  .entry-content .alignright,
  .entry-content .aligncenter {
    float: none !important;
    display: block !important;
    margin: 1em auto !important;
    max-width: 100% !important;
    clear: both;
  }

  .entry-content .wp-caption {
    max-width: 100% !important;
  }

  .entry-content .wp-block-image .alignleft,
  .entry-content .wp-block-image .alignright,
  .entry-content .wp-block-image .aligncenter {
    float: none;
    margin-left: auto;
    margin-right: auto;
  }

  .entry-content .wp-block-media-text {
    display: block !important;
    grid-template-columns: 1fr !important;
  }

  .entry-content .wp-block-media-text__media,
  .entry-content .wp-block-media-text__content {
    width: 100% !important;
    max-width: 100% !important;
  }

  .entry-content .wp-block-columns {
    flex-direction: column !important;
  }

  .entry-content .wp-block-column {
    flex-basis: 100% !important;
    min-width: 0 !important;
  }

  .om-entry-scan .entry-content table {
    display: block;
    width: 100% !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

.om-related h2 {
  font-size: 1.1rem;
  margin: 0 0 10px;
  color: var(--om-brown-deep);
}

html.om-dark .om-related h2 {
  color: var(--om-gold);
}

/* مقالات ذات صلة: بطاقات أوضح على الديسكتوب (أقل فراغ، صورة بجانب النص) */
@media (min-width: 901px) {
  .om-related .om-post-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
    align-items: stretch;
  }

  .om-related .om-post-card {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    min-height: 0;
  }

  .om-related .om-post-card-thumb {
    width: 112px;
    min-width: 112px;
    max-width: 112px;
    aspect-ratio: 1;
    border-bottom: none;
    border-inline-end: 2px solid var(--om-gold-dim);
    align-self: stretch;
  }

  .om-related .om-post-card-body {
    flex: 1;
    min-width: 0;
    padding: 10px 14px 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .om-related .om-post-card-body h2 {
    font-size: clamp(0.88rem, 1.1vw, 1rem);
    line-height: 1.45;
    margin: 0 0 6px;
  }

  .om-related .om-post-card-meta {
    font-size: 12px;
  }

  .om-related .om-post-card-excerpt {
    margin-top: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

.om-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 24px 0 40px;
}

.om-pagination a,
.om-pagination span,
.om-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  padding: 0 12px;
  border-radius: var(--om-radius-sm);
  background: var(--om-card);
  border: 1px solid var(--om-gold-dim);
  font-weight: 700;
  color: var(--om-text) !important;
  margin: 0 2px;
}

.om-pagination .current,
.om-pagination span.page-numbers.current {
  background: var(--om-brown);
  color: var(--om-white) !important;
  border-color: var(--om-brown);
}

.om-none-box {
  background: var(--om-card);
  border-radius: var(--om-radius);
  padding: 32px 20px;
  text-align: center;
  border: 1px solid var(--om-gold-dim);
  box-shadow: var(--om-shadow);
}

.om-none-box p {
  margin: 0 0 16px;
  color: var(--om-muted);
}

.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
}

/* ——— Comments ——— */
.om-comments {
  margin-top: 18px;
}

.om-comments-body {
  padding: 12px 14px 16px;
}

.om-comment-list {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
}

.om-comment-list .comment,
.om-comment-list .pingback {
  margin: 0 0 16px;
  padding: 14px 16px;
  background: var(--om-paper-dim);
  border-radius: var(--om-radius-sm);
  border: 1px solid var(--om-gold-dim);
}

.om-comment-list .children {
  list-style: none;
  margin: 12px 0 0;
  padding-right: 16px;
  border-right: 2px solid var(--om-gold-dim);
}

.comment-body {
  font-size: 15px;
  line-height: 1.7;
}

.comment-meta {
  font-size: 13px;
  color: var(--om-muted);
  margin-bottom: 8px;
}

.comment-meta a {
  font-weight: 700;
}

.om-comments .comment-reply-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 700;
}

.om-comments-closed {
  color: var(--om-muted);
  margin-bottom: 16px;
}

.om-comments .comment-form input[type="text"],
.om-comments .comment-form input[type="email"],
.om-comments .comment-form input[type="url"],
.om-comments .comment-form textarea {
  width: 100%;
  max-width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--om-paper-dim);
  border-radius: var(--om-radius-sm);
  font-family: inherit;
  font-size: 15px;
  direction: rtl;
  margin-bottom: 12px;
}

.om-comments .comment-form .form-submit {
  margin-top: 8px;
}

/* ——— Layout + sidebar + breadcrumbs + YouTube + audio archive + social dock ——— */

.om-layout {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 300px);
  gap: 22px;
  align-items: start;
  max-width: var(--om-max);
  margin: 0 auto;
  padding: 18px 16px 36px;
}

.om-layout__main {
  min-width: 0;
}

@media (max-width: 960px) {
  .om-layout {
    grid-template-columns: 1fr;
    gap: 20px;
    padding-bottom: 32px;
  }

  .om-layout__sidebar {
    order: 2;
  }
}

.om-breadcrumbs {
  font-size: 13px;
  color: var(--om-muted);
  margin: 0 0 16px;
  line-height: 1.6;
}

.om-breadcrumbs a {
  color: var(--om-brown-mid);
  text-decoration: none;
  font-weight: 600;
}

.om-breadcrumbs a:hover {
  text-decoration: underline;
}

.om-bc-sep {
  opacity: 0.45;
  margin: 0 4px;
}

.om-bc-current {
  font-weight: 800;
  color: var(--om-text);
}

.om-sidebar {
  position: sticky;
  top: 12px;
}

@media (max-width: 960px) {
  .om-sidebar {
    position: static;
  }
}

.om-side-block {
  background: var(--om-card);
  border-radius: var(--om-radius);
  border: 1px solid var(--om-gold-dim);
  margin-bottom: 11px;
  overflow: hidden;
  box-shadow: var(--om-shadow);
}

.om-side-block__head {
  margin: 0;
  padding: 9px 12px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
}

.om-side-block--sermons .om-side-block__head {
  background: var(--om-side-red);
  color: #fff;
}

.om-side-block--cta {
  background: linear-gradient(180deg, #fff8f0 0%, var(--om-card) 100%);
}

.om-side-block--cta .om-side-block__head {
  background: var(--om-side-orange);
  color: #fff;
}

.om-side-block--fatwa .om-side-block__head {
  background: var(--om-side-brown);
  color: #fff;
}

.om-side-block--library .om-side-block__head {
  background: var(--om-brown-mid);
  color: #fff;
}

.om-side-block__text {
  margin: 0;
  padding: 8px 12px 0;
  font-size: 14px;
  color: var(--om-muted);
  line-height: 1.5;
}

.om-side-block__btn {
  display: inline-block;
  margin: 8px 12px 10px;
  padding: 7px 14px;
  border-radius: var(--om-radius-sm);
  font-weight: 800;
  font-size: 13px;
  background: var(--om-side-orange);
  color: #fff !important;
  text-decoration: none !important;
}

.om-side-block__btn--outline {
  background: var(--om-brown);
}

.om-side-list {
  list-style: none;
  margin: 0;
  padding: 2px 0 5px;
}

.om-side-list li {
  padding: 6px 12px;
  border-bottom: 1px solid var(--om-paper-dim);
  font-size: 14px;
  line-height: 1.45;
}

.om-side-list li:last-child {
  border-bottom: none;
}

.om-side-list a {
  color: var(--om-text);
  font-weight: 600;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  line-height: 1.45;
}

.om-side-empty {
  color: var(--om-muted);
  font-style: italic;
}

.om-youtube-block {
  margin: 28px auto 8px;
  max-width: var(--om-max);
  padding: 0 18px;
}

.om-youtube-block__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.om-youtube-block__title {
  margin: 0;
  font-family: "Amiri", serif;
  font-size: 1.35rem;
  color: var(--om-brown-deep);
}

html.om-dark .om-youtube-block__title {
  color: var(--om-gold);
}

.om-youtube-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

@media (max-width: 768px) {
  .om-youtube-grid {
    grid-template-columns: 1fr;
  }
}

.om-yt-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 140px;
  border-radius: var(--om-radius);
  background-color: var(--om-brown-deep);
  background-size: cover;
  background-position: center;
  overflow: hidden;
  border: 1px solid var(--om-gold-dim);
  box-shadow: var(--om-shadow);
  text-decoration: none !important;
  color: #fff !important;
}

.om-yt-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(26, 18, 15, 0.92) 0%,
    rgba(26, 18, 15, 0.2) 55%,
    rgba(26, 18, 15, 0.35) 100%
  );
}

.om-yt-card__play {
  position: relative;
  z-index: 1;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(197, 160, 89, 0.95);
  color: #1a120f;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  padding-left: 4px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.om-yt-card__label {
  position: absolute;
  bottom: 10px;
  right: 12px;
  left: 12px;
  z-index: 1;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  opacity: 0.95;
}

/* ——— Hosted videos: شريط داكن + بطاقات بيضاء (مقتطفات) ——— */
.om-hosted-videos {
  margin: 36px 0 24px;
  max-width: var(--om-max);
  margin-inline: auto;
  padding: 0 18px;
}

.om-hosted-videos__topbar {
  background: linear-gradient(
    180deg,
    #2a1f1c 0%,
    #1e1614 100%
  );
  border-radius: var(--om-radius) var(--om-radius) 0 0;
  border: 1px solid rgba(197, 160, 89, 0.22);
  border-bottom: none;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
}

.om-hosted-videos__topbar-inner {
  max-width: var(--om-max);
  margin: 0 auto;
  padding: 18px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.om-hosted-videos__brand {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.om-hosted-videos__yticon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #1a56c4;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(26, 86, 196, 0.35);
}

.om-hosted-videos__yticon svg {
  margin-inline-start: 2px;
}

.om-hosted-videos__titles {
  min-width: 0;
}

.om-hosted-videos__title {
  margin: 0;
  font-family: "Amiri", serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: #fffaf5;
  line-height: 1.3;
}

.om-hosted-videos__subtitle {
  margin: 6px 0 0;
  font-size: 13px;
  color: rgba(255, 250, 245, 0.72);
  line-height: 1.45;
}

.om-hosted-videos__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.om-hosted-videos__pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: #fffaf5;
  color: #1a120f !important;
  font-weight: 800;
  font-size: 13px;
  text-decoration: none !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.om-hosted-videos__pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.om-hosted-videos__pill-arr {
  font-size: 14px;
  opacity: 0.85;
}

.om-hosted-videos__all {
  font-size: 13px;
  font-weight: 700;
  color: var(--om-gold-bright) !important;
  text-decoration: underline !important;
  text-underline-offset: 3px;
}

html.om-dark .om-hosted-videos__all {
  color: #e8d4a8 !important;
}

.om-hosted-videos__body {
  background: var(--om-paper);
  border: 1px solid var(--om-gold-dim);
  border-top: 1px solid rgba(197, 160, 89, 0.15);
  border-radius: 0 0 var(--om-radius) var(--om-radius);
  padding: 20px 18px 22px;
  box-shadow: 0 12px 36px rgba(40, 27, 22, 0.08);
}

html.om-dark .om-hosted-videos__body {
  background: var(--om-paper-dim);
  border-color: rgba(197, 160, 89, 0.2);
}

.om-hosted-videos__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

@media (max-width: 768px) {
  .om-hosted-videos__grid {
    grid-template-columns: 1fr;
  }
}

.om-hosted-videos__card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0;
  border: none;
  cursor: pointer;
  text-align: center;
  font: inherit;
  background: var(--om-card);
  border-radius: var(--om-radius-sm);
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(40, 27, 22, 0.1);
  border: 1px solid rgba(197, 160, 89, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.om-hosted-videos__card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(40, 27, 22, 0.16);
}

.om-hosted-videos__card:focus-visible {
  outline: 3px solid var(--om-gold);
  outline-offset: 3px;
}

.om-hosted-videos__thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  background-size: cover;
  background-position: center;
  background-color: #2a211c;
}

.om-hosted-videos__thumb--0 {
  background-image: linear-gradient(
    165deg,
    #3e2723 0%,
    #1a120f 45%,
    #4e342e 100%
  );
}

.om-hosted-videos__thumb--1 {
  background-image: linear-gradient(
    165deg,
    #fbc02d 0%,
    #e65100 55%,
    #bf360c 100%
  );
}

.om-hosted-videos__thumb--2 {
  background-image: linear-gradient(
    180deg,
    #fffde7 0%,
    #fdd835 40%,
    #f9a825 100%
  );
}

.om-hosted-videos__thumb-dim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.55) 0%,
    rgba(0, 0, 0, 0.05) 50%,
    rgba(0, 0, 0, 0.2) 100%
  );
  pointer-events: none;
}

.om-hosted-videos__play-fab {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #c62828;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
  z-index: 1;
}

.om-hosted-videos__play-fab svg {
  margin-inline-start: 4px;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.3));
}

.om-hosted-videos__caption {
  padding: 14px 12px 16px;
  background: var(--om-card);
}

.om-hosted-videos__label {
  display: block;
  font-family: "Amiri", serif;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.55;
  color: var(--om-text);
}

html.om-dark .om-hosted-videos__label {
  color: var(--om-white);
}

/* ——— Video modal (مطابق نمط المرجع) ——— */
.om-video-modal {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  box-sizing: border-box;
}

.om-video-modal[hidden] {
  display: none !important;
}

.om-video-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(14, 10, 9, 0.78);
  backdrop-filter: blur(8px);
}

.om-video-modal__shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 920px;
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  background: #2d211e;
  border-radius: 14px;
  border: 1px solid rgba(197, 160, 89, 0.35);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

.om-video-modal__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: linear-gradient(180deg, #3e2e2a 0%, #2d211e 100%);
  border-bottom: 1px solid rgba(197, 160, 89, 0.25);
  min-height: 52px;
}

.om-video-modal__close {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 10px;
  background: #6d4c41;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, transform 0.1s ease;
}

.om-video-modal__close:hover {
  background: #8d6e63;
}

.om-video-modal__close:active {
  transform: scale(0.96);
}

.om-video-modal__title {
  flex: 1;
  margin: 0;
  min-width: 0;
  font-family: "Tajawal", sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  color: #e8d4a8;
  line-height: 1.45;
  text-align: start;
  padding-inline-end: 4px;
}

.om-video-modal__frame {
  padding: 14px;
  background: #0a0807;
}

.om-global-video-el {
  display: block;
  width: 100%;
  max-height: min(70vh, 520px);
  border-radius: 10px;
  background: #000;
}

body.om-video-open {
  overflow: hidden;
}

.om-audio-archive {
  margin-bottom: 8px;
}

.om-audio-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
  background: var(--om-card);
  border: 1px solid var(--om-gold-dim);
  border-radius: var(--om-radius-sm);
  box-shadow: 0 4px 14px rgba(40, 27, 22, 0.06);
  cursor: pointer;
  transition: border-color var(--om-transition), box-shadow var(--om-transition);
}

.om-audio-row:hover {
  border-color: var(--om-gold);
  box-shadow: var(--om-shadow);
}

.om-audio-row__main {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex: 1 1 200px;
  min-width: 0;
}

.om-audio-row__play {
  flex-shrink: 0;
  margin-top: 2px;
}

.om-audio-row__title {
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.4;
}

.om-audio-row__title a {
  color: var(--om-text);
  text-decoration: none;
}

.om-audio-row__title a:hover {
  color: var(--om-gold);
}

.om-audio-row__date {
  font-size: 12px;
  color: var(--om-muted);
}

.om-audio-row__open {
  flex-shrink: 0;
  font-size: 13px !important;
  padding: 8px 12px !important;
}

/* —— صفحة الصوتيات: مشغّل مدمج —— */
.om-audio-page {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.om-audio-page__item {
  background: var(--om-card);
  border: 1px solid var(--om-gold-dim);
  border-radius: var(--om-radius-sm);
  box-shadow: 0 4px 14px rgba(40, 27, 22, 0.06);
  overflow: hidden;
  transition: border-color var(--om-transition), box-shadow var(--om-transition);
}

.om-audio-page__item.is-expanded {
  border-color: var(--om-gold);
  box-shadow: var(--om-shadow);
}

.om-audio-page__head {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  cursor: pointer;
}

.om-audio-page__head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.om-audio-page__head-text {
  flex: 1;
  min-width: 0;
  text-align: right;
}

.om-audio-page__title {
  margin: 0 0 6px;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.45;
  color: var(--om-text);
}

.om-audio-page__meta {
  font-size: 12px;
  color: var(--om-muted);
}

.om-audio-page__badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(77, 54, 44, 0.08);
  font-weight: 700;
}

.om-audio-page__btn-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: rgba(77, 54, 44, 0.12);
  color: var(--om-text);
  cursor: pointer;
  text-decoration: none;
  transition: background var(--om-transition), color var(--om-transition), transform 0.12s ease;
}

.om-audio-page__btn-circle:hover {
  background: var(--om-gold);
  color: var(--om-bg, #fff);
}

.om-audio-page__btn-circle--lg {
  width: 56px;
  height: 56px;
}

.om-audio-page__panel {
  padding: 0 16px 16px;
  border-top: 1px solid rgba(77, 54, 44, 0.1);
}

.om-audio-page__panel-top {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0 8px;
}

.om-audio-page__panel-title {
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.4;
}

.om-audio-page__panel-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.om-audio-page__video-wrap {
  margin-bottom: 8px;
  border-radius: 10px;
  overflow: hidden;
  background: #111;
}

.om-audio-page__media {
  display: block;
  width: 100%;
  max-height: min(48vh, 380px);
}

.om-audio-page__wave {
  position: relative;
  height: 58px;
  border-radius: 8px;
  background: rgba(77, 54, 44, 0.07);
  overflow: hidden;
  cursor: pointer;
  margin: 4px 0 10px;
}

.om-audio-page__wave:focus-visible {
  outline: 2px solid var(--om-gold);
  outline-offset: 2px;
}

.om-audio-page__wave-bars {
  position: absolute;
  inset: 10px 12px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2px;
  z-index: 1;
  pointer-events: none;
}

.om-audio-page__wave-bar {
  flex: 1;
  min-width: 2px;
  max-width: 5px;
  background: rgba(77, 54, 44, 0.38);
  border-radius: 2px;
  align-self: flex-end;
}

.om-audio-page__wave-progress {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 0;
  max-width: 100%;
  z-index: 2;
  background: linear-gradient(to left, rgba(193, 39, 45, 0.22), rgba(193, 39, 45, 0.05));
  pointer-events: none;
  border-radius: 8px;
}

[dir="rtl"] .om-audio-page__wave-progress {
  left: auto;
  right: 0;
}

.om-audio-page__wave-knob {
  display: none;
}

.om-audio-page__times {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  color: var(--om-muted);
  margin-bottom: 10px;
}

.om-audio-page__controls {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.om-audio-page__ctrl {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 10px;
  border: none;
  border-radius: 10px;
  background: rgba(77, 54, 44, 0.08);
  color: var(--om-text);
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  transition: background var(--om-transition);
}

.om-audio-page__ctrl:hover {
  background: rgba(193, 39, 45, 0.15);
}

.om-audio-page__toolbar {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 4px;
  border-top: 1px dashed rgba(77, 54, 44, 0.15);
}

.om-audio-page__rate {
  min-width: 48px;
  padding: 8px 10px;
  border: 1px solid var(--om-gold-dim);
  border-radius: 8px;
  background: var(--om-card);
  font-weight: 800;
  cursor: pointer;
  color: var(--om-text);
}

.om-audio-page__mute {
  border: none;
  background: transparent;
  color: var(--om-text);
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
}

.om-audio-page__mute:hover {
  background: rgba(77, 54, 44, 0.08);
}

.om-audio-page__volume {
  flex: 1;
  min-width: 80px;
  max-width: 160px;
  accent-color: var(--om-gold, #b8860b);
}

.om-audio-page__dl-link {
  margin-inline-start: auto;
  font-weight: 800;
  font-size: 14px;
  color: var(--om-text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.om-audio-page__dl-link:hover {
  color: var(--om-gold);
}

/* بطاقة الصوتيات في الرئيسية */
.om-card-body .om-audio-page--home {
  gap: 8px;
  margin: 0;
}

.om-card-body .om-audio-page--home .om-audio-page__item {
  margin-bottom: 0;
}

.om-card-body .om-audio-page--home .om-audio-page__head {
  padding: 10px 12px;
}

.om-card-body .om-audio-page--home .om-audio-page__play-head {
  background: #c1272d;
  color: #fff;
}

.om-card-body .om-audio-page--home .om-audio-page__play-head:hover {
  background: #a01f26;
  color: #fff;
}

.om-card-body .om-audio-page--home .om-audio-page__title {
  font-size: 0.98rem;
}

.om-card-body .om-audio-page--home .om-audio-page__panel {
  padding: 0 12px 12px;
}

.om-card-body .om-audio-page--home .om-audio-page__wave {
  height: 48px;
  margin: 4px 0 8px;
}

.om-card-body .om-audio-page--home .om-audio-page__btn-circle--lg {
  width: 50px;
  height: 50px;
}

.om-post-card-excerpt {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--om-muted);
}

.om-social-dock {
  position: fixed;
  right: 12px;
  top: 32%;
  z-index: 42;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.om-social-dock__link {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--om-brown);
  color: var(--om-white) !important;
  text-decoration: none !important;
  font-weight: 800;
  font-size: 15px;
  border: 2px solid var(--om-gold-dim);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.28);
  transition: transform var(--om-transition), background var(--om-transition);
}

.om-social-dock__link:hover {
  transform: scale(1.06);
  background: var(--om-brown-mid);
  color: var(--om-white) !important;
}

.om-social-dock__link--youtube {
  background: #b71c1c;
}

.om-social-dock__link--whatsapp {
  background: #128c7e;
}

.om-social-dock--compact {
  top: auto;
  bottom: 20px;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  max-width: calc(100vw - 24px);
}

.om-social-dock--compact .om-social-dock__link {
  width: 40px;
  height: 40px;
  font-size: 13px;
}

body.omw-inner-with-sidebar .om-related {
  margin-top: 18px;
}

/* ——— صفحة أقسام الدروس (#om-courses) — دمج مع ألوان الثيم + شبكة مرنة ——— */
body.om-lessons-hub .om-lessons-hub__content {
  overflow: visible;
  max-width: 100%;
  padding-top: 6px;
}

body.om-lessons-hub #om-courses {
  width: 100%;
  max-width: min(1040px, 100%);
  margin-inline: auto;
  box-sizing: border-box;
  padding-inline: clamp(8px, 2vw, 18px);
  padding-bottom: 8px;
  font-family: "Tajawal", system-ui, sans-serif;
}

body.om-lessons-hub #om-courses .om-header {
  position: relative;
  z-index: 1;
  overflow: visible;
  min-height: 0;
  background: linear-gradient(
    140deg,
    var(--om-brown-deep) 0%,
    var(--om-brown-mid) 48%,
    var(--om-brown) 100%
  ) !important;
  border: 2px solid var(--om-gold-dim) !important;
  border-radius: var(--om-radius);
  box-shadow: var(--om-shadow);
  padding: clamp(20px, 3vw, 36px) clamp(16px, 3vw, 28px) !important;
}

body.om-lessons-hub #om-courses .om-header-icon {
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.2));
}

body.om-lessons-hub #om-courses .om-header h1 {
  font-family: "Amiri", serif !important;
  color: var(--om-white) !important;
  font-size: clamp(1.35rem, 2.8vw, 2rem) !important;
  line-height: 1.45 !important;
  margin: 0 0 8px !important;
}

body.om-lessons-hub #om-courses .om-header .om-subtitle {
  color: rgba(255, 250, 245, 0.92) !important;
  font-size: clamp(13px, 1.8vw, 15px) !important;
  line-height: 1.65 !important;
  max-width: 42em;
  margin-inline: auto !important;
}

body.om-lessons-hub #om-courses .om-header .om-count {
  color: var(--om-gold-bright) !important;
}

body.om-lessons-hub #om-courses .om-search-wrap {
  margin-bottom: 18px !important;
}

body.om-lessons-hub #om-courses .om-search-form {
  border-color: var(--om-gold-dim) !important;
  box-shadow: var(--om-shadow);
  border-radius: 999px;
}

body.om-lessons-hub #om-courses .om-search-form button {
  background: var(--om-brown-mid) !important;
  color: var(--om-white) !important;
  font-family: inherit !important;
}

body.om-lessons-hub #om-courses .om-search-form input[type="search"] {
  font-family: inherit !important;
}

body.om-lessons-hub #om-courses .om-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px 10px;
  margin-bottom: 16px !important;
  padding: 0 2px 4px;
  overflow: visible;
}

body.om-lessons-hub #om-courses .om-filter-btn {
  flex: 0 1 auto;
  background: var(--om-card) !important;
  border: 1.5px solid var(--om-gold-dim) !important;
  color: var(--om-brown-deep) !important;
  font-family: inherit !important;
  border-radius: 999px;
}

body.om-lessons-hub #om-courses .om-filter-btn:hover,
body.om-lessons-hub #om-courses .om-filter-btn.om-active {
  background: var(--om-brown) !important;
  color: var(--om-white) !important;
  border-color: var(--om-brown) !important;
}

html.om-dark body.om-lessons-hub #om-courses .om-filter-btn {
  background: var(--om-card) !important;
  color: var(--om-text) !important;
  border-color: var(--om-gold-dim) !important;
}

html.om-dark body.om-lessons-hub #om-courses .om-filter-btn:hover,
html.om-dark body.om-lessons-hub #om-courses .om-filter-btn.om-active {
  background: var(--om-brown-mid) !important;
  color: var(--om-white) !important;
}

body.om-lessons-hub #om-courses .om-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)) !important;
  gap: 14px !important;
  align-items: start;
  align-content: start;
}

body.om-lessons-hub #om-courses .om-grid > p:empty,
body.om-lessons-hub .om-lessons-hub__content p:empty,
body.om-lessons-hub .entry-content p:empty {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  min-height: 0 !important;
}

body.om-lessons-hub .om-lessons-hub__content .wp-block-html,
body.om-lessons-hub .entry-content .wp-block-html {
  margin-block: 0 !important;
}

/* بطاقات الدروس = روابط داخل الشبكة؛ لا تستخدم نفس نمط .om-card العام (overflow + flex على العنوان). */
body.om-lessons-hub #om-courses .om-grid > a.om-card {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  gap: 12px !important;
  padding: 16px 18px !important;
  overflow: visible !important;
  min-width: 0 !important;
  min-height: min-content !important;
  box-sizing: border-box !important;
  text-decoration: none !important;
}

body.om-lessons-hub #om-courses .om-card {
  background: var(--om-card) !important;
  border: 1px solid rgba(197, 160, 89, 0.28) !important;
  border-inline-end: 4px solid var(--om-gold) !important;
  border-radius: var(--om-radius-sm) !important;
  min-height: auto !important;
  min-width: 0;
  font-family: inherit !important;
  box-shadow: 0 4px 14px rgba(40, 27, 22, 0.06);
}

/* wpautop قد يضع <p> داخل الرابط — لا نستخدم display:contents (يخفي العناوين في WebKit/بعض الحالات) */
body.om-lessons-hub #om-courses a.om-card > p:empty {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.om-lessons-hub #om-courses a.om-card p {
  display: block !important;
  margin: 0 !important;
  max-width: 100%;
  box-sizing: border-box;
}

body.om-lessons-hub #om-courses a.om-card .om-card-top,
body.om-lessons-hub #om-courses a.om-card .om-card-title,
body.om-lessons-hub #om-courses a.om-card .om-card-footer {
  flex: 0 0 auto !important;
  min-height: 0;
}

body.om-lessons-hub #om-courses .om-card.om-hidden {
  display: none !important;
}

/*
 * يجب أن يغلب قاعدة .om-grid > a.om-card أعلاه (display:flex) — لها عنصران (body+a)
 * فـ .om-card.om-hidden وحده أضعف تخصصاً ولا يخفي البطاقة رغم !important.
 */
body.om-lessons-hub #om-courses .om-grid > a.om-card.om-hidden {
  display: none !important;
}

/* بطاقات خارج #om-courses بعد تقسيم المحتوى في المحرّر */
body.om-lessons-hub .om-lessons-hub__content a.om-card.om-hidden,
body.om-lessons-hub .om-lessons-hub__content .om-card.om-hidden {
  display: none !important;
}

body.om-lessons-hub .om-lessons-hub__content .om-grid > a.om-card.om-hidden {
  display: none !important;
}

body.om-lessons-hub #om-courses .om-card:hover {
  box-shadow: var(--om-shadow);
  border-color: var(--om-gold) !important;
}

body.om-lessons-hub #om-courses .om-num {
  background: var(--om-brown-mid) !important;
  color: var(--om-white) !important;
  font-family: inherit !important;
}

body.om-lessons-hub #om-courses .om-cat {
  background: rgba(197, 160, 89, 0.2) !important;
  color: var(--om-brown-deep) !important;
  font-family: inherit !important;
}

html.om-dark body.om-lessons-hub #om-courses .om-cat {
  color: var(--om-gold-bright) !important;
  background: rgba(197, 160, 89, 0.12) !important;
}

body.om-lessons-hub #om-courses .om-card .om-card-title {
  color: var(--om-text) !important;
  font-family: "Amiri", serif !important;
  font-size: clamp(1rem, 2.4vw, 1.15rem) !important;
  font-weight: 700 !important;
  line-height: 1.75 !important;
  flex: 0 1 auto !important;
  display: block !important;
  overflow: visible !important;
  visibility: visible !important;
  opacity: 1 !important;
  text-align: right !important;
  width: 100%;
  box-sizing: border-box;
}

body.om-lessons-hub #om-courses .om-card-footer {
  border-top-color: var(--om-gold-dim) !important;
}

body.om-lessons-hub #om-courses .om-lessons {
  color: var(--om-muted) !important;
  font-family: inherit !important;
}

body.om-lessons-hub #om-courses .om-arrow {
  color: var(--om-brown-mid) !important;
}

body.om-lessons-hub #om-courses .om-ornament {
  color: var(--om-muted);
  margin-top: 20px !important;
}

@media (max-width: 900px) {
  body.om-lessons-hub #om-courses .om-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)) !important;
  }
}

@media (max-width: 600px) {
  body.om-lessons-hub #om-courses .om-header {
    padding: 18px 14px 22px !important;
  }

  body.om-lessons-hub #om-courses .om-header h1 {
    font-size: clamp(1.15rem, 4.5vw, 1.65rem) !important;
    word-wrap: break-word;
    overflow-wrap: anywhere;
  }

  body.om-lessons-hub #om-courses .om-subtitle {
    font-size: 14px !important;
    line-height: 1.55 !important;
  }

  body.om-lessons-hub #om-courses .om-search-form {
    flex-wrap: wrap;
    border-radius: 14px !important;
  }

  body.om-lessons-hub #om-courses .om-search-form input[type="search"] {
    font-size: 16px !important;
  }

  body.om-lessons-hub #om-courses .om-search-form button {
    flex: 1 1 auto;
    min-width: 88px;
  }

  body.om-lessons-hub #om-courses .om-grid {
    grid-template-columns: 1fr !important;
  }
}


