/* Landing menu cleanup — intentionally scoped to header navigation and footer only. */

/* Header items and groups hidden immediately, before the cleanup script removes them. */
nav[data-testid="navigation"] a[href="/lido-multichain"],
nav[data-testid="navigation"] li:has(> a[data-testid="header-snapshot__link"]),
nav[data-testid="navigation"] li:has(> a[data-testid="header-on-chain__link"]),
nav[data-testid="navigation"] li:has(> a[data-testid="header-dg__link"]),
nav[data-testid="navigation"] li:has(> a[data-testid="header-stVaults__link"]),
nav[data-testid="navigation"] li:has(> a[data-testid="header-blog__link"]) {
  display: none !important;
}

/* Entire columns that would otherwise become empty after requested removals. */
nav[data-testid="navigation"] [aria-label="submenu"] > [class*="nav-card_columnWrapper"]:has(a[data-testid="header-institutional__link"]),
nav[data-testid="navigation"] [aria-label="submenu"]:has(a[data-testid="header-institutional__link"]) > [class*="nav-card_columnWrapper"]:has([class*="header-card_cardWithButton"]),
nav[data-testid="navigation"] [aria-label="submenu"] > [class*="nav-card_columnWrapper"]:has(a[data-testid="header-cms__link"]),
nav[data-testid="navigation"] [aria-label="submenu"] > [class*="nav-card_columnWrapper"]:has(a[data-testid="header-governance__link"]),
nav[data-testid="navigation"] [aria-label="submenu"] > [class*="nav-card_columnWrapper"]:has(a[data-testid="header-contribute__link"]) {
  display: none !important;
}

/* Institutional integrations CTA. */
nav[data-testid="navigation"] [aria-label="submenu"]:has(a[data-testid="header-institutional__link"]) a[href*="/category/institutional/"] {
  display: none !important;
}

/* Footer links requested for removal. */
[data-testid="footer"] [data-testid="footer__multichain"],
[data-testid="footer"] [data-testid="footer__lido_institutional"],
[data-testid="footer"] [data-testid="footer__community_staking_module"],
[data-testid="footer"] [data-testid="footer__no_stvaults"],
[data-testid="footer"] [data-testid="footer__stvaults"],
[data-testid="footer"] [data-testid="footer__governance_stack"],
[data-testid="footer"] [data-testid="footer__snapshot_votes"],
[data-testid="footer"] [data-testid="footer__on_chain_votes"],
[data-testid="footer"] [data-testid="footer__lego_grants"],
[data-testid="footer"] [data-testid="footer__contribute"],
[data-testid="footer"] [data-testid="footer__lido_analytics_hub"],
[data-testid="footer"] [data-testid="footer__faq"],
[data-testid="footer"] [data-testid="footer__blog"] {
  display: none !important;
}

/* Reflow reduced mega menus without changing the site-wide layout system. */
nav[data-testid="navigation"] [aria-label="submenu"][data-menu-columns="1"] {
  grid-template-columns: minmax(0, 1fr) !important;
}
nav[data-testid="navigation"] [aria-label="submenu"][data-menu-columns="2"] {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}
nav[data-testid="navigation"] [aria-label="submenu"][data-menu-columns="2"] > [class*="nav-card_columnGridSpan"] {
  grid-column: span 1 !important;
}

@media (min-width: 1300px) {
  nav[data-testid="navigation"] [aria-label="submenu"][data-menu-columns="1"] {
    --nav-card-width: 560px;
    width: var(--nav-card-width) !important;
    min-width: var(--nav-card-width) !important;
  }
  nav[data-testid="navigation"] [aria-label="submenu"][data-menu-columns="2"] {
    --nav-card-width: 980px;
    width: var(--nav-card-width) !important;
    min-width: var(--nav-card-width) !important;
  }
}

/* Landing content cleanup — step 2. These rules only hide the requested CTAs/links. */
nav[data-testid="navigation"] [aria-label="submenu"] a[href="/lido-ecosystem"],
[data-testid="steth-section__blockFourEcosystemButton"],
[data-testid="steth-section__blockFourLearnMoreButton"],
[data-testid="security__web3soc_learn_more"],
[class*="community-staking-card_"] a[href="/csm"],
[class*="lido-dao_container"] a[href="/governance"],
[class*="lido-dao_container"] a[href="/scorecard"],
[data-testid="ecosystem__button"],
[data-testid="ecosystem-slider-more__button"] {
  display: none !important;
}

/* The final “90 more apps” tile stays visible, but is no longer a link. */
[data-testid="ecosystem-slider-more__card"] {
  cursor: default !important;
  pointer-events: none !important;
  text-decoration: none !important;
}


/* Step 5: additional footer cleanup. */
[data-testid="footer"] [data-testid="footer__decentralization_scorecard"],
[data-testid="footer"] [data-testid="footer__lido_connect"],
[data-testid="footer"] [data-testid="footer__press_kit"],
[data-testid="footer"] [data-testid="footer__institutional_press_kit"],
[data-testid="footer"] [class*="column_navColumn"]:has([data-testid="footer__lido_morning_coffee"]),
[data-testid="footer"] [class*="column_navColumn"]:has([data-testid="footer__ecosystem"]) {
  display: none !important;
}

/* Institutional menu testimonial card, based on the site's existing image-card component. */
nav[data-testid="navigation"] .institutional-testimonials-card img {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 16 / 9;
  object-fit: cover !important;
}

#landing-testimonials {
  scroll-margin-top: 120px;
}

/* Footer legal links: hide only Privacy Notice, Terms Of Use, and their divider. */
[data-testid="footer"] [data-testid="footer__privacy-notice"],
[data-testid="footer"] [data-testid="footer__terms-of-use"],
[data-testid="footer"] [class*="legalDivider"] {
  display: none !important;
}
