/* ═══════════════════════════════════════════════════════
   WordPress adapter — makes block markup render exactly
   like the original hand-written HTML.
   ═══════════════════════════════════════════════════════ */

/* Transparent wrappers: a paragraph that only holds a button/link,
   and the <figure> around converted images, act as if they weren't there. */
p.a2-contents,
figure.wp-block-image.a2-img { display: contents; }

/* Elements that were <div>/<span>/… in the original and are now paragraphs.
   Zero-specificity so the original class rules still win. */
:where(.a2-page, .a2-footer-part) p:where(.a2-div, .a2-address, .a2-blockquote, .a2-figcaption, .a2-li) { max-width: none; }
:where(.a2-page, .a2-footer-part) p:where(.a2-span, .a2-strong, .a2-em, .a2-small, .a2-time, .a2-cite, .a2-b, .a2-i) { display: inline; max-width: none; }
:where(.a2-page, .a2-footer-part) p.a2-strong { font-weight: 700; }
:where(.a2-page, .a2-footer-part) p.a2-em,
:where(.a2-page, .a2-footer-part) p.a2-i { font-style: italic; }

/* Lists keep their original look (the theme reset removes bullets only on role=list). */
.footer__links.wp-block-list,
.hero__creds-list.wp-block-list { list-style: none; }

/* Template-part / post-content wrappers add no box of their own. */
.a2-header-part, .a2-footer-part, .a2-main, .a2-content { display: contents; }
.wp-site-blocks { padding: 0; }

/* ── Header: core Navigation block styled as the original nav ── */
.nav .nav__logo { margin: 0; }
.nav .nav__logo a, .nav .nav__logo img { display: block; }
.nav .nav__logo img { height: 52px; width: auto !important; max-width: 200px; object-fit: contain; object-position: left center; }
.nav .wp-block-navigation.nav__links { margin: 0; }
.nav .nav__links .wp-block-navigation__container { margin: 0; }
.nav .nav__links .wp-block-navigation-item { flex-shrink: 0; white-space: nowrap; }
.nav .nav__links .wp-block-navigation__container { gap: var(--space-8); }
.nav .nav__links .wp-block-navigation-item__content { padding: 0; }
.nav .nav__links a,
.nav .nav__links .wp-block-navigation-item__content {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
}
.nav .nav__links a:hover { color: var(--gold); }
@media (max-width: 768px) {
  .nav .wp-block-navigation.nav__links { display: none; }
  .nav.nav--open .wp-block-navigation.nav__links { display: flex; margin: 0; }
  .nav.nav--open .nav__links .wp-block-navigation__container { flex-direction: column; align-items: center; gap: var(--space-10); }
  .nav.nav--open .nav__links a { font-size: var(--text-lg); }
}

/* Footer logo uses the Site Logo block. */
.a2-footer-logo { margin: 0 0 var(--space-6); }
.a2-footer-logo img { width: 140px; height: auto; }

/* Admin bar offset for the fixed nav when logged in. */
.admin-bar .nav { top: 32px; }
@media (max-width: 782px) { .admin-bar .nav { top: 46px; } }

/* Blog / plain pages (not part of the original design) */
.a2-blog { display: block; padding: calc(var(--space-20) + 60px) 0 var(--space-20); }
.a2-blog .container > * + * { margin-top: var(--space-5); }
.a2-blog .wp-block-post-title { font-size: var(--text-2xl); }
.a2-prose p, .a2-prose ul, .a2-prose ol { margin-bottom: 1em; }

/* The original Contact page loaded only the base styles; keep its compact hero. */
:where(.a2-page-contact) .page-hero { min-height: 0; }

/* Brand fonts (style guide): Gotham Light body copy. */
body { font-weight: 300; }

/* Style guide: no gold. Icons are recolored to the context accent (navy on light, white on dark). */
img[src*="B-Corp_B"], img[src*="B%20Corp_B"], img[src*="Commission_dollarSign"], img[src*="Forbes_stars"],
img[src*="Partnership_handshake"], img[src*="Resources_"], img[src*="Virtuoso"], img[src*="community"],
img[src*="legacy"], img[src*="technology"], img[src*="/A2."] { filter: var(--a2-icon-filter); }
/* Text sitting on photos or video (heroes, transparent header) uses the on-dark accent. */
.nav, .hero, .page-hero, .apply-hero, .cta-final {
  --gold: #fff; --gold-light: rgba(255,255,255,0.85); --gold-dark: rgba(255,255,255,0.75); --on-gold: var(--navy);
  --color-accent: var(--gold); --color-accent-hover: var(--gold-dark); --a2-icon-filter: var(--a2-icon-white);
}

/* Jump links (e.g. footer "As Seen In" → About page) stop below the fixed header. */
[id] { scroll-margin-top: 110px; }

/* Press cards (About → As Seen In): quote sits right under the headline, date pinned to the bottom,
   so cards with short headlines (e.g. TravelPulse) don't open a gap above the quote. */
.press-card .press-card__headline { flex: 0 0 auto; }
.press-card .press-card__date { margin-top: auto; }

/* Apply page: embedded Microsoft Form (responses go to the team's Microsoft List via Power Automate).
   Fixed height so the whole form shows without an inner scrollbar; raise it if questions are added. */
.apply-msform { background: #fff; }
.apply-msform iframe { display: block; width: 100%; height: 2520px; border: 0; }
@media (max-width: 600px) {
  .apply-form-card:has(.apply-msform) { padding: 0; border: 0; background: transparent; box-shadow: none; }
  .apply-msform iframe { height: 2620px; }
}

/* ── Mobile fixes (v1.5.0) ─────────────────────────────────────────── */
/* Mobile menu: the scrolled nav's backdrop-filter made the full-screen menu stay nav-height.
   Drop the filter while the menu is open so the overlay covers the whole screen. */
.nav.nav--open { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--navy); }
.nav.nav--open::before { opacity: 0; }
.nav .nav__logo, .nav .nav__hamburger { position: relative; z-index: 100; }

/* Reduce Motion: stop looping animations instead of running them near-instantly. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-iteration-count: 1 !important; }
}

/* Photo/logo strips on phones and with Reduce Motion: swipeable; pages.js scrolls them gently. */
.a2-swipe { overflow-x: auto !important; overscroll-behavior-x: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.a2-swipe::-webkit-scrollbar { display: none; }
.a2-swipe :is(.adv-marquee-track, .comm-marquee-track, .marquee-track) { animation: none !important; transform: none !important; }

/* Credentials bar on phones: show all four in a 2×2 grid instead of a cut-off row. */
@media (max-width: 768px) {
  .hero__creds-list { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3) var(--space-4); padding: var(--space-4) 0; justify-items: start; }
  .hero__creds-list li, .hero__creds-list li:nth-child(n+3) { display: flex; white-space: normal; font-size: 11px; line-height: 1.35; letter-spacing: 0.06em; }
  .hero__creds-list li img { flex-shrink: 0; }
}

/* Travel for Better: text first, photos after, on phones too. */
.tfb-grid .tfb-image { order: 0; }

/* About › Our Story: keep the desk photo cropped the same on every screen (hides the banner). */
.story-grid .story-grid__item--family { height: auto; aspect-ratio: 9 / 5; }

/* Hero video: when an iPhone blocks autoplay (Low Power Mode), show the still image, not a play button. */
.hero__video::-webkit-media-controls-start-playback-button,
.hero__video::-webkit-media-controls-overlay-play-button,
.hero__video::-webkit-media-controls { display: none !important; -webkit-appearance: none; }

/* Why A2 › Our Community: the "Meet our advisors" button sits inside the card grid;
   make it span the full row and center it instead of taking the next grid cell. */
.community-grid > p:last-child:has(.btn) { grid-column: 1 / -1; text-align: center; margin-top: var(--space-8); }

/* Why A2 › Our Community: one row of community photos between the heading and the cards.
   Five photos on larger screens; on phones the 1st, 3rd and 5th. */
.community-strip { display: grid; grid-template-columns: 1.2fr 1fr 1.4fr 1fr 1.2fr; gap: 12px; height: 230px; margin-top: var(--space-12); }
.community-strip > * { margin: 0; }
.community-strip__photo { overflow: hidden; border-radius: 3px; }
.community-strip__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.community-strip + .community-grid { margin-top: var(--space-10); }
@media (max-width: 900px) { .community-strip { height: 180px; } }
@media (max-width: 600px) {
  .community-strip { grid-template-columns: 1fr 1.3fr 1fr; height: 150px; gap: 8px; }
  .community-strip__photo:nth-child(2), .community-strip__photo:nth-child(4) { display: none; }
}

/* Why A2 › Our Partner Network: show every partner logo in one brand navy
   (the logo drawings use several browns, grays and a gold). */
.plogo-tile svg [fill]:not([fill="none"]),
.plogo-tile svg text,
.plogo-tile svg tspan { fill: var(--navy, #00245D) !important; }
.plogo-tile svg [stroke]:not([stroke="none"]) { stroke: var(--navy, #00245D) !important; }
