/* Final shared footer presentation used across every full site page. */
html body > footer.footer.mega-footer .footer-social-link { display:inline-grid !important; width:42px !important; height:42px !important; padding:0 !important; place-items:center; border-radius:50% !important; transition:transform .2s ease,box-shadow .2s ease; }
html body > footer.footer.mega-footer .footer-social-link:hover { transform:translateY(-3px); box-shadow:0 8px 18px rgba(0,0,0,.18); }
html body > footer.footer.mega-footer .footer-social-link svg { width:20px; height:20px; }
html body > footer.footer.mega-footer .footer-social-link--facebook { background:#1877f2 !important; color:#fff !important; }
html body > footer.footer.mega-footer .footer-social-link--instagram { background:linear-gradient(135deg,#833ab4,#fd1d1d,#fcb045) !important; color:#fff !important; }
html body > footer.footer.mega-footer .footer-social-link--linkedin { background:#0a66c2 !important; color:#fff !important; }
html body > footer.footer.mega-footer .footer-social-link--tiktok { background:#111 !important; color:#fff !important; }

html body > footer.footer.mega-footer {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: relative !important;
  isolation: isolate;
  z-index: 20 !important;
  width: 100% !important;
  height: auto !important;
  min-height: 380px;
  margin: 0 !important;
  padding: clamp(2.5rem, 5vw, 4.5rem) 0 2rem !important;
  overflow: visible !important;
  color: rgba(255, 255, 255, 0.88) !important;
  background:
    radial-gradient(circle at 12% 0%, rgba(65, 165, 165, 0.26), transparent 28rem),
    radial-gradient(circle at 88% 100%, rgba(242, 115, 87, 0.2), transparent 28rem),
    #071a1a !important;
  border-top: 1px solid rgba(250, 186, 61, 0.3) !important;
}

html body > footer.footer.mega-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(250, 186, 61, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(250, 186, 61, 0.045) 1px, transparent 1px);
  background-size: 84px 84px;
}

html body > footer.footer.mega-footer > .container {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: relative !important;
  z-index: 1 !important;
  width: min(1180px, calc(100% - 2rem)) !important;
  margin: 0 auto !important;
}

/* Mega Footer Layout */
html body > footer.footer.mega-footer .footer-shell {
  width: 100% !important;
  margin: 0 !important;
  padding: clamp(2rem, 5vw, 3.5rem) !important;
  color: rgba(255, 255, 255, 0.88) !important;
  background: linear-gradient(145deg, rgba(13, 42, 42, 0.98), rgba(6, 24, 24, 0.98)) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 24px !important;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.34) !important;
}

html body > footer.footer.mega-footer .footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 2.5rem 1.5rem;
  margin-bottom: 2rem;
}

html body > footer.footer.mega-footer .footer-col {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

html body > footer.footer.mega-footer .footer-heading {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
  position: relative;
  padding-bottom: 0.5rem;
}

html body > footer.footer.mega-footer .footer-heading::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 40px;
  height: 2px;
  background: #faba3d;
  border-radius: 2px;
}

html[dir="ltr"] body > footer.footer.mega-footer .footer-heading::after {
  right: auto;
  left: 0;
}

html body > footer.footer.mega-footer .footer-links-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

html body > footer.footer.mega-footer .footer-links-list a {
  color: rgba(255, 255, 255, 0.76);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s ease, padding-right 0.2s ease;
}

html body > footer.footer.mega-footer .footer-links-list a:hover {
  color: #faba3d;
  padding-right: 6px;
}

html body > footer.footer.mega-footer .footer-contact-info p {
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

html body > footer.footer.mega-footer .footer-bottom-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
  text-align: center;
}

@media (max-width: 991px) {
  html body > footer.footer.mega-footer .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* على شاشات أضيق من 600px → عمود واحد */
@media (max-width: 600px) {
  html body > footer.footer.mega-footer .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
}

@media (max-width: 700px) {
  html body > footer.footer.mega-footer {
    padding-bottom: 6.5rem !important;
  }

  html body > footer.footer.mega-footer .footer-shell {
    padding: 1.5rem !important;
    border-radius: 16px !important;
  }

  html body > footer.footer.mega-footer .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
}

/* أصغر من 400px → ضغط إضافي */
@media (max-width: 400px) {
  html body > footer.footer.mega-footer .footer-shell {
    padding: 1.25rem !important;
    border-radius: 12px !important;
  }

  html body > footer.footer.mega-footer .footer-heading {
    font-size: 1rem;
  }
}

html body > footer.footer.mega-footer .footer-social-link--snapchat { background:#fffc00 !important; color:#000 !important; }

/* Payment brands displayed in the shared footer. */
html body > footer.footer.mega-footer .footer-payment-strip {
  display:flex !important;
  align-items:center;
  justify-content:center;
  gap:18px;
  margin:22px auto 18px;
  padding:13px 20px;
  max-width:520px;
  border:1px solid rgba(255,255,255,.2);
  border-radius:14px;
  background:rgba(255,255,255,.08);
}

/* Final footer payment placement: same line as copyright, physical left. */
html body > footer.footer.mega-footer .footer-bottom-bar .footer-payment-strip { display:flex !important; flex-direction:row !important; position:absolute !important; left:0 !important; top:50% !important; transform:translateY(-50%) !important; margin:0 !important; padding:0 !important; max-width:none !important; border:0 !important; background:transparent !important; box-shadow:none !important; }
html body > footer.footer.mega-footer .footer-bottom-bar .footer-payment-label { display:none !important; }
html body > footer.footer.mega-footer .footer-bottom-bar .footer-payment-logos { width:auto !important; display:flex !important; gap:9px !important; }
html body > footer.footer.mega-footer .footer-bottom-bar .footer-payment-logos img { height:30px !important; max-width:76px !important; padding:4px 6px !important; }
html body > footer.footer.mega-footer .footer-bottom-bar .footer-payment-logos img:nth-child(3),
html body > footer.footer.mega-footer .footer-bottom-bar .footer-payment-logos img:nth-child(4) { height:36px !important; max-width:88px !important; padding:3px 6px !important; }
@media (max-width:560px) {
  html body > footer.footer.mega-footer .footer-bottom-bar .footer-payment-strip { position:static !important; transform:none !important; width:100% !important; justify-content:flex-start !important; }
}
html body > footer.footer.mega-footer .footer-payment-label {
  color:rgba(255,255,255,.82);
  font-size:.78rem;
  font-weight:700;
  white-space:nowrap;
}
html body > footer.footer.mega-footer .footer-payment-logos {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:13px;
}
html body > footer.footer.mega-footer .footer-payment-logos img {
  width:auto;
  height:28px;
  max-width:88px;
  object-fit:contain;
  display:block;
  background:#fff;
  border-radius:4px;
  padding:3px 5px;
}
html body > footer.footer.mega-footer .footer-payment-logos img:first-child { width:78px; }
html body > footer.footer.mega-footer .footer-payment-logos img:nth-child(2) { width:88px; }
html body > footer.footer.mega-footer .footer-payment-logos img:nth-child(3) { width:62px; }
html body > footer.footer.mega-footer .footer-payment-logos img:nth-child(4) { width:58px; }
@media (max-width:560px) {
  html body > footer.footer.mega-footer .footer-payment-strip { flex-direction:column; gap:9px; padding:12px 10px; }
  html body > footer.footer.mega-footer .footer-payment-logos { gap:7px; }
  html body > footer.footer.mega-footer .footer-payment-logos img { height:25px; }
  html body > footer.footer.mega-footer .footer-payment-logos img:first-child { width:68px; }
  html body > footer.footer.mega-footer .footer-payment-logos img:nth-child(2) { width:78px; }
}

/* Final placement override: payment brands share the copyright line. */
html body > footer.footer.mega-footer .footer-bottom-bar .footer-payment-strip { flex-direction:row; margin:0; padding:0; max-width:none; border:0; background:transparent; box-shadow:none; }
html body > footer.footer.mega-footer .footer-bottom-bar .footer-payment-label { display:none; }
html body > footer.footer.mega-footer .footer-bottom-bar .footer-payment-logos { width:auto; }
@media (max-width:560px) {
  html body > footer.footer.mega-footer .footer-bottom-bar .footer-payment-strip { width:100%; padding:0; }
}

/* Keep payment brands on the same footer-bottom line, at the physical left. */
html body > footer.footer.mega-footer .footer-bottom-bar { justify-content:space-between; gap:20px; }
html body > footer.footer.mega-footer .footer-bottom-bar { position:relative; }
html body > footer.footer.mega-footer .footer-bottom-bar .footer-payment-strip { display:flex; flex-direction:row; gap:9px; margin:0 0 0 auto; padding:0; max-width:none; border:0; background:transparent; box-shadow:none; }
html body > footer.footer.mega-footer .footer-bottom-bar .footer-payment-strip { position:absolute; left:0; top:50%; transform:translateY(-50%); }
html body > footer.footer.mega-footer .footer-bottom-bar .footer-payment-label { display:none; }
html body > footer.footer.mega-footer .footer-bottom-bar .footer-payment-logos { width:auto; gap:7px; }
html body > footer.footer.mega-footer .footer-bottom-bar .footer-payment-logos img,
html body > footer.footer.mega-footer .footer-bottom-bar .footer-payment-logos img:first-child,
html body > footer.footer.mega-footer .footer-bottom-bar .footer-payment-logos img:nth-child(2),
html body > footer.footer.mega-footer .footer-bottom-bar .footer-payment-logos img:nth-child(3),
html body > footer.footer.mega-footer .footer-bottom-bar .footer-payment-logos img:nth-child(4) { flex:0 0 auto; width:auto !important; height:24px; max-width:60px; padding:3px 5px; border-radius:5px; }
@media (max-width:560px) {
  html body > footer.footer.mega-footer .footer-bottom-bar { flex-wrap:wrap; justify-content:center; }
  html body > footer.footer.mega-footer .footer-bottom-bar .footer-payment-strip { position:static; transform:none; margin:0; order:2; width:100%; justify-content:flex-start; }
}

/* Refined footer payment presentation */
html body > footer.footer.mega-footer .footer-payment-strip { flex-direction:column; gap:11px; max-width:480px; padding:16px 20px; background:rgba(255,255,255,.055); box-shadow:0 10px 26px rgba(0,0,0,.12); }
html body > footer.footer.mega-footer .footer-payment-label { font-size:.8rem; letter-spacing:.01em; }
html body > footer.footer.mega-footer .footer-payment-logos { gap:10px; width:100%; }
html body > footer.footer.mega-footer .footer-payment-logos img,
html body > footer.footer.mega-footer .footer-payment-logos img:first-child,
html body > footer.footer.mega-footer .footer-payment-logos img:nth-child(2),
html body > footer.footer.mega-footer .footer-payment-logos img:nth-child(3),
html body > footer.footer.mega-footer .footer-payment-logos img:nth-child(4) { flex:1 1 0; width:auto !important; min-width:0; max-width:88px; height:38px; padding:7px 10px; border:1px solid rgba(15,23,42,.08); border-radius:8px; box-shadow:0 3px 9px rgba(0,0,0,.12); }
@media (max-width:560px) {
  html body > footer.footer.mega-footer .footer-payment-strip { padding:14px 12px; }
  html body > footer.footer.mega-footer .footer-payment-logos img,
  html body > footer.footer.mega-footer .footer-payment-logos img:first-child,
  html body > footer.footer.mega-footer .footer-payment-logos img:nth-child(2),
  html body > footer.footer.mega-footer .footer-payment-logos img:nth-child(3),
  html body > footer.footer.mega-footer .footer-payment-logos img:nth-child(4) { height:34px; padding:6px 7px; }
}


/* ENHANCED FOOTER SOCIAL ICONS STYLING */
.social-row, .footer-social-links {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 12px !important;
    flex-wrap: wrap !important;
    margin-top: 16px !important;
}

.footer-social-link {
    display: inline-flex !important;
    width: 44px !important;
    height: 44px !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
    text-decoration: none !important;
    position: relative !important;
}

.footer-social-link:hover {
    transform: translateY(-4px) scale(1.08) !important;
    box-shadow: 0 8px 20px rgba(0,0,0,0.25) !important;
}

.footer-social-link svg {
    width: 20px !important;
    height: 20px !important;
    fill: currentColor !important;
}

.footer-social-link--linkedin { background: #0a66c2 !important; color: #ffffff !important; }
.footer-social-link--instagram { background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045) !important; color: #ffffff !important; }
.footer-social-link--facebook { background: #1877f2 !important; color: #ffffff !important; }
.footer-social-link--tiktok { background: #000000 !important; color: #ffffff !important; border: 1px solid rgba(255,255,255,0.2) !important; }
.footer-social-link--snapchat { background: #fffc00 !important; color: #000000 !important; }
.footer-social-link--x { background: #000000 !important; color: #ffffff !important; border: 1px solid rgba(255,255,255,0.2) !important; }
.footer-social-link--youtube { background: #ff0000 !important; color: #ffffff !important; }

/* SLOGAN VISIBILITY OVERRIDE */
.site-header.premium-header .logo-slogan,
.premium-header .logo-slogan,
.logo-slogan {
    display: block !important;
    font-size: 11px !important;
    color: #7c9494 !important;
    font-weight: 500 !important;
    white-space: normal !important;
    margin-top: 2px !important;
}

.footer-slogan {
    display: block !important;
    font-weight: 700 !important;
    color: #faba3d !important;
    margin: 0.35rem 0 0.55rem !important;
}


/* ==========================================================================
   GLOBAL MOBILE HERO TEXT REDUCTION (ALL PAGES)
   ========================================================================== */
@media (max-width: 991px) {
  body .hero h1,
  body .hero-copy h1,
  body .page-hero-copy h1,
  body .hero-showcase .hero-copy h1,
  body .hero-homepage .hero-copy h1,
  body .course-header h1,
  body .post-header h1,
  body .page-header h1,
  body .hero-content h1,
  body .section-hero h1,
  body h1.hero-title,
  body h1.page-title {
    font-size: clamp(1.6rem, 7vw, 2.2rem) !important;
    line-height: 1.25 !important;
    margin-bottom: 0.75rem !important;
    max-width: 100% !important;
  }
  
  body .hero p,
  body .hero-copy p,
  body .page-hero-copy p,
  body .hero-showcase .hero-copy p,
  body .hero-homepage .hero-copy p,
  body .page-header p,
  body .hero-content p,
  body .section-hero p,
  body p.hero-subtitle {
    font-size: clamp(0.9rem, 4.5vw, 1.1rem) !important;
    line-height: 1.5 !important;
    margin-bottom: 1rem !important;
    max-width: 100% !important;
  }
}



/* ==========================================================================
   CENTERED MOBILE HEADER SLOGAN - V4 (ABSOLUTE CENTERING)
   ========================================================================== */
@media (max-width: 991px) {
  /* 1. Ensure header-shell is the relative parent */
  body .site-header .header-shell,
  body .site-header.premium-header .header-shell {
    position: relative !important;
  }
  
  /* 2. Remove any relative positioning from brand link and its wrappers */
  body .site-header .brand,
  body .site-header.premium-header .brand,
  html[dir="rtl"] body .site-header.premium-header .brand,
  body a.brand,
  body a.brand-saas {
    position: static !important;
  }

  /* 3. Absolute position the slogan in the exact center of header-shell */
  body .site-header .brand .logo-slogan,
  body .site-header.premium-header .brand .logo-slogan,
  body .site-header.premium-header .brand-saas .logo-slogan,
  body a.brand span.logo-slogan,
  html[dir="rtl"] body .site-header.premium-header a.brand span.logo-slogan,
  html[dir="rtl"] body .site-header a.brand span.logo-slogan {

    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    
    /* 4. Formatting */
    width: 125px !important;
    max-width: 130px !important;
    text-align: center !important;
    white-space: normal !important;
    line-height: 1.3 !important;
    font-size: 8.5px !important;
    font-weight: 600 !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    color: var(--color-text-muted, rgba(255, 255, 255, 0.7)) !important;
    direction: rtl !important;
  }
}


/* ==========================================================================
   MOBILE MENU CONTAINER OVERFLOW FIX - V7 (ALLOW FULL TEXT)
   ========================================================================== */
@media (max-width: 991px) {
  /* Remove overflow-x: hidden from parent containers that clip the text */
  body .premium-header .site-nav.site-nav-saas .drawer-content,
  body .premium-header .site-nav.site-nav-saas .navigation-container,
  body .site-nav .drawer-content,
  body .site-nav .navigation-container {
    overflow-x: visible !important;
    overflow: visible !important;
  }

  /* nav-panel must allow overflow too */
  body .premium-header .site-nav.site-nav-saas .nav-panel {
    overflow-x: visible !important;
  }

  /* nav-list items should not clip */  
  body .premium-header .site-nav.site-nav-saas .nav-list,
  body .nav-list {
    overflow: visible !important;
  }

  /* nav-item-dropdown should not clip */
  body .nav-item-dropdown,
  body .premium-header .nav-item-dropdown {
    overflow: visible !important;
  }

  /* open dropdown menu must show all content */
  body .premium-header .site-nav.site-nav-saas .nav-item-dropdown.open .nav-dropdown-menu,
  body .nav-item-dropdown.open .nav-dropdown-menu {
    overflow: visible !important;
    max-height: 2500px !important;
  }

  /* Force dropdown links to wrap text */
  body .nav-dropdown-link,
  body .premium-header .nav-dropdown-link,
  body .site-nav .nav-dropdown-link {
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    text-overflow: unset !important;
    overflow: visible !important;
    display: block !important;
    height: auto !important;
    line-height: 1.5 !important;
  }
}



/* ==========================================================================
   MOBILE MENU DROPDOWN FIX - V8 (ACCORDION STYLE FOR MOBILE)
   ========================================================================== */
@media (max-width: 991px) {
  body .premium-header .nav-dropdown-menu,
  body .site-header .nav-dropdown-menu,
  body .site-nav-saas .nav-dropdown-menu,
  body .site-header.premium-header .nav-dropdown-menu {
    position: static !important;
    transform: none !important;
    inset-inline-start: 0 !important;
    left: 0 !important;
    right: auto !important;
    margin-top: 0.5rem !important;
    min-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
}

/* Final footer payment placement: same line as copyright, physical left. */
html body > footer.footer.mega-footer .footer-bottom-bar .footer-payment-strip { display:flex; flex-direction:row; position:absolute; left:0; top:50%; transform:translateY(-50%); margin:0; padding:0; max-width:none; border:0; background:transparent; box-shadow:none; }
html body > footer.footer.mega-footer .footer-bottom-bar .footer-payment-label { display:none; }
html body > footer.footer.mega-footer .footer-bottom-bar .footer-payment-logos { width:auto; display:flex; gap:7px; }
@media (max-width:560px) {
  html body > footer.footer.mega-footer .footer-bottom-bar .footer-payment-strip { position:static; transform:none; width:100%; justify-content:flex-start; }
}

/* WordPress theme: the payment strip can hold more logos (e.g. Tamara) — wrap them on small screens
   so the footer keeps its original width. */
@media (max-width: 700px) {
  html body > footer.footer.mega-footer .footer-shell { grid-template-columns: minmax(0, 1fr); }
  html body > footer.footer.mega-footer .footer-bottom-bar .footer-payment-logos { flex-wrap: wrap !important; justify-content: center; row-gap: 7px !important; }
}
