/*
Theme Name: infi_taalim
Theme URI: http://infinyteam.com/
Description: قالب ويكي للدروس المدرسية اونلاين، تم برمجته بناءا على الطلب
Author: محمد الرسموكي
Author URI: http://infinyteam.com/
Version: 1.0
License: يرجى عدم بيع القالب او ازالة الحقوق
*/

/* ✅ إعداد المتغيرات الأساسية لاستخدام الخط */
:root {
  --bs-font-sans-serif: 'IBM Plex Sans Arabic', sans-serif;
  --bs-body-font-family: 'IBM Plex Sans Arabic', sans-serif;
}

/* ✅ ربط خط IBM Plex Sans Arabic محليًا */
@font-face {
  font-family: 'IBM Plex Sans Arabic';
  src: url('/wp-content/themes/infi_taalim/assets/font/IBMPlexSansArabic-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'IBM Plex Sans Arabic';
  src: url('/wp-content/themes/infi_taalim/assets/font/IBMPlexSansArabic-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'IBM Plex Sans Arabic';
  src: url('/wp-content/themes/infi_taalim/assets/font/IBMPlexSansArabic-Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

/* ✅ فرض تطبيق الخط على جميع العناصر */
body, html, p, div, span, a, h1, h2, h3, h4, h5, h6, li, ul, ol, table, td, th, form, input, textarea, select, button {
  font-family: 'IBM Plex Sans Arabic', sans-serif !important;
}

body, p, div, span, h1, h2, h3, h4, h5, h6, a, li, ul, ol, table, td, th, form, input, textarea, select, button {
  font-family: 'IBM Plex Sans Arabic', sans-serif;
}

/* ✅ تنسيقات body من Bootstrap مع الخط */
body {
  margin: 0;
  font-family: var(--bs-body-font-family);
  font-size: var(--bs-body-font-size);
  font-weight: var(--bs-body-font-weight);
  line-height: var(--bs-body-line-height);
  color: var(--bs-body-color);
  text-align: var(--bs-body-text-align);
  background-color: var(--bs-body-bg);
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

/* ✅ جعل المحتوى والإعلانات ريسبونسيف */
.content,
.entry-content,
.post-content {
  max-width: 100%;
  overflow-x: hidden;
}

.content img,
.entry-content img,
.post-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1rem auto;
}

.content iframe,
.entry-content iframe,
.post-content iframe {
  max-width: 100% !important;
  height: auto !important;
  display: block;
  margin: 1rem auto;
}

/* ✅ إعلانات Google AdSense */
.adsbygoogle,
.content ins.adsbygoogle,
.entry-content ins.adsbygoogle,
.post-content ins.adsbygoogle {
  max-width: 100% !important;
  display: block !important;
  margin: 1rem auto !important;
  overflow: hidden;
  text-align: center;
}

/* ✅ تحسين العرض على الشاشات الصغيرة */
@media (max-width: 600px) {
  .adsbygoogle,
  .content ins.adsbygoogle,
  .entry-content ins.adsbygoogle,
  .post-content ins.adsbygoogle {
    max-width: 100% !important;
    margin: 1rem auto !important;
  }

  .content img,
  .entry-content img,
  .post-content img {
    max-width: 95%;
  }

  .pdf-download-btn,
  #download-link,
  a.pdf-download-btn,
  .pdf-container a {
    display: inline-block;
    padding: 14px 28px;
    background-color: #007bff !important;
    color: #fff !important;
    text-decoration: none !important;
    font-size: 18px;
    font-weight: 600;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
    transition: background 0.3s ease, transform 0.2s ease;
  }

  .pdf-download-btn:hover,
  #download-link:hover,
  .pdf-container a:hover {
    background-color: #0056b3 !important;
    transform: translateY(-2px);
  }

  .post-card .card-title {
    display: block !important;
    -webkit-line-clamp: unset !important;
    -webkit-box-orient: unset !important;
    overflow: visible !important;
  }
}

/* =========================================================
   الفوتر المعقّد — تنسيق كامل ومتجاوب (خلفية بيضاء)
   ========================================================= */

#site-footer.site-footer,
.site-footer {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: relative;
  z-index: 10;
  clear: both;
  width: 100%;
  min-height: 260px;
  margin: 45px 0 0;
  padding: 0;
  overflow: hidden;
  background: #ffffff !important;
  color: #1a2a3a !important;
  border-top: 4px solid #1ea7a1;
  box-sizing: border-box;
  direction: rtl;
  text-align: right;
  line-height: 1.8;
}

#site-footer.site-footer *,
.site-footer * {
  box-sizing: border-box;
}

#site-footer.site-footer > .container,
.site-footer > .container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 42px 15px 0;
}

:where(#site-footer, .site-footer) .footer-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.35fr) repeat(2, minmax(170px, 1fr));
  gap: 35px;
  align-items: start;
  width: 100%;
}

:where(#site-footer, .site-footer) .footer-grid.has-widgets {
  grid-template-columns: minmax(220px, 1.25fr) repeat(2, minmax(160px, 1fr)) minmax(190px, 1fr);
}

:where(#site-footer, .site-footer) .footer-col {
  display: block;
  min-width: 0;
  color: #4a5a6a !important;
}

:where(#site-footer, .site-footer) .footer-about {
  text-align: right;
}

:where(#site-footer, .site-footer) .footer-site-title {
  display: block;
  min-height: 42px;
  margin: 0 0 14px !important;
  padding: 0 !important;
  color: #16305c !important;
  font-size: 21px !important;
  font-weight: 700 !important;
  line-height: 1.5;
}

:where(#site-footer, .site-footer) .footer-site-title .custom-logo-link,
:where(#site-footer, .site-footer) .footer-brand-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #16305c !important;
  text-decoration: none !important;
}

:where(#site-footer, .site-footer) .footer-site-title .custom-logo {
  display: block;
  width: auto;
  max-width: 180px;
  max-height: 60px;
  margin: 0;
}

:where(#site-footer, .site-footer) .footer-brand-link i {
  color: #d9a520 !important;
}

:where(#site-footer, .site-footer) .footer-desc {
  max-width: 310px;
  margin: 0 0 20px !important;
  color: #5a6a7a !important;
  font-size: 15px;
}

:where(#site-footer, .site-footer) .social-icons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  direction: rtl;
}

:where(#site-footer, .site-footer) .social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 37px;
  height: 37px;
  padding: 0;
  border: 1px solid rgba(22, 48, 92, 0.2);
  border-radius: 50%;
  background: transparent;
  color: #16305c !important;
  text-decoration: none !important;
  line-height: 1;
  transition: color 0.25s ease, background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

:where(#site-footer, .site-footer) .social-icons a:hover,
:where(#site-footer, .site-footer) .social-icons a:focus-visible {
  background: #0d6efd !important;
  border-color: #0d6efd !important;
  color: #ffffff !important;
  transform: translateY(-2px);
}

:where(#site-footer, .site-footer) .footer-heading {
  position: relative;
  display: block;
  margin: 0 0 18px !important;
  padding: 0 0 10px !important;
  color: #16305c !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  line-height: 1.5;
}

:where(#site-footer, .site-footer) .footer-heading::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 45px;
  height: 3px;
  border-radius: 4px;
  background: #0d6efd;
}

:where(#site-footer, .site-footer) .footer-menu-list,
:where(#site-footer, .site-footer) .contact-list {
  display: block;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

:where(#site-footer, .site-footer) .footer-menu-list li,
:where(#site-footer, .site-footer) .contact-list li {
  display: block;
  margin: 0 0 9px !important;
  padding: 0 !important;
  background: transparent !important;
}

:where(#site-footer, .site-footer) .footer-menu-list li::before,
:where(#site-footer, .site-footer) .contact-list li::before {
  display: none !important;
  content: none !important;
}

:where(#site-footer, .site-footer) .footer-menu-list a,
:where(#site-footer, .site-footer) .contact-list a,
:where(#site-footer, .site-footer) .contact-list span {
  color: #4a5a6a !important;
  text-decoration: none !important;
  font-size: 15px;
  transition: color 0.25s ease;
  overflow-wrap: anywhere;
}

:where(#site-footer, .site-footer) .footer-menu-list a:hover,
:where(#site-footer, .site-footer) .footer-menu-list a:focus-visible,
:where(#site-footer, .site-footer) .contact-list a:hover,
:where(#site-footer, .site-footer) .contact-list a:focus-visible {
  color: #0d6efd !important;
}

:where(#site-footer, .site-footer) .contact-list i {
  display: inline-block;
  width: 23px;
  margin-left: 5px;
  color: #0d6efd !important;
  text-align: center;
}

:where(#site-footer, .site-footer) .footer-widgets,
:where(#site-footer, .site-footer) .footer-widgets p,
:where(#site-footer, .site-footer) .footer-widgets li,
:where(#site-footer, .site-footer) .footer-widgets a,
:where(#site-footer, .site-footer) .footer-widgets span,
:where(#site-footer, .site-footer) .footer-widgets label {
  color: #4a5a6a !important;
}

:where(#site-footer, .site-footer) .footer-widgets img {
  max-width: 100%;
  height: auto;
}

:where(#site-footer, .site-footer) .footer-bottom {
  display: block;
  width: 100%;
  margin-top: 38px;
  padding: 18px 0;
  border-top: 1px solid rgba(22, 48, 92, 0.12);
}

:where(#site-footer, .site-footer) .footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  flex-wrap: wrap;
  width: 100%;
}

:where(#site-footer, .site-footer) .copyright,
:where(#site-footer, .site-footer) .copyright a,
:where(#site-footer, .site-footer) .footer-legal,
:where(#site-footer, .site-footer) .footer-legal a {
  color: #5a6a7a !important;
  font-size: 14px;
}

:where(#site-footer, .site-footer) .copyright a,
:where(#site-footer, .site-footer) .footer-legal a {
  text-decoration: none !important;
}

:where(#site-footer, .site-footer) .copyright a:hover,
:where(#site-footer, .site-footer) .footer-legal a:hover {
  color: #0d6efd !important;
}

:where(#site-footer, .site-footer) .footer-legal {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

:where(#site-footer, .site-footer) .sep {
  color: rgba(22, 48, 92, 0.35) !important;
}

@media (max-width: 900px) {
  :where(#site-footer, .site-footer) .footer-grid,
  :where(#site-footer, .site-footer) .footer-grid.has-widgets {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
  }
}

@media (max-width: 600px) {
  #site-footer.site-footer,
  .site-footer {
    margin-top: 30px;
  }

  #site-footer.site-footer > .container,
  .site-footer > .container {
    padding: 32px 18px 0;
  }

  :where(#site-footer, .site-footer) .footer-grid,
  :where(#site-footer, .site-footer) .footer-grid.has-widgets {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  :where(#site-footer, .site-footer) .footer-about,
  :where(#site-footer, .site-footer) .footer-col {
    text-align: right;
  }

  :where(#site-footer, .site-footer) .social-icons {
    justify-content: flex-start;
  }

  :where(#site-footer, .site-footer) .footer-bottom-inner {
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  :where(#site-footer, .site-footer) .footer-legal {
    justify-content: center;
  }
}

/* =========================================================
   الهيرو الاحترافي (الصفحة الرئيسية)
   ========================================================= */
  .home-hero {
  position: relative;
  background: linear-gradient(135deg, #f8fcff 0%, #eef7ff 52%, #e2f1fb 100%);
  border-radius: 20px;
  padding: 3rem 1.5rem;
  text-align: center;
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.home-hero::before {
  content: "";
  position: absolute;
  top: -60px;
  right: -60px;
  width: 220px;
  height: 220px;
  background: rgba(13, 110, 253, 0.06);
  border-radius: 50%;
}

.home-hero::after {
  content: "";
  position: absolute;
  bottom: -80px;
  left: -40px;
  width: 260px;
  height: 260px;
  background: rgba(13, 110, 253, 0.05);
  border-radius: 50%;
}

.home-hero .hero-inner {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 auto;
}

.home-hero .hero-eyebrow {
  display: inline-block;
  background: rgba(13, 110, 253, 0.1);
  color: #0d6efd;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 5px 16px;
  border-radius: 20px;
  margin-bottom: 1rem;
  letter-spacing: 0.3px;
}

.home-hero h1 {
  font-size: 2rem;
  font-weight: 800;
  color: #16305c;
  margin-bottom: 0.6rem;
  line-height: 1.3;
}

.home-hero p {
  color: #3d5170;
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 1.6rem;
}

.telegram-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: #0d6efd;
  color: #fff !important;
  text-decoration: none !important;
  padding: 12px 26px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 6px 18px rgba(13, 110, 253, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.telegram-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(13, 110, 253, 0.35);
  color: #fff;
}

.telegram-btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  fill: #fff;
}

.search-wrapper {
  background-color: #fff !important;
  border-radius: 14px;
  padding: 1rem !important;
}

@media (max-width: 576px) {
  .home-hero { padding: 2.2rem 1rem; }
  .home-hero h1 { font-size: 1.5rem; }
  .home-hero p { font-size: 0.9rem; }
}
/* تنسيقات عارض وتحميل PDF للقالب الجديد */

.pdf-viewer-wrapper {
  width: 100%;
  margin: 25px auto;
  overflow: hidden;
  border: 1px solid #e3e8ef;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 5px 18px rgba(16, 42, 67, 0.08);
  direction: rtl;
}

.pdf-toolbar {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 10px 16px;
  background: #102a43;
  color: #fff;
}

.pdf-toolbar-title {
  display: block;
  overflow: hidden;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pdf-toolbar-title .fa-file-pdf {
  margin-left: 6px;
  color: #f05d5e;
}

.pdf-iframe-outer {
  display: block;
  width: 100%;
  min-height: 500px;
  border: 0;
  background: #f4f6f8;
}

.pdf-download-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px;
  background: #f8fafc;
  border-top: 1px solid #e3e8ef;
}

.pdf-download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 165px;
  padding: 12px 22px;
  border: 0;
  border-radius: 8px;
  background: #1677b8 !important;
  color: #fff !important;
  text-decoration: none !important;
  font-weight: 700;
  line-height: 1.4;
  transition: background .2s ease, transform .2s ease;
}

.pdf-download-btn:hover,
.pdf-download-btn:focus-visible {
  background: #0f5e91 !important;
  color: #fff !important;
  transform: translateY(-1px);
}

.pdf-download-note {
  color: #64748b;
  font-size: 13px;
}

.pdf-error {
  margin: 25px auto;
  padding: 20px;
  border: 1px solid #f2c5c5;
  border-radius: 8px;
  background: #fff6f6;
  color: #b42318;
  text-align: center;
}

@media (max-width: 600px) {
  .pdf-viewer-wrapper {
    margin: 18px 0;
    border-radius: 8px;
  }

  .pdf-iframe-outer {
    min-height: 420px;
  }

  .pdf-download-footer {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .pdf-download-btn {
    width: 100%;
  }
}


/* =========================================================
   عارض وتحميل ملفات PDF — القالب الجديد
   القراءة داخل المقال + صفحة تحميل واحدة
   ========================================================= */

.pdf-viewer-wrapper {
  width: 100%;
  max-width: 100%;
  margin: 25px auto;
  overflow: hidden;
  border: 1px solid #e3e8ef;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 5px 18px rgba(16, 42, 67, 0.08);
  direction: rtl;
}

.pdf-toolbar {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 50px;
  padding: 10px 16px;
  background: #102a43;
  color: #ffffff;
}

.pdf-toolbar-title {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: #ffffff !important;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.6;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pdf-toolbar-title .fa-file-pdf {
  margin-left: 6px;
  color: #f05d5e !important;
}

.pdf-iframe-outer {
  display: block !important;
  width: 100% !important;
  min-height: 500px;
  border: 0 !important;
  background: #f4f6f8;
}

.pdf-download-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px;
  background: #f8fafc;
  border-top: 1px solid #e3e8ef;
}

.pdf-download-footer .pdf-download-btn,
.pdf-viewer-wrapper .pdf-download-btn,
.pdf-download-page .pdf-download-button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 165px;
  padding: 12px 22px !important;
  border: 0;
  border-radius: 8px;
  background: #1677b8 !important;
  color: #ffffff !important;
  text-decoration: none !important;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
  transition: background 0.2s ease, transform 0.2s ease;
}

.pdf-download-footer .pdf-download-btn:hover,
.pdf-download-footer .pdf-download-btn:focus-visible,
.pdf-viewer-wrapper .pdf-download-btn:hover,
.pdf-viewer-wrapper .pdf-download-btn:focus-visible,
.pdf-download-page .pdf-download-button:hover,
.pdf-download-page .pdf-download-button:focus-visible {
  background: #0f5e91 !important;
  color: #ffffff !important;
  text-decoration: none !important;
  transform: translateY(-1px);
}

.pdf-download-note {
  color: #64748b !important;
  font-size: 13px;
}

.pdf-download-note i {
  color: #1ea7a1 !important;
}

.pdf-error {
  width: 100%;
  margin: 25px auto;
  padding: 20px;
  border: 1px solid #f2c5c5;
  border-radius: 8px;
  background: #fff6f6;
  color: #b42318 !important;
  text-align: center;
}

/* صفحة التحميل الموحدة */
.pdf-download-page {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 30px 15px 55px;
  direction: rtl;
}

.pdf-download-page .pdf-download-breadcrumb a {
  color: #1677b8 !important;
  text-decoration: none !important;
}

.pdf-download-card {
  padding: 34px 24px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 8px 28px rgba(16, 42, 67, 0.08);
  text-align: center;
}

.pdf-download-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  margin-bottom: 15px;
  border-radius: 50%;
  background: #FDEDEA;
  color: #e74c3c;
  font-size: 34px;
}

.pdf-download-title {
  margin: 0 0 8px !important;
  color: #102a43 !important;
  font-size: 23px !important;
  overflow-wrap: anywhere;
}

.pdf-download-size {
  color: #64748b !important;
}

.pdf-download-countdown {
  margin: 22px 0;
  color: #52606d !important;
}

.pdf-download-button-wrap {
  display: none;
  margin-top: 20px;
}

.pdf-download-note {
  margin-top: 18px;
}

@media (max-width: 600px) {
  .pdf-viewer-wrapper {
    margin: 18px 0;
    border-radius: 8px;
  }

  .pdf-toolbar {
    padding: 9px 12px;
  }

  .pdf-toolbar-title {
    font-size: 14px;
  }

  .pdf-iframe-outer {
    min-height: 420px;
  }

  .pdf-download-footer {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    padding: 13px;
  }

  .pdf-download-footer .pdf-download-btn,
  .pdf-viewer-wrapper .pdf-download-btn,
  .pdf-download-page .pdf-download-button {
    width: 100%;
  }

  .pdf-download-card {
    padding: 26px 16px;
  }

  .pdf-download-title {
    font-size: 19px !important;
  }
}


/* =========================================================
   تحسين نهائي لعارض PDF وصفحة التحميل
   ========================================================= */

/* حذف شريط اسم الملف أعلى العارض حتى يبقى العارض فقط */
.pdf-viewer-wrapper .pdf-toolbar,
.pdf-viewer-wrapper .pdf-toolbar-title {
  display: none !important;
}

.pdf-viewer-wrapper {
  margin: 28px auto !important;
  border: 1px solid #dfe7ef !important;
  border-radius: 14px !important;
  background: #ffffff !important;
  box-shadow: 0 8px 24px rgba(16, 42, 67, 0.10) !important;
}

.pdf-viewer-wrapper .pdf-iframe-outer {
  min-height: 680px !important;
  background: #f5f7fa !important;
}

.pdf-viewer-wrapper .pdf-download-footer {
  min-height: 76px;
  padding: 15px 20px !important;
  background: #f8fafc !important;
}

.pdf-viewer-wrapper .pdf-download-note,
.pdf-download-page .pdf-download-note {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 16px !important;
  border: 1px solid #a7e3bd !important;
  border-radius: 999px !important;
  background: #e9f9ef !important;
  color: #147a3d !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1.4;
  text-align: center;
}

.pdf-viewer-wrapper .pdf-download-note i,
.pdf-download-page .pdf-download-note i {
  color: #159447 !important;
}

/* صفحة التحميل: مسافات أوضح وبطاقة أكثر توازنًا */
.pdf-download-page {
  max-width: 820px !important;
  padding: 38px 15px 70px !important;
}

.pdf-download-page .pdf-download-breadcrumb {
  margin-bottom: 28px !important;
  color: #64748b;
  text-align: right;
}

.pdf-download-page .pdf-download-card {
  min-height: 440px;
  padding: 48px 30px 38px !important;
  border: 1px solid #dfe7ef !important;
  border-top: 4px solid #1677b8 !important;
  border-radius: 18px !important;
  background: #ffffff !important;
  box-shadow: 0 12px 34px rgba(16, 42, 67, 0.10) !important;
}

.pdf-download-page .pdf-download-icon {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 92px !important;
  height: 92px !important;
  margin: 0 auto 22px !important;
  border: 1px solid #ffc9c5 !important;
  border-radius: 18px !important;
  background: #fff1f0 !important;
  color: #d92d20 !important;
  box-shadow: 0 6px 15px rgba(217, 45, 32, 0.10);
}

.pdf-download-page .pdf-download-icon i {
  color: #d92d20 !important;
  font-size: 48px !important;
}

.pdf-download-page .pdf-download-icon .pdf-file-svg {
  display: block;
  width: 48px;
  height: 58px;
  fill: #d92d20;
}

.pdf-download-page .pdf-download-title {
  margin: 0 auto 12px !important;
  max-width: 680px;
  color: #102a43 !important;
  font-size: clamp(21px, 3vw, 29px) !important;
  font-weight: 800 !important;
  line-height: 1.55 !important;
}

.pdf-download-page .pdf-download-size {
  margin: 0 0 26px !important;
  color: #64748b !important;
  font-size: 15px !important;
}

.pdf-download-page .pdf-download-countdown {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 70px;
  margin: 25px auto 18px !important;
  padding: 14px 20px !important;
  border: 1px solid #f4c76d !important;
  border-radius: 12px !important;
  background: #fff8e6 !important;
  color: #8a5700 !important;
  font-size: 20px !important;
  font-weight: 800 !important;
  line-height: 1.6;
  text-align: center;
}

.pdf-download-page .pdf-download-countdown i {
  color: #d18b00 !important;
  font-size: 22px;
}

.pdf-download-page #pdf-download-timer {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  height: 46px;
  padding: 0 9px;
  border-radius: 10px;
  background: #d18b00 !important;
  color: #ffffff !important;
  font-size: 25px !important;
  font-weight: 800 !important;
  line-height: 1;
}

.pdf-download-page .pdf-download-button-wrap {
  display: none;
  margin: 24px auto 0 !important;
}

.pdf-download-page .pdf-download-button {
  min-width: 230px !important;
  min-height: 52px;
  padding: 14px 28px !important;
  border-radius: 10px !important;
  background: #1677b8 !important;
  color: #ffffff !important;
  font-size: 17px !important;
  font-weight: 800 !important;
}

.pdf-download-page .pdf-download-note {
  margin: 25px auto 0 !important;
}

.pdf-download-page .pdf-download-error {
  border-top-color: #d92d20 !important;
}

@media (max-width: 600px) {
  .pdf-viewer-wrapper {
    margin: 18px 0 !important;
    border-radius: 9px !important;
  }

  .pdf-viewer-wrapper .pdf-iframe-outer {
    min-height: 480px !important;
  }

  .pdf-viewer-wrapper .pdf-download-footer {
    align-items: center !important;
    justify-content: center !important;
    padding: 16px 12px !important;
  }

  .pdf-viewer-wrapper .pdf-download-footer .pdf-download-btn {
    width: 100% !important;
  }

  .pdf-viewer-wrapper .pdf-download-note {
    width: auto !important;
    max-width: 100%;
    margin: 0 auto !important;
    text-align: center !important;
  }

  .pdf-download-page {
    padding: 24px 12px 48px !important;
  }

  .pdf-download-page .pdf-download-card {
    min-height: 0;
    padding: 32px 16px 30px !important;
    border-radius: 14px !important;
  }

  .pdf-download-page .pdf-download-icon {
    width: 82px !important;
    height: 82px !important;
    margin-bottom: 18px !important;
  }

  .pdf-download-page .pdf-download-icon i {
    font-size: 42px !important;
  }

  .pdf-download-page .pdf-download-countdown {
    flex-direction: column;
    gap: 8px;
    min-height: 128px;
    margin-top: 26px !important;
    padding: 15px 12px !important;
    font-size: 18px !important;
  }

  .pdf-download-page #pdf-download-timer {
    min-width: 54px;
    height: 54px;
    font-size: 29px !important;
  }

  .pdf-download-page .pdf-download-note {
    width: fit-content;
    max-width: 100%;
    margin: 25px auto 0 !important;
    padding: 9px 14px !important;
    text-align: center;
  }
}


/* =========================================================
   الفوتر الأبيض النهائي — أولوية عالية
   ========================================================= */

#site-footer.site-footer,
.site-footer {
  display: block !important;
  width: 100% !important;
  min-height: 260px;
  background-color: #ffffff !important;
  background: #ffffff !important;
  color: #1f2937 !important;
  border-top: 4px solid #1677b8 !important;
  direction: rtl;
}

#site-footer.site-footer .footer-site-title,
#site-footer.site-footer .footer-site-title a,
#site-footer.site-footer .footer-brand-link,
.site-footer .footer-site-title,
.site-footer .footer-site-title a,
.site-footer .footer-brand-link {
  color: #16305c !important;
}

#site-footer.site-footer .footer-desc,
#site-footer.site-footer .footer-col,
#site-footer.site-footer .footer-widgets,
.site-footer .footer-desc,
.site-footer .footer-col,
.site-footer .footer-widgets {
  color: #374151 !important;
}

#site-footer.site-footer .footer-heading,
.site-footer .footer-heading {
  color: #16305c !important;
  font-weight: 800 !important;
}

#site-footer.site-footer .footer-heading::after,
.site-footer .footer-heading::after {
  background: #1677b8 !important;
}

#site-footer.site-footer .footer-menu-list a,
#site-footer.site-footer .contact-list a,
#site-footer.site-footer .contact-list span,
#site-footer.site-footer .footer-widgets a,
#site-footer.site-footer .footer-widgets p,
#site-footer.site-footer .footer-widgets li,
.site-footer .footer-menu-list a,
.site-footer .contact-list a,
.site-footer .contact-list span,
.site-footer .footer-widgets a,
.site-footer .footer-widgets p,
.site-footer .footer-widgets li {
  color: #374151 !important;
  text-decoration: none !important;
}

#site-footer.site-footer .footer-menu-list a:hover,
#site-footer.site-footer .contact-list a:hover,
#site-footer.site-footer .footer-widgets a:hover,
.site-footer .footer-menu-list a:hover,
.site-footer .contact-list a:hover,
.site-footer .footer-widgets a:hover {
  color: #1677b8 !important;
}

#site-footer.site-footer .contact-list i,
.site-footer .contact-list i {
  color: #1677b8 !important;
}

#site-footer.site-footer .social-icons a,
.site-footer .social-icons a {
  border-color: rgba(22, 48, 92, 0.25) !important;
  background: #ffffff !important;
  color: #16305c !important;
}

#site-footer.site-footer .social-icons a:hover,
.site-footer .social-icons a:hover {
  background: #1677b8 !important;
  border-color: #1677b8 !important;
  color: #ffffff !important;
}

#site-footer.site-footer .footer-bottom,
.site-footer .footer-bottom {
  border-top-color: rgba(22, 48, 92, 0.16) !important;
}

#site-footer.site-footer .copyright,
#site-footer.site-footer .copyright a,
#site-footer.site-footer .footer-legal,
#site-footer.site-footer .footer-legal a,
.site-footer .copyright,
.site-footer .copyright a,
.site-footer .footer-legal,
.site-footer .footer-legal a {
  color: #4b5563 !important;
}

#site-footer.site-footer .copyright a:hover,
#site-footer.site-footer .footer-legal a:hover,
.site-footer .copyright a:hover,
.site-footer .footer-legal a:hover {
  color: #1677b8 !important;
}


/* =========================================================
   الهوية البصرية النهائية للهيدر والفوتر
   ========================================================= */

/* خلفية مميزة للهيدر عن محتوى الموقع */
.site-header,
header,
.navbar {
  position: relative;
  z-index: 1000;
}

.navbar {
  background: linear-gradient(135deg, #16305c 0%, #1677b8 100%) !important;
  border-bottom: 3px solid #f6c344 !important;
  box-shadow: 0 4px 16px rgba(22, 48, 92, 0.18) !important;
}

.navbar .navbar-brand,
.navbar .navbar-brand span,
.navbar .navbar-nav .nav-link {
  color: #ffffff !important;
}

.navbar .navbar-nav .nav-link {
  padding: 10px 13px;
  border-radius: 8px;
  font-weight: 600;
  transition: background .2s ease, color .2s ease;
}

.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link:focus-visible {
  background: rgba(255,255,255,.15) !important;
  color: #f6c344 !important;
}

/* أزرار الهاتف: واضحة وكبيرة وقابلة للنقر */
.navbar-toggler,
.search-toggle-btn {
  position: relative;
  z-index: 1002;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 44px !important;
  height: 44px !important;
  padding: 0 !important;
  border: 1px solid rgba(255,255,255,.60) !important;
  border-radius: 12px !important;
  background: rgba(255,255,255,.14) !important;
  color: #ffffff !important;
  cursor: pointer !important;
  pointer-events: auto !important;
  box-shadow: 0 3px 10px rgba(0,0,0,.12) !important;
}

.navbar-toggler:hover,
.navbar-toggler:focus-visible,
.search-toggle-btn:hover,
.search-toggle-btn:focus-visible {
  background: #f6c344 !important;
  border-color: #f6c344 !important;
  color: #16305c !important;
  outline: none;
}

.navbar-toggler-icon {
  position: relative;
  display: block !important;
  width: 22px !important;
  height: 2px !important;
  background-image: none !important;
  background-color: #ffffff !important;
  border-radius: 3px;
}

.navbar-toggler-icon::before,
.navbar-toggler-icon::after {
  content: "";
  position: absolute;
  right: 0;
  width: 22px;
  height: 2px;
  border-radius: 3px;
  background: #ffffff;
}

.navbar-toggler-icon::before { top: -7px; }
.navbar-toggler-icon::after { top: 7px; }

.search-toggle-btn svg {
  display: block;
  width: 23px !important;
  height: 23px !important;
}

/* صندوق البحث */
#headerSearchCollapse {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1040;
  display: none;
  background: #ffffff !important;
  border-bottom: 1px solid #d9e2ec;
  box-shadow: 0 8px 18px rgba(16,42,67,.14);
}

#headerSearchCollapse.show {
  display: block !important;
}

#headerSearchCollapse .search-form-wrapper {
  padding: 14px 0 !important;
}

#headerSearchCollapse input[type="search"] {
  min-height: 44px;
  width: 100%;
  border: 2px solid #d9e2ec !important;
  border-radius: 9px;
  color: #16305c !important;
  background: #ffffff !important;
}

/* القائمة الجانبية */
#offcanvasMenu {
  z-index: 1060 !important;
  width: min(320px, 88vw) !important;
  background: #ffffff !important;
  border-left: 1px solid #d9e2ec;
  box-shadow: -8px 0 28px rgba(16,42,67,.20);
}

#offcanvasMenu .offcanvas-header {
  background: linear-gradient(135deg, #16305c, #1677b8) !important;
  color: #ffffff !important;
}

#offcanvasMenu .offcanvas-title {
  color: #ffffff !important;
  font-weight: 800;
}

#offcanvasMenu .btn-close {
  filter: brightness(0) invert(1);
  opacity: .95;
}

#offcanvasMenu .list-group {
  padding: 10px !important;
}

#offcanvasMenu .list-group-item {
  margin-bottom: 5px;
  border: 0 !important;
  border-radius: 8px !important;
  color: #16305c !important;
  font-weight: 600;
}

#offcanvasMenu .list-group-item:hover,
#offcanvasMenu .list-group-item:focus-visible {
  background: #eef7ff !important;
  color: #1677b8 !important;
}

/* خلفية الفوتر بيضاء ونصوصه داكنة مهما كانت القواعد القديمة */
#site-footer.site-footer,
.site-footer {
  display: block !important;
  width: 100% !important;
  background: #ffffff !important;
  background-color: #ffffff !important;
  color: #1f2937 !important;
  border-top: 4px solid #1677b8 !important;
}

#site-footer.site-footer .footer-heading,
.site-footer .footer-heading,
#site-footer.site-footer .footer-site-title,
.site-footer .footer-site-title {
  color: #16305c !important;
}

#site-footer.site-footer .footer-desc,
.site-footer .footer-desc,
#site-footer.site-footer .footer-col,
.site-footer .footer-col,
#site-footer.site-footer .footer-widgets,
.site-footer .footer-widgets {
  color: #374151 !important;
}

#site-footer.site-footer .footer-menu-list a,
#site-footer.site-footer .contact-list a,
#site-footer.site-footer .contact-list span,
#site-footer.site-footer .footer-widgets a,
#site-footer.site-footer .footer-widgets p,
#site-footer.site-footer .footer-widgets li,
.site-footer .footer-menu-list a,
.site-footer .contact-list a,
.site-footer .contact-list span,
.site-footer .footer-widgets a,
.site-footer .footer-widgets p,
.site-footer .footer-widgets li {
  color: #374151 !important;
}

#site-footer.site-footer .contact-list i,
.site-footer .contact-list i {
  color: #1677b8 !important;
}

#site-footer.site-footer .social-icons a,
.site-footer .social-icons a {
  border-color: rgba(22,48,92,.25) !important;
  background: #ffffff !important;
  color: #16305c !important;
}

#site-footer.site-footer .social-icons a:hover,
.site-footer .social-icons a:hover {
  background: #1677b8 !important;
  border-color: #1677b8 !important;
  color: #ffffff !important;
}

#site-footer.site-footer .footer-bottom,
.site-footer .footer-bottom {
  border-top-color: rgba(22,48,92,.16) !important;
}

#site-footer.site-footer .copyright,
#site-footer.site-footer .copyright a,
#site-footer.site-footer .footer-legal,
#site-footer.site-footer .footer-legal a,
.site-footer .copyright,
.site-footer .copyright a,
.site-footer .footer-legal,
.site-footer .footer-legal a {
  color: #4b5563 !important;
}

@media (min-width: 992px) {
    .navbar {
    background: #eef7ff !important;
    border-bottom: 1px solid #b8d9ef !important;
  }
  .navbar .navbar-brand,
  .navbar .navbar-brand span,
  .navbar .navbar-nav .nav-link {
    color: #16305c !important;
  }
  .navbar .navbar-nav .nav-link:hover,
  .navbar .navbar-nav .nav-link:focus-visible {
    background: #eef7ff !important;
    color: #1677b8 !important;
  }
  .search-toggle-btn {
    background: #eef7ff !important;
    border-color: #b8d9ef !important;
    color: #16305c !important;
  }
}

@media (max-width: 600px) {
  .navbar > .container {
    min-height: 68px;
  }
  .navbar-toggler,
  .search-toggle-btn {
    width: 46px !important;
    height: 46px !important;
  }
  #offcanvasMenu {
    width: min(300px, 86vw) !important;
  }
  #site-footer .footer-bottom-inner,
  .site-footer .footer-bottom-inner {
    justify-content: center !important;
    text-align: center;
  }
}


/* حالات بديلة للقائمة إذا تعذر تحميل Bootstrap JavaScript */
@media (max-width: 991.98px) {
  #offcanvasMenu:not(.show) {
    visibility: hidden;
    transform: translateX(100%);
  }

  #offcanvasMenu.show {
    visibility: visible !important;
    transform: translateX(0);
  }
}

.mobile-menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1050;
  background: rgba(16, 42, 67, 0.42);
}

body.mobile-menu-open {
  overflow: hidden;
}


/* =========================================================
   الهيرو وصندوق البحث — ضبط نهائي خفيف واحترافي
   ========================================================= */

body {
  background: #f5f9fc !important;
}

main.container,
.container.bg-white,
.content-area {
  background-color: transparent !important;
}

.home-hero {
  background: linear-gradient(135deg, #fafdff 0%, #eef7ff 55%, #e4f2fb 100%) !important;
  border: 1px solid #d9eaf5;
  box-shadow: 0 8px 24px rgba(22, 119, 184, 0.06);
}

#headerSearchCollapse {
  top: calc(100% + 10px) !important;
  left: 50% !important;
  right: auto !important;
  width: min(720px, calc(100% - 24px)) !important;
  transform: translateX(-50%);
  padding: 0 !important;
  border: 1px solid #d9e2ec !important;
  border-radius: 14px !important;
  background: #ffffff !important;
  box-shadow: 0 14px 34px rgba(16,42,67,.18) !important;
  overflow: hidden;
}

#headerSearchCollapse .container {
  max-width: none;
  padding: 0 16px !important;
}

#headerSearchCollapse .search-form-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 0 !important;
}

#headerSearchCollapse form,
#headerSearchCollapse .search-form {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 0;
}

#headerSearchCollapse input[type="search"] {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 46px;
  padding: 9px 15px !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 9px !important;
  background: #f8fafc !important;
  color: #16305c !important;
  outline: none;
}

#headerSearchCollapse input[type="search"]:focus {
  border-color: #1677b8 !important;
  background: #ffffff !important;
  box-shadow: 0 0 0 3px rgba(22,119,184,.14) !important;
}

#headerSearchCollapse button[type="submit"],
#headerSearchCollapse input[type="submit"] {
  flex: 0 0 auto;
  min-width: 48px;
  min-height: 46px;
  padding: 8px 14px !important;
  border: 0 !important;
  border-radius: 9px !important;
  background: #1677b8 !important;
  color: #ffffff !important;
  cursor: pointer !important;
}

#headerSearchCollapse button[type="submit"]:hover,
#headerSearchCollapse input[type="submit"]:hover {
  background: #0f5e91 !important;
}

@media (max-width: 600px) {
  #headerSearchCollapse {
    top: calc(100% + 8px) !important;
    width: calc(100% - 20px) !important;
    border-radius: 12px !important;
  }

  #headerSearchCollapse .container {
    padding: 0 12px !important;
  }

  #headerSearchCollapse .search-form-wrapper,
  #headerSearchCollapse form,
  #headerSearchCollapse .search-form {
    gap: 8px;
  }

  #headerSearchCollapse input[type="search"],
  #headerSearchCollapse button[type="submit"],
  #headerSearchCollapse input[type="submit"] {
    min-height: 44px;
  }
}


/* خلفية موحدة للهيدر والفوتر */
.navbar,
#site-footer.site-footer,
.site-footer {
  background: linear-gradient(135deg, #f5fbff 0%, #e5f3fb 100%) !important;
}

#site-footer.site-footer,
.site-footer {
  color: #16305c !important;
  border-top-color: #1677b8 !important;
}

#site-footer.site-footer .footer-heading,
#site-footer.site-footer .footer-site-title,
#site-footer.site-footer .footer-site-title a,
#site-footer.site-footer .footer-brand-link,
.site-footer .footer-heading,
.site-footer .footer-site-title,
.site-footer .footer-site-title a,
.site-footer .footer-brand-link {
  color: #16305c !important;
}

#site-footer.site-footer .footer-desc,
#site-footer.site-footer .footer-col,
#site-footer.site-footer .footer-widgets,
#site-footer.site-footer .footer-menu-list a,
#site-footer.site-footer .contact-list a,
#site-footer.site-footer .contact-list span,
#site-footer.site-footer .copyright,
#site-footer.site-footer .copyright a,
#site-footer.site-footer .footer-legal a,
.site-footer .footer-desc,
.site-footer .footer-col,
.site-footer .footer-widgets,
.site-footer .footer-menu-list a,
.site-footer .contact-list a,
.site-footer .contact-list span,
.site-footer .copyright,
.site-footer .copyright a,
.site-footer .footer-legal a {
  color: #374151 !important;
}


/* =========================================================
   تحسين نهائي للخطوصات وصندوق البحث
   ========================================================= */

html,
body {
  font-size: 16px !important;
}

body,
button,
input,
textarea,
select {
  font-family: 'IBM Plex Sans Arabic', sans-serif !important;
}

.content,
.entry-content,
.post-content {
  font-size: 17px !important;
  line-height: 1.9 !important;
}

.navbar .navbar-nav .nav-link,
.navbar .navbar-brand,
.search-toggle-btn {
  font-size: 16px !important;
}

#headerSearchCollapse form,
#headerSearchCollapse .search-form {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  direction: rtl !important;
  width: 100% !important;
  gap: 10px !important;
  margin: 0 !important;
}

#headerSearchCollapse form label,
#headerSearchCollapse .search-form label {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  margin: 0 !important;
}

#headerSearchCollapse form label input[type="search"],
#headerSearchCollapse .search-form label input[type="search"],
#headerSearchCollapse form > input[type="search"] {
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  font-family: 'IBM Plex Sans Arabic', sans-serif !important;
  font-size: 16px !important;
}

#headerSearchCollapse form button[type="submit"],
#headerSearchCollapse form input[type="submit"],
#headerSearchCollapse .search-form button[type="submit"],
#headerSearchCollapse .search-form input[type="submit"] {
  order: 2 !important;
  flex: 0 0 auto !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 52px !important;
  min-height: 46px !important;
  padding: 8px 15px !important;
  border: 0 !important;
  border-radius: 9px !important;
  background: #1677b8 !important;
  color: #ffffff !important;
  font-family: 'IBM Plex Sans Arabic', sans-serif !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
}

#headerSearchCollapse form button[type="submit"]:hover,
#headerSearchCollapse form input[type="submit"]:hover,
#headerSearchCollapse .search-form button[type="submit"]:hover,
#headerSearchCollapse .search-form input[type="submit"]:hover {
  background: #0f5e91 !important;
}

#site-footer.site-footer,
.site-footer {
  font-size: 15px !important;
}

#site-footer.site-footer .footer-menu-list a,
#site-footer.site-footer .contact-list a,
#site-footer.site-footer .contact-list span,
.site-footer .footer-menu-list a,
.site-footer .contact-list a,
.site-footer .contact-list span {
  font-size: 16px !important;
}

@media (max-width: 600px) {
  .content,
  .entry-content,
  .post-content {
    font-size: 16px !important;
  }

  #headerSearchCollapse {
    width: calc(100% - 20px) !important;
  }

  #headerSearchCollapse form,
  #headerSearchCollapse .search-form {
    gap: 8px !important;
  }

  #headerSearchCollapse form button[type="submit"],
  #headerSearchCollapse form input[type="submit"] {
    min-width: 48px !important;
    min-height: 44px !important;
    padding: 8px 12px !important;
  }
}


/* =========================================================
   دمج محسّن من CSS الإضافي
   ========================================================= */

/* إخفاء الصورة البارزة المخصصة فقط */
.custom-featured-image {
  display: none !important;
}

/* عناوين المقال: متناسقة مع ألوان الهيدر والفوتر */
article h2,
article h3,
article h4,
article h5,
article h6 {
  margin: 24px 0 16px;
  padding: 11px 16px;
  border-right: 4px solid #f6c344;
  border-radius: 9px;
  background: linear-gradient(135deg, #1677b8 0%, #1a6fa8 100%);
  color: #ffffff !important;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.65;
  scroll-margin-top: 90px;
}

article h3 { font-size: 1.18rem; }
article h4,
article h5,
article h6 { font-size: 1.1rem; }

/* الصور داخل المحتوى */
.content img,
.entry-content img,
.post-content img,
article img {
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

/* الجداول: إطار واضح وقراءة أفضل */
.entry-content table,
.post-content table,
article table {
  width: 100%;
  margin: 24px 0;
  border: 1px solid #d9e2ec !important;
  border-collapse: collapse !important;
  border-spacing: 0;
  background: #ffffff;
  color: #263238;
  font-size: 16px;
  line-height: 1.75;
  direction: rtl;
}

.entry-content table th,
.entry-content table td,
.post-content table th,
.post-content table td,
article table th,
article table td {
  min-width: 100px;
  padding: 12px 14px;
  border: 1px solid #d9e2ec !important;
  text-align: right;
  vertical-align: middle;
}

.entry-content table th,
.post-content table th,
article table th {
  background: #eef7ff;
  color: #16305c;
  font-weight: 800;
  border-bottom: 2px solid #b8d9ef !important;
}

.entry-content table tr:nth-child(even),
.post-content table tr:nth-child(even),
article table tr:nth-child(even) {
  background: #f8fbfd;
}

.entry-content table tr:hover,
.post-content table tr:hover,
article table tr:hover {
  background: #eef7ff;
}

/* منع التمدد الأفقي على الهاتف دون تصغير الإعلانات */
@media (max-width: 768px) {
  html,
  body {
    overflow-x: hidden;
  }

  iframe {
    max-width: 100%;
    display: block;
    margin-right: auto;
    margin-left: auto;
  }

  .entry-content,
  .post-content,
  .content-area {
    max-width: 100%;
  }

  .entry-content table,
  .post-content table,
  article table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: normal;
    font-size: 15px;
  }

  .entry-content table th,
  .entry-content table td,
  .post-content table th,
  .post-content table td,
  article table th,
  article table td {
    padding: 10px 11px;
  }
}

@media (max-width: 600px) {
  article h2,
  article h3,
  article h4,
  article h5,
  article h6 {
    margin: 20px 0 13px;
    padding: 9px 12px;
    font-size: 1.1rem;
  }

  article h3 { font-size: 1.05rem; }
  article h4,
  article h5,
  article h6 { font-size: 1rem; }
}


/* =========================================================
   تكبير الخطوط — إصدار القراءة الواضحة
   ========================================================= */

html {
  font-size: 17px !important;
}

body {
  font-size: 18px !important;
  line-height: 1.85 !important;
}

.navbar .navbar-nav .nav-link,
.navbar .navbar-brand,
.navbar .navbar-brand span {
  font-size: 18px !important;
  font-weight: 700 !important;
}

.home-hero h1 {
  font-size: clamp(2rem, 3.5vw, 2.8rem) !important;
  line-height: 1.35 !important;
}

.home-hero p {
  font-size: 1.2rem !important;
  line-height: 1.9 !important;
}

.content,
.entry-content,
.post-content,
.content-area {
  font-size: 18px !important;
  line-height: 1.95 !important;
}

.content a,
.entry-content a,
.post-content a {
  font-size: inherit;
}

article h2 { font-size: 1.5rem !important; }
article h3 { font-size: 1.35rem !important; }
article h4,
article h5,
article h6 { font-size: 1.22rem !important; }

.entry-content table,
.post-content table,
article table {
  font-size: 17px !important;
}

#site-footer.site-footer,
.site-footer {
  font-size: 16px !important;
}

#site-footer.site-footer .footer-menu-list a,
#site-footer.site-footer .contact-list a,
#site-footer.site-footer .contact-list span,
.site-footer .footer-menu-list a,
.site-footer .contact-list a,
.site-footer .contact-list span {
  font-size: 16px !important;
}

@media (max-width: 600px) {
  html { font-size: 16px !important; }
  body { font-size: 17px !important; }
  .navbar .navbar-nav .nav-link,
  .navbar .navbar-brand,
  .navbar .navbar-brand span { font-size: 16px !important; }
  .home-hero h1 { font-size: 2rem !important; }
  .home-hero p { font-size: 1.08rem !important; }
  .content,
  .entry-content,
  .post-content,
  .content-area { font-size: 17px !important; line-height: 1.9 !important; }
  article h2 { font-size: 1.3rem !important; }
  article h3 { font-size: 1.2rem !important; }
  article h4,
  article h5,
  article h6 { font-size: 1.1rem !important; }
}


/* =========================================================
   تكبير خط الفوتر — أولوية نهائية
   ========================================================= */

#site-footer.site-footer,
.site-footer {
  font-size: 18px !important;
  line-height: 1.9 !important;
}

#site-footer.site-footer .footer-site-title,
.site-footer .footer-site-title {
  font-size: 22px !important;
}

#site-footer.site-footer .footer-desc,
.site-footer .footer-desc {
  font-size: 17px !important;
  line-height: 1.9 !important;
}

#site-footer.site-footer .footer-heading,
.site-footer .footer-heading {
  font-size: 20px !important;
  line-height: 1.6 !important;
}

#site-footer.site-footer .footer-menu-list a,
#site-footer.site-footer .contact-list a,
#site-footer.site-footer .contact-list span,
#site-footer.site-footer .footer-widgets,
#site-footer.site-footer .footer-widgets p,
#site-footer.site-footer .footer-widgets li,
#site-footer.site-footer .footer-widgets a,
.site-footer .footer-menu-list a,
.site-footer .contact-list a,
.site-footer .contact-list span,
.site-footer .footer-widgets,
.site-footer .footer-widgets p,
.site-footer .footer-widgets li,
.site-footer .footer-widgets a {
  font-size: 17px !important;
  line-height: 1.9 !important;
}

#site-footer.site-footer .contact-list i,
.site-footer .contact-list i {
  font-size: 17px !important;
}

#site-footer.site-footer .copyright,
#site-footer.site-footer .copyright a,
#site-footer.site-footer .footer-legal,
#site-footer.site-footer .footer-legal a,
.site-footer .copyright,
.site-footer .copyright a,
.site-footer .footer-legal,
.site-footer .footer-legal a {
  font-size: 16px !important;
  line-height: 1.8 !important;
}

@media (max-width: 600px) {
  #site-footer.site-footer,
  .site-footer {
    font-size: 17px !important;
  }

  #site-footer.site-footer .footer-site-title,
  .site-footer .footer-site-title {
    font-size: 20px !important;
  }

  #site-footer.site-footer .footer-heading,
  .site-footer .footer-heading {
    font-size: 19px !important;
  }

  #site-footer.site-footer .footer-desc,
  #site-footer.site-footer .footer-menu-list a,
  #site-footer.site-footer .contact-list a,
  #site-footer.site-footer .contact-list span,
  #site-footer.site-footer .footer-widgets,
  #site-footer.site-footer .footer-widgets p,
  #site-footer.site-footer .footer-widgets li,
  #site-footer.site-footer .footer-widgets a,
  .site-footer .footer-desc,
  .site-footer .footer-menu-list a,
  .site-footer .contact-list a,
  .site-footer .contact-list span,
  .site-footer .footer-widgets,
  .site-footer .footer-widgets p,
  .site-footer .footer-widgets li,
  .site-footer .footer-widgets a {
    font-size: 16px !important;
    line-height: 1.85 !important;
  }

  #site-footer.site-footer .copyright,
  #site-footer.site-footer .copyright a,
  #site-footer.site-footer .footer-legal,
  #site-footer.site-footer .footer-legal a,
  .site-footer .copyright,
  .site-footer .copyright a,
  .site-footer .footer-legal,
  .site-footer .footer-legal a {
    font-size: 15px !important;
  }
}


/* أيقونات التواصل المضمّنة: لا تعتمد على تحميل Font Awesome */
#site-footer .social-icons a .social-icon-svg,
.site-footer .social-icons a .social-icon-svg {
  display: block;
  width: 19px;
  height: 19px;
  fill: currentColor;
  stroke: none;
  color: inherit;
}

#site-footer .social-icons a:hover .social-icon-svg,
#site-footer .social-icons a:focus-visible .social-icon-svg,
.site-footer .social-icons a:hover .social-icon-svg,
.site-footer .social-icons a:focus-visible .social-icon-svg {
  color: inherit;
}

@media (max-width: 600px) {
  #site-footer .social-icons a .social-icon-svg,
  .site-footer .social-icons a .social-icon-svg {
    width: 20px;
    height: 20px;
  }
}


/* =========================================================
   صندوق البحث في الرئيسية والتصنيفات
   ========================================================= */

.search-wrapper {
  display: block !important;
  width: 100%;
  margin: 24px auto !important;
  padding: 14px !important;
  border: 1px solid #d9eaf5 !important;
  border-radius: 14px !important;
  background: linear-gradient(135deg, #f5fbff 0%, #e5f3fb 100%) !important;
  box-shadow: 0 8px 22px rgba(22, 119, 184, 0.08) !important;
  direction: rtl;
}

.search-wrapper form,
.search-wrapper .search-form {
  display: flex !important;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 0 !important;
  direction: rtl;
}

.search-wrapper input[type="search"],
.search-wrapper input[type="text"] {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 48px;
  padding: 10px 16px !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 9px !important;
  background: #ffffff !important;
  color: #16305c !important;
  font-family: 'IBM Plex Sans Arabic', sans-serif !important;
  font-size: 17px !important;
  outline: none;
}

.search-wrapper input[type="search"]::placeholder,
.search-wrapper input[type="text"]::placeholder {
  color: #64748b;
  opacity: 1;
}

.search-wrapper input[type="search"]:focus,
.search-wrapper input[type="text"]:focus {
  border-color: #1677b8 !important;
  box-shadow: 0 0 0 3px rgba(22, 119, 184, 0.14) !important;
}

.search-wrapper button[type="submit"],
.search-wrapper input[type="submit"] {
  flex: 0 0 auto;
  min-width: 58px;
  min-height: 48px;
  padding: 9px 17px !important;
  border: 0 !important;
  border-radius: 9px !important;
  background: #1677b8 !important;
  color: #ffffff !important;
  font-family: 'IBM Plex Sans Arabic', sans-serif !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: background .2s ease, transform .2s ease;
}

.search-wrapper button[type="submit"]:hover,
.search-wrapper input[type="submit"]:hover {
  background: #0f5e91 !important;
  transform: translateY(-1px);
}

@media (max-width: 600px) {
  .search-wrapper {
    margin: 18px 0 !important;
    padding: 10px !important;
    border-radius: 12px !important;
  }

  .search-wrapper form,
  .search-wrapper .search-form {
    gap: 8px;
  }

  .search-wrapper input[type="search"],
  .search-wrapper input[type="text"] {
    min-height: 46px;
    font-size: 16px !important;
  }

  .search-wrapper button[type="submit"],
  .search-wrapper input[type="submit"] {
    min-width: 52px;
    min-height: 46px;
    padding: 8px 13px !important;
  }
}


/* =========================================================
   تنسيق صفحات التصنيفات وتسلسل العناوين
   H1 عنوان التصنيف — H2 المواد — H3 آخر المواضيع — H4 الموضوع
   ========================================================= */

.category-header-card {
  margin: 24px 0 28px;
  padding: 0;
  border: 1px solid #d9eaf5;
  border-radius: 16px;
  background: linear-gradient(135deg, #fafdff 0%, #e5f3fb 100%);
  box-shadow: 0 8px 22px rgba(22, 119, 184, 0.07);
  overflow: hidden;
}

.category-header-inner {
  padding: 26px 22px 24px;
}

.category-heading-content {
  padding: 0;
}

.category-title {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0;
  padding: 10px 22px;
  color: #16305c !important;
  font-size: clamp(2rem, 4vw, 2.7rem) !important;
  font-weight: 800 !important;
  line-height: 1.35 !important;
}

.category-title i {
  color: #1677b8;
  font-size: .78em;
}

.category-description {
  max-width: 900px;
  margin: 14px auto 0 !important;
  color: #4b5563 !important;
  font-size: 18px !important;
  line-height: 1.95 !important;
  text-align: center;
}

.category-materials-section {
  margin: 0 0 32px;
}

.category-section-title,
.category-latest-header .cat-posts-title {
  margin: 0 0 18px;
  padding: 12px 18px;
  border-right: 5px solid #f6c344;
  border-radius: 10px;
  background: linear-gradient(135deg, #1677b8 0%, #1a6fa8 100%);
  color: #ffffff !important;
  font-size: 1.55rem !important;
  font-weight: 800 !important;
  line-height: 1.55 !important;
  text-align: right;
  box-shadow: 0 5px 14px rgba(22, 119, 184, 0.12);
}

.category-materials-section .cardc {
  padding: 10px;
  border: 1px solid #d9eaf5;
  border-radius: 14px;
  background: #fafdff !important;
}

.category-card-title {
  display: block;
  padding: 10px 8px;
  color: #16305c !important;
  font-size: 17px !important;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
}

.category-latest-header {
  margin: 28px 0 18px;
}

.category-latest-header .cat-posts-title {
  margin-bottom: 0;
  text-align: right;
}

.cat-posts .post-card h4,
.cat-posts .post-card h4 a,
.post-card .post-title {
  color: #16305c !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  line-height: 1.7 !important;
}

.cat-posts .post-card h4 a:hover,
.post-card .post-title:hover {
  color: #1677b8 !important;
}

.cat-posts .post-card .text-muted {
  color: #64748b !important;
  font-size: 15px !important;
}

@media (max-width: 768px) {
  .category-header-inner {
    padding: 20px 14px 18px;
  }

  .category-title {
    padding: 8px 12px;
    font-size: 1.85rem !important;
  }

  .category-description {
    margin-top: 10px !important;
    font-size: 16px !important;
    line-height: 1.85 !important;
  }

  .category-section-title,
  .category-latest-header .cat-posts-title {
    margin-bottom: 14px;
    padding: 10px 13px;
    font-size: 1.3rem !important;
  }

  .category-card-title {
    padding: 8px 5px;
    font-size: 16px !important;
  }

  .cat-posts .post-card h4,
  .cat-posts .post-card h4 a,
  .post-card .post-title {
    font-size: 16px !important;
    line-height: 1.65 !important;
  }
}


/* التعديل النهائي: بطاقات المواد مباشرة بعد الوصف */
.category-materials-section {
  margin: 22px 0 34px !important;
}

.category-materials-section .cardc {
  margin-top: 0 !important;
}

.category-materials-section .category-card-title {
  display: block;
  margin: 0 !important;
  padding: 10px 8px;
  color: #16305c !important;
  font-size: 19px !important;
  font-weight: 800 !important;
  line-height: 1.5 !important;
  text-align: center;
}

@media (max-width: 768px) {
  .category-materials-section {
    margin-top: 18px !important;
  }

  .category-materials-section .category-card-title {
    padding: 8px 5px;
    font-size: 17px !important;
  }
}


/* =========================================================
   زر تحميل المزيد في صفحات التصنيفات
   ========================================================= */

.category-load-more-wrap {
  display: flex;
  justify-content: center;
  margin: 30px 0 12px;
}

.category-load-more {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 190px;
  min-height: 50px;
  padding: 11px 24px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, #1677b8 0%, #0f5e91 100%);
  color: #ffffff;
  font-family: 'IBM Plex Sans Arabic', sans-serif;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
  box-shadow: 0 7px 16px rgba(22, 119, 184, 0.2);
  transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}

.category-load-more:hover,
.category-load-more:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(22, 119, 184, 0.28);
  outline: none;
}

.category-load-more:focus-visible {
  box-shadow: 0 0 0 4px rgba(246, 195, 68, .38), 0 10px 22px rgba(22, 119, 184, .25);
}

.category-load-more:disabled {
  opacity: .78;
  cursor: wait;
  transform: none;
}

.category-load-more-spinner {
  display: none;
  width: 17px;
  height: 17px;
  border: 2px solid rgba(255,255,255,.45);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: category-load-more-spin .75s linear infinite;
}

.category-load-more.is-loading .category-load-more-spinner {
  display: inline-block;
}

@keyframes category-load-more-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 600px) {
  .category-load-more-wrap {
    margin: 24px 0 10px;
  }

  .category-load-more {
    width: min(100%, 280px);
    min-height: 48px;
    font-size: 16px;
  }
}


/* =========================================================
   إظهار عناوين المقالات كاملة داخل بطاقات التصنيف
   ========================================================= */

.post-card,
.post-card.h-100 {
  height: auto !important;
  min-height: 100% !important;
}

.post-card .card-body {
  height: auto !important;
  min-height: 118px;
  overflow: visible !important;
}

.post-card .card-title,
.post-card h4.card-title,
.post-card .post-title {
  display: block !important;
  height: auto !important;
  max-height: none !important;
  min-height: 0 !important;
  margin-bottom: 12px !important;
  overflow: visible !important;
  white-space: normal !important;
  text-overflow: clip !important;
  -webkit-line-clamp: unset !important;
  -webkit-box-orient: initial !important;
  line-clamp: unset !important;
  color: #16305c !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  line-height: 1.75 !important;
}

.post-card .post-title:hover,
.post-card .post-title:focus-visible {
  color: #1677b8 !important;
}

@media (max-width: 600px) {
  .post-card .card-body {
    min-height: 0;
    padding: 12px 10px !important;
  }

  .post-card .card-title,
  .post-card h4.card-title,
  .post-card .post-title {
    font-size: 16px !important;
    line-height: 1.7 !important;
  }
}


/* =========================================================
   أزرار الربط بين التصنيفات
   ========================================================= */

.category-hierarchy-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin: 34px auto 28px;
  padding: 20px;
  border: 1px solid #d9eaf5;
  border-radius: 14px;
  background: linear-gradient(135deg, #fafdff 0%, #e5f3fb 100%);
  box-shadow: 0 7px 18px rgba(22, 119, 184, .07);
}

.category-parent-button,
.category-child-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 9px 18px;
  border-radius: 9px;
  text-decoration: none !important;
  font-family: 'IBM Plex Sans Arabic', sans-serif;
  font-size: 16px !important;
  font-weight: 700 !important;
  line-height: 1.5;
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}

.category-parent-button {
  background: #1677b8;
  color: #ffffff !important;
  box-shadow: 0 5px 12px rgba(22, 119, 184, .18);
}

.category-parent-button:hover,
.category-parent-button:focus-visible {
  background: #0f5e91;
  color: #ffffff !important;
  transform: translateY(-2px);
}

.category-children-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.category-child-button {
  background: #ffffff;
  border: 1px solid #b8d9ef;
  color: #16305c !important;
}

.category-child-button:hover,
.category-child-button:focus-visible {
  background: #eef7ff;
  border-color: #1677b8;
  color: #1677b8 !important;
  transform: translateY(-2px);
  box-shadow: 0 5px 12px rgba(22, 119, 184, .12);
}

.category-parent-button span,
.category-child-button span {
  font-size: 1.15em;
  line-height: 1;
}

@media (max-width: 600px) {
  .category-hierarchy-nav {
    gap: 13px;
    margin: 26px 0 22px;
    padding: 14px 10px;
  }

  .category-parent-button,
  .category-child-button {
    width: 100%;
    min-height: 44px;
    font-size: 15px !important;
  }

  .category-children-buttons {
    flex-direction: column;
    gap: 8px;
  }
}


/* =========================================================
   بطاقات التصنيفات في الصفحة الرئيسية — تصميم احترافي
   ========================================================= */

.category-home-widget {
  width: 100%;
  margin: 24px 0;
  padding: 14px;
  border: 1px solid #d9eaf5;
  border-radius: 16px;
  background: linear-gradient(135deg, #fafdff 0%, #e5f3fb 100%);
  box-shadow: 0 8px 22px rgba(22, 119, 184, .07);
}

.category-widget-heading {
  margin: 0 0 18px;
  padding: 12px 18px;
  border-right: 5px solid #f6c344;
  border-radius: 10px;
  background: linear-gradient(135deg, #1677b8 0%, #0f5e91 100%);
  color: #ffffff;
  text-align: center;
  box-shadow: 0 5px 14px rgba(22, 119, 184, .14);
}

.category-widget-title {
  margin: 0;
  color: #ffffff !important;
  font-size: 1.55rem !important;
  font-weight: 800 !important;
  line-height: 1.55 !important;
}

.category-home-widget-body {
  padding: 2px;
}

.category-home-grid {
  align-items: stretch;
  margin-right: -6px;
  margin-left: -6px;
}

.category-home-grid-item {
  display: flex;
  padding-right: 6px;
  padding-left: 6px;
}

.category-home-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  overflow: hidden;
  border: 1px solid #cbdfe9 !important;
  border-radius: 12px !important;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(22, 48, 92, .08);
  transition: transform .22s ease, box-shadow .22s ease;
}

.category-home-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 22px rgba(22, 119, 184, .18);
}

.category-home-card-link {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  color: inherit;
}

.category-home-card-image {
  display: block;
  width: 100%;
  height: 170px !important;
  min-height: 170px;
  object-fit: contain !important;
  padding: 8px;
  background: #ffffff;
}

.category-home-card .category-card-placeholder {
  height: 170px;
  padding: 14px;
  background: #eaf6fc;
}

.category-home-card-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  padding: 8px 7px !important;
  border-top: 0;
  background: #1677b8 !important;
}

.category-home-card-title {
  display: block;
  width: 100%;
  margin: 0 !important;
  color: #ffffff !important;
  font-size: 17px !important;
  font-weight: 800 !important;
  line-height: 1.55 !important;
  text-align: center;
}

@media (max-width: 768px) {
  .category-home-widget {
    padding: 10px;
    border-radius: 13px;
  }

  .category-widget-title {
    font-size: 1.3rem !important;
  }

  .category-home-card-image,
  .category-home-card .category-card-placeholder {
    height: 145px !important;
    min-height: 145px;
  }

  .category-home-card-footer {
    min-height: 54px;
  }

  .category-home-card-title {
    font-size: 16px !important;
  }
}

@media (max-width: 420px) {
  .category-home-card-image,
  .category-home-card .category-card-placeholder {
    height: 135px !important;
    min-height: 135px;
  }

  .category-home-card-title {
    font-size: 15px !important;
  }
}


/* =========================================================
   عارض ملفات Google Drive داخل المقال
   ========================================================= */

.content iframe[src*="drive.google.com"],
.entry-content iframe[src*="drive.google.com"],
.post-content iframe[src*="drive.google.com"],
.content iframe[src*="docs.google.com"],
.entry-content iframe[src*="docs.google.com"],
.post-content iframe[src*="docs.google.com"],
.content iframe.google-drive-embed,
.entry-content iframe.google-drive-embed,
.post-content iframe.google-drive-embed {
  display: block !important;
  width: 100% !important;
  height: 780px !important;
  min-height: 620px !important;
  max-width: 100% !important;
  margin: 24px auto !important;
  border: 1px solid #d9e2ec !important;
  border-radius: 12px !important;
  background: #f8fbfd !important;
  box-shadow: 0 8px 22px rgba(22, 48, 92, .10) !important;
}

@media (max-width: 768px) {
  .content iframe[src*="drive.google.com"],
  .entry-content iframe[src*="drive.google.com"],
  .post-content iframe[src*="drive.google.com"],
  .content iframe[src*="docs.google.com"],
  .entry-content iframe[src*="docs.google.com"],
  .post-content iframe[src*="docs.google.com"],
  .content iframe.google-drive-embed,
  .entry-content iframe.google-drive-embed,
  .post-content iframe.google-drive-embed {
    height: 620px !important;
    min-height: 520px !important;
    margin: 18px auto !important;
    border-radius: 10px !important;
  }
}

@media (max-width: 480px) {
  .content iframe[src*="drive.google.com"],
  .entry-content iframe[src*="drive.google.com"],
  .post-content iframe[src*="drive.google.com"],
  .content iframe[src*="docs.google.com"],
  .entry-content iframe[src*="docs.google.com"],
  .post-content iframe[src*="docs.google.com"],
  .content iframe.google-drive-embed,
  .entry-content iframe.google-drive-embed,
  .post-content iframe.google-drive-embed {
    height: 540px !important;
    min-height: 460px !important;
  }
}


/* =========================================================
   الفوتر كودجت كامل — منطقة واحدة قابلة للتحكم
   ========================================================= */

#site-footer.footer-widget-only {
  width: 100%;
  margin-top: 40px;
  padding: 42px 0 0;
  background: linear-gradient(135deg, #f5fbff 0%, #e5f3fb 100%) !important;
  color: #16305c !important;
  border-top: 4px solid #1677b8;
  box-sizing: border-box;
}

#site-footer.footer-widget-only .container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 15px;
  box-sizing: border-box;
}

#site-footer.footer-widget-only .footer-widget-area {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
  width: 100%;
}

#site-footer.footer-widget-only .footer-widget-area > .widget {
  min-width: 0;
  margin: 0;
  padding: 22px 20px;
  border: 1px solid #cbdfea;
  border-radius: 14px;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 6px 16px rgba(22, 48, 92, .07);
}

#site-footer.footer-widget-only .footer-widget-area .widget-title {
  position: relative;
  margin: 0 0 16px;
  padding-bottom: 10px;
  color: #16305c !important;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.6;
}

#site-footer.footer-widget-only .footer-widget-area .widget-title::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 42px;
  height: 3px;
  border-radius: 3px;
  background: #f6c344;
}

#site-footer.footer-widget-only .footer-widget-area p,
#site-footer.footer-widget-only .footer-widget-area li,
#site-footer.footer-widget-only .footer-widget-area a,
#site-footer.footer-widget-only .footer-widget-area span {
  color: #374151 !important;
  font-size: 17px;
  line-height: 1.9;
}

#site-footer.footer-widget-only .footer-widget-area a {
  text-decoration: none;
  transition: color .2s ease;
}

#site-footer.footer-widget-only .footer-widget-area a:hover,
#site-footer.footer-widget-only .footer-widget-area a:focus-visible {
  color: #1677b8 !important;
}

#site-footer.footer-widget-only .footer-widget-area ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

#site-footer.footer-widget-only .footer-widget-area li {
  margin-bottom: 8px;
}

#site-footer.footer-widget-only .footer-bottom {
  margin-top: 32px;
  padding: 18px 0;
  border-top: 1px solid rgba(22, 48, 92, .16);
}

#site-footer.footer-widget-only .footer-bottom-inner {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

#site-footer.footer-widget-only .copyright,
#site-footer.footer-widget-only .copyright a {
  color: #4b5563 !important;
  font-size: 16px;
  line-height: 1.8;
}

@media (max-width: 900px) {
  #site-footer.footer-widget-only .footer-widget-area {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  #site-footer.footer-widget-only {
    margin-top: 28px;
    padding-top: 30px;
  }

  #site-footer.footer-widget-only .footer-widget-area {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  #site-footer.footer-widget-only .footer-widget-area > .widget {
    padding: 18px 16px;
  }

  #site-footer.footer-widget-only .footer-widget-area .widget-title {
    font-size: 19px;
  }

  #site-footer.footer-widget-only .footer-widget-area p,
  #site-footer.footer-widget-only .footer-widget-area li,
  #site-footer.footer-widget-only .footer-widget-area a,
  #site-footer.footer-widget-only .footer-widget-area span {
    font-size: 16px;
  }
}


/* =========================================================
   أربع مناطق ودجات مستقلة للفوتر
   ========================================================= */

#site-footer.footer-widget-only .footer-widget-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  align-items: start;
  width: 100%;
}

#site-footer.footer-widget-only .footer-widget-column {
  min-width: 0;
  padding: 22px 20px;
  border: 1px solid #cbdfea;
  border-radius: 14px;
  background: rgba(255, 255, 255, .84);
  box-shadow: 0 6px 16px rgba(22, 48, 92, .07);
}

#site-footer.footer-widget-only .footer-widget-column .widget {
  margin: 0;
}

#site-footer.footer-widget-only .footer-widget-column .widget + .widget {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #d9eaf5;
}

#site-footer.footer-widget-only .footer-widget-column .widget-title {
  position: relative;
  margin: 0 0 16px;
  padding-bottom: 10px;
  color: #16305c !important;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.6;
}

#site-footer.footer-widget-only .footer-widget-column .widget-title::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 42px;
  height: 3px;
  border-radius: 3px;
  background: #f6c344;
}

#site-footer.footer-widget-only .footer-widget-column p,
#site-footer.footer-widget-only .footer-widget-column li,
#site-footer.footer-widget-only .footer-widget-column a,
#site-footer.footer-widget-only .footer-widget-column span,
#site-footer.footer-widget-only .footer-widget-column label {
  color: #374151 !important;
  font-size: 17px;
  line-height: 1.9;
}

#site-footer.footer-widget-only .footer-widget-column a {
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: color .2s ease;
}

#site-footer.footer-widget-only .footer-widget-column a:hover,
#site-footer.footer-widget-only .footer-widget-column a:focus-visible {
  color: #1677b8 !important;
}

#site-footer.footer-widget-only .footer-widget-column ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

#site-footer.footer-widget-only .footer-widget-column li {
  margin-bottom: 8px;
}

@media (max-width: 1050px) {
  #site-footer.footer-widget-only .footer-widget-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  #site-footer.footer-widget-only .footer-widget-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  #site-footer.footer-widget-only .footer-widget-column {
    padding: 18px 16px;
  }

  #site-footer.footer-widget-only .footer-widget-column .widget-title {
    font-size: 19px;
  }

  #site-footer.footer-widget-only .footer-widget-column p,
  #site-footer.footer-widget-only .footer-widget-column li,
  #site-footer.footer-widget-only .footer-widget-column a,
  #site-footer.footer-widget-only .footer-widget-column span,
  #site-footer.footer-widget-only .footer-widget-column label {
    font-size: 16px;
  }
}


/* =========================================================
   إصلاح تضخم شعار وأيقونات ودجات الفوتر
   ========================================================= */

#site-footer.footer-widget-only .footer-widget-column {
  overflow: hidden;
}

#site-footer.footer-widget-only .footer-widget-logo-content {
  width: 100%;
  text-align: center;
}

#site-footer.footer-widget-only .footer-widget-logo,
#site-footer.footer-widget-only .footer-widget-logo-content img,
#site-footer.footer-widget-only .footer-widget-logo-content .custom-logo {
  display: block !important;
  width: auto !important;
  max-width: 180px !important;
  height: auto !important;
  max-height: 82px !important;
  margin: 0 auto 14px !important;
  object-fit: contain !important;
}

#site-footer.footer-widget-only .footer-widget-logo-content .custom-logo-link {
  display: block;
  width: 100%;
  text-align: center;
}

#site-footer.footer-widget-only .footer-widget-description {
  margin: 0;
  text-align: center;
}

#site-footer.footer-widget-only .footer-widget-social-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

#site-footer.footer-widget-only .footer-widget-social-links a {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  flex: 0 0 42px;
  width: 42px !important;
  height: 42px !important;
  padding: 0 !important;
  border: 1px solid #b8d9ef;
  border-radius: 50%;
  background: #ffffff;
  color: #1677b8 !important;
  text-decoration: none;
  line-height: 1;
  transition: transform .2s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
}

#site-footer.footer-widget-only .footer-widget-social-links a:hover,
#site-footer.footer-widget-only .footer-widget-social-links a:focus-visible {
  background: #1677b8;
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 5px 12px rgba(22, 119, 184, .22);
}

#site-footer.footer-widget-only .footer-widget-social-links svg,
#site-footer.footer-widget-only .footer-widget-social-links svg.social-icon-svg {
  display: block !important;
  width: 22px !important;
  height: 22px !important;
  max-width: 22px !important;
  max-height: 22px !important;
  margin: 0 !important;
  fill: currentColor;
  stroke: none;
}

#site-footer.footer-widget-only .footer-widget-social-links svg rect,
#site-footer.footer-widget-only .footer-widget-social-links svg circle,
#site-footer.footer-widget-only .footer-widget-social-links svg path {
  vector-effect: non-scaling-stroke;
}

@media (max-width: 600px) {
  #site-footer.footer-widget-only .footer-widget-logo,
  #site-footer.footer-widget-only .footer-widget-logo-content img,
  #site-footer.footer-widget-only .footer-widget-logo-content .custom-logo {
    max-width: 155px !important;
    max-height: 72px !important;
  }

  #site-footer.footer-widget-only .footer-widget-social-links a {
    flex-basis: 40px;
    width: 40px !important;
    height: 40px !important;
  }

  #site-footer.footer-widget-only .footer-widget-social-links svg,
  #site-footer.footer-widget-only .footer-widget-social-links svg.social-icon-svg {
    width: 20px !important;
    height: 20px !important;
    max-width: 20px !important;
    max-height: 20px !important;
  }
}
/* =========================================================
   الزر العائم لمصدر جوجل نيوز المفضل
   ========================================================= */
#floating-preferred-source {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 9999;
  background: #ffffff;
  border-radius: 50px;
  box-shadow: 0 4px 14px rgba(22, 48, 92, .18);
  padding: 6px;
}
@media (max-width: 600px) {
  #floating-preferred-source {
    bottom: 15px;
    left: 15px;
    transform: scale(.92);
  }
}

/* =========================================================
   أزرار المشاركة الجديدة أسفل المقال
   ========================================================= */
.share-section {
  margin: 28px 0 6px;
  padding: 20px 16px;
  border: 1px solid #e3e8ef;
  border-radius: 14px;
  background: linear-gradient(135deg, #fafdff 0%, #f2f8fc 100%);
  text-align: center;
}
.share-title {
  margin: 0 0 16px;
  color: #16305c;
  font-size: 17px;
  font-weight: 800;
}
.share-buttons-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 120px;
  padding: 10px 18px;
  border-radius: 10px;
  color: #ffffff !important;
  text-decoration: none !important;
  font-weight: 700;
  font-size: 14.5px;
  box-shadow: 0 4px 10px rgba(0,0,0,.1);
  transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}
.share-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(0,0,0,.16);
  opacity: .95;
  color: #ffffff !important;
}
.share-btn i { font-size: 16px; }
.share-fb  { background: #1877f2; }
.share-tw  { background: #1da1f2; }
.share-wa  { background: #25d366; }
.share-tg  { background: #229ed9; }
.share-pin { background: #e60023; }

@media (max-width: 600px) {
  .share-btn { flex: 1 1 45%; justify-content: center; min-width: 0; }
}

/* =========================================================
   زر "أضفنا كمصدر مفضل" — توسيط مضمون على كل الأجهزة
   ========================================================= */
.preferred-source-plain {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  width: 100% !important;
  margin: 20px auto !important;
  text-align: center !important;
}

.preferred-source-plain > div {
  margin: 0 auto !important;
}

/* =========================================================
   زر الانضمام لقناة تيليجرام — أولوية عالية تمنع أي تعارض
   ========================================================= */
.telegram-channel-wrap {
  text-align: center;
  margin: 20px 0;
}

a.telegram-channel-btn,
a.telegram-channel-btn:visited {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 13px 30px !important;
  border-radius: 50px !important;
  background: linear-gradient(135deg, #229ed9, #1b7fb0) !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  font-size: 15.5px !important;
  text-decoration: none !important;
  border: none !important;
  box-shadow: 0 6px 18px rgba(34, 158, 217, .35) !important;
  transition: transform .2s ease, box-shadow .2s ease;
}

a.telegram-channel-btn:hover,
a.telegram-channel-btn:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(34, 158, 217, .45) !important;
  color: #ffffff !important;
  text-decoration: none !important;
}

a.telegram-channel-btn i {
  font-size: 19px !important;
  color: #ffffff !important;
}

a.telegram-channel-btn span {
  color: #ffffff !important;
}