/* Local layout/photo increment. Native headings, type, palette and scripts stay authoritative. */
.medical-masonry.fh-layout-products,
.medical-masonry.fh-layout-applications{align-items:stretch!important;grid-auto-rows:auto!important;grid-auto-flow:row}
.fh-layout-products>.machine-card,
.fh-layout-applications>.case-card{margin-top:0!important;align-self:stretch!important;min-width:0;translate:none!important;display:grid!important;grid-template-rows:subgrid;row-gap:0}
.fh-layout-products>.machine-card{grid-row:span 6!important}
.fh-layout-products .machine-image{height:auto;min-height:0;aspect-ratio:3/2;position:relative}
.fh-layout-products .machine-image>img:first-child,
.fh-layout-products .machine-image>.machine-alt{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}
.fh-layout-products .machine-copy{display:grid;grid-template-rows:subgrid;grid-row:span 5;row-gap:0;min-width:0;padding:25px 27px 27px!important}
.fh-layout-products .machine-copy>.machine-spec{align-self:stretch;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:subgrid;grid-row:span 2;row-gap:0}
.fh-layout-products .machine-copy .machine-spec>span{display:grid;grid-template-rows:subgrid;grid-row:span 2;row-gap:0;min-width:0;margin-top:0}
.fh-layout-applications>.case-card{grid-row:span 4!important}
.fh-layout-applications>.case-card>img{width:100%;height:auto;aspect-ratio:16/9;object-fit:cover}
.fh-layout-applications>.case-card>div{display:grid;grid-template-rows:subgrid;grid-row:span 3;row-gap:0;min-width:0;align-self:stretch}
.fh-layout-applications .case-card .round-arrow{position:static;justify-self:end;align-self:end;margin-top:12px}
.fh-layout-news{align-items:stretch;grid-auto-rows:auto}
.fh-layout-news>.news-card{display:grid;grid-template-rows:subgrid;grid-row:span 4;row-gap:0;min-width:0;margin-top:0;align-self:stretch}
.fh-layout-news .news-image{aspect-ratio:16/9;height:auto;min-height:0;overflow:hidden}
.fh-layout-news .news-image img{width:100%;height:100%;object-fit:cover}
.fh-layout-news>.news-card>div:not(.news-image){display:grid;grid-template-rows:subgrid;grid-row:span 3;row-gap:0;min-width:0}

.workflow.fh-layout-workflow{align-items:stretch;grid-auto-rows:auto}
.workflow.fh-layout-workflow>.fh-workflow-step{display:grid;grid-template-rows:subgrid;grid-row:span 4;row-gap:0;min-width:0;align-self:stretch}
.fh-workflow-photo{display:block;position:relative;aspect-ratio:3/2;overflow:hidden;margin:0 0 18px;min-width:0;border-radius:8px}
.fh-workflow-photo img{display:block;width:100%;height:100%;object-fit:cover;transition:transform .45s ease}
.fh-workflow-step:hover .fh-workflow-photo img{transform:scale(1.025)}
/* Author display rules must never undo a native filter/hidden state. */
.fh-layout-products>[hidden],.fh-layout-applications>[hidden],.fh-layout-news>[hidden],.fh-layout-workflow>[hidden]{display:none!important}
@media(max-width:1000px){.fh-layout-products>.machine-card{grid-row:span 8!important}.fh-layout-products .machine-copy{padding:22px!important;grid-row:span 7}.fh-layout-products .machine-copy>.machine-spec{grid-template-columns:minmax(0,1fr);grid-row:span 4}.fh-layout-products .machine-copy .machine-spec>span+span{margin-top:8px}}
@media(max-width:700px){.fh-layout-products>.machine-card{grid-row:span 6!important}.fh-layout-products .machine-copy{padding:20px!important;grid-row:span 5}.fh-layout-products .machine-copy>.machine-spec{grid-template-columns:repeat(2,minmax(0,1fr));grid-row:span 2}.fh-layout-products .machine-copy .machine-spec>span+span{margin-top:0}}
@media(prefers-reduced-motion:reduce){.fh-workflow-photo img{transition:none;transform:none!important}}
html.motion-reduced .fh-workflow-photo img{transition:none;transform:none!important}

@media (min-width: 1024px) {
  html body .case-grid.fh-layout-applications:has(> .case-card:nth-child(4):last-child) {
    grid-template-columns: repeat(4,minmax(0,1fr)) !important;
  }
}
@media (max-width: 1023px) {
  html body .case-grid.fh-layout-applications:has(> .case-card:nth-child(4):last-child) {
    grid-template-columns: repeat(2,minmax(0,1fr)) !important;
  }
}

@media (max-width: 760px) {
  html body .medical-product-wall .machine-copy h3 {
    font-size: clamp(17px,5vw,20px);
    line-height: 1.27;
    margin-block: 4px 7px;
  }
  html body .medical-product-wall .machine-copy > p {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    line-height: 1.5;
  }
  html body .medical-product-wall .machine-spec {
    grid-template-columns: minmax(0,1fr);
    gap: 3px;
    margin-top: 8px;
    padding-top: 6px;
    font-size: 14px;
    line-height: 1.35;
  }
  html body .medical-product-wall .machine-spec > span {
    display: flex;
    flex-wrap: wrap;
    gap: 1px 5px;
    justify-content: space-between;
  }
  html body .medical-product-wall .machine-spec strong { font-size: 14px; }
  html body main .news-grid:has(> :is(:only-child,:nth-child(3):last-child)) > .news-card .text-link {
    display: inline-block;
    margin: 4px 0 0;
    padding-block: 0;
    line-height: 1.35;
  }
  html body main :is(.product-grid,.case-grid,.news-grid):has(> :is(:only-child,:nth-child(3):last-child)) {
    grid-template-columns: minmax(0,1fr) !important;
    grid-auto-rows: auto !important;
    gap: 11px !important;
  }
  html body main :is(.product-grid,.case-grid,.news-grid):has(> :is(:only-child,:nth-child(3):last-child)) > :is(.machine-card,.case-card,.news-card) {
    display: grid !important;
    grid-template-columns: minmax(94px,32%) minmax(0,1fr);
    grid-template-rows: auto;
    grid-row: auto !important;
    gap: 0;
    padding: 0;
    align-items: stretch;
    overflow: hidden;
  }
  html body main :is(.product-grid,.case-grid,.news-grid):has(> :is(:only-child,:nth-child(3):last-child)) > :is(.machine-card,.case-card,.news-card) > :is(.machine-image,.news-image,img) {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 104px;
    aspect-ratio: auto;
    margin: 0;
    object-fit: cover;
    border-radius: 0;
    grid-row: auto;
  }
  html body main :is(.product-grid,.news-grid):has(> :is(:only-child,:nth-child(3):last-child)) > :is(.machine-card,.news-card) > :is(.machine-image,.news-image) img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  html body main :is(.product-grid,.case-grid,.news-grid):has(> :is(:only-child,:nth-child(3):last-child)) > :is(.machine-card,.case-card,.news-card) > div:not(.machine-image,.news-image) {
    display: block !important;
    min-width: 0;
    grid-row: auto !important;
    padding: 10px !important;
  }
  html body main :is(.product-grid,.case-grid,.news-grid):has(> :is(:only-child,:nth-child(3):last-child)) > :is(.machine-card,.case-card,.news-card) :is(h3,p) {
    margin-block: 4px;
  }
  html body main :is(.product-grid,.news-grid):has(> :is(:only-child,:nth-child(3):last-child)) > :is(.machine-card,.news-card) p {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }
}

@media (min-width: 761px) {
  html body main .medical-catalog-wall.product-grid:has(> :nth-child(4):last-child) {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  html body main .medical-catalog-wall.product-grid:has(> :nth-child(4):last-child) > .machine-card {
    grid-column: auto !important;
    min-width: 0;
  }
}

@media (min-width: 1100px) {
  html body main .medical-catalog-wall.product-grid:has(> :nth-child(4):last-child) {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

.site-header .menu-toggle span { margin: 4px 0; }


/* Keep the cover separate from the text height on compact news lists. */
@media (max-width: 760px) {
  html body main .news-grid:has(> :is(:only-child, :nth-child(3):last-child)) > .news-card {
    grid-template-columns: minmax(92px, 35%) minmax(0, 1fr);
    align-items: center;
    gap: 0 12px;
    padding-block: 10px;
  }
  html body main .news-grid:has(> :is(:only-child, :nth-child(3):last-child)) > .news-card > .news-image {
    height: auto;
    min-height: 0;
    aspect-ratio: 3 / 2;
    align-self: center;
    border-radius: 8px;
    overflow: hidden;
  }
  html body main .news-grid:has(> :is(:only-child, :nth-child(3):last-child)) > .news-card > div:not(.news-image) {
    padding: 0 !important;
    line-height: 1.35;
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
  }
  html body main .news-grid:has(> :is(:only-child, :nth-child(3):last-child)) > .news-card p {
    line-height: 1.45;
    -webkit-line-clamp: 1;
  }
  html body main .news-grid:has(> :is(:only-child, :nth-child(3):last-child)) > .news-card .text-link {
    align-self: flex-start;
    margin-inline: 0;
  }
}

/* Keep compact card thumbnail dimensions independent of the copy. */
@media (max-width: 760px) {
  html body main :is(.product-grid,.case-grid):has(> :is(:only-child, :nth-child(3):last-child)) > :is(.machine-card,.case-card) {
    grid-template-columns: minmax(90px, 34%) minmax(0, 1fr);
    align-items: center;
    column-gap: 10px;
    padding: 8px 10px;
  }
  html body main :is(.product-grid,.case-grid):has(> :is(:only-child, :nth-child(3):last-child)) > :is(.machine-card,.case-card) > :is(.machine-image,img) {
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 3 / 2;
    align-self: center;
    border-radius: 7px;
    overflow: hidden;
  }
  html body main :is(.product-grid,.case-grid):has(> :is(:only-child, :nth-child(3):last-child)) > :is(.machine-card,.case-card) > div:not(:is(.machine-image,img)) {
    min-width: 0;
    padding: 0 !important;
  }
}
