/* WordPress-specific adjustments on top of the original design (main.css). */

/* Fixed nav below the admin bar */
body.admin-bar nav#mainNav { top: 32px; }
@media (max-width: 782px) { body.admin-bar nav#mainNav { top: 46px; } }

/* Footer: the original forces 4 columns at every width (html.v2 footer .footer-inner … !important),
   which overflows on mobile and causes horizontal scroll. Restore a responsive grid. */
@media (max-width: 900px) {
  html.v2 footer .footer-inner { grid-template-columns: 1fr 1fr !important; gap: 2.5rem 2rem; }
  html.v2 footer .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  html.v2 footer .footer-inner { grid-template-columns: 1fr !important; gap: 2rem; }
  html.fx-ready footer { padding: 3.5rem 1.5rem 2rem !important; }
}
/* Fund pages on phones: metrics and committee grids were wider than the screen (inherited). */
@media (max-width: 600px) {
  html.v2 .info-card { padding: 1.75rem 1.25rem !important; }
  html.v2 .fund-metrics, html.v2 .fund-header .fund-metrics, html.v2 .os-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  html.v2 .fund-metric { padding: 1.25rem .75rem !important; min-width: 0; }
  html.v2 .fund-metric-value { font-size: 1.5rem !important; overflow-wrap: anywhere; }
  html.v2 .committee-team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: .75rem !important; }
  html.v2 .committee-team-grid .team-member.tm-v2 { padding: 1rem .6rem !important; height: 270px !important; min-width: 0; }
  html.v2 .committee-team-grid .team-member.tm-v2 .team-photo { flex: 0 0 84px !important; width: 84px !important; height: 84px !important; min-height: 84px !important; max-height: 84px !important; }
  html.v2 .committee-team-grid .team-member.tm-v2 .team-name { font-size: .95rem !important; overflow-wrap: anywhere; }
}
/* Academia on phones: logo grid and chair cards overflowed (inherited). */
@media (max-width: 700px) {
  html.v2 .partner-logos-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  html.v2 .partner-logo-box { min-width: 0; overflow-wrap: break-word; padding: 1rem .75rem; }
  html.v2 .partner-logo-box > span { font-size: .9rem; }
  html.v2 .chair-grid { grid-template-columns: minmax(0, 1fr) !important; }
  html.v2 .chair-header { flex-direction: column-reverse; align-items: flex-start; }
  html.v2 .chair-card { padding: 1.5rem 1.25rem 1.25rem; }
}

/* Mobile header: logo + "Investor Area" + burger on one line without overlapping */
@media (max-width: 600px) {
  .nav-inner { padding: 0 1rem; gap: .6rem; }
  .brand-logo-img { height: 32px; }
  html.fx-ready .nav-investor-btn { white-space: nowrap; padding: .4rem .6rem !important; font-size: .58rem !important; letter-spacing: .08em !important; }
  .nav-right { gap: .5rem; }
}

/* Home hero: optional background video (above the photo, below the dark overlay ::after) */
.hero.hero-editorial .hero-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center 48%;
  z-index: 0; pointer-events: none;
  filter: brightness(1.16) saturate(.98) contrast(1.02);
}
html.v2.fx-ready .hero.hero-real.hero-editorial[style*="--hero-img"]::before { background-image: var(--hero-img) !important; }

/* Language switch: the original rule that hides the divider also made the active "ES" pill transparent */
.lang-toggle .lang-divider + .lang-btn.active { background: var(--teal-dark); }

/* Desktop: the accordion toggle is mobile-only */
.sub-toggle { display: none; }

/* Mobile menu panel + accordion submenus (the original dropdowns overlapped the other items) */
@media (max-width: 900px) {
  .nav-links.is-open {
    display: flex !important; flex-direction: column; align-items: stretch;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--white); box-shadow: 0 12px 32px rgba(0,0,0,.12);
    padding: .5rem 0 1rem; max-height: calc(100vh - 76px); overflow-y: auto;
  }
  .nav-links.is-open > li { position: relative; border-bottom: 1px solid var(--border); }
  .nav-links.is-open > li:last-child { border-bottom: none; }
  html.v2 .nav-links.is-open > li > a { height: auto; line-height: 1.2; padding: 1rem 3.5rem 1rem 1.5rem; }
  .nav-links.is-open > li > a::after { display: none; }
  .nav-links.is-open .sub-toggle {
    display: flex; align-items: center; justify-content: center;
    position: absolute; top: 0; right: .5rem; width: 3rem; height: 3.1rem;
    background: none; border: 0; color: var(--teal-dark); cursor: pointer;
    transition: transform .2s;
  }
  .nav-links.is-open li.sub-open > .sub-toggle { transform: rotate(180deg); }
  .nav-links.is-open .dropdown {
    position: static; display: none; opacity: 1; pointer-events: all; transform: none;
    min-width: 0; box-shadow: none; border-top: 1px solid var(--border); background: var(--light-bg);
  }
  .nav-links.is-open li.sub-open > .dropdown { display: block; }
  .nav-links.is-open .dropdown a { padding: .85rem 1.5rem .85rem 2.5rem; }
  .nav-links.is-open .dropdown a:hover { padding-left: 2.5rem; }
}

footer .footer-contact, footer .footer-col a, footer .footer-bottom p { overflow-wrap: anywhere; }
/* Safety net: never allow sideways scrolling of the whole page */
html { overflow-x: clip; }

/* Header: solid at the top, translucent "glass" once the page scrolls */
html.fx-ready nav#mainNav { transition: background .35s ease, box-shadow .35s ease, backdrop-filter .35s ease; }
html.fx-ready nav#mainNav.scrolled {
  background: rgba(255,255,255,.62) !important;
  backdrop-filter: saturate(160%) blur(18px) !important;
  -webkit-backdrop-filter: saturate(160%) blur(18px) !important;
  box-shadow: 0 8px 30px rgba(31,62,73,.10);
}
/* Keep the mobile menu panel readable while the header is translucent */
@media (max-width: 900px) {
  html.fx-ready nav#mainNav.scrolled:has(.nav-links.is-open) { background: rgba(255,255,255,.97) !important; }
}

/* Anchored vehicles (Other strategies) clear the fixed nav */
[id^="vehicle-"] { scroll-margin-top: 100px; }

/* Clickable cards rendered server-side */
.strat-card[data-href], .portfolio-card[data-href] { cursor: pointer; }
.nav-investor-btn:not([href]) { cursor: default; }
.legal-docs a:not([href]) { cursor: default; }

/* Generic pages / single news */
.ib-prose { max-width: 820px; }
.ib-prose p, .ib-prose ul, .ib-prose ol { margin-bottom: 1.1rem; color: var(--text); line-height: 1.8; }
.ib-prose ul, .ib-prose ol { padding-left: 1.4rem; }
.ib-prose h2, .ib-prose h3 { font-family: var(--font-display, Georgia, serif); color: var(--teal-dark); margin: 2rem 0 1rem; }
.ib-prose a { color: var(--teal); }

/* Contact Form 7 inside the original form styles */
.contact-form .wpcf7-form-control-wrap { display: block; }
.contact-form .form-check .wpcf7-list-item { margin: 0; }
.contact-form .form-check label { display: flex; gap: .6rem; align-items: flex-start; font-size: .8rem; color: var(--muted); }
.contact-form .wpcf7-not-valid-tip { font-size: .75rem; margin-top: .3rem; }
.contact-form .wpcf7-response-output { margin: 1rem 0 0 !important; font-size: .85rem; border-radius: 8px; }
.contact-form .wpcf7-spinner { margin: 0 0 0 .75rem; }

/* Pagination on fallback lists */
.ib-pagination { margin-top: 2.5rem; text-align: center; }
.ib-pagination .page-numbers { padding: 0 .5rem; }
