/* T224 — mobile homepage card hierarchy cleanup.
   Removes the legacy "card inside card" treatment from the return-story and
   partner sections while preserving one premium outer frame. Mobile only. */
@media (max-width: 920px) {
  /* ---------------- Return story ---------------- */
  #home .home-after-hero-content > .identity-section {
    padding: 12px 12px 16px !important;
    gap: 10px !important;
    border-radius: 26px !important;
    border: 1px solid rgba(212,175,55,.28) !important;
    background: linear-gradient(180deg, rgba(7,22,38,.30), rgba(3,13,26,.20)) !important;
    box-shadow: 0 18px 46px rgba(0,0,0,.20) !important;
    overflow: hidden !important;
  }

  /* Remove the old inset frame that visually creates a second card. */
  #home .home-after-hero-content > .identity-section::before,
  #home .home-after-hero-content > .identity-section::after {
    content: none !important;
    display: none !important;
    border: 0 !important;
    background: none !important;
    box-shadow: none !important;
  }

  #home .identity-section .sign-photo {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    aspect-ratio: 4 / 4.75 !important;
    margin: 0 !important;
    border-radius: 22px !important;
    border: 1px solid rgba(236,197,110,.18) !important;
    box-shadow: 0 14px 34px rgba(0,0,0,.22) !important;
    overflow: hidden !important;
    background: transparent !important;
  }

  #home .identity-section .sign-photo img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: 50% 43% !important;
    transform: none !important;
  }

  #home .identity-section .section-copy {
    width: 100% !important;
    margin: 0 !important;
    padding: 14px 10px 4px !important;
    text-align: center !important;
    background: transparent !important;
    background-image: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }

  #home .identity-section .section-copy .eyebrow {
    margin: 0 auto 10px !important;
    padding: 7px 14px !important;
    background: rgba(212,175,55,.08) !important;
    border: 1px solid rgba(212,175,55,.28) !important;
    box-shadow: none !important;
  }

  #home .identity-section .section-copy h2 {
    max-width: 13ch !important;
    margin: 0 auto 12px !important;
    text-align: center !important;
    line-height: 1.28 !important;
  }

  #home .identity-section .section-copy p {
    max-width: 34ch !important;
    margin: 0 auto 18px !important;
    padding: 0 3px !important;
    text-align: center !important;
    background: transparent !important;
    background-image: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    color: #eadfc9 !important;
    line-height: 1.85 !important;
  }

  #home .identity-section .outline-btn {
    min-width: 180px !important;
    margin: 0 auto 2px !important;
  }

  /* ---------------- Partner ---------------- */
  #home .home-after-hero-content > .partner-promo {
    padding: 12px 12px 18px !important;
    gap: 8px !important;
    border-radius: 26px !important;
    border: 1px solid rgba(212,175,55,.28) !important;
    background: linear-gradient(180deg, rgba(7,22,38,.28), rgba(3,13,26,.18)) !important;
    box-shadow: 0 18px 46px rgba(0,0,0,.20) !important;
    overflow: hidden !important;
  }

  /* Remove old inset partner frame. */
  #home .home-after-hero-content > .partner-promo::before,
  #home .home-after-hero-content > .partner-promo::after {
    content: none !important;
    display: none !important;
    border: 0 !important;
    background: none !important;
    box-shadow: none !important;
  }

  #home .partner-promo .partner-promo-logo {
    order: -1 !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  #home .partner-promo .partner-promo-logo img {
    width: 100% !important;
    max-width: 100% !important;
    max-height: none !important;
    height: auto !important;
    display: block !important;
    object-fit: contain !important;
    border-radius: 20px !important;
    filter: none !important;
  }

  #home .partner-promo .partner-promo-copy {
    width: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 14px 12px 4px !important;
    text-align: center !important;
    background: transparent !important;
    background-image: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }

  #home .partner-promo .partner-eyebrow {
    margin: 0 auto 10px !important;
    padding: 7px 14px !important;
    background: rgba(212,175,55,.08) !important;
    border: 1px solid rgba(212,175,55,.28) !important;
    box-shadow: none !important;
  }

  #home .partner-promo h2 {
    margin: 0 0 10px !important;
    font-size: clamp(2rem, 9vw, 2.65rem) !important;
    line-height: 1.2 !important;
  }

  #home .partner-promo p {
    max-width: 34ch !important;
    margin: 0 auto !important;
    padding: 0 2px !important;
    text-align: center !important;
    background: transparent !important;
    background-image: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    color: #eadfc9 !important;
    line-height: 1.9 !important;
  }
}

/* T225 — true single-card mobile composition.
   T147 uses stronger body/#home selectors and was still repainting the copy
   areas as blue glass. These high-specificity final rules intentionally win
   and leave exactly ONE premium outer card per return-story/partner section. */
@media (max-width: 920px) {
  body.nile-home-active #home .home-after-hero-content > .identity-section,
  body.nile-home-active #home .home-after-hero-content > .partner-promo {
    border: 1px solid rgba(226,190,101,.34) !important;
    border-radius: 28px !important;
    background:
      linear-gradient(180deg, rgba(5,18,33,.22) 0%, rgba(3,12,24,.16) 100%) !important;
    background-image: linear-gradient(180deg, rgba(5,18,33,.22) 0%, rgba(3,12,24,.16) 100%) !important;
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.045),
      0 20px 48px rgba(0,0,0,.22) !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    overflow: hidden !important;
  }

  body.nile-home-active #home .home-after-hero-content > .identity-section::before,
  body.nile-home-active #home .home-after-hero-content > .identity-section::after,
  body.nile-home-active #home .home-after-hero-content > .partner-promo::before,
  body.nile-home-active #home .home-after-hero-content > .partner-promo::after {
    content: none !important;
    display: none !important;
    background: none !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  /* The image is media inside the one card, not a second framed card. */
  body.nile-home-active #home .identity-section .sign-photo,
  body.nile-home-active #home .partner-promo .partner-promo-logo {
    border: 0 !important;
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }

  body.nile-home-active #home .identity-section .sign-photo::before,
  body.nile-home-active #home .identity-section .sign-photo::after,
  body.nile-home-active #home .partner-promo .partner-promo-logo::before,
  body.nile-home-active #home .partner-promo .partner-promo-logo::after {
    content: none !important;
    display: none !important;
  }

  body.nile-home-active #home .identity-section .sign-photo img,
  body.nile-home-active #home .partner-promo .partner-promo-logo img {
    border: 0 !important;
    box-shadow: none !important;
    filter: none !important;
  }

  /* CRITICAL: remove the legacy T147 blue-glass copy panel completely. */
  body.nile-home-active #home .home-after-hero-content .identity-section .section-copy,
  body.nile-home-active #home .home-after-hero-content .partner-promo .partner-promo-copy {
    position: relative !important;
    z-index: 2 !important;
    width: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 16px 14px 12px !important;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: 0 !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }

  body.nile-home-active #home .home-after-hero-content .identity-section .section-copy::before,
  body.nile-home-active #home .home-after-hero-content .identity-section .section-copy::after,
  body.nile-home-active #home .home-after-hero-content .partner-promo .partner-promo-copy::before,
  body.nile-home-active #home .home-after-hero-content .partner-promo .partner-promo-copy::after {
    content: none !important;
    display: none !important;
    background: none !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  body.nile-home-active #home .identity-section .section-copy p,
  body.nile-home-active #home .partner-promo .partner-promo-copy p {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border: 0 !important;
    box-shadow: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }

  /* Keep only the small gold badge treatment as a label, not a nested card. */
  body.nile-home-active #home .identity-section .section-copy .eyebrow,
  body.nile-home-active #home .partner-promo .partner-eyebrow {
    background: rgba(212,175,55,.065) !important;
    border: 1px solid rgba(224,187,91,.30) !important;
    box-shadow: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }

  /* Slightly tighter, coherent single-card rhythm. */
  body.nile-home-active #home .home-after-hero-content > .identity-section {
    padding: 12px 12px 18px !important;
    gap: 4px !important;
  }

  body.nile-home-active #home .home-after-hero-content > .partner-promo {
    padding: 12px 12px 20px !important;
    gap: 4px !important;
  }

  body.nile-home-active #home .identity-section .section-copy h2,
  body.nile-home-active #home .partner-promo h2 {
    margin-top: 2px !important;
    margin-bottom: 12px !important;
  }
}
