/* BK-DEV-003: scoped mobile photo geometry; desktop photographs stay unchanged. */
@media (max-width:959px) {
  /* C01/C02: square sources need the top of the frame, not a central strip. */
  .buyers-styled #main .bp-benefit :is(#block-5-el-5,#block-5-el-12) {
    aspect-ratio:4/3;
    height:auto;
    min-height:0;
    background-position:50% 0%!important;
  }
  /* C03: preserve the portrait, including both heads and the papers. */
  .buyers-styled #main .bp-risks-layout > #block-9-el-24 {
    width:100%;max-width:480px;justify-self:center;
    aspect-ratio:2/3;height:auto;min-height:0;
    background-position:50% 50%!important;
  }
  /* C04/C05/C06/C08: a landscape photograph cannot fill a tall phone
     without losing people. Keep it intact below the readable hero copy. */
  body:is([data-page="agentam"],[data-page="uslugi"],[data-page="chastye-voprosy"],[data-page="po-vyplatam-svo"]) #main > .sp-hero {
    --bk-hero-gutter:24px;
    display:flex;flex-direction:column;align-items:stretch;gap:28px;
    padding:110px var(--bk-hero-gutter) 0;
    min-height:100svh;overflow:hidden;background:#f8f8f9;
  }
  body:is([data-page="agentam"],[data-page="uslugi"],[data-page="chastye-voprosy"],[data-page="po-vyplatam-svo"]) #main > .sp-hero::after {display:none}
  body:is([data-page="agentam"],[data-page="uslugi"],[data-page="chastye-voprosy"],[data-page="po-vyplatam-svo"]) #main > .sp-hero > .seller-hero-content {
    order:0;flex:1;display:flex;flex-direction:column;justify-content:center;
    width:100%;margin:0 auto;gap:0;
  }
  body:is([data-page="agentam"],[data-page="uslugi"],[data-page="chastye-voprosy"],[data-page="po-vyplatam-svo"]) #main > .sp-hero > .seller-hero-photo {
    order:1;position:static;inset:auto;z-index:auto;flex:none;align-self:center;
    width:calc(100% + 2 * var(--bk-hero-gutter));max-width:none;
    height:auto;min-height:0;object-fit:contain;opacity:1;
  }
  /* C13: preserve the full height of the conversation photograph. */
  body[data-page="po-vyplatam-svo"] #main #block-3-el-12 {
    aspect-ratio:3/2;height:auto;min-height:0;background-position:50% 50%!important;
  }
}
@media (max-width:767px) {
  /* C07: same mobile composition, using the existing certificate hero. */
  body[data-page="sertifikat-dlya-sirot"] #main > .ap-hero {
    display:flex;flex-direction:column;align-items:stretch;gap:28px;
    padding:110px 0 0;min-height:100svh;background:#f8f8f9;
  }
  body[data-page="sertifikat-dlya-sirot"] #main > .ap-hero::after {display:none}
  body[data-page="sertifikat-dlya-sirot"] #main > .ap-hero > .ap-container {
    order:0;flex:1;display:flex;align-items:center;
  }
  body[data-page="sertifikat-dlya-sirot"] #main > .ap-hero > .ap-hero-photo {
    order:1;position:static;inset:auto;z-index:auto;flex:none;
    width:100%;height:auto;min-height:0;object-fit:contain;opacity:1;
  }
  /* C09/C10: fixed 220px height cut the tops as cards became wider. */
  body[data-page="sertifikat-dlya-sirot"] #main .ap-problem > img:is([src$="siroty-04-purchase-order-v1.webp"],[src$="siroty-05-seller-terms-v1.webp"]) {
    aspect-ratio:3/2;height:auto;min-height:0;max-height:none;object-fit:contain;
  }
  /* C11/C12: keep both sides of the team photos; put the salary below
     the shorter mobile frame so it cannot cover people or their work. */
  body[data-page="motivation"] #main img[src$="d89e9bc6a0d3fcedb994.jpg"],
  body[data-page="motivation"] #main .ap-career-photo > img {
    aspect-ratio:3/2;height:auto;min-height:0;max-height:none;object-fit:contain;
  }
  body[data-page="motivation"] #main .ap-career-photo > .ap-salary {
    position:static;margin-top:16px;background:#f0f1f4;
  }
}
@media (max-width:479px) {
  body:is([data-page="agentam"],[data-page="uslugi"],[data-page="chastye-voprosy"],[data-page="po-vyplatam-svo"]) #main > .sp-hero {
    --bk-hero-gutter:16px;padding-top:90px;
  }
  body[data-page="sertifikat-dlya-sirot"] #main > .ap-hero {padding-top:90px}
}
