/* Nagoya reuses Higashiosaka's components; all overrides stay within this page. */
.p-nagoya {
  --nagoya-blue: #146fc4;
  --nagoya-blue-dark: #0b3c6a;
  --nagoya-blue-light: #edf5fc;
  --accent-color: var(--nagoya-blue);
  /* Responsive lettering: edit width independently; height follows a fixed ratio. */
  --nagoya-pc-letter-width: 84.315%;
  --nagoya-pc-letter-min-width: 1108.8px;
  --nagoya-pc-letter-ratio: 2.390325;
  --nagoya-pc-letter-y: 0px;
  --nagoya-sp-letter-width: 121%;
  --nagoya-sp-letter-ratio: 3.0211805556;
  /* Reference 390x844: (345 - 84) / (844 - 168) = 38.61% of the FV height. */
  --nagoya-sp-letter-top: 38.61%;
  --nagoya-sp-letter-x: 2%;
  --nagoya-sp-letter-y: 0px;
  /* Existing shared campus components read this token, including FAQ and pricing. */
  --main-green: var(--nagoya-blue);
}

.p-nagoya :is(section[id], #referral) {
  scroll-margin-top: 110px;
}

.p-nagoya .drawer__nav {
  background: var(--nagoya-blue-dark);
}

.p-nagoya .school-menu__panel a:is(:hover, [aria-current="page"]) {
  background: var(--nagoya-blue-light);
  color: var(--nagoya-blue-dark);
}

/* FV height and image fitting inherit Higashiosaka's shared styles. */
.p-nagoya .mv {
  background: #000;
  overflow: clip;
}

.p-nagoya .mv__image {
  display: block;
}

@media screen and (min-width: 769px) {
  .p-nagoya .mv__text-wrap {
    width: min(46%, 632px);
    left: clamp(28px, 5.56vw, 80px);
  }

  .p-nagoya .mv__copy {
    font-size: clamp(32px, 4.2vw, 60.52px);
  }

  .p-nagoya .mv__copy-sub {
    font-size: clamp(22px, 2.77vw, 39.885px);
  }

  .p-nagoya .mv__desc {
    font-size: clamp(16px, 1.67vw, 24px);
  }

  .p-nagoya .mv__cv-btn {
    grid-template-columns: minmax(0, 300px);
    margin-top: clamp(20px, 3.33vw, 48px);
  }
}

.p-nagoya .mv__copy-sub {
  color: #90cfff;
}

/* Retain the full facility photo alongside the original, location-neutral description. */
.p-nagoya .nagoya-facility {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  align-items: center;
  gap: clamp(28px, 4vw, 64px);
  margin-top: 48px;
}

.p-nagoya .nagoya-facility__image {
  overflow: hidden;
  border-radius: 12px;
  background: var(--nagoya-blue-light);
}

.p-nagoya .nagoya-facility__image img {
  height: auto;
}

.p-nagoya .nagoya-facility__textarea {
  margin-top: 0;
  padding: 30px 0 30px 28px;
  border: 0;
  border-left: 3px solid var(--nagoya-blue);
  border-radius: 0;
}

.p-nagoya .facility-guide__heading {
  margin-inline: 0;
  font-size: clamp(20px, 2.1vw, 28px);
  line-height: 1.7;
}

.p-nagoya .facility-guide__text {
  line-height: 2;
}

.p-nagoya .facility-guide__text p+p {
  margin-top: 16px;
}

/* Reference layout: student photo on the left, grade and approved comment on the right. */
.p-nagoya .nagoya-voice {
  background: var(--nagoya-blue-light);
}

.p-nagoya .nagoya-voice__list {
  margin-top: 48px;
}

.p-nagoya .nagoya-voice__item {
  display: grid;
  grid-template-columns: minmax(0, 280px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
  padding: 36px;
  background: #fff;
  border-radius: 16px;
}

.p-nagoya .nagoya-voice__item+.nagoya-voice__item {
  margin-top: 28px;
}

.p-nagoya .nagoya-voice__image {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 12px;
}

/* The supplied screenshots have black margins. Centered cover trims those without editing originals. */
.p-nagoya .nagoya-voice__image img {
  width: 100%;
  height: 100%;
}

.p-nagoya .nagoya-voice__label {
  color: var(--nagoya-blue);
  font-size: 14px;
  font-weight: 700;
}

.p-nagoya .nagoya-voice__title {
  margin-top: 12px;
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.6;
}

.p-nagoya .nagoya-voice__grade {
  margin-top: 12px;
  font-size: 14px;
  color: #555;
}

.p-nagoya .nagoya-voice__text {
  margin-top: 24px;
  line-height: 1.9;
  color: #333;
}

/* With the registration steps removed, STEP03 must keep the same card style as STEP01/02. */
.p-nagoya .application__flow:last-child {
  background: #ebebeb;
  border-radius: 24px;
  padding: 40px 48px;
  margin-top: 123px;
}

.p-nagoya .nagoya-contact-link {
  width: fit-content;
  padding: 14px 24px;
  border: 1px solid var(--nagoya-blue);
  border-radius: 90px;
  background: #fff;
  color: var(--nagoya-blue);
  text-align: center;
  font-weight: 700;
}

.p-nagoya .drawer__btn .nagoya-contact-link {
  margin-inline: auto;
}

@media screen and (max-width: 1024px) {
  .p-nagoya .nagoya-facility {
    gap: 28px;
  }

  .p-nagoya .nagoya-facility__textarea {
    padding: 16px 0 16px 20px;
  }

  .p-nagoya .facility-guide__text {
    font-size: 15px;
  }
}

@media screen and (max-width: 768px) {
  .p-nagoya {
    padding-bottom: calc(62px + env(safe-area-inset-bottom, 0px));
  }

  .p-nagoya :is(section[id], #referral) {
    scroll-margin-top: 96px;
  }

  /* Preserve the inherited full-bleed ABOUT image without scrollbar-width overflow. */
  .p-nagoya .about {
    overflow-x: clip;
  }

  .p-nagoya .nagoya-facility {
    grid-template-columns: 1fr;
    margin-top: 32px;
  }

  .p-nagoya .nagoya-facility__textarea {
    padding: 0;
    border: 0;
  }

  .p-nagoya .facility-guide__heading {
    font-size: 21px;
  }

  .p-nagoya .facility-guide__text {
    font-size: 15px;
  }

  .p-nagoya .nagoya-voice__list {
    margin-top: 32px;
  }

  .p-nagoya .nagoya-voice__item {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 24px;
  }

  .p-nagoya .nagoya-voice__image {
    aspect-ratio: 5/4;
    margin-inline: auto;
  }

  .p-nagoya .nagoya-voice__title {
    font-size: 22px;
    margin-top: 8px;
  }

  .p-nagoya .nagoya-voice__grade {
    margin-top: 8px;
  }

  .p-nagoya .nagoya-voice__text {
    margin-top: 16px;
  }

  .p-nagoya .application__flow:last-child {
    padding: 20px 24px;
    margin-top: 60px;
  }

  .p-nagoya .header__inner {
    column-gap: 12px;
  }

  .p-nagoya .header__logo {
    min-width: 0;
  }

  .p-nagoya .sp__menu {
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: #fff;
  }

  .p-nagoya .nagoya-sp-link {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 62px;
    padding: 10px 6px;
    background: var(--nagoya-blue);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
  }

  .p-nagoya .nagoya-sp-link--outline {
    background: #fff;
    color: var(--nagoya-blue);
    border: 1px solid var(--nagoya-blue);
  }

  .p-nagoya .drawer__nav {
    padding-bottom: calc(82px + env(safe-area-inset-bottom, 0px));
  }
}
/* Fit the transparent reference-style lettering to the visible frame independently
   of the cover-cropped photos. Foreground and background share identical fitting. */
.p-nagoya .mv__lettering {
  max-inline-size: none;
  position: absolute;
  display: block;
  z-index: 1;
  /* PC Y is an offset from the vertical center; SP uses its own top anchor. */
  top: calc(50% + var(--nagoya-pc-letter-y));
  translate: 0 -50%;
  bottom: auto;
  width: max(var(--nagoya-pc-letter-min-width), var(--nagoya-pc-letter-width));
  height: auto;
  aspect-ratio: var(--nagoya-pc-letter-ratio);
  left: 29%;
  right: auto;
  pointer-events: none;
}

.p-nagoya .mv__lettering img {
  /* Out-of-flow image cannot impose its intrinsic ratio on the lettering box. */
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
}

.p-nagoya .mv__foreground {
  position: absolute;
  display: block;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.p-nagoya .mv__foreground img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.p-nagoya .mv__text-wrap {
  z-index: 3;
}

@media screen and (max-width: 768px) {
  .p-nagoya .mv__image--nagoya img {
    height: calc(100vh - 168px);
  }

  .p-nagoya .mv__lettering {
    top: calc(var(--nagoya-sp-letter-top) + var(--nagoya-sp-letter-y));
    translate: none;
    left: var(--nagoya-sp-letter-x);
    right: auto;
    width: var(--nagoya-sp-letter-width);
    height: auto;
    aspect-ratio: var(--nagoya-sp-letter-ratio);
    bottom: auto;
  }

  .p-nagoya .mv__foreground img {
    object-position: top;
  }
}
