/* ===== Rasid Mobile Final Fix ===== */
/* Desktop untouched. Verification file untouched. */

@media (max-width: 768px) {

  html,
  body {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden !important;
  }

  body {
    position: relative !important;
  }

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

  img,
  svg,
  video,
  iframe {
    max-width: 100% !important;
    height: auto !important;
  }

  body > header,
  body > main,
  body > footer,
  main,
  section {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    overflow-x: hidden !important;
    transform: none !important;
  }

  [class*="container"],
  [class*="wrap"],
  [class*="inner"],
  [class*="content"],
  [class*="section"],
  [class*="grid"],
  [class*="row"] {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
    transform: none !important;
  }

  /* ===== Header ===== */
  body > header {
    padding: 18px 14px !important;
    text-align: center !important;
  }

  body > header,
  body > header > *,
  body > header div {
    max-width: 100% !important;
  }

  body > header > div {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 14px !important;
  }

  body > header img {
    width: 72px !important;
    max-width: 72px !important;
    height: auto !important;
    object-fit: contain !important;
  }

  body > header nav,
  body > header ul {
    width: 100% !important;
    max-width: 360px !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px 16px !important;
    padding: 0 !important;
    margin: 0 auto !important;
    list-style: none !important;
    text-align: center !important;
  }

  body > header li {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body > header a {
    text-align: center !important;
    white-space: normal !important;
  }

  body > header a[href*="login"],
  body > header a[href*="register"],
  body > header a[href*="lang"],
  body > header a[href*="en"],
  body > header button {
    width: 100% !important;
    max-width: 150px !important;
    min-height: 40px !important;
    padding: 9px 12px !important;
    margin: 0 auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 24px !important;
    font-size: 14px !important;
    line-height: 1.25 !important;
  }

  /* ===== Hero / main content ===== */
  section {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  .hero,
  [class*="hero"] {
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    padding-top: 38px !important;
    padding-bottom: 34px !important;
    gap: 22px !important;
  }

  h1 {
    font-size: 31px !important;
    line-height: 1.45 !important;
    text-align: center !important;
    max-width: 100% !important;
  }

  h2 {
    font-size: 23px !important;
    line-height: 1.5 !important;
    text-align: center !important;
  }

  p,
  .lead {
    font-size: 16px !important;
    line-height: 1.9 !important;
    text-align: center !important;
    max-width: 100% !important;
  }

  [class*="grid"],
  [class*="cards"],
  [class*="features"],
  [class*="services"],
  [class*="packages"],
  [class*="plans"],
  [class*="pricing"] {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  [class*="card"],
  [class*="package"],
  [class*="plan"] {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* Forms without breaking login */
  form {
    width: 100% !important;
    max-width: 520px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  form input,
  form select,
  form textarea {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* ===== Floating WhatsApp / Telegram ===== */
  a[href*="wa.me"],
  a[href*="whatsapp"] {
    position: fixed !important;
    left: 14px !important;
    right: auto !important;
    bottom: 96px !important;
    width: 54px !important;
    height: 54px !important;
    z-index: 9999 !important;
    transform: none !important;
  }

  a[href*="t.me"],
  a[href*="telegram"] {
    position: fixed !important;
    left: 14px !important;
    right: auto !important;
    bottom: 30px !important;
    width: 54px !important;
    height: 54px !important;
    z-index: 9999 !important;
    transform: none !important;
  }

  a[href*="wa.me"] img,
  a[href*="whatsapp"] img,
  a[href*="t.me"] img,
  a[href*="telegram"] img {
    width: 54px !important;
    height: 54px !important;
    object-fit: contain !important;
  }

  /* ===== Footer ===== */
  body > footer {
    width: 100% !important;
    max-width: 100% !important;
    padding: 38px 16px 28px !important;
    text-align: center !important;
  }

  body > footer,
  body > footer *,
  body > footer div,
  body > footer p,
  body > footer a {
    max-width: 100% !important;
    white-space: normal !important;
    text-align: center !important;
  }

  body > footer > div,
  body > footer [class*="grid"],
  body > footer [class*="wrap"],
  body > footer [class*="inner"] {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 18px !important;
  }

  body > footer nav,
  body > footer ul,
  body > footer [class*="links"] {
    width: 100% !important;
    max-width: 360px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    padding: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  body > footer li {
    list-style: none !important;
  }

  .payments,
  .payment-logos,
  [class*="payment"],
  [class*="logos"] {
    width: 100% !important;
    max-width: 360px !important;
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .payments img,
  .payment-logos img,
  [class*="payment"] img,
  [class*="logos"] img {
    max-height: 30px !important;
    width: auto !important;
    object-fit: contain !important;
  }
}

@media (max-width: 420px) {
  body > header nav,
  body > header ul {
    grid-template-columns: 1fr 1fr !important;
  }

  h1 {
    font-size: 28px !important;
  }

  h2 {
    font-size: 21px !important;
  }

  section {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
}

/* ===== Header polish only - mobile ===== */
@media (max-width: 768px) {

  body > header {
    padding: 20px 14px 24px !important;
  }

  body > header > div {
    max-width: 390px !important;
    margin: 0 auto !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 18px !important;
    justify-items: center !important;
    text-align: center !important;
  }

  /* شعار واسم المنصة */
  body > header img {
    width: 74px !important;
    max-width: 74px !important;
    height: auto !important;
    margin: 0 auto 4px !important;
    display: block !important;
  }

  body > header h1,
  body > header h2,
  body > header h3,
  body > header .brand,
  body > header .logo,
  body > header [class*="brand"] {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* روابط: الخدمات / الباقات / النماذج / من نحن / تواصل معنا */
  body > header nav,
  body > header ul {
    width: 100% !important;
    max-width: 330px !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 14px 28px !important;
    justify-items: center !important;
    align-items: center !important;
    margin: 4px auto 0 !important;
    padding: 0 !important;
  }

  body > header nav a,
  body > header ul a {
    font-size: 17px !important;
    font-weight: 800 !important;
    line-height: 1.4 !important;
    text-align: center !important;
    padding: 0 !important;
    margin: 0 !important;
    white-space: nowrap !important;
  }

  /* خلي تواصل معنا بالوسط إذا جاء لحاله */
  body > header nav a:last-child:nth-child(odd),
  body > header ul li:last-child:nth-child(odd) {
    grid-column: 1 / -1 !important;
  }

  /* أزرار إنشاء حساب / تسجيل دخول / English */
  body > header a[href*="register"],
  body > header a[href*="login"],
  body > header a[href*="lang"],
  body > header a[href*="en"] {
    width: 108px !important;
    max-width: 108px !important;
    min-height: 38px !important;
    padding: 8px 10px !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    line-height: 1.15 !important;
  }
}

@media (max-width: 420px) {
  body > header nav,
  body > header ul {
    max-width: 300px !important;
    gap: 13px 24px !important;
  }

  body > header nav a,
  body > header ul a {
    font-size: 16px !important;
  }

  body > header a[href*="register"],
  body > header a[href*="login"],
  body > header a[href*="lang"],
  body > header a[href*="en"] {
    width: 100px !important;
    max-width: 100px !important;
    font-size: 12px !important;
  }
}


/* ===== Move Contact Us slightly up - mobile only ===== */
@media (max-width: 768px) {

  body > header nav a:last-child,
  body > header ul li:last-child {
    grid-column: 1 / -1 !important;
    justify-self: center !important;
    transform: translateY(-10px) !important;
    margin-top: -4px !important;
    margin-bottom: -10px !important;
  }

  body > header nav,
  body > header ul {
    row-gap: 10px !important;
  }

  body > header > div {
    gap: 12px !important;
  }
}


/* ===== Contact link higher center - mobile ===== */
@media (max-width: 768px) {

  body > header nav a:last-child,
  body > header ul li:last-child {
    grid-column: 1 / -1 !important;
    justify-self: center !important;
    transform: translateY(-24px) !important;
    margin-top: -14px !important;
    margin-bottom: -22px !important;
  }

  body > header nav,
  body > header ul {
    row-gap: 8px !important;
  }
}


/* ===== Header buttons polish - mobile ===== */
@media (max-width: 768px) {

  body > header a[href*="register"],
  body > header a[href*="login"],
  body > header a[href*="en"],
  body > header a[href*="lang"] {
    white-space: nowrap !important;
    line-height: 1 !important;
    height: 42px !important;
    min-height: 42px !important;
    padding: 0 14px !important;
    font-size: 13px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  body > header a[href*="register"],
  body > header a[href*="login"] {
    width: 124px !important;
    max-width: 124px !important;
  }

  body > header a[href*="en"],
  body > header a[href*="lang"] {
    width: 88px !important;
    max-width: 88px !important;
    font-size: 12px !important;
  }
}

@media (max-width: 420px) {

  body > header a[href*="register"],
  body > header a[href*="login"] {
    width: 118px !important;
    max-width: 118px !important;
    font-size: 12.5px !important;
  }

  body > header a[href*="en"],
  body > header a[href*="lang"] {
    width: 82px !important;
    max-width: 82px !important;
    font-size: 11.5px !important;
  }
}


/* ===== Equal header buttons - mobile ===== */
@media (max-width: 768px) {

  body > header a[href*="register"],
  body > header a[href*="login"],
  body > header a[href*="en"],
  body > header a[href*="lang"] {
    width: 112px !important;
    max-width: 112px !important;
    min-width: 112px !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 8px !important;
    font-size: 12.5px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
  }

  body > header > div {
    justify-items: center !important;
    align-items: center !important;
  }
}

@media (max-width: 420px) {

  body > header a[href*="register"],
  body > header a[href*="login"],
  body > header a[href*="en"],
  body > header a[href*="lang"] {
    width: 106px !important;
    max-width: 106px !important;
    min-width: 106px !important;
    font-size: 12px !important;
  }
}


/* ===== Equal header buttons - mobile ===== */
@media (max-width: 768px) {

  body > header a[href*="register"],
  body > header a[href*="login"],
  body > header a[href*="en"],
  body > header a[href*="lang"] {
    width: 112px !important;
    max-width: 112px !important;
    min-width: 112px !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 8px !important;
    font-size: 12.5px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
  }

  body > header > div {
    justify-items: center !important;
    align-items: center !important;
  }
}

@media (max-width: 420px) {

  body > header a[href*="register"],
  body > header a[href*="login"],
  body > header a[href*="en"],
  body > header a[href*="lang"] {
    width: 106px !important;
    max-width: 106px !important;
    min-width: 106px !important;
    font-size: 12px !important;
  }
}


/* ===== Header menu one-line polish - mobile ===== */
@media (max-width: 768px) {

  /* روابط القائمة: الخدمات / الباقات / النماذج / من نحن / تواصل معنا */
  body > header nav,
  body > header ul {
    width: 100% !important;
    max-width: 390px !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 18px !important;
    margin: 8px auto 10px !important;
    padding: 0 !important;
  }

  body > header nav a:not([href*="login"]):not([href*="register"]):not([href*="en"]):not([href*="lang"]),
  body > header ul a:not([href*="login"]):not([href*="register"]):not([href*="en"]):not([href*="lang"]) {
    font-size: 14px !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    padding: 0 !important;
    margin: 0 !important;
    transform: none !important;
  }

  /* إلغاء رفع تواصل معنا السابق عشان تدخل بنفس السطر */
  body > header nav a:last-child,
  body > header ul li:last-child {
    grid-column: auto !important;
    transform: none !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    justify-self: auto !important;
  }
}

@media (max-width: 420px) {
  body > header nav,
  body > header ul {
    max-width: 350px !important;
    gap: 13px !important;
  }

  body > header nav a:not([href*="login"]):not([href*="register"]):not([href*="en"]):not([href*="lang"]),
  body > header ul a:not([href*="login"]):not([href*="register"]):not([href*="en"]):not([href*="lang"]) {
    font-size: 13px !important;
  }
}

