/* =====================================================================
   PHONE BOTTOM TAB BAR  (templates/website/includes/mobile_tabbar.html;
   index, Our homes, Services, Students, Birthday - below 900px only)
   Moved out of the <style> in that include. Linked from the <head> of
   base.html (after the page CSS), not from the include itself: page_router.js
   re-inserts the tab bar markup on every menu click.
   ===================================================================== */

.m-tabbar{display:none}
@media (max-width:899px){
  /* room under the footer so the fixed bar never covers the last content.
     :has(.m-tabbar) = only on pages that really show the tab bar; this file is
     linked on every page, and other pages must not get 100px of empty space. */
  body:has(.m-tabbar){padding-bottom:calc(100px + env(safe-area-inset-bottom,0px))}
  .m-tabbar{
    --ease:cubic-bezier(.34,1.56,.64,1);--blue:#1E5FD8;--blue-l:#3F86DA;
    position:fixed;left:10px;right:10px;bottom:calc(10px + env(safe-area-inset-bottom,0px));z-index:900;
    display:grid;grid-template-columns:repeat(5,1fr);align-items:end;
    padding:10px 6px 8px;border-radius:26px;
    background:rgba(255,255,255,.88);backdrop-filter:blur(18px) saturate(1.6);-webkit-backdrop-filter:blur(18px) saturate(1.6);
    border:1px solid rgba(203,214,230,.9);
    box-shadow:0 18px 40px -12px rgba(11,37,69,.35),0 4px 14px rgba(11,37,69,.08),inset 0 1px 0 rgba(255,255,255,.9);
    font-family:'Plus Jakarta Sans',system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;
    transition:transform .45s var(--ease),opacity .3s;
  }
  /* slides away while scrolling down, back on scroll up */
  html.m-tab-hide .m-tabbar{transform:translateY(calc(100% + 24px));opacity:0}

  /* spotlight lamp: glowing bar on the top edge + soft light cone onto the active icon */
  .m-tabbar .ind{position:absolute;top:-1px;left:calc(6px + (100% - 12px) / 5 * var(--i,2));width:calc((100% - 12px) / 5);height:52px;display:flex;justify-content:center;pointer-events:none;transition:left .55s var(--ease),opacity .3s}
  .m-tabbar .ind::before{content:"";position:absolute;top:0;width:30px;height:4px;border-radius:0 0 6px 6px;background:linear-gradient(90deg,var(--blue-l),var(--blue));box-shadow:0 0 12px 2px rgba(63,134,218,.65)}
  .m-tabbar .ind::after{content:"";position:absolute;top:3px;width:60px;height:46px;border-radius:0 0 22px 22px;background:linear-gradient(180deg,rgba(63,134,218,.22) 0%,rgba(63,134,218,.08) 55%,rgba(63,134,218,0) 100%);clip-path:polygon(28% 0,72% 0,100% 100%,0 100%)}
  .m-tabbar .ind.moving::before{animation:mtStretch .55s var(--ease)}
  .m-tabbar.no-ind .ind{opacity:0}

  .m-tabbar a{position:relative;z-index:1;display:flex;flex-direction:column;align-items:center;gap:4px;font-size:11px;font-weight:600;line-height:1.2;color:#8592A6;text-decoration:none;-webkit-tap-highlight-color:transparent;transition:color .3s}
  /* duotone icons: outline always, tinted fill fades in when active */
  .m-tabbar .i{fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;flex:none;fill-opacity:0;transition:fill-opacity .35s,transform .45s var(--ease)}
  .m-tabbar a:not(.mid) .i{width:26px;height:26px;margin-top:6px;stroke-width:1.8}
  .m-tabbar a:not(.mid):active .i{transform:scale(.82)}
  .m-tabbar a span.t{transition:transform .4s var(--ease),letter-spacing .3s}
  .m-tabbar a.on:not(.mid){color:var(--blue);font-weight:800}
  .m-tabbar a.on:not(.mid) .i{fill-opacity:.2;transform:translateY(-2px);animation:mtDraw .7s ease-out,mtPop .6s var(--ease)}
  .m-tabbar a.on:not(.mid) span.t{letter-spacing:.2px}

  /* centre Explore button: heartbeat icon + pulsing rings */
  .m-tabbar a.mid{color:#0B2545;font-weight:700}
  .m-tabbar .fab{position:relative;width:58px;height:58px;margin-top:-34px;border-radius:50%;background:linear-gradient(145deg,var(--blue-l) 0%,var(--blue) 100%);color:#fff;display:grid;place-items:center;border:4px solid #fff;box-shadow:0 10px 22px -4px rgba(30,95,216,.55),0 0 0 1px #E4EAF3;transition:transform .3s var(--ease)}
  .m-tabbar .fab::before,.m-tabbar .fab::after{content:"";position:absolute;inset:-4px;border-radius:50%;border:2px solid rgba(30,95,216,.45);animation:mtRing 2.4s ease-out infinite;pointer-events:none}
  .m-tabbar .fab::after{animation-delay:1.2s}
  .m-tabbar .fab .i{width:26px;height:26px;stroke-width:2.1;fill:rgba(255,255,255,.25);fill-opacity:1;animation:mtBeat 2.4s ease-in-out infinite}
  .m-tabbar a.mid:active .fab{transform:scale(.9) rotate(-6deg)}
  .m-tabbar a.mid.on .fab{box-shadow:0 0 0 5px rgba(63,134,218,.25),0 10px 22px -4px rgba(30,95,216,.55)}

  @keyframes mtDraw{0%{stroke-dasharray:1;stroke-dashoffset:1}100%{stroke-dasharray:1;stroke-dashoffset:0}}
  @keyframes mtPop{0%{transform:translateY(4px) scale(.75)}60%{transform:translateY(-4px) scale(1.1)}100%{transform:translateY(-2px)}}
  @keyframes mtStretch{0%{transform:scaleX(1)}35%{transform:scaleX(2.4)}100%{transform:scaleX(1)}}
  @keyframes mtBeat{0%,40%,100%{transform:scale(1)}10%,30%{transform:scale(1.18)}20%{transform:scale(.95)}}
  @keyframes mtRing{0%{transform:scale(1);opacity:.9}100%{transform:scale(1.55);opacity:0}}
}
@media (max-width:899px) and (prefers-reduced-motion:reduce){
  .m-tabbar,.m-tabbar *,.m-tabbar *::before,.m-tabbar *::after{animation:none!important;transition:none!important}
}
