/* v445 — Panwa cards and long headings on phones */

/* Card photos keep their ratio: the HTML height attribute no longer stretches them */
.panwa-related > img,
.panwa .panwa-related__link > img {
  height: auto !important;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

/* Focus on the person in each existing photo */
.panwa-related img[src*="panwa-13"] { object-position: 66% 50% !important; }
.panwa-related img[src*="panwa-05"] { object-position: 28% 62% !important; }
.panwa-related img[src*="panwa-12"] { object-position: 40% 35% !important; }
.panwa-related img[src*="panwa-02"] { object-position: 50% 45% !important; }

/* Long words in headings (RU «Образовательные», «Противопоказания») */
h1, h2, h3 { overflow-wrap: break-word; }
html[lang="ru"] h1, html[lang="ru"] h2, html[lang="ru"] h3,
html[lang="es"] h1, html[lang="es"] h2, html[lang="es"] h3 { hyphens: auto; }

@media (max-width: 480px) {
  #ed387-title, .panwa-section h2 { font-size: clamp(1.75rem, 8.6vw, 2.4rem); line-height: 1.15; }
  .tr-card h3, .panwa-related h3 { font-size: clamp(1.4rem, 7.2vw, 1.9rem); line-height: 1.2; }
  .panwa-related > img,
  .panwa .panwa-related__link > img { aspect-ratio: 16 / 10; }
}
