/* Services-only spacing refinement against the 1440px 1005 PDF.
 * Keep the approved PC layout, SVG geometry and typography.
 * These are local flow gaps, not a scale or a fixed overall page height.
 */
@media (min-width: 768px) {
  /* Center the visible lines, excluding unused space inside the paragraph. */
  .page-services main .service-feature__description {
    width: max-content;
    max-width: calc(100% - 48px);
    margin-inline: auto;
  }

  .page-services main .service-feature--home {
    margin-top: 90px;
  }

  .page-services main .service-feature--home .service-cards {
    margin-top: 80px;
  }

  .page-services main .service-feature--home .service-card {
    /* PDF card bottom: 3770.6px; preserve image/text/padding, extend only the floor. */
    min-height: 663px;
  }

  .page-services main .service-details {
    margin-top: 92px;
    row-gap: 16px;
  }

  .page-services main .service-detail--short {
    padding-top: 151px;
  }

  .page-services main .service-detail--day > .masked-photo {
    margin-bottom: 128px;
  }

  .page-services main .service-detail--trial {
    /* Keep the original staggered columns; this is not an equal-height card grid. */
    margin-top: -214px;
  }

  .page-services main .service-detail--trial > .masked-photo {
    margin-top: 48px;
  }

  /* Refine decoration only after its parent section is aligned.
   * Keep the existing motif dimensions; align the visible vertical centers.
   */
  .page-services main .service-details > .sub-pattern--left {
    top: 29px;
  }

  .page-services main .service-details > .sub-pattern--right {
    bottom: -193px;
  }

  .page-services main .service-contact {
    margin-top: 185px;
  }

/* shared:service-footer:start */
  .subpage--services .site-footer {
    /* Measured text-to-visible-linebar interval; footer content/layout is unchanged. */
    margin-top: 90px;
  }
/* shared:service-footer:end */
}


.page-services main .sub-pattern > img {
  width: 100%;
}

/* The DOM follows the formal SP reading order. Keep the approved PC columns. */
.page-services main .services-contact-break,
.page-services main .service-card .services-paragraph-break {
  display: none;
}

@media (min-width: 768px) {
  .page-services main .service-feature__banner--home .masked-photo {
    order: -1;
  }

  .page-services main .service-detail--short {
    grid-column: 1;
    grid-row: 1;
  }

  .page-services main .service-detail--day {
    grid-column: 2;
    grid-row: 1;
    padding-top: calc(365px * 728 / 1044 + 128px);
  }

  .page-services main .service-detail--trial {
    grid-column: 1;
    grid-row: 2;
  }

  .page-services main .service-detail--consult {
    grid-column: 2;
    grid-row: 2;
  }

  .page-services main .service-detail--short > .masked-photo {
    position: absolute;
    top: 0;
    left: calc(100% - 365px);
    margin: 0;
  }
}

@media (min-width: 768px) and (max-width: 1100px) {
  .page-services main .service-detail--short > .masked-photo {
    left: max(calc(50% + 22.5px), calc(100% - 365px));
  }
}

/* 1019 formal SP p1: large overlapping motifs, full-width cards and photos. */
@media (max-width: 767px) {
  .page-services main .sub-hero {
    padding-top: 0;
  }

  .page-services main .sub-hero__title {
    padding: 0 20px 47px 52px;
  }

  .page-services main .sub-hero__title h1 {
    font-size: 1.375rem;
  }

  .page-services main .sub-hero__title::before {
    top: 3px;
    left: calc(50% - 108px);
    width: 30px;
    height: 30px;
  }

  .page-services main .sub-hero__media {
    margin: 0;
  }

  .page-services main .sub-hero__media picture,
  .page-services main .sub-hero__media img {
    height: clamp(365px, 114.1333vw, 600px);
    border-radius: 0;
  }

  .page-services main .sub-hero__media picture {
    overflow: hidden;
  }

  .page-services main .sub-hero__media img {
    transform: translate(-1.8667vw, -4.5333vw) scale(1.14);
  }

  .page-services main .sub-hero > .sub-pattern--left {
    width: 270px;
    max-width: none;
    left: 0;
    top: auto;
    bottom: -227px;
  }

  .page-services main .sub-hero__accent {
    width: 32px;
    height: 32px;
    right: 39px;
    bottom: -247px;
  }

  .page-services main .service-card p,
  .page-services main .service-feature__description,
  .page-services main .service-details p,
  .page-services main .service-contact {
    letter-spacing: var(--tracking-body);
  }

  .page-services main .sub-intro {
    width: calc(100% - 50px);
    margin-top: 280px;
    font-size: 1.25rem;
    line-height: 2;
  }

  .page-services main .sub-intro .services-intro-break {
    display: initial;
  }

  /* Anchor complete right-side graphics to the viewport, at every mobile width. */
  .page-services main :is(.sub-intro, .service-feature--home, .service-details) > .sub-pattern--right {
    left: auto;
    right: calc((100% - 100vw) / 2);
  }

  .page-services main .sub-intro > .sub-pattern--right {
    display: block;
    width: 375px;
    max-width: none;
    top: auto;
    bottom: -342px;
  }

  .page-services main .service-feature {
    width: 100%;
    margin-top: 382px;
  }

  .page-services main .service-feature__banner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-height: 0;
  }

  .page-services main .service-feature__banner .shape-heading {
    width: 365px;
    max-width: none;
    min-height: 340px;
    margin: 0 0 0 calc(50% - 159px);
  }

  .page-services main .shape-heading h2 {
    font-size: 1.875rem;
    line-height: 1.4;
    max-width: calc(100vw - 90px - max(0px, 2rem - 32px));
    overflow-wrap: anywhere;
  }

  .page-services main .masked-photo {
    position: relative;
  }

  .page-services main .masked-photo picture {
    position: absolute;
    inset: 0;
  }

  .page-services main .service-feature__banner:not(.service-feature__banner--home) h2 {
    letter-spacing: var(--tracking-body);
    transform: translateX(-24px);
  }

  .page-services main .service-feature__banner .masked-photo {
    width: 430px;
    margin: -75px 0 0 calc(50% - 218px);
  }

  .page-services main .service-feature__accent {
    width: 32px;
    height: 32px;
    display: none;
  }

  .page-services main .service-feature__banner::after,
  .page-services main .service-card:first-child::after,
  .page-services main .service-feature__description::after {
    content: '';
    position: absolute;
    width: 32px;
    height: 32px;
    background: url('../images/subpages-1005/accent.svg') center / contain no-repeat;
    pointer-events: none;
  }

  .page-services main .service-feature__banner::after {
    right: 35px;
    bottom: -40px;
  }

  .page-services main .service-cards {
    margin-top: 91px;
    gap: 142px;
  }

  .page-services main .service-card {
    position: relative;
    padding: 48px 45px 44px;
    border-radius: 30px;
  }

  .page-services main .service-card:first-child {
    padding-bottom: 35px;
  }

  .page-services main .service-card:first-child::after {
    left: 48px;
    bottom: -86px;
  }

  .page-services main .service-card picture {
    height: auto;
    aspect-ratio: 285 / 211;
    overflow: hidden;
    border-radius: 8px;
  }

  .page-services main .service-card img {
    height: 100%;
    aspect-ratio: auto;
    border-radius: 0;
  }

  .page-services main .service-card h3 {
    font-size: 1.25rem;
    line-height: 1.65;
    margin: 26px 0 24px;
    padding: 5px 8px;
  }

  .page-services main .service-feature--home {
    margin-top: 322px;
  }

  .page-services main .service-feature--home > .sub-pattern--right {
    width: 375px;
    max-width: none;
    top: -298px;
  }

  .page-services main .service-feature__banner--home .shape-heading {
    order: -1;
    min-height: 252px;
    margin-left: calc(50% - 171px);
  }

  .page-services main .service-feature__banner--home .masked-photo {
    width: 365px;
    margin: -25px 0 0 calc(50% - 171px);
  }

  .page-services main .service-feature__banner--home::after {
    content: none;
  }

  .page-services main .service-feature__description {
    position: relative;
    margin: 41px 45px 0;
  }

  .page-services main .service-feature__description br {
    display: none;
  }

  .page-services main .service-feature__description .services-paragraph-break,
  .page-services main .service-card .services-paragraph-break {
    display: initial;
  }

  .page-services main .service-feature__description::after {
    right: -10px;
    bottom: -122px;
  }

  .page-services main .service-feature--home .service-cards {
    margin-top: 163px;
    gap: 118px;
  }

  .page-services main .service-feature--home .service-card h3 {
    font-size: 1.1875rem;
    line-height: 1.5;
    padding: 16px 8px 10px;
  }

  .page-services main .service-feature--home .service-card:last-child {
    padding-bottom: 50px;
  }

  .page-services main .service-feature--home .service-card:first-child {
    padding-bottom: 52px;
  }

  .page-services main .service-details {
    width: calc(100% - 90px);
    margin-top: 380px;
  }

  .page-services main .service-details > .sub-pattern {
    display: block;
    max-width: none;
  }

  .page-services main .service-details > .sub-pattern--left {
    width: 375px;
    left: -45px;
    top: -380px;
  }

  .page-services main .service-details article {
    margin-bottom: 0;
  }

  .page-services main .service-detail--short > .masked-photo {
    width: 415px;
    margin: 0 0 -60px -15px;
  }

  .page-services main .service-details .shape-heading {
    width: 300px;
    min-height: 282px;
    margin: 0 0 24px;
  }

  .page-services main .service-detail--short .shape-heading {
    margin-left: 10px;
  }

  .page-services main .service-detail--short p {
    line-height: 1.875;
  }

  .page-services main .service-detail--day {
    margin-top: 33px;
  }

  .page-services main .service-detail--day .shape-heading {
    width: 283px;
  }

  .page-services main .service-detail--day h2 {
    color: #fff;
  }

  .page-services main .service-detail--consult {
    margin-top: 34px;
  }

  .page-services main .service-detail--consult .shape-heading {
    width: 265px;
    min-height: 240px;
    margin-left: 8px;
  }

  .page-services main .service-detail--trial {
    margin-top: 45px;
  }

  .page-services main .service-detail--trial .shape-heading {
    width: 365px;
    min-height: 252px;
    margin-left: -12px;
  }

  .page-services main .service-detail--trial > .masked-photo {
    width: 365px;
    margin: 72px 0 0 10px;
  }

  .page-services main .service-details > .sub-pattern--right {
    width: 375px;
    bottom: -400px;
  }

  .page-services main .service-contact {
    margin: 470px 45px 0 52px;
    text-align: left;
    line-height: 2;
  }

  .page-services main .services-contact-break {
    display: initial;
  }
}

/* DR3-P03: formal assets keep their original geometry. PC flow gaps approved
 * on 10/6 stay intact; local shapes, photos and ornaments are independent. */
@media (min-width: 768px) {
  .page-services main .shape-heading h2 {
    font-size: 1.875rem;
    line-height: 1.4;
  }

  .page-services main .service-detail--day h2 { color: #fff; }

  .page-services main .service-detail--short .shape-heading {
    width: 300px;
    min-height: 284px;
    margin-left: 40px;
  }

  .page-services main .service-detail--day .shape-heading {
    width: 283px;
    min-height: 283px;
    margin-left: 3px;
    margin-bottom: 32px;
  }

  .page-services main .service-detail--consult .shape-heading {
    width: 280.532px;
    min-height: 255.624px;
    margin-left: 3.266px;
  }

  .page-services main .service-detail--trial .shape-heading {
    width: 381.014px;
    min-height: 267.832px;
    margin-left: 11.066px;
    margin-bottom: 36.5px;
  }

  .page-services main .service-details { row-gap: 83px; }

  .page-services main .service-feature__banner:not(.service-feature__banner--home) .masked-photo {
    width: 434.468px;
    flex-shrink: 0;
    margin-right: 9.429px;
    top: -50.046px;
    aspect-ratio: 434.468 / 303.82;
  }

  .page-services main .service-feature__banner--home .masked-photo {
    width: 368.058px;
    flex-shrink: 0;
    margin-left: 39.673px;
    top: -19.05px;
    aspect-ratio: 368.058 / 346.543;
  }

  .page-services main .service-feature__banner:not(.service-feature__banner--home) .shape-heading {
    left: 13.875px;
  }

  .page-services main .service-feature__banner--home {
    position: relative;
    min-height: 370px;
  }

  .page-services main .service-feature__banner--home .shape-heading {
    position: absolute;
    left: 306.812px;
    top: 70.528px;
    width: 381.014px;
    min-height: 267.832px;
    margin: 0;
  }

  .page-services main .service-detail--short > .masked-photo {
    width: 372.348px;
    left: calc(100% - 408.808px);
    top: .225px;
    aspect-ratio: 372.348 / 260.38;
  }

  .page-services main .service-detail--trial > .masked-photo {
    width: 367.965px;
    margin-top: 70.217px;
    aspect-ratio: 367.965 / 346.457;
    margin-left: 37.885px;
  }

  .page-services main .service-detail--trial > .masked-photo { position: relative; }

  .page-services main .service-feature__banner .masked-photo picture,
  .page-services main .service-detail > .masked-photo picture {
    position: absolute;
    inset: 0;
  }

  .page-services main .service-feature__banner .masked-photo img,
  .page-services main .service-detail > .masked-photo img {
    position: absolute;
    height: auto;
    max-width: none;
  }

  /* Image rectangles from the formal PDF, relative to each mask clip. */
  .page-services main .service-feature__banner:not(.service-feature__banner--home) .masked-photo img {
    width: 106.781%; left: -2.089%; top: -3.198%;
  }
  .page-services main .service-feature__banner--home .masked-photo img {
    width: 131.761%; left: -20.262%; top: -2.849%;
  }
  .page-services main .service-detail--short > .masked-photo img {
    width: 111.692%; left: -3.709%; top: -3.816%;
  }
  .page-services main .service-detail--trial > .masked-photo img {
    width: 144.276%; left: -16.234%; top: -2.159%;
  }

  .page-services main .service-feature > .sub-pattern--left,
  .page-services main .service-details > .sub-pattern--left {
    width: 443.58px;
    clip-path: none;
  }

  .page-services main .service-feature > .sub-pattern--left {
    left: calc((1000px - 100vw) / 2 - 78.74px);
    top: .48px;
  }
  .page-services main .service-details > .sub-pattern--left {
    left: calc((1000px - 100vw) / 2 - 111.51px);
    top: -16.86px;
  }

  /* Four missing PC accents. The source has 8px padding in its viewBox. */
  .page-services main .service-cards::before,
  .page-services main .service-cards::after,
  .page-services main .service-feature:not(.service-feature--home) .service-card:first-child::before,
  .page-services main .service-feature--home .service-card:first-child::before {
    content: '';
    position: absolute;
    width: 54.5px;
    height: 50.875px;
    background: url('../images/subpages-1005/accent.svg') center / contain no-repeat;
    pointer-events: none;
  }
  .page-services main .service-cards,
  .page-services main .service-card { position: relative; }
  .page-services main .service-feature:not(.service-feature--home) .service-cards::before {
    left: calc(100% - 2.6px); top: -62.2px;
  }
  .page-services main .service-feature:not(.service-feature--home) .service-cards::after {
    left: 643.4px; bottom: -26.44px;
  }
  .page-services main .service-feature:not(.service-feature--home) .service-card:first-child::before {
    left: -106.8px; top: 286.5px;
  }
  .page-services main .service-feature--home .service-card:first-child::before {
    left: -27.3px; top: -21.4px;
  }
  .page-services main .service-feature--home .service-cards::before,
  .page-services main .service-feature--home .service-cards::after { content: none; }
}

@media (max-width: 767px) {
  .page-services main .service-feature:not(.service-feature--home) .service-card:last-child p {
    letter-spacing: var(--tracking-body);
  }

  /* Return the saved line to the open space before the home banner. */
  .page-services main .service-feature--home { margin-top: 354px; }
  .page-services main .service-detail--consult { margin-top: 15px; }
  .page-services main .service-detail--trial { margin-top: 55.3px; }
  .page-services main .service-detail--trial > .masked-photo {
    width: 367.965px;
    aspect-ratio: 367.965 / 346.457;
    margin-top: 66.5px;
    margin-left: 7.294px;
  }
  .page-services main .service-detail--trial > .masked-photo img {
    position: absolute;
    width: 144.276%;
    max-width: none;
    height: auto;
    left: -16.234%;
    top: -2.159%;
  }
  .page-services main .service-details > .sub-pattern--right { bottom: -401.37px; }
  .page-services main .service-contact { margin-top: 478.6px; }
}

/* Allow enlarged text and the narrower two-column range to grow in flow. */
@media (min-width: 768px) {
  .page-services main .service-feature__banner--home {
    min-height: calc(370px + max(0px, 15rem - 240px));
  }
}

@media (min-width: 768px) and (max-width: 1100px) {
  .page-services main .service-feature__banner--home {
    flex-wrap: wrap;
    min-height: 0;
  }
  .page-services main .service-feature__banner--home .masked-photo {
    top: 0;
    margin-left: 0;
  }
  .page-services main .service-feature__banner--home .shape-heading {
    position: relative;
    left: auto;
    top: auto;
    margin: -50px 0 0 auto;
  }
  .page-services main .service-detail--trial .shape-heading {
    max-width: calc(100% - 11.066px);
  }
  .page-services main .service-detail--trial > .masked-photo {
    max-width: calc(100% - 37.885px);
  }
}

/* Grow the green SVG uniformly with multiline enlarged headings. */
.page-services main .shape-heading--green::before {
  background-size: auto 100%;
}

/* Fixed page-to-page link, using the shared pill button. */
.page-services main .service-facilities-link { margin: 105px 24px 0; text-align: center; position: relative; }
.page-services main .service-facilities-link + .service-contact { margin-top: 48px; }
@media (max-width: 767px) {
  .page-services main .service-facilities-link { margin-top: 478.6px; }
  .page-services main .service-facilities-link + .service-contact { margin-top: 32px; }
}

/* Service prose only: locations, headings and buttons retain their alignment. */
.page-services main .service-description {
  text-align: justify;
  text-align-last: left;
  line-break: strict;
}

.page-services main .service-description__note {
  display: inline-block;
  max-width: 100%;
  font-size: .875em;
  letter-spacing: 0;
  text-align: left;
  text-align-last: left;
}

/* Mobile review 02: home cards keep equal internal rhythm; decoration follows them. */
@media (max-width: 767px) {
  .page-services main .service-feature--home .service-cards { gap: 96px; }
  .page-services main .service-feature--home .service-card { padding: 40px 40px 48px; }
  .page-services main .service-feature--home .service-card h3 { margin: 24px 0; }
  .page-services main .service-details { margin-top: 400px; }
  .page-services main .service-details > .sub-pattern--left { top: -360px; }
}

/* 1111 manuscript: compact two-line service labels. */
.page-services main .service-card h3 { line-height: 1.3; padding-block: 13px 7px; }
.page-services main .service-card h3 .yuho-heading-supplement { display: inline-block; vertical-align: top; line-height: 1.35; }

@media (max-width: 767px) {
  .page-services main .services-intro-pc-break { display: none; }
}
