/* Site-wide: phones, notched devices, overflow — Itqan Tools */
/* hidden أقوى من clip لإخفاء شريط السكرول الأفقي في المعاينة/RTL عند تجاوزات مطلقة */
html {
    overflow-x: hidden;
    max-width: 100%;
    width: 100%;
    /* يحجز مكان شريط التمرير من أول إطار — يمنع إزاحة أفقية للشريط الأسود عند ظهور السكرول */
    scrollbar-gutter: stable;
  }

  body {
    overflow-x: hidden;
    max-width: 100%;
    width: 100%;
  }

  /* لا فراغ أبيض بعد الفوتر — الطول يتبع المحتوى فقط */
  body:has(.site-footer) {
    min-height: 0;
    padding-bottom: 0;
  }
  .site-footer {
    margin-bottom: 0;
  }

  /*
   لا تضع overflow-x: hidden على nav: حسب مواصفة CSS، الجمع بين hidden (أفقي) وvisible (عمودي)
   يجعل overflow-y يُحسب كـ auto فيظهر شريط تمرير عمودي داخل الشريط الأسود.
   منع التمدد الأفقي يبقى عبر html/body؛ الشريط لا يحتاج قصاً إضافياً مع .itqan-navbar-inner { min-width:0 }.
  */
  nav.navbar.navbar-expand-xl.navbar-dark.bg-dark {
    position: sticky;
    top: 0;
    z-index: 1040;
    max-width: 100%;
    overflow: visible !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
  }
  .navbar .container-fluid.itqan-navbar-inner {
    max-width: 100%;
    min-width: 0;
    overflow: visible !important;
  }

  /* ===== شعار الشريط — 177×52 ثابتاً (جوال + ديسكتوب) ===== */
  a.itqan-nav-logo.navbar-brand.logo {
    flex: 0 0 auto !important;
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 0 !important;
    font-size: 0 !important;
  }
  a.itqan-nav-logo.navbar-brand.logo:not(:has(picture)) {
    width: auto !important;
  }
  a.itqan-nav-logo.navbar-brand.logo:has(picture) {
    width: 177px !important;
    max-width: 177px !important;
  }
  /* موحّد للغتين: ارتفاع ثابت + عرض تلقائي — الشعار القديم فقط (بدون picture) */
  a.itqan-nav-logo:not(:has(picture)) img.itqan-logo-img.logo-icon {
    max-width: none !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
    box-sizing: border-box !important;
  }
  @media (min-width: 1200px) {
    a.itqan-nav-logo.navbar-brand.logo:has(picture) {
      width: 177px !important;
      max-width: 177px !important;
    }
    a.itqan-nav-logo:not(:has(picture)) img.itqan-logo-img,
    html[dir="rtl"] a.itqan-nav-logo:not(:has(picture)) img.itqan-logo-img,
    html[dir="ltr"] a.itqan-nav-logo:not(:has(picture)) img.itqan-logo-img {
      height: 52px !important;
      min-height: 52px !important;
      max-height: 52px !important;
      width: auto !important;
      max-width: none !important;
    }
  }
  @media (max-width: 1199.98px) {
    /* الترتيب البصري الثابت (Safari + Chrome): [☰ قائمة] [الشعار] ... [⚙ إعدادات] */
    .navbar > .container-fluid.itqan-navbar-inner {
      display: grid !important;
      grid-template-columns: auto minmax(0, 1fr) auto !important;
      grid-template-rows: auto auto !important;
      align-items: center !important;
      direction: ltr !important;
      min-height: 56px !important;
      padding-left: max(0.5rem, env(safe-area-inset-left, 0px)) !important;
      padding-right: max(0.5rem, env(safe-area-inset-right, 0px)) !important;
      column-gap: 10px !important;
    }
    .navbar > .itqan-navbar-inner > .navbar-toggler {
      grid-column: 1 !important;
      grid-row: 1 !important;
      justify-self: start !important;
      align-self: center !important;
      margin: 0 !important;
    }
    .navbar > .itqan-navbar-inner > a.itqan-nav-logo.navbar-brand.logo {
      grid-column: 2 !important;
      grid-row: 1 !important;
      justify-self: start !important;
      align-self: center !important;
      margin: 0 !important;
      height: 52px !important;
      min-height: 52px !important;
      display: flex !important;
      align-items: center !important;
    }
    .navbar > .itqan-navbar-inner > .nav-dropdown-wrapper.itqan-nav-sliders-slot {
      grid-column: 3 !important;
      grid-row: 1 !important;
      justify-self: end !important;
      align-self: center !important;
      margin: 0 !important;
      z-index: 1080 !important;
    }
    .navbar > .itqan-navbar-inner > #navbarNav.collapse.navbar-collapse {
      grid-column: 1 / -1 !important;
      grid-row: 2 !important;
      position: fixed !important;
    }
    a.itqan-nav-logo:not(:has(picture)) img.itqan-logo-img,
    html[dir="rtl"] a.itqan-nav-logo:not(:has(picture)) img.itqan-logo-img,
    html[dir="ltr"] a.itqan-nav-logo:not(:has(picture)) img.itqan-logo-img {
      height: 52px !important;
      min-height: 52px !important;
      max-height: 52px !important;
      width: auto !important;
      max-width: none !important;
    }
  }
  @media (min-width: 1200px) {
    .navbar.navbar-expand-xl .navbar-collapse,
    .navbar.navbar-expand-xl .navbar-nav {
      max-height: none !important;
      overflow: visible !important;
    }
    .navbar.navbar-expand-xl .nav-item.dropdown:hover,
    .navbar.navbar-expand-xl .lang-navbar-dropdown:hover,
    .navbar.navbar-expand-xl .nav-item.user-dropdown:hover {
      z-index: 1060;
    }
    .navbar.navbar-expand-xl .dropdown-menu {
      z-index: 1060 !important;
    }
  }

  /*
   إعلانات AdSense: iframe/عرض ثابت قد يوسّع scrollWidth في معاينة أدوات المطور
   فيظهر فراغ أفقي وتضطر لسحب الشريط لرؤية المحتوى المركز.
  */
  #adContainer {
    overflow-x: hidden;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
  }
  #adContainer iframe,
  #adContainer ins.adsbygoogle {
    max-width: 100% !important;
    box-sizing: border-box;
  }
  #adContainer iframe {
    width: 100% !important;
    display: block;
    margin-left: auto;
    margin-right: auto;
  }
  ins.adsbygoogle {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* عنصر مخفي لـ Google Translate: لا يمتد خارج viewport حتى لا يوسّع scrollWidth (فراغ أفقي في RTL وأدوات المطور) */
  .itqan-offscreen-widget {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    width: 1px !important;
    height: 1px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
    clip-path: inset(50%) !important;
    opacity: 0 !important;
    pointer-events: none !important;
    z-index: 0 !important;
  }

  /*
   بعد تغيّر مقاس المعاينة: تصفير التمرير الأفقي (مع الإعلان ومع RTL)
   — يتم استدعاء منطق أقوى من سكربت في أسفل header.php أيضاً.
  */
  
  /* ===== Floating help/contact tooltip: flip reliably =====
     Use wrapper classes to avoid any dir/selector conflicts. */
  .float-action-wrapper.is-rtl .float-action-tooltip {
    left: calc(100% + 14px) !important;
    right: auto !important;
    transform: translate(-10px, -50%);
  }
  .float-action-wrapper.is-rtl .float-action-tooltip::before {
    right: 100% !important;
    left: auto !important;
    border-left-color: transparent;
    border-right-color: #111;
  }
  
  .float-action-wrapper.is-ltr .float-action-tooltip {
    left: auto !important;
    right: calc(100% + 14px) !important;
    transform: translate(10px, -50%);
  }
  .float-action-wrapper.is-ltr .float-action-tooltip::before {
    right: auto !important;
    left: 100% !important;
    border-right-color: transparent;
    border-left-color: #111;
  }
  .float-action-wrapper.is-ltr .float-action-btn:hover .float-action-tooltip,
  .float-action-wrapper.is-rtl .float-action-btn:hover .float-action-tooltip {
    transform: translate(0, -50%);
  }
  
  @media (max-width: 576px) {
    .logo-text {
      font-size: 1rem !important;
    }
  }
  
  @media (max-width: 1199.98px) {
    .float-action-wrapper {
      left: auto !important;
      right: max(10px, env(safe-area-inset-right, 0px)) !important;
      bottom: calc(18px + env(safe-area-inset-bottom, 0px)) !important;
      z-index: 1020;
    }
  }

  /*
   أدوات PDF (دمج، ضغط، تقسيم…): منع scrollWidth > viewport على اللابتوب والجوال
   — نفس مبدأ Itqan Tools: حاوية مرنة + max-width:100% + min-width:0 في Grid/Flex
  */
  .container.my-5 {
    max-width: 100%;
    box-sizing: border-box;
    padding-left: max(0.75rem, env(safe-area-inset-left, 0px));
    padding-right: max(0.75rem, env(safe-area-inset-right, 0px));
  }
  .container.my-5 > .row > [class*="col-"] {
    min-width: 0;
    max-width: 100%;
  }
  .upload-area.card,
  #dropArea {
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
  }
  #dropArea .card-body {
    max-width: 100%;
    overflow-x: hidden;
  }
  #dropArea .d-flex.justify-content-center {
    flex-wrap: wrap;
    max-width: 100%;
    overflow: hidden;
  }
  .upload-pick-wrap {
    max-width: 100%;
    box-sizing: border-box;
  }
  .pdf-viewer-container {
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
  }
  .pdf-grid {
    min-width: 0;
    max-width: 100%;
  }
  .additional-upload-row {
    flex-wrap: wrap;
    max-width: 100%;
  }

  @media (max-width: 1199.98px) {
    .upload-pick-wrap {
      transform: none !important;
      flex-wrap: wrap;
      justify-content: center;
    }
    .upload-cloud-stack {
      flex-direction: row !important;
      justify-content: center;
      gap: 12px !important;
    }
    .upload-cloud-stack .cloud-icon {
      margin-bottom: 0 !important;
    }
    .pdf-grid {
      grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
      gap: 20px;
    }
    .pdf-viewer-container {
      padding: 16px;
    }
    /* إخفاء الأسئلة الشائعة والمحتوى التعليمي عند تفعيل المحرر على الجوال */
    html.itqan-editor-active .tool-seo-visible-wrap,
    html.itqan-editor-active .merge-seo-content {
      display: none !important;
    }
  }

  @media (max-width: 576px) {
    .upload-pick-wrap {
      flex-direction: column;
      width: 100%;
      gap: 12px;
    }
    .upload-pick-wrap .btn-lg,
    .upload-pick-wrap #selectFilesBtn {
      width: 100%;
      max-width: 100%;
      padding-left: 1rem !important;
      padding-right: 1rem !important;
      font-size: 1rem;
      white-space: normal;
    }
    .upload-cloud-stack {
      flex-direction: row !important;
      justify-content: center;
      gap: 12px;
    }
    .upload-cloud-stack .cloud-icon {
      margin-bottom: 0 !important;
    }
    .upload-area.card,
    #dropArea {
      padding: 1rem !important;
    }
    .pdf-grid {
      grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
      gap: 12px;
    }
    .pdf-viewer-container {
      padding: 12px;
    }
    .pdf-thumbnail {
      min-height: 160px;
    }
    .pdf-thumbnail.landscape {
      min-height: 130px;
    }
  }

  /*
   أدوات PDF — وضع المعاينة على الجوال: إظهار أزرار الإجراء (ترجمة، دمج، ضغط…)
   لا يؤثر على سطح المكتب — max-width: 1199.98px فقط
  */
  @media (max-width: 1199.98px) {
    html.itqan-editor-active #editor-section.main-editor {
      overflow-y: auto !important;
      -webkit-overflow-scrolling: touch;
      padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
    }

    html.itqan-editor-active #editor-section .sidebar {
      overflow: visible !important;
      height: auto !important;
      max-height: none !important;
    }

    html.itqan-editor-active #editor-section .sidebar .sidebar-body,
    html.itqan-editor-active #editor-section .sidebar .merge-sidebar-body {
      overflow-y: visible !important;
      max-height: none !important;
      flex: 0 1 auto !important;
    }

    html.itqan-editor-active #editor-section .sidebar > .merge-sidebar-footer:has(.btn-finish),
    html.itqan-editor-active #editor-section .sidebar > .p-3:has(.btn-finish) {
      position: fixed;
      left: 0;
      right: 0;
      bottom: 0;
      z-index: 1050;
      margin: 0;
      padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)) !important;
      background: #fff;
      border-top: 1px solid #e8e8e8;
      box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    }

    html.itqan-editor-active #editor-section .sidebar > .merge-sidebar-footer:has(.btn-finish) .btn-finish,
    html.itqan-editor-active #editor-section .sidebar > .p-3:has(.btn-finish) .btn-finish {
      width: 100%;
      margin: 0;
    }

    /* تعديل PDF */
    #editor-section.active .sp-foot:has(.btn-save) {
      position: fixed;
      left: 0;
      right: 0;
      bottom: 0;
      z-index: 1050;
      margin: 0;
      padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)) !important;
      background: #fff;
      border-top: 1px solid #e8e8e8;
      box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    }

    #editor-section.active .side-panel {
      padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
    }

    /* توقيع PDF — زر التوقيع عند فتح تبويب الأدوات */
    .itq-tools-col.mobile-show .itq-tools-footer {
      position: fixed;
      left: 0;
      right: 0;
      bottom: 0;
      z-index: 1050;
      margin: 0;
      padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)) !important;
      background: var(--itq-sidebar-bg, #fff);
      border-top: 1px solid #e8e8e8;
      box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    }

    .itq-tools-col.mobile-show {
      padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)) !important;
      overflow: visible !important;
    }

    /* مقارنة PDF */
    .compare-layout .compare-action:has(.btn) {
      position: fixed;
      left: 0;
      right: 0;
      bottom: 0;
      z-index: 1050;
      margin: 0;
      padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)) !important;
      background: #fff;
      border-top: 1px solid #e8e8e8;
      box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    }

    .compare-layout {
      padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
    }
  }

  /*
   إعلان أفقي — جوال فقط (صفحات النتيجة: أعلى المحتوى بعيداً عن أزرار التحميل)
   واجهة الاختيار/الرفع: الإعلان يبقى أسفل منطقة الاختيار (#adContainer) على الجوال والكمبيوتر
   slot: 4271503562
  */
  .merge-result-mobile-ad {
    display: none !important;
  }
  @media (max-width: 1199.98px) {
    .merge-result-mobile-ad {
      display: block !important;
      margin: 0 0 18px;
      text-align: center;
      overflow: hidden;
      max-width: 100%;
      box-sizing: border-box;
    }
    .merge-result-mobile-ad ins.adsbygoogle {
      display: block !important;
      width: min(100%, 728px) !important;
      max-width: 100% !important;
      min-height: 90px;
      margin-left: auto !important;
      margin-right: auto !important;
    }
    /* لا إعلان علوي في واجهة الاختيار — فقط أسفل منطقة الرفع */
    #upload-section .merge-result-mobile-ad,
    #vaextUploadSection .merge-result-mobile-ad,
    #nrdUploadSection .merge-result-mobile-ad {
      display: none !important;
    }
  }

/* ===== Cookie consent bar (GDPR / Consent Mode v2) ===== */
.itqan-cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 12000;
  background: #fff;
  border-top: 1px solid #e5e5e5;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12);
  box-sizing: border-box;
}
.itqan-cookie-banner[hidden] {
  display: none !important;
}
.itqan-cookie-banner.is-visible {
  display: block !important;
}
body.itqan-cookie-open {
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.itqan-cookie-banner__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 20px;
  padding-bottom: max(18px, env(safe-area-inset-bottom, 18px));
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px 24px;
}
.itqan-cookie-banner__content {
  flex: 1 1 420px;
  min-width: 0;
}
.itqan-cookie-banner__title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 8px;
  color: #111;
}
.itqan-cookie-banner__text {
  font-size: 0.88rem;
  line-height: 1.65;
  margin: 0;
  color: #444;
}
.itqan-cookie-banner__text a {
  color: #111;
  font-weight: 600;
  text-decoration: underline;
}
.itqan-cookie-banner__prefs {
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 10px 12px;
  margin-top: 12px;
  background: #fafafa;
}
.itqan-cookie-pref {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}
.itqan-cookie-pref:last-child {
  border-bottom: none;
}
.itqan-cookie-pref strong {
  display: block;
  font-size: 0.88rem;
  margin-bottom: 4px;
}
.itqan-cookie-pref p {
  margin: 0;
  font-size: 0.8rem;
  color: #666;
  line-height: 1.5;
}
.itqan-cookie-pref__always {
  font-size: 0.78rem;
  color: #888;
  white-space: nowrap;
  padding-top: 2px;
}
.itqan-cookie-pref--toggle input {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 4px;
  accent-color: #111;
}
.itqan-cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  flex: 0 0 auto;
}
.itqan-cookie-btn {
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  line-height: 1.2;
  white-space: nowrap;
}
.itqan-cookie-btn--primary {
  background: #111;
  color: #fff;
  border-color: #111;
}
.itqan-cookie-btn--primary:hover {
  background: #333;
}
.itqan-cookie-btn--ghost {
  background: #fff;
  color: #222;
  border-color: #bbb;
}
.itqan-cookie-btn--ghost:hover {
  border-color: #666;
}
@media (max-width: 768px) {
  .itqan-cookie-banner__inner {
    flex-direction: column;
    justify-content: flex-start;
    gap: 12px;
    padding: 14px 16px;
    padding-bottom: max(14px, env(safe-area-inset-bottom, 14px));
  }
  .itqan-cookie-banner__content {
    flex: 0 1 auto;
  }
  .itqan-cookie-banner__actions {
    width: 100%;
    flex-direction: column;
    margin-top: 0;
  }
  .itqan-cookie-btn {
    width: 100%;
    text-align: center;
    white-space: normal;
  }
}

/* Multidisciplinary science icon — math, physics, chemistry, biology */
.ms-science-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #f8f9fa;
  border: 2px solid #000;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  margin: 0 auto 1rem;
  overflow: hidden;
  flex-shrink: 0;
}
.ms-science-icon--card {
  width: 58px;
  height: 58px;
  margin: 0 auto;
}
/* Homepage tool cards — reuse the shared .tool-icon circle + hover */
.tool-icon .ms-science-icon--card {
  width: 100%;
  height: 100%;
  margin: 0;
  border: none;
  border-radius: 0;
  background: transparent;
}
.tool-icon .ms-science-icon--card .ms-science-icon__cell {
  border-color: transparent;
  background: transparent;
  font-size: 0.82rem;
  color: inherit;
}
.tool-icon .ms-science-icon--card .ms-science-icon__cell--math,
.tool-icon .ms-science-icon--card .ms-science-icon__cell--phy,
.tool-icon .ms-science-icon--card .ms-science-icon__cell--chem,
.tool-icon .ms-science-icon--card .ms-science-icon__cell--bio {
  background: transparent;
}
.tool-card:hover .tool-icon .ms-science-icon--card .ms-science-icon__cell {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.12);
}
.ms-science-icon__cell {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  color: #111;
  border: 1px solid #e9ecef;
  line-height: 1;
}
.ms-science-icon--card .ms-science-icon__cell {
  font-size: 0.7rem;
}
.ms-science-icon__cell--math { background: #fafbfc; }
.ms-science-icon__cell--phy  { background: #f3f4f6; }
.ms-science-icon__cell--chem { background: #fafbfc; }
.ms-science-icon__cell--bio  { background: #f3f4f6; }
.ms-science-icon__cell i {
  pointer-events: none;
}


/* ===== Laptop / Windows display scale (125%~150% on 1080p ≈ 1280–1536 CSS px) =====
   Soften fixed editor sidebars and result CTA widths so tool pages do not crush. */
@media (max-width: 1400px) and (min-width: 992px) {
  html.itqan-editor-active #editor-section.main-editor,
  #editor-section.main-editor,
  .main-editor {
    min-width: 0;
    max-width: 100%;
  }

  html.itqan-editor-active #editor-section.main-editor .sidebar,
  #editor-section.main-editor .sidebar,
  #editor-section .sidebar,
  .main-editor > .sidebar {
    width: min(280px, 30vw) !important;
    min-width: 0 !important;
    max-width: 34% !important;
    flex: 0 0 min(280px, 30vw) !important;
  }

  html.itqan-editor-active #editor-section.main-editor > *:not(.sidebar),
  #editor-section.main-editor > *:not(.sidebar),
  .main-editor > .p-3,
  .main-editor .viewer-area,
  .main-editor .content-area {
    min-width: 0 !important;
  }
}

@media (max-width: 1200px) and (min-width: 992px) {
  html.itqan-editor-active #editor-section.main-editor .sidebar,
  #editor-section.main-editor .sidebar,
  #editor-section .sidebar,
  .main-editor > .sidebar {
    width: min(240px, 28vw) !important;
    max-width: 32% !important;
    flex: 0 0 min(240px, 28vw) !important;
  }
}

/* Result / download CTAs: never force 320px wider than the viewport */
@media (max-width: 1366px) {
  .compress-result-download,
  a.compress-result-download,
  button.compress-result-download {
    min-width: min(320px, 100%) !important;
    max-width: 100%;
    box-sizing: border-box;
  }
}

@media (max-width: 575.98px) {
  .compress-result-download,
  a.compress-result-download,
  button.compress-result-download {
    min-width: 0 !important;
    width: 100%;
  }
}

/* Upload / tool shells: prevent horizontal overflow on mid laptops */
@media (max-width: 1366px) {
  .container.my-5,
  #upload-section .container,
  #upload-section .row {
    max-width: 100%;
  }
  #upload-section .col-lg-8,
  #upload-section .col-lg-10 {
    min-width: 0;
    max-width: 100%;
  }
}

/*
 * شعار nav بـ <picture> (WebP ~242px): صندوق ثابت — يتغلب على width:auto أعلاه ويمنع CLS عند PSI.
 * الشعار القديم بدون picture يبقى height + width:auto.
 */
a.itqan-nav-logo picture {
  display: block;
  line-height: 0;
  flex-shrink: 0;
  width: 177px !important;
  height: 52px !important;
  max-width: 177px !important;
}
a.itqan-nav-logo picture img.itqan-logo-img.logo-icon,
html[dir="rtl"] a.itqan-nav-logo picture img.itqan-logo-img,
html[dir="ltr"] a.itqan-nav-logo picture img.itqan-logo-img {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  height: 100% !important;
  max-height: 100% !important;
  min-height: 0 !important;
  object-fit: contain !important;
}
/* desktop picture size unified with base 177x52 — media override removed */
