/* ==========================================================================
   desktop-fix.css — 2026-11-13
   Additive, desktop-scoped layout fixes for the homepage so the desktop view
   matches the mobile design. Loaded AFTER home-polish.css. Nothing here
   removes content; everything except section 0 is inside min-width queries,
   so phones (<=768px) are untouched.
   ========================================================================== */

/* 0. Trust Professional Network — light cards ("For Clients" / "For Attorneys")
      had white headings + white text on a white card (home-polish.css forces
      every h3/p in this section to white). Restore the card's own dark text.
      This was invisible at every width, so it applies everywhere. */
#trust-professional-network a > div[style*="#fff 0%"] h3 { color: #112240 !important; }
#trust-professional-network a > div[style*="#fff 0%"] p  { color: #4b5563 !important; }

/* 0b. (2026-11-13, all widths) Two buttons were nearly invisible:
       "See How It Works" — navy text on the dark navy hero;
       "Explore Trust Types" — white text on the light gold call-to-action card. */
.hero-cta .btn-ghost { color: #fff !important; border-color: rgba(255,255,255,0.55) !important; }
.hero-cta .btn-ghost:hover { background: rgba(255,255,255,0.1) !important; }
.cta-buttons .btn-ghost-white { color: #0c1a2e !important; border-color: rgba(12,26,46,0.4) !important; }
.cta-buttons .btn-ghost-white:hover { background: rgba(12,26,46,0.08) !important; }

/* 0c. (2026-11-13, phones) Tokenomics: the 3 card columns couldn't shrink below their
       text width, pushing the page 1px wider than the screen and clipping the right column. */
@media (max-width: 768px) {
  #ltrst-dao-staking div[style*="repeat(3,1fr)"] { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 10px !important; }
  #ltrst-dao-staking div[style*="repeat(3,1fr)"] > div { min-width: 0; overflow-wrap: anywhere; padding-left: 8px !important; padding-right: 8px !important; }
}

@media (min-width: 769px) {

  /* 1. "Choose your portal." — the institutional card contains a nested
        mailto link, so the browser splits it into an EMPTY grid cell plus the
        card. On desktop that empty cell left a huge blank gap between the two
        cards. Hide the empty cell and lay the two cards out as a centred pair. */
  #choose-portal .container > div:nth-child(2) > a:not(:has(*)) { display: none !important; }
  #choose-portal .container > div:nth-child(2) {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    max-width: 960px;
    margin: 0 auto;
    align-items: stretch;
  }

  /* 2. Trust-type lists — on desktop the name and the description were squeezed
        side by side (names wrapping onto 2 lines). Stack them like mobile. */
  .trust-list li { flex-direction: column; align-items: flex-start; gap: 2px; }
  .trust-desc { text-align: left; flex-shrink: 1; }

  /* 3. Tokenomics — 7 allocation cards in a 3-wide grid left one card stranded
        on its own row at the left. Centre the last row. */
  #ltrst-dao-staking div[style*="repeat(3,1fr)"] {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center;
  }
  #ltrst-dao-staking div[style*="repeat(3,1fr)"] > div { flex: 0 0 calc((100% - 32px) / 3); }
}

@media (min-width: 769px) and (max-width: 1024px) {
  /* 5. How It Works on small laptops/tablets — the intended 2x2 layout wrapped
        as 3 + 1 (step 04 stranded alone). Force a clean 2x2. */
  .steps-grid .step-card { flex: 0 0 calc(50% - 16px); max-width: 340px; }
}

@media (min-width: 1025px) {
  /* 4. Footer — 5 blocks (brand + 4 link columns) in a 4-column grid pushed
        "Company" onto its own row under the brand. Give it 5 columns. */
  .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr; gap: 40px; }
}
