/* Fixes on top of the Val-Ed Initiatives design (site.css is copied unchanged by `npm run sync-design`,
   so fixes live here; src/pages/_design.ts adds this file to every page). */

/* Mobile menu.
   1. The design centred the list with flex `justify-content:center`, which pushed "Home" and "Our Story"
      above the top edge when the menu was taller than the screen.
   2. iPhone Safari would not scroll a flex scroll container laid out like this: swipes scrolled the page
      behind the menu instead, so links below the screen could not be reached.
   So the menu is a plain block scroller; the list fills at least the menu's height and centres its items
   inside itself, which keeps the centred look when it fits and scrolls normally when it does not. */
.menu {
  display: block;
  padding-top: 64px;
  padding-bottom: 64px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}
.menu > ul {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
/* Keep the close (✕) button on screen while the menu scrolls. */
.menu .close { position: fixed; z-index: 2; }
/* While the menu is open, the page behind it does not scroll, and the chatbot (which sits above
   everything) is hidden so it does not cover menu links. */
html:has(.menu.open), html:has(.menu.open) body { overflow: hidden; }
html:has(.menu.open) #ve-avatar-btn, html:has(.menu.open) #ve-label { display: none !important; }

/* Footer call-to-action button: on the Partners page its long label ("Take the first step towards
   transformation") could not wrap and made the page wider than a phone screen. */
.cta .btn { white-space: normal; max-width: 100%; text-align: center; }

/* Left side tab (Our Offerings / Impact Stories / Contact Us): the vertical labels could wrap onto two
   columns on phones (seen in iPhone browsers), so "IMPACT STORIES" and "CONTACT US" looked misaligned.
   Keep each label on one line, and line them up on the tab's centre. */
.sidetab { align-items: center; }
.sidetab a { white-space: nowrap; line-height: 1; }

/* Link arrows: the "↗" character is replaced with an SVG icon (src/pages/_design.ts). */
.vi-arrow {
  display: inline-block;
  width: 0.95em;
  height: 0.95em;
  flex-shrink: 0;
  vertical-align: -0.12em;
  transition: transform 0.2s ease;
}
a:hover .vi-arrow, button:hover .vi-arrow { transform: translate(2px, -2px); }

/* Chat: keep the parent site's AI chatbot ("Val-Ed Assistant", #ve-avatar-btn, added by the Wix site
   script from valedindia.com's custom code). The design's own WhatsApp bubble (a.chat) sat in the
   same corner, so it is hidden whenever the chatbot is on the page, and still shows if it fails to load. */
html:has(#ve-avatar-btn) a.chat { display: none !important; }
