/* =====================================================
   MOIT Header – Visual Identity (Unified with Logo)
   Clean • Institutional • Calm
   ===================================================== */

/* =========================
   Brand Color Variables
   ========================= */

:root {
  --moit-primary: #0F766E;      /* تركوازي الشعار */
  --moit-secondary: #15803D;    /* أخضر الشعار */
  --moit-dark: #0F2A44;         /* كحلي مؤسسي */
  --moit-text: #374151;
  --moit-light-bg: #F7F9FB;
}

/* =========================
   Global Typography
   ========================= */

.moit-header {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* =====================================================
   Top Bar – Visual
   ===================================================== */

.moit-top-bar {
  background: #F8FAFC;
  border-bottom: 1px solid #E2E8F0;
  font-size: 0.875rem;
  color: var(--moit-text);
  box-shadow: inset 0 -1px 0 #EEF2F7;

  min-height: 44px;
  display: flex;
  align-items: center;
  
  box-shadow: inset 0 -1px 0 #e5e7eb;
}

.moit-top-bar a {
  color: var(--moit-text);
  text-decoration: none;
  transition: color 0.2s ease;
}

.moit-top-bar a:hover {
  color: var(--moit-primary);
}

/* =====================================================
   Breaking News Label
   ===================================================== */

.moit-ticker__label {
  background: linear-gradient(
    135deg,
    #0F766E,
    #15803D
  );
  color: #fff;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 6px;
  letter-spacing: 0.4px;
  box-shadow:
    0 3px 8px rgba(0,0,0,0.18),
    inset 0 1px 0 rgba(255,255,255,0.15);
  transition: transform 0.3s ease;
  
  border-inline-start: 3px solid #B91C1C;
}

.moit-ticker__label:hover {
  transform: translateY(-1px);
}

/* =====================================================
   Breaking News – Scroll
   ===================================================== */
.moit-ticker__track {
  position: relative;
  overflow: hidden;
  width: 100%;
}

.moit-ticker__track .view-content {
  display: flex;
  align-items: center;
  gap: 80px;
  white-space: nowrap;
  will-change: transform;
}


.moit-ticker__item {
  font-weight: 600;
  color: #1F2937;
  letter-spacing: 0.2px;
}

.moit-ticker__item a {
  text-decoration: none;
  transition: color 0.25s ease;
}

.moit-ticker__item a:hover {
  color: var(--moit-secondary);
  text-shadow: 0 0 6px rgba(15,118,110,0.4);
}

/* Edge fade */
.moit-ticker__track::before,
.moit-ticker__track::after {
  content: "";
  position: absolute;
  top: 0;
  width: 40px;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.moit-ticker__track::before {
  left: 0;
  background: linear-gradient(to right, var(--moit-light-bg), transparent);
}

.moit-ticker__track::after {
  right: 0;
  background: linear-gradient(to left, var(--moit-light-bg), transparent);
}

/* =====================================================
   Main Header
   ===================================================== */

.moit-main-header {
  background:#fff;
}

/* Campaign Box */
.moit-header__campaign {
  border: 1px solid #E5E7EB;
  border-radius: 6px;
  padding: 0;
  font-size: 0.9rem;
  color: #6B7280;
  background: #F9FAFB;
}

/* =====================================================
   Main Navigation – Institutional Style
   ===================================================== */

.moit-main-navigation {
  position: sticky;
  top: 0;
  z-index: 90;

  background: linear-gradient(
    to bottom,
    #0C2338,
    #0F2A44
  );

  border-top: 4px solid var(--moit-primary);

  box-shadow:
    0 8px 22px rgba(0,0,0,0.22),
    inset 0 1px 0 rgba(255,255,255,0.06);
}

/* Menu links */
.moit-menu__link {
  color: #E5EDF5;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.3px;
  
  transition:
    color 0.25s ease,
    transform 0.25s ease,
    text-shadow 0.25s ease;
}

.moit-menu__link:hover {
  color: #5FD0C5;
  transform: translateY(-2px);
  text-shadow: 0 4px 10px rgba(0,0,0,0.25);
}

/* Active */
.moit-menu__item.is-active > .moit-menu__link {
  color: #5FD0C5;
  position: relative;
}

.moit-menu__item.is-active > .moit-menu__link::after {
  content: "";
  position: absolute;
  bottom: -8px;
  inset-inline-start: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(
    to right,
    var(--moit-primary),
    var(--moit-secondary)
  );
  border-radius: 2px;
}

/* =====================================================
   Dropdown
   ===================================================== */

.moit-menu--level-2 {
  background-color: #ffffff;
  border-radius: 8px;
  padding: 6px 0;
  box-shadow: 0 12px 25px rgba(0,0,0,0.15);
}

.moit-menu--level-2 .moit-menu__link {
  color: var(--moit-dark);
  padding: 8px 16px;
  font-weight: 500;
}

.moit-menu--level-2 .moit-menu__link:hover {
  background-color: #F3F6F9;
  color: var(--moit-primary);
}

/* =====================================================
   Home Icon
   ===================================================== */

.moit-menu__link--home {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background-color: rgba(255,255,255,0.15);
}

.moit-menu__link--home::before {
  content: "";
  width: 18px;
  height: 18px;

  background-image: url("../../images/icons/home.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;

  filter: invert(1);
}


.moit-menu__link--home:hover {
  background-color: rgba(255,255,255,0.25);
}

/* =====================================================
   Mobile Toggle
   ===================================================== */

.moit-mobile-toggle {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  border: 1px solid #E5E7EB;
  background-color: #F9FAFB;
  font-size: 1.4rem;
  cursor: pointer;
}

.moit-mobile-toggle:hover {
  background-color: #F3F4F6;
}

/* =====================================================
   Disabled Links
   ===================================================== */

.menu a[href="#"],
.menu a[href=""] {
  color: #9AA5A0;
  cursor: not-allowed;
  pointer-events: none;
  opacity: 0.6;
}


/* =========================================
   Top Bar Utility Icons
   ========================================= */

.moit-top-bar__utilities a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.moit-top-bar__utilities a::before {
  content: "";
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-color: #e5e7eb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: #111827;
}

/* FAQ icon */
.moit-top-bar__utilities a[href*="faq"]::before {
  content: "?";
}

/* Login icon */
.moit-top-bar__utilities a[href*="login"]::before {
  content: "🔒";
}

/* Search icon */
.moit-top-bar__utilities a[href*="search"]::before {
  content: "🔍";
}

/* =====================================
   Breaking News – Clean Base Layout
   ===================================== */

.moit-ticker {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  line-height: 1.4;
  max-width: 600px;
}


.moit-ticker__track .block.card {
  background: transparent;
  border: 0;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
}


/*------------------------------------------*/
/* ===============================
   Top Bar – Breaking News Block
   =============================== */

.moit-top-bar__left {
  flex: 1;
  min-width: 0;
  padding-inline-end: 28px;
  position: relative;
}

/* فاصل واضح */
.moit-top-bar__left::after {
  content: "";
  position: absolute;
  top: 50%;
  inset-inline-end: 0;
  transform: translateY(-50%);
  width: 1px;
  height: 26px;
  background: linear-gradient(
    to bottom,
    transparent,
    #cbd5e1,
    transparent
  );
}

.moit-ticker {
  background: #ffffff;
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  box-shadow:
    0 4px 10px rgba(0,0,0,0.06),
    inset 0 1px 0 rgba(255,255,255,0.8);
}





/* ===============================
   Top Bar Utilities – Final Polish
   =============================== */

.moit-top-bar__utilities ul {
  gap: 20px;
}

.moit-top-bar__utilities a {
  font-weight: 500;
  opacity: 0.85;
  transition: all 0.25s ease;
}

.moit-top-bar__utilities a:hover {
  opacity: 1;
  transform: translateY(-1px);
}

/* توحيد شكل الدوائر */
.moit-top-bar__utilities a::before {
  background-color: rgba(15,42,68,0.08);
  transition: all 0.25s ease;
}

.moit-top-bar__utilities a:hover::before {
  background-color: rgba(15,42,68,0.15);
}



/* =========================================
   Header Campaign – Structural Control
   ========================================= */

.moit-header__campaign {
  height: 60px;          /* ارتفاع ثابت */
  max-height: 60px;
  overflow: hidden;      /* منع تمدد غير مرغوب */
  display: flex;
  align-items: center;   /* توسيط عمودي */
  
  margin-inline-start: 20px;
}

/* اجعل أي بلوك داخلها لا يكسر الارتفاع */
.moit-header__campaign .block {
  margin: 0;
  padding: 0;
}



/* =========================================
   Header Campaign – Flex Width Fix
   ========================================= */

/* اجعل منطقة الحملة تتمدد بجانب الشعار */
.moit-main-header__inner {
  display: flex;
  align-items: center;
}

/* الشعار يبقى بحجمه الطبيعي */
.moit-header__branding {
  flex: 0 0 auto;
}

/* الحملة تأخذ كل المساحة المتبقية */
.moit-header__campaign {
  flex: 1 1 auto;
  min-width: 0;
}

/* الصورة تملأ المنطقة بالكامل */
.moit-header__campaign img {
  width: 100%;
  height: 60px;
  object-fit: cover;
  display: block;
}



/* =========================================
   MOIT Header Campaign – Official Final
   Institutional • Balanced • Production Ready
   ========================================= */

/* ===== Container ===== */

.moit-campaign-flash {
  width: 100%;
  height: 60px;
  padding-inline: 24px;

  display: flex;
  align-items: center;
  gap: 36px;

  background: transparent;
  border-radius: 6px;
  position: relative;

  border: 2px solid rgba(139,107,46,0.35);
  overflow: hidden;
}

/* ===== Gold Border Glow (Only When Complete) ===== */

.moit-campaign-flash::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 14px;
  padding: 2px;

  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    rgba(212,175,55,0.8) 40deg,
    transparent 80deg
  );

  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);

  -webkit-mask-composite: xor;
  mask-composite: exclude;

  animation: rotateBorder 6s linear infinite;
  opacity: 0;
  transition: opacity .6s ease;

  pointer-events: none;
  z-index: 0;
}

@keyframes rotateBorder {
  to { transform: rotate(360deg); }
}

/* يظهر الإطار فقط عند اكتمال الدورة */
.moit-campaign-flash.is-complete::before {
  opacity: 1;
}

/* ===== Content Layer ===== */

.moit-campaign-flash > * {
  position: relative;
  z-index: 2;
}

/* ===== Header Column ===== */

.moit-campaign-flash__header {
  flex: 0 0 160px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Label */

.moit-campaign-flash__label {
  font-size: 11px;
  letter-spacing: 1px;
  color: #8B6B2E;
  position: relative;
}

/* Sparkle Effect */

.moit-campaign-flash__label::after {
  content: "✦";
  position: absolute;
  inset-inline-start: -14px;
  top: 0;
  font-size: 10px;
  color: #D4AF37;
  animation: sparkle 2.5s ease-in-out infinite;
}

@keyframes sparkle {
  0%   { opacity: 0; transform: scale(0.6); }
  50%  { opacity: 1; transform: scale(1.15); }
  100% { opacity: 0; transform: scale(0.6); }
}

/* Title */

.moit-campaign-flash__title {
  font-size: 16px;
  font-weight: 800;
  color: #0F766E;
}

/* ===== Cards Layout ===== */

.moit-campaign-flash__cards {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  align-items: center;
  width: 100%;
}

/* ===== Cards ===== */

.moit-campaign-flash__card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  padding: 8px 16px;
  border-radius: 20px;

  background: rgba(15,118,110,0.05);
  border: 1px solid rgba(15,118,110,0.25);

  font-size: 13px;
  text-align: center;
  white-space: nowrap;

  color: rgba(15,42,68,0.7);

  opacity: 0;
  transform: translateY(6px);
  transition: all 0.4s ease;
}

.moit-campaign-flash__card.is-visible {
  opacity: 1;
  transform: translateY(0);
  color: #0F2A44;
}

.moit-campaign-flash__card.is-highlight {
  border-color: #D4AF37;
  box-shadow: 0 0 14px rgba(212,175,55,0.45);
  color: #000;
}

/* ===== SVG Icons ===== */

.icon {
  width: 16px;
  height: 16px;
  fill: #0F766E;
  flex-shrink: 0;
}

/* ===== Progress Bar ===== */

.moit-campaign-progress {
  position: absolute;
  bottom: 0;
  inset-inline-start: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg,#8B6B2E,#D4AF37);
  transition: width linear;
}


.moit-campaign-link {
  display: block;
  text-decoration: none;
}

.moit-campaign-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.moit-campaign-link * {
  color: inherit;
}











/* =========================================
   Mobile Visual Refinement (Header Only)
   ========================================= */

@media (max-width: 768px) {

  /* تخفيف padding الهيدر */
  .moit-main-header__inner {
    padding: 12px 14px;
  }

  /* تحسين شكل زر القائمة */
  .moit-mobile-toggle {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 1px solid rgba(15,42,68,0.15);
    background-color: #ffffff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  }

  .moit-mobile-toggle:hover {
    background-color: #f5f7f9;
  }

  /* إعطاء تنفّس للحملة */
  .moit-header__campaign {
    margin-top: 10px;
    margin-inline-start: 0;
  }

  /* تكييف الفلاش مع الموبايل */
  .moit-campaign-flash {
    height: auto;
    min-height: 58px;
    padding-inline: 16px;
    gap: 18px;
    border-radius: 12px;
  }

  /* تقليل عرض العمود الجانبي للفلاش */
  .moit-campaign-flash__header {
    flex: 0 0 130px;
  }

  /* تصغير العنوان قليلاً */
  .moit-campaign-flash__title {
    font-size: 14px;
  }

  /* بطاقات الفلاش أقل ازدحام */
  .moit-campaign-flash__cards {
    gap: 10px;
    grid-template-columns: repeat(1, 1fr);
  }

  .moit-campaign-flash__card {
    font-size: 12px;
    padding: 6px 12px;
  }

}


/* Fix ticker width on mobile */
@media (max-width: 768px) {

  .moit-ticker {
    max-width: 100%;
    width: 100%;
  }

  .moit-top-bar__inner {
    padding-inline: 12px;
  }

}

/* Allow campaign to expand on mobile */
@media (max-width: 768px) {

  .moit-header__campaign {
    height: auto;
    max-height: none;
    overflow: visible;
  }

}


/* =========================================
   🔴 Hide Campaign Flash on Mobile
   ========================================= */
@media (max-width: 768px) {
  .moit-header__campaign {
    display: none !important;
  }
}

