/* Future Al-Mostaqbal Platform v4.3.0 — Clean Mobile Navigation System
   Single source of truth for the mobile drawer. No Control Schema mutation. */

html.fap-mobile-menu-open,
body.fap-mobile-menu-open{
  overflow:hidden;
  overscroll-behavior:none;
  touch-action:none;
}

body.fap-theme-chrome-enabled .fap-theme-burger span{
  transition:transform .22s ease, opacity .22s ease, background .22s ease;
}
body.fap-theme-chrome-enabled .fap-theme-burger.is-active span:nth-child(1){transform:translateY(7px) rotate(45deg);}
body.fap-theme-chrome-enabled .fap-theme-burger.is-active span:nth-child(2){opacity:0;}
body.fap-theme-chrome-enabled .fap-theme-burger.is-active span:nth-child(3){transform:translateY(-7px) rotate(-45deg);}

body.fap-theme-chrome-enabled .fap-theme-mobile[data-fap-theme-mobile-menu]{
  display:none;
}

@media (max-width:1180px){
  body.fap-theme-chrome-enabled .fap-theme-mobile[data-fap-theme-mobile-menu]{
    display:block;
    position:fixed;
    inset:0;
    width:100vw;
    height:100dvh;
    max-height:100dvh;
    z-index:2147483000;
    margin:0;
    padding:0;
    border:0;
    background:transparent;
    opacity:0;
    visibility:hidden;
    pointer-events:none;
    overflow:hidden;
    transform:none;
    transition:opacity .24s ease, visibility .24s ease;
  }

  body.fap-theme-chrome-enabled .fap-theme-mobile[data-fap-theme-mobile-menu].is-open{
    opacity:1;
    visibility:visible;
    pointer-events:auto;
  }

  body.fap-theme-chrome-enabled .fap-theme-mobile__backdrop{
    position:absolute;
    inset:0;
    display:block;
    background:rgba(7,29,49,.62);
    backdrop-filter:blur(12px);
    -webkit-backdrop-filter:blur(12px);
  }

  body.fap-theme-chrome-enabled .fap-theme-mobile__panel{
    position:absolute;
    inset-block:10px;
    inset-inline-end:10px;
    width:min(430px,calc(100vw - 20px));
    max-height:calc(100dvh - 20px);
    min-height:0;
    display:flex;
    flex-direction:column;
    overflow:hidden;
    direction:rtl;
    border:1px solid rgba(255,255,255,.72);
    border-radius:30px;
    background:
      radial-gradient(circle at 8% 0%,rgba(139,195,74,.20),transparent 34%),
      linear-gradient(180deg,rgba(255,255,255,.98),rgba(240,250,252,.99));
    box-shadow:0 34px 90px rgba(7,29,49,.34);
    transform:translateX(28px) scale(.985);
    opacity:.94;
    transition:transform .28s cubic-bezier(.2,.8,.2,1), opacity .22s ease;
    outline:none;
  }

  body.fap-theme-chrome-enabled .fap-theme-mobile.is-open .fap-theme-mobile__panel{
    transform:translateX(0) scale(1);
    opacity:1;
  }

  body.fap-theme-chrome-enabled .fap-theme-mobile__head{
    flex:0 0 auto;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:16px;
    border-bottom:1px solid rgba(27,67,109,.10);
    background:rgba(255,255,255,.86);
    backdrop-filter:blur(14px);
    -webkit-backdrop-filter:blur(14px);
  }

  body.fap-theme-chrome-enabled .fap-theme-mobile__brand{
    display:flex;
    align-items:center;
    gap:10px;
    min-width:0;
  }

  body.fap-theme-chrome-enabled .fap-theme-mobile__brand .custom-logo-link,
  body.fap-theme-chrome-enabled .fap-theme-mobile__brand .fap-theme-logo__icon,
  body.fap-theme-chrome-enabled .fap-theme-mobile__brand .fap-theme-logo__mark{
    width:56px;
    height:56px;
    flex:0 0 56px;
    display:grid;
    place-items:center;
    border:0;
    border-radius:18px;
    background:transparent;
    box-shadow:none;
    overflow:hidden;
  }

  body.fap-theme-chrome-enabled .fap-theme-mobile__brand .custom-logo-link img,
  body.fap-theme-chrome-enabled .fap-theme-mobile__brand .fap-theme-logo__icon img{
    width:100%;
    height:100%;
    object-fit:contain;
    background:transparent;
  }

  body.fap-theme-chrome-enabled .fap-theme-mobile__eyebrow{
    display:block;
    color:var(--fap-green,#51A348);
    font-size:13px;
    font-weight:900;
    line-height:1.25;
  }

  body.fap-theme-chrome-enabled .fap-theme-mobile__title{
    display:block;
    color:var(--fap-primary,#1B436D);
    font-size:20px;
    font-weight:900;
    line-height:1.25;
  }

  body.fap-theme-chrome-enabled .fap-theme-mobile__close{
    width:48px;
    height:48px;
    flex:0 0 48px;
    display:grid;
    place-items:center;
    border:0;
    border-radius:18px;
    background:linear-gradient(135deg,var(--fap-primary,#1B436D),#123b62);
    color:#fff;
    cursor:pointer;
    box-shadow:0 14px 34px rgba(27,67,109,.22);
    transition:transform .22s ease, box-shadow .22s ease, filter .22s ease;
  }

  body.fap-theme-chrome-enabled .fap-theme-mobile__close span{
    position:relative;
    display:block;
    width:22px;
    height:22px;
    font-size:0;
  }

  body.fap-theme-chrome-enabled .fap-theme-mobile__close span::before,
  body.fap-theme-chrome-enabled .fap-theme-mobile__close span::after{
    content:"";
    position:absolute;
    top:50%;
    left:50%;
    width:24px;
    height:3px;
    border-radius:999px;
    background:currentColor;
  }
  body.fap-theme-chrome-enabled .fap-theme-mobile__close span::before{transform:translate(-50%,-50%) rotate(45deg);}
  body.fap-theme-chrome-enabled .fap-theme-mobile__close span::after{transform:translate(-50%,-50%) rotate(-45deg);}

  body.fap-theme-chrome-enabled .fap-theme-mobile__close:hover,
  body.fap-theme-chrome-enabled .fap-theme-mobile__close:focus-visible{
    transform:translateY(-2px);
    box-shadow:0 18px 44px rgba(27,67,109,.30);
    outline:2px solid rgba(251,192,45,.42);
    outline-offset:2px;
  }

  body.fap-theme-chrome-enabled .fap-theme-mobile__quick{
    flex:0 0 auto;
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:10px;
    padding:14px 16px;
    border-bottom:1px solid rgba(27,67,109,.08);
  }

  body.fap-theme-chrome-enabled .fap-theme-mobile__quick a{
    min-height:48px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:7px;
    border-radius:999px;
    color:#fff;
    border:1px solid rgba(255,255,255,.22);
    text-decoration:none;
    font-size:13px;
    font-weight:900;
    line-height:1.2;
    box-shadow:0 14px 32px rgba(27,67,109,.12);
    transition:transform .22s ease, filter .22s ease;
  }
  body.fap-theme-chrome-enabled .fap-theme-mobile__quick a:hover,
  body.fap-theme-chrome-enabled .fap-theme-mobile__quick a:focus-visible{
    transform:translateY(-2px);
    filter:saturate(1.06);
  }
  body.fap-theme-chrome-enabled .fap-theme-mobile__quick-link.is-phone{background:linear-gradient(135deg,var(--fap-primary,#1B436D),#123b62);}
  body.fap-theme-chrome-enabled .fap-theme-mobile__quick-link.is-wa{background:linear-gradient(135deg,var(--fap-green,#51A348),var(--fap-green-2,#8BC34A));}
  body.fap-theme-chrome-enabled .fap-theme-mobile__social--facebook{background:linear-gradient(135deg,#1877f2,#0f5fc4);}
  body.fap-theme-chrome-enabled .fap-theme-mobile__social--facebook svg{width:18px;height:18px;fill:currentColor;}

  body.fap-theme-chrome-enabled .fap-theme-mobile__scroll{
    flex:1 1 auto;
    min-height:0;
    overflow-y:auto;
    overflow-x:hidden;
    -webkit-overflow-scrolling:touch;
    overscroll-behavior:contain;
    padding:14px 16px 22px;
    scrollbar-width:thin;
  }

  body.fap-theme-chrome-enabled .fap-theme-mobile__menu,
  body.fap-theme-chrome-enabled .fap-theme-mobile__menu ul{
    list-style:none;
    margin:0;
    padding:0;
  }

  body.fap-theme-chrome-enabled .fap-theme-mobile__menu{
    display:grid;
    gap:9px;
  }

  body.fap-theme-chrome-enabled .fap-theme-mobile__menu li{
    margin:0;
    padding:0;
  }

  body.fap-theme-chrome-enabled .fap-theme-mobile__menu > li > a{
    min-height:54px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    padding:14px 16px;
    border-radius:20px;
    background:#fff;
    color:var(--fap-primary,#1B436D);
    border:1px solid rgba(27,67,109,.12);
    box-shadow:0 10px 26px rgba(27,67,109,.055);
    font-size:16px;
    font-weight:900;
    line-height:1.35;
    text-decoration:none;
    transition:transform .22s ease, background .22s ease, color .22s ease, box-shadow .22s ease;
  }

  body.fap-theme-chrome-enabled .fap-theme-mobile__menu > li.current-menu-item > a,
  body.fap-theme-chrome-enabled .fap-theme-mobile__menu > li.current-menu-ancestor > a,
  body.fap-theme-chrome-enabled .fap-theme-mobile__menu > li > a:hover,
  body.fap-theme-chrome-enabled .fap-theme-mobile__menu > li > a:focus-visible{
    background:linear-gradient(135deg,var(--fap-primary,#1B436D),#123b62);
    color:#fff;
    transform:translateY(-1px);
    box-shadow:0 14px 36px rgba(27,67,109,.16);
  }

  body.fap-theme-chrome-enabled .fap-theme-mobile__menu > li.menu-item-has-children > a::after{
    content:"⌄";
    width:26px;
    height:26px;
    display:inline-grid;
    place-items:center;
    border-radius:999px;
    background:rgba(27,67,109,.08);
    color:inherit;
    font-size:16px;
    line-height:1;
  }

  body.fap-theme-chrome-enabled .fap-theme-mobile__menu .sub-menu{
    display:grid;
    gap:8px;
    margin:9px 12px 4px 0;
    padding:0 14px 0 0;
    border-inline-start:2px solid rgba(81,163,72,.22);
  }

  body.fap-theme-chrome-enabled .fap-theme-mobile__menu .sub-menu a{
    min-height:48px;
    display:flex;
    align-items:center;
    padding:12px 14px;
    border-radius:16px;
    background:rgba(255,255,255,.82);
    color:var(--fap-primary,#1B436D);
    border:1px solid rgba(27,67,109,.10);
    font-size:14px;
    font-weight:800;
    line-height:1.35;
    text-decoration:none;
    transition:transform .2s ease, background .2s ease;
  }
  body.fap-theme-chrome-enabled .fap-theme-mobile__menu .sub-menu a:hover,
  body.fap-theme-chrome-enabled .fap-theme-mobile__menu .sub-menu a:focus-visible{
    background:rgba(81,163,72,.12);
    transform:translateX(-2px);
  }

  body.fap-theme-chrome-enabled .fap-theme-mobile__footer{
    flex:0 0 auto;
    display:grid;
    gap:8px;
    padding:13px 16px max(16px,env(safe-area-inset-bottom));
    background:rgba(255,255,255,.90);
    border-top:1px solid rgba(27,67,109,.09);
  }
  body.fap-theme-chrome-enabled .fap-theme-mobile__footer a{
    min-height:48px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border-radius:18px;
    color:#fff;
    background:linear-gradient(135deg,var(--fap-orange,#F46830),var(--fap-yellow,#FBC02D));
    font-weight:900;
    text-decoration:none;
  }
  body.fap-theme-chrome-enabled .fap-theme-mobile__footer span{
    text-align:center;
    color:var(--fap-muted,#64748b);
    font-size:12px;
    font-weight:800;
  }
}

@media (max-width:480px){
  body.fap-theme-chrome-enabled .fap-theme-mobile__panel{
    inset:7px;
    width:auto;
    max-height:calc(100dvh - 14px);
    border-radius:26px;
  }
  body.fap-theme-chrome-enabled .fap-theme-mobile__quick{
    grid-template-columns:1fr;
    gap:8px;
  }
  body.fap-theme-chrome-enabled .fap-theme-mobile__quick a{
    min-height:48px;
    font-size:14px;
  }
  body.fap-theme-chrome-enabled .fap-theme-mobile__menu > li > a{
    min-height:52px;
    font-size:15px;
  }
}

@media (prefers-reduced-motion:reduce){
  body.fap-theme-chrome-enabled .fap-theme-mobile,
  body.fap-theme-chrome-enabled .fap-theme-mobile__panel,
  body.fap-theme-chrome-enabled .fap-theme-mobile__menu a,
  body.fap-theme-chrome-enabled .fap-theme-mobile__quick a{
    transition:none;
  }
}
