/* Tablet keeps the wide homepage composition. */
@media (min-width: 768px) {
  .site-header .menu-toggle { display: none; }
  .site-header .brand img { width: 106px; height: auto; }
  .site-header nav, .site-header nav.open { display: flex; position: static; flex-direction: row; align-items: center; gap: 12px; padding: 0; box-shadow: none; white-space: nowrap; }
  .site-header nav > a, .site-header .services-menu > button { font-size: 12px; }
  .site-header #services-nav { position: absolute; background: white; }
  .hero-stage .hero-motto { display: block; font-size: 16px; }
  .hero .hero-inner { min-height: 0; padding-block: 56px; }
  .hero .hero-copy { max-width: 53%; }
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
  .stats > div { min-width: 0; gap: 8px; padding-inline: 8px; }
  .stats img { width: 36px; }
  .stats p, .stats small { white-space: normal; }
  .team { grid-template-columns: 1fr 1fr; align-items: center; }
}

/* The same content flows vertically on phones. */
@media (max-width: 767px) {
  .medirogh-story-home main { --edge: clamp(18px, 5vw, 32px); }
  .medirogh-story-home main .wrap { width: calc(100% - 2 * var(--edge)); }
  .hero-stage .hero {
    display: flex; flex-direction: column; position: relative; top: auto;
    min-height: 0; background: #efe8df; overflow: hidden;
  }
  .hero-stage .hero::before, .hero-stage .hero::after { display: none; }
  .hero-stage .hero-inner {
    order: -1; width: 100%; min-height: 0; padding: 32px var(--edge) 18px;
  }
  .hero-stage .hero-copy { max-width: 100%; }
  .hero .hero-description .desktop-break { display: none; }
  .hero-stage .hero > .section-image {
    display: block; position: static; width: 100%; height: clamp(165px, 49vw, 300px);
    object-fit: cover; object-position: 76% center; translate: none; transform: none; z-index: auto;
    mask-image: linear-gradient(to bottom, transparent, black 20%);
  }
  .hero-stage .hero-motto { display: block; margin: 18px 0 0; position: static; color: #354139; font-size: .75rem; }
  .hero-motto br { display: none; }
  .hero-stage .hero-buttons { flex-wrap: wrap; gap: 10px; }
  .hero-stage .trust { display: flex; align-items: center; margin-top: 22px; }
  .hero-stage .trust img { width: 94px; height: auto; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .services .services-layout { display: flex; flex-direction: column; align-items: stretch; gap: 24px; }
  .services .services-copy { display: block; order: -1; padding: 0; }
  .services .service-cards { display: grid; grid-template-columns: 1fr; gap: 18px; }
  .services .service-card, .services .service-card:last-child {
    display: grid; grid-template-columns: minmax(0, 38%) minmax(0, 1fr);
    min-height: 155px; height: auto; background: white; color: #354139;
  }
  .services .service-card::before, .services .service-card::after { display: none; }
  .services .service-card > img { position: static; width: 100%; height: 100%; object-fit: cover; translate: none; }
  .services .service-card > div { position: static; padding: 16px; background: none; color: inherit; }
  .services .service-card :is(h3,p,.card-more) { color: inherit; min-height: 0; }
  .services .card-more { display: inline-block; width: auto; height: auto; padding: 4px 0; border: 0; text-decoration: underline; }
  .locations .locations-layout, .team, .reviews .reviews-layout { display: grid; grid-template-columns: minmax(0,1fr); }
  .reviews .review-carousel { min-width: 0; }
}

@media (max-width: 700px) {
  .services .service-cards { gap: 10px; }
  .services .service-card,
  .services .service-card:last-child {
    position: relative;
    grid-template-columns: clamp(76px, 24vw, 118px) minmax(0, 1fr);
    min-height: 0;
  }
  .services .service-card > img {
    position: absolute;
    inset: 0 auto 0 0;
    width: clamp(76px, 24vw, 118px);
    height: 100%;
    min-height: 0;
    object-fit: cover;
  }
  .services .service-card > div,
  .services .service-card:last-child > div {
    grid-column: 2;
    height: auto;
    padding: 12px 14px;
    display: grid;
    align-content: center;
    gap: 5px;
  }
  .services .service-card h3,
  .services .service-card p { margin: 0; }
  .services .service-card h3 br { display: none; }
  .services .service-card .card-more {
    justify-self: start;
    margin: 0;
    padding: 2px 0;
    line-height: 1.3;
  }
}

@media (max-width: 767px) {
  .medirogh-story-home .closing {
    background: #2d392e;
    min-height: 0;
    padding: 18px var(--edge, 20px) 12px;
  }
  .closing .closing-copy {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 7px 10px;
  }
  .closing .closing-copy h2,
  .closing .closing-copy p {
    grid-column: 1 / -1;
    margin: 0;
  }
  .closing .closing-copy h2 {
    font-size: clamp(24px, 6.4vw, 32px);
    line-height: 1.12;
  }
  .closing .closing-copy p { font-size: 16px; line-height: 1.35; }
  .closing .closing-copy br { display: none; }
  .closing .closing-copy .button {
    min-height: 44px;
    padding: 8px 16px;
    justify-self: start;
  }
  .closing .closing-copy::after {
    content: "";
    justify-self: end;
    width: min(100%, 200px);
    aspect-ratio: 1.8 / 1;
    background: url('/media/gesundheit-naechster-schritt-hintergrund.png') 80.5% 66% / 430% auto no-repeat;
    mask-image: linear-gradient(to right, transparent, black 4%, black 96%, transparent);
  }
}
