* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
  color: #2d2d2d;
  background: #ffffff;
  line-height: 1.7;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(100%, 980px);
  margin: 0 auto;
  padding: 0 20px;
}

.page-header {
  background: #ffffff;
  border-bottom: 1px solid #e7e7e7;
  padding: 14px 0;
}

.header-logo {
  display: block;
  width: auto;
  height: auto;
  max-height: 48px;
}

.hero {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  background: #e8ebf0;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-picture {
  position: absolute;
  inset: 0;
  display: block;
}

.hero-bg-img {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
  object-position: center;
  max-width: none;
}

.hero-overlay {
  position: relative;
  z-index: 1;
  min-height: 420px;
  display: flex;
  align-items: center;
  padding: 56px 0;
  /* TOPテキストの左余白（白枠幅と連動） */
  --hero-text-pad-left: 24px;
}

.hero-overlay-inner {
  position: relative;
  z-index: 1;
  width: 100%;
}

.hero-overlay::before {
  content: "";
  position: absolute;
  /* 白枠はヒーロー左端に固定 */
  left: 0;
  top: 22px;
  bottom: 22px;
  /* テキスト（.hero-panel）幅に合わせて伸びすぎないよう固定 */
  width: min(calc(720px + var(--hero-text-pad-left) + 40px), 100%);
  background: rgba(255, 255, 255, 0.9);
  z-index: 0;
  pointer-events: none;
}

.hero-panel {
  max-width: min(100%, 720px);
  margin: 0;
  padding: 0 0 0 var(--hero-text-pad-left);
  background: transparent;
  box-shadow: none;
  text-align: left;
}

.hero-mobile-titles {
  display: none;
}

.hero-desktop-titles {
  display: block;
}

.hero-title--mobile-heading {
  margin: 0;
}

.hero-text-block {
  margin: 0 0 1.15em;
}

.hero-text-block:last-child {
  margin-bottom: 0;
}

.hero-highlight {
  margin: 8px 0 0;
  font-size: clamp(18px, 1.8vw, 22px);
  line-height: 1.5;
  color: #2d2d2d;
  font-weight: 400;
}

.hero-text-block .hero-highlight {
  margin-top: 0;
}

@media (min-width: 820px) {
  .hero-highlight {
    white-space: nowrap;
  }
}

.hero-highlight-intro,
.hero-highlight-outro {
  color: #2d2d2d;
  font-weight: 400;
}

.hero-highlight-em {
  color: #c00;
  font-weight: 700;
}

.hero-tag {
  margin: 0 0 6px;
  font-size: clamp(18px, 1.8vw, 22px);
  line-height: 1.35;
  font-weight: 700;
  color: #1e2863;
  letter-spacing: 0.06em;
}

.hero-title {
  margin: 0 0 8px;
  font-size: clamp(28px, 4.2vw, 48px);
  line-height: 1.2;
  font-weight: 700;
  color: #1e2863;
  word-break: keep-all;
  overflow-wrap: normal;
}

@media (min-width: 640px) {
  .hero-title {
    white-space: nowrap;
  }
}

@media (max-width: 639px) {
  .hero-title {
    white-space: normal;
    text-wrap: pretty;
  }
}

.hero-quote {
  margin: 0 0 6px;
  font-size: 15px;
  line-height: 1.55;
  color: #2d2d2d;
}

.hero-copy {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: #2d2d2d;
}

@media (min-width: 821px) {
  .hero-panel-body > .hero-text-block:first-child {
    margin-top: 26px;
  }
}

.about-body p {
  margin: 0 0 1em;
}

.about-body p:last-child {
  margin-bottom: 0;
}

/* 1行目・2行目はくっつける（.about-body p の margin-bottom:1em を打ち消し） */
.about-body .about-lead {
  margin: 0;
  padding: 0;
  font-size: clamp(18px, 2.5vw, 24px);
  line-height: 1.25;
  color: #c00;
  font-weight: 700;
}

.about-body .about-subtitle {
  margin: 5px 0 1.5em;
  padding: 0;
  font-size: clamp(18px, 2.2vw, 22px);
  font-weight: 700;
  color: #c00;
  line-height: 1.25;
}

.accent-inline {
  color: #c00;
  font-weight: 700;
}

.placeholder-image {
  border: 2px dashed #c6cbd6;
  background: #fff;
  border-radius: 8px;
  min-height: 240px;
  display: grid;
  place-items: center;
  color: #7d8698;
  font-weight: 700;
  text-align: center;
  padding: 16px;
}

.section {
  background: #ffffff;
  padding: 56px 0;
}

.section--program {
  background: #fdf0f0;
}

.section-title {
  margin: 0 0 24px;
  padding-left: 16px;
  border-left: 8px solid #c00;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.35;
}

.lead-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 28px;
  align-items: start;
}

.lead-grid--about {
  grid-template-columns: 1fr 1.15fr;
}

.feature-stack {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.feature-stack-body {
  max-width: 100%;
}

.feature-stack-body > p {
  margin: 0 0 1em;
}

.feature-stack-body > p:last-child {
  margin-bottom: 0;
}

.feature-lead {
  font-size: 15px;
}

.feature-footnote {
  margin: 20px 0 0;
  color: #2d2d2d;
  font-weight: 400;
  font-size: 14px;
}

.feature-em-red {
  color: #cc0000;
  font-weight: 700;
}

.program-intro {
  margin: 0 0 1em;
  font-size: 14px;
  color: #444;
}

.program-intro.program-intro--secondary {
  margin: 0 0 1em;
}

/* グリッド内で画像が縦に引き伸ばされないよう、幅基準で比率固定 */
.about-visual {
  margin: 0;
  min-width: 0;
  align-self: start;
}

.about-visual picture {
  display: block;
  width: 100%;
  line-height: 0;
}

.about-visual img {
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 1200 / 1542;
  display: block;
  border-radius: 8px;
}

.feature-visual {
  margin: 0;
  width: 100%;
  min-width: 0;
}

.feature-visual picture {
  display: block;
  width: 100%;
  line-height: 0;
}

.feature-visual img {
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 2000 / 672;
  display: block;
  border-radius: 4px;
}

.map-embed {
  width: 100%;
  border-radius: 4px;
  overflow: hidden;
}

.map-embed iframe {
  width: 100%;
  height: min(56vw, 420px);
  min-height: 280px;
  display: block;
  border: 0;
}

.access-details {
  display: grid;
  gap: 8px;
}

.accent {
  color: #c00;
  font-weight: 700;
}

.feature-list {
  margin: 0;
  padding-left: 20px;
}

.feature-list li {
  margin-bottom: 10px;
}

.program-table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
}

th,
td {
  border: 1px solid #d8d8d8;
  padding: 6px 10px;
  font-size: 14px;
  vertical-align: middle;
  text-align: center;
  line-height: 1.35;
  font-weight: 400;
}

thead th {
  background: #f0e4e8;
  font-weight: 400;
}

.program-th-no {
  width: 3.5rem;
  text-align: center;
  white-space: nowrap;
}

.program-th-major {
  width: 28%;
  min-width: 8.5rem;
}

tbody td:first-child {
  text-align: center;
  font-weight: 400;
  white-space: nowrap;
}

.access-grid {
  display: grid;
  gap: 24px;
}

.access-note {
  margin: 0;
  font-size: 14px;
}

.access-sub {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #666;
  line-height: 1.6;
}

.access-heading {
  margin: 16px 0 6px;
  font-size: 15px;
  font-weight: 700;
  color: #2d2d2d;
}

.access-stations {
  margin: 0;
  padding-left: 1.25em;
  font-size: 14px;
}

.access-stations li {
  margin-bottom: 6px;
}

.form-placeholder {
  padding: 40px 0 24px;
  text-align: left;
  background: #e9f0f3;
  color: #2d2d2d;
}

.form-placeholder h2 {
  margin: 0 0 12px;
  padding-left: 16px;
  border-left: 8px solid #cc0000;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.35;
  font-weight: 700;
  color: #2d2d2d;
}

.wp-form-embed {
  width: 100%;
  max-width: 100%;
  margin: 12px auto 0;
  border: 0;
  border-radius: 0;
  overflow: visible;
  background: transparent;
  box-shadow: none;
}

.wp-form-embed iframe {
  width: 100%;
  height: 680px;
  /* JSで内容高さに合わせるまでの初期値。min-height が大きいと内容より下が空いて見える */
  min-height: 280px;
  display: block;
  border: 0;
  background: transparent;
  overflow: hidden;
}

.site-footer {
  background: #1e2863;
  color: #fff;
  padding: 14px 0;
}

.site-footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 24px;
}

.footer-links {
  display: flex;
  gap: 22px;
  margin: 0;
}

.footer-links a {
  color: #fff;
  text-decoration: none;
  font-size: 13px;
}

.footer-links a:hover {
  text-decoration: underline;
}

.footer-copy {
  margin: 0;
  text-align: right;
  font-size: 12px;
  color: #fff;
}

@media (max-width: 820px) {
  .header-logo {
    max-height: 40px;
  }

  .hero {
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    overflow: hidden;
  }

  .hero-media {
    position: relative;
    order: 1;
    z-index: 0;
  }

  /* picture/img が absolute のままだと .hero-media の高さが確保されず、
     続く .hero-overlay が画像と重なって表示される */
  .hero-picture {
    position: relative;
    inset: auto;
    display: block;
    height: auto;
  }

  .hero-bg-img {
    position: relative;
    inset: auto;
    width: 100%;
    height: auto;
    min-height: 200px;
    max-height: none;
    aspect-ratio: 2560 / 834;
    object-fit: cover;
    vertical-align: middle;
  }

  .hero-overlay {
    order: 2;
    min-height: 0;
    padding: 18px 0 28px;
    --hero-text-pad-left: 16px;
    display: block;
    z-index: 1;
  }

  .hero-overlay::before {
    display: none;
  }

  .hero-desktop-titles {
    display: none;
  }

  .hero-mobile-titles {
    display: block;
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: auto;
    z-index: 2;
    padding: 14px 0 18px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0.12) 55%, transparent 100%);
    box-sizing: border-box;
    text-align: left;
  }

  .hero-mobile-titles .hero-tag,
  .hero-mobile-titles .hero-title {
    color: #1e2863;
    text-shadow:
      0 0 12px rgba(255, 255, 255, 0.95),
      0 0 4px rgba(255, 255, 255, 0.98),
      0 1px 3px rgba(255, 255, 255, 0.9);
  }

  .hero-mobile-titles .hero-title {
    white-space: normal;
    text-wrap: pretty;
    word-break: keep-all;
  }

  .hero-panel {
    max-width: 100%;
    padding: 0;
  }

  .hero-panel-body {
    padding-top: 0;
  }

  .hero-text-block {
    margin-bottom: 1.15em;
  }

  .hero-text-block:last-child {
    margin-bottom: 0;
  }

  .section-title {
    padding-left: 14px;
  }

  .lead-grid,
  .lead-grid--about {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 38px 0;
  }

  .wp-form-embed {
    width: 100%;
    margin-top: 14px;
  }

  .wp-form-embed iframe {
    height: min(70vh, 720px);
    min-height: 280px;
  }

  .site-footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-copy {
    text-align: left;
  }
}
