/* ========================================================================== 
   NASHORN Einsatzbereiche responsive - Gesundheitswesen & Pflege
   Desktop remains owned by worlds.css. This file only recomposes content
   below the Desktop Master boundary.
   ========================================================================== */

/* The responsive product rail is an alternate view of the desktop story. */
.pf-page .pf-room__rail {
  display: none;
}

/* Canonical non-desktop families. */
@media (min-width: 768px) and (max-width: 1199.98px) and (orientation: landscape) and (min-height: 601px),
       (min-width: 1024px) and (max-width: 1199.98px) and (orientation: portrait),
       (max-width: 767.98px),
       (min-width: 768px) and (max-width: 1023.98px) and (orientation: portrait),
       (min-width: 768px) and (max-width: 1199.98px) and (orientation: landscape) and (max-height: 600px) {
  /* Clip the content wrapper, matching static main.site-responsive-content.
     The same class also lives on body for responsive tokens; clipping body locks the viewport. */
  .pf-page .site-main {
    overflow: clip;
  }

  .pf-page .plan-spec__head .h2,
  .pf-page .pf-room__intro h2,
  .pf-page .plan-share__copy .h2,
  .pf-page .cta .h2 {
    font-size: var(--site-section-title-size);
    line-height: var(--site-section-title-line-height);
    letter-spacing: var(--site-section-title-letter-spacing);
    text-wrap: balance;
  }

  .pf-page .pk-hero__lead,
  .pf-page .pf-room__intro > p:last-child,
  .pf-page .plan-share__text,
  .pf-page .cta__text {
    font-size: var(--site-lead-size);
    line-height: var(--site-lead-line-height);
  }

  .pf-page .btn {
    min-height: var(--site-button-min-height);
  }

  .pf-page .btn .icon,
  .pf-page .pf-room-card .icon,
  .pf-page .plan-share__routes .icon {
    width: var(--site-action-icon-size);
    height: var(--site-action-icon-size);
  }

  /* Einsatzbereiche hero primitive shared with the Psychiatrie pilot. */
  .pf-page.world--plan .pk-hero {
    height: auto;
    min-height: 0;
    margin-bottom: 0;
  }

  .pf-page.world--plan .pk-hero__stage {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
  }

  .pf-page.world--plan .pk-hero__media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
  }

  .pf-page.world--plan .pk-hero__frame {
    justify-content: space-between;
    min-height: inherit;
    margin-top: 0;
  }

  .pf-page.world--plan .pk-hero__inner {
    width: 100%;
    min-width: 0;
    padding-top: 0;
  }

  .pf-page.world--plan .pk-hero__copy {
    min-width: 0;
  }

  .pf-page.world--plan .pk-hero__copy h1 {
    max-width: 14ch;
    font-size: var(--site-title-size);
    line-height: var(--site-title-line-height);
    letter-spacing: var(--site-title-letter-spacing);
    text-wrap: balance;
  }

  .pf-page.world--plan .pk-hero__lead {
    max-width: 44ch;
  }

  .pf-page.world--plan .plan-quiet {
    max-width: var(--site-reading-copy-width);
    font-size: var(--site-card-copy-size);
    line-height: var(--site-card-copy-line-height);
  }

  /* Im Alltag: visible media and a stable editorial hierarchy on touch. */
  .pf-page.world--plan .plan-spec {
    padding-block: var(--site-section-space);
  }

  .pf-page.world--plan .plan-spec__head {
    max-width: var(--site-reading-copy-width);
    margin-bottom: var(--site-section-space-compact);
  }

  .pf-page.world--plan .plan-spec__head .h2 {
    max-width: 16ch;
  }

  .pf-page.world--plan .plan-spec__grid {
    gap: calc(2 * var(--site-card-gap));
  }

  .pf-page.world--plan .plan-spec__grid > li {
    min-width: 0;
    padding-top: var(--site-card-gap);
  }

  .pf-page.world--plan .plan-spec__index {
    margin-bottom: calc(1.5 * var(--site-card-gap));
    font-size: clamp(3.5rem, 8vw, 5.75rem);
  }

  .pf-page.world--plan .plan-spec__media,
  .pf-page.world--plan .plan-spec__grid > li:hover .plan-spec__media,
  .pf-page.world--plan .elementor .elementor-widget figure.plan-spec__media,
  .pf-page.world--plan .elementor .elementor-widget .plan-spec__grid > li:hover figure.plan-spec__media {
    grid-template-rows: 1fr;
    margin-bottom: calc(1.5 * var(--site-card-gap));
    opacity: 1;
  }

  .pf-page.world--plan .plan-spec__media img,
  .pf-page.world--plan .plan-spec__grid > li:hover .plan-spec__media img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    opacity: 1;
    transform: none;
  }

  .pf-page.world--plan .plan-spec__grid h3 {
    margin-bottom: var(--site-action-gap);
    font-size: var(--site-card-title-size);
    font-weight: var(--site-card-title-weight);
    line-height: var(--site-card-title-line-height);
    letter-spacing: var(--site-card-title-letter-spacing);
  }

  .pf-page.world--plan .plan-spec__grid p {
    max-width: var(--site-reading-copy-width);
    font-size: var(--site-body-size);
    line-height: var(--site-body-line-height);
  }

  /* Zimmermoebel: the desktop cinematic becomes a touch-native product rail. */
  .pf-page.world--plan .pf-room {
    padding-block: var(--site-section-space);
  }

  .pf-page.world--plan .pf-room__stage {
    display: block;
    min-height: 0;
    padding-block: 0;
  }

  .pf-page.world--plan .pf-room__visual,
  .pf-page.world--plan .pf-room__states {
    display: none;
  }

  .pf-page.world--plan .pf-room__copy {
    width: 100%;
  }

  .pf-page.world--plan .pf-room__intro {
    max-width: var(--site-reading-copy-width);
    margin-bottom: var(--site-section-space-compact);
  }

  .pf-page.world--plan .pf-room__intro h2 {
    max-width: 13ch;
  }

  .pf-page.world--plan .pf-room__intro > p:last-child {
    max-width: var(--site-reading-copy-width);
    margin-top: var(--site-title-copy-gap);
  }

  .pf-page .pf-room__rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(76%, 1fr);
    gap: var(--site-card-gap);
    width: calc(100% + var(--site-content-edge));
    margin: 0;
    padding: 0 var(--site-content-edge) 0 0;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
    scroll-snap-type: inline mandatory;
    scrollbar-width: none;
    list-style: none;
  }

  .pf-page .pf-room__rail::-webkit-scrollbar {
    display: none;
  }

  .pf-page .pf-room-card {
    min-width: 0;
    overflow: hidden;
    background: #fff;
    scroll-snap-align: start;
  }

  .pf-page .pf-room-card > a {
    display: grid;
    height: 100%;
    color: var(--navy-900);
    text-decoration: none;
  }

  .pf-page .pf-room-card figure {
    min-width: 0;
    margin: 0;
    overflow: hidden;
    background: #e7ecef;
  }

  .pf-page .pf-room-card figure img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    transition: transform 480ms var(--pf-ease);
  }

  .pf-page .pf-room-card[data-pf-product="storage"] figure,
  .pf-page .pf-room-card[data-pf-product="desk"] figure {
    background: #fff;
  }

  .pf-page .pf-room-card[data-pf-product="storage"] figure img,
  .pf-page .pf-room-card[data-pf-product="desk"] figure img {
    object-fit: contain;
  }

  .pf-page .pf-room-card__body {
    position: relative;
    display: grid;
    align-content: start;
    gap: 8px;
    min-height: 9.5rem;
    padding: var(--site-card-padding);
  }

  .pf-page .pf-room-card__body strong {
    max-width: calc(100% - (var(--site-action-icon-size) + var(--site-action-gap)));
    font-size: var(--site-card-feature-title-size);
    font-weight: var(--site-card-feature-title-weight);
    line-height: var(--site-card-feature-title-line-height);
    letter-spacing: var(--site-card-feature-title-letter-spacing);
  }

  .pf-page .pf-room-card__body > span {
    max-width: 38ch;
    color: var(--text-soft);
    font-size: var(--site-card-copy-size);
    line-height: var(--site-card-copy-line-height);
  }

  .pf-page .pf-room-card .icon {
    position: absolute;
    top: calc(1.5 * var(--site-card-gap));
    right: calc(1.5 * var(--site-card-gap));
    transition: transform 240ms var(--pf-ease);
  }

  .pf-page .pf-room-card > a:hover figure img,
  .pf-page .pf-room-card > a:focus-visible figure img {
    transform: scale(1.02);
  }

  .pf-page .pf-room-card > a:hover .icon,
  .pf-page .pf-room-card > a:focus-visible .icon {
    transform: translate3d(3px, -3px, 0);
  }

  /* Gemeinschaftsbereiche: stable media-first editorial composition. */
  .pf-page.world--plan .plan-share {
    min-height: 0;
  }

  .pf-page.world--plan .plan-share__photo {
    min-height: 0;
  }

  .pf-page.world--plan .plan-share__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
  }

  .pf-page.world--plan .plan-share__copy {
    padding: var(--site-section-space) var(--site-content-edge);
  }

  .pf-page.world--plan .plan-share__copy .h2 {
    max-width: 13ch;
  }

  .pf-page.world--plan .plan-share__text {
    max-width: var(--site-reading-copy-width);
    margin-top: var(--site-title-copy-gap);
  }

  .pf-page.world--plan .plan-share__routes {
    margin-top: var(--site-section-space-compact);
  }

  .pf-page.world--plan .plan-share__routes li {
    min-height: var(--site-touch-target);
    padding-block: calc(1.25 * var(--site-card-gap));
  }

  .pf-page.world--plan .plan-share__routes .text-link--underline {
    font-size: var(--site-card-feature-title-size);
    line-height: var(--site-card-feature-title-line-height);
  }

  .pf-page.world--plan .plan-share__routes p {
    max-width: var(--site-reading-copy-width);
    font-size: var(--site-card-copy-size);
    line-height: var(--site-card-copy-line-height);
  }

  /* Final CTA follows the approved Homepage/internal-page composition. */
  .pf-page .cta {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: min(570px, 100svh);
  }

  .pf-page .cta__media {
    inset: 0;
    width: 100%;
    height: 100%;
  }

  .pf-page .cta__media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center center;
  }

  .pf-page .cta__inner {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: inherit;
    padding-block: var(--site-section-space);
    text-align: center;
  }

  .pf-page .cta__shift,
  .pf-page .cta__content {
    width: 100%;
    margin-inline: auto;
  }

  .pf-page .cta__content {
    max-width: 34rem;
  }

  .pf-page .cta__text {
    margin-inline: auto;
  }

  .pf-page .cta__actions {
    justify-content: center;
  }
}

/* Compact Desktop Master: editorial splits and complete product rows. */
@media (min-width: 768px) and (max-width: 1199.98px) and (orientation: landscape) and (min-height: 601px),
       (min-width: 1024px) and (max-width: 1199.98px) and (orientation: portrait) {
  .pf-page.world--plan .pk-hero {
    min-height: clamp(580px, 86svh, 700px);
  }

  .pf-page.world--plan .pk-hero__frame {
    padding-top: calc(var(--header-h) + clamp(24px, 4vh, 40px));
    padding-bottom: clamp(10px, 1.5vh, 18px);
  }

  .pf-page.world--plan .pk-hero__inner {
    flex: 1;
    grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
    align-items: center;
    padding-block: clamp(18px, 3.5vh, 34px);
  }

  .pf-page.world--plan .pk-hero__copy {
    grid-column: 2;
    width: min(100%, 38rem);
    max-width: none;
  }

  .pf-page.world--plan .pk-hero__copy h1 {
    max-width: 15ch;
    margin-bottom: clamp(16px, 2.2vh, 22px);
    font-size: clamp(2.75rem, 5vw, 3.65rem);
    line-height: 0.98;
  }

  .pf-page.world--plan .pk-hero__lead {
    margin-bottom: clamp(20px, 3vh, 28px);
  }

  .pf-page.world--plan .pk-hero__mark {
    font-size: clamp(2.5rem, 5vw, 4.2rem);
    line-height: 0.86;
  }

  .pf-page.world--plan .pk-hero__media img {
    object-position: 34% 58%;
  }

  .pf-page.world--plan .plan-spec__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pf-page .pf-room__rail {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-flow: row;
    width: 100%;
    padding-right: 0;
    overflow: visible;
  }

  .pf-page.world--plan .plan-share {
    grid-template-columns: minmax(19rem, 0.82fr) minmax(0, 1.18fr);
    min-height: clamp(560px, 70svh, 720px);
  }

  .pf-page.world--plan .plan-share__photo {
    grid-column: 2;
    grid-row: 1;
  }

  .pf-page.world--plan .plan-share__copy {
    grid-column: 1;
    grid-row: 1;
    justify-content: center;
  }
}

/* Touch Master: clear stacking and touch-native product browsing. */
@media (max-width: 767.98px),
       (min-width: 768px) and (max-width: 1023.98px) and (orientation: portrait),
       (min-width: 768px) and (max-width: 1199.98px) and (orientation: landscape) and (max-height: 600px) {
  .pf-page.world--plan .pk-hero {
    min-height: max(640px, 100svh);
  }

  .pf-page.world--plan .pk-hero__frame {
    padding-top: calc(var(--header-h) + var(--site-section-space-compact));
    padding-bottom: var(--site-content-edge);
  }

  .pf-page.world--plan .pk-hero__inner {
    display: grid;
    grid-template-columns: 1fr;
  }

  .pf-page.world--plan .pk-hero__copy {
    grid-column: 1;
  }

  .pf-page.world--plan .pk-hero__copy .btn {
    width: 100%;
    justify-content: space-between;
  }

  .pf-page.world--plan .pk-hero__mark {
    max-width: 100%;
    font-size: clamp(2.2rem, 9.4vw, 4rem);
    line-height: 0.86;
    white-space: normal;
    text-wrap: balance;
  }

  .pf-page.world--plan .plan-spec__grid {
    grid-template-columns: 1fr;
  }

  .pf-page.world--plan .plan-share {
    grid-template-columns: 1fr;
  }

  .pf-page.world--plan .plan-share__photo,
  .pf-page.world--plan .plan-share__copy {
    grid-column: 1;
    grid-row: auto;
  }

  .pf-page.world--plan .plan-share__photo {
    order: 1;
    aspect-ratio: 16 / 10;
  }

  .pf-page.world--plan .plan-share__copy {
    order: 2;
  }
}

/* Small Tablet Portrait keeps editorial content controlled and spacious. */
@media (min-width: 768px) and (max-width: 1023.98px) and (orientation: portrait) {
  .pf-page.world--plan .plan-spec__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pf-page.world--plan .plan-spec__grid > li:last-child {
    grid-column: 1 / -1;
  }

  .pf-page.world--plan .plan-spec__grid > li:last-child .plan-spec__media img {
    aspect-ratio: 16 / 7;
  }

  .pf-page .pf-room__rail {
    grid-auto-columns: minmax(52%, 1fr);
  }
}

/* Mobile Portrait: compact one-column stories and deliberate media crops. */
@media (max-width: 767.98px) and (orientation: portrait) {
  .pf-page.world--plan .pk-hero__media img {
    object-position: 39% center;
  }

  .pf-page.world--plan .pk-hero__copy h1 {
    max-width: 12ch;
  }

  .pf-page.world--plan .pk-hero__mark {
    font-size: clamp(1.85rem, 8.6vw, 2.9rem);
  }

  .pf-page .pf-room__rail {
    grid-auto-columns: minmax(84%, 1fr);
  }

  .pf-page.world--plan .plan-share__photo {
    aspect-ratio: 4 / 3;
  }

  .pf-page .cta__actions {
    align-items: center;
    width: 100%;
  }

  .pf-page .cta__actions .btn {
    width: fit-content;
    max-width: 100%;
    justify-content: center;
  }
}

/* Mobile Landscape / low-height Touch Master. */
@media (max-width: 1199.98px) and (orientation: landscape) and (max-height: 600px) {
  .pf-page.world--plan .pk-hero {
    min-height: 0;
    aspect-ratio: 16 / 9;
  }

  .pf-page.world--plan .pk-hero__frame {
    position: absolute;
    inset: 0;
    height: auto;
    min-height: 0;
    margin-inline: auto;
    padding-top: calc(var(--header-h) + clamp(10px, 2.5vh, 16px));
    padding-bottom: clamp(8px, 2vh, 14px);
  }

  .pf-page.world--plan .pk-hero__inner {
    flex: 1;
    grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
    align-items: center;
    padding-block: clamp(8px, 2vh, 16px);
  }

  .pf-page.world--plan .pk-hero__copy {
    grid-column: 2;
    width: min(100%, 35rem);
    max-width: none;
  }

  .pf-page.world--plan .pk-hero__copy h1 {
    max-width: 16ch;
    margin-bottom: clamp(8px, 2vh, 14px);
    font-size: clamp(1.8rem, 4vw, 2.65rem);
    line-height: 0.98;
  }

  .pf-page.world--plan .pk-hero__lead {
    max-width: 48ch;
    margin-bottom: clamp(10px, 2.4vh, 18px);
  }

  .pf-page.world--plan .pk-hero__copy .btn {
    width: fit-content;
    min-width: min(100%, 14rem);
  }

  .pf-page.world--plan .plan-quiet {
    margin-top: 10px;
  }

  .pf-page.world--plan .pk-hero__mark {
    font-size: clamp(1.7rem, 4vw, 2.65rem);
    line-height: 0.86;
    white-space: nowrap;
  }

  .pf-page.world--plan .pk-hero__media img {
    object-position: 34% 58%;
  }

  .pf-page.world--plan .plan-spec {
    padding-block: var(--site-section-space-compact);
  }

  .pf-page.world--plan .plan-spec__head {
    margin-bottom: var(--site-section-space-compact);
  }

  .pf-page.world--plan .plan-spec__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pf-page.world--plan .plan-spec__index {
    font-size: clamp(3rem, 6vw, 4.2rem);
  }

  .pf-page .pf-room__rail {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-flow: row;
    width: 100%;
    padding-right: 0;
    overflow: visible;
  }

  .pf-page .pf-room-card__body {
    min-height: 8rem;
  }

  .pf-page.world--plan .plan-share {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .pf-page.world--plan .plan-share__photo {
    grid-column: 1;
    grid-row: 1;
    order: initial;
    aspect-ratio: auto;
  }

  .pf-page.world--plan .plan-share__copy {
    grid-column: 2;
    grid-row: 1;
    order: initial;
    justify-content: center;
    padding-block: var(--site-section-space-compact);
  }

  .pf-page .cta {
    min-height: 100svh;
  }
}
