/* R279: direção mobile por arte, não recorte automático da composição desktop.
   A camada é exclusiva para telas estreitas; o desktop permanece no cascade original. */

@media (max-width: 760px) {
  /* A Home já possui sua composição aprovada. As páginas internas usam o mesmo
     princípio editorial: arte completa primeiro, texto legível depois. */
  .solutions-page .hero-split {
    display: flex !important;
    flex-direction: column;
    min-height: 0 !important;
    margin-top: 12px;
    border-radius: 22px;
    overflow: hidden;
  }

  .solutions-page .hero-visual.hero-media {
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: #062f3a;
  }

  .solutions-page .hero-split .hero-image {
    order: 0;
    display: block;
    width: 100%;
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: auto;
    object-fit: contain !important;
    object-position: center;
    mask-image: none !important;
    background: #062f3a;
  }

  .solutions-page .hero-visual .hero-content {
    order: 1;
    width: 100%;
    padding: 30px 22px 36px;
    margin: 0;
    background: #062f3a;
  }

  .solutions-page .hero-split .hero-content h1 {
    max-width: 100%;
    margin: 0 0 18px;
    font-size: clamp(2.35rem, 11vw, 3.7rem);
    line-height: .98;
  }

  .solutions-page .hero-split .hero-content p {
    max-width: 100%;
    font-size: .98rem;
    line-height: 1.55;
  }

  .solutions-page .hero-split .hero-content .back-link {
    margin-top: 20px;
  }

  /* Detail pages: the source artwork contains its own desktop lettering.
     contain keeps that lettering and the complete person/photo visible. */
  body.solution-detail-page .breadcrumb {
    width: min(calc(100% - 28px), 680px);
    padding: 14px 0 0;
    margin-inline: auto;
  }

  body.solution-detail-page .detail-hero {
    display: grid !important;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    width: min(calc(100% - 28px), 680px);
    min-height: 0 !important;
    margin: 12px auto 0;
    padding: 0 0 28px;
    border-radius: 22px;
    background: #e5efe9;
    overflow: hidden;
  }

  body.solution-detail-page .detail-media {
    grid-row: 1;
    order: 0;
    width: 100%;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    aspect-ratio: 5696 / 3200;
    margin: 0;
    border-radius: 22px 22px 0 0;
    background: #062f3a;
    display: grid;
    place-items: center;
  }

  body.solution-detail-page .detail-media img {
    display: block;
    width: 100%;
    height: auto !important;
    min-height: 0 !important;
    object-fit: contain !important;
    object-position: center;
  }

  body.solution-detail-page .detail-copy {
    grid-row: 2;
    order: 1;
    width: 100%;
    min-height: 0;
    padding: 28px 22px 8px;
    margin: 0;
    justify-content: flex-start;
  }

  body.solution-detail-page .detail-copy h1 {
    max-width: 100%;
    margin: 14px 0 16px;
    font-size: clamp(2.35rem, 11vw, 3.65rem);
    line-height: .98;
  }

  body.solution-detail-page .detail-copy > p {
    max-width: none;
    font-size: .98rem;
    line-height: 1.58;
  }

  body.solution-detail-page .detail-copy .button {
    width: 100%;
    margin-top: 12px;
  }

  body.solution-detail-page .detail-intro,
  body.solution-detail-page .section-heading,
  body.solution-detail-page .cta-layout {
    display: block;
  }

  body.solution-detail-page .detail-intro > p,
  body.solution-detail-page .section-heading > p {
    margin-top: 18px;
  }

  /* SEO solution pages: preserve the complete horizontal hero artwork before
     stacking the editorial copy. */
  .seo-page .seo-hero-media {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    aspect-ratio: 8 / 3;
    background: #062f3a;
  }

  .seo-page .seo-hero-media img {
    width: 100%;
    height: auto !important;
    min-height: 0 !important;
    object-fit: contain !important;
    object-position: center;
  }

  .seo-page .seo-hero > .shell {
    padding: 28px 0 38px;
  }

  .seo-page .seo-hero h1 {
    font-size: clamp(2.35rem, 11vw, 3.65rem) !important;
    line-height: .98 !important;
  }

  /* Representatives: the original banner is an illustration, not a photo
     to crop around the face. Keep the complete authored frame. */
  .representatives-page .hero > img {
    width: 100%;
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: 8 / 3;
    object-fit: contain !important;
    object-position: center;
    background: #062f3a;
  }

  .representatives-page .hero::after,
  .about-page .about-hero::after {
    display: none !important;
  }

  /* About uses the same wide authored composition: show it whole, then read. */
  .about-page .about-hero-media {
    width: 100%;
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: 2055 / 765;
    object-fit: contain !important;
    object-position: center;
    background: #062f3a;
  }

  .about-page .about-hero-inner {
    padding-top: 28px;
  }

  /* Request page artwork is also a wide composition; do not zoom it until it
     becomes an unrecognizable strip. */
  .request-page .request-stage {
    padding-top: clamp(164px, 43vw, 198px);
    background-size: 100% auto;
    background-position: center top;
  }
}

@media (max-width: 380px) {
  body.solution-detail-page .detail-hero,
  body.solution-detail-page .breadcrumb,
  .solutions-page .hero-visual .hero-content,
  .seo-page .seo-hero > .shell,
  .representatives-page .hero-copy,
  .about-page .about-hero-inner,
  .request-page .request-layout {
    width: min(calc(100% - 22px), 680px);
  }

  .solutions-page .hero-visual .hero-content,
  body.solution-detail-page .detail-copy,
  .seo-page .seo-hero > .shell,
  .representatives-page .hero-copy,
  .about-page .about-hero-inner {
    padding-inline: 16px;
  }
}
