/**
 * School Page CSS
 * Extracted from SWELL swell_child/single-schools.php inline styles.
 * Phase 1: No refactoring — exact reproduction of original styles.
 */

/* Caveat (self-hosted, latin only — 校名タイトル用。日本語はフォールバック) */
@font-face {
  font-family: 'Caveat';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/caveat-latin-400.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

body {
  font-family: "游ゴシック体", YuGothic, "游ゴシック", "Yu Gothic", Meiryo, system-ui, sans-serif;
}

a.download {
  display: flex;
  align-items: center;
}

.l-content {
  padding-top: 0;
}

/* Smooth in-page anchor scroll + sticky-nav offset */
html {
  scroll-behavior: smooth;
}

#school_info,
#school_curriculum,
#school_accomo,
#school_course,
#school_overview,
#school_other_fee,
#school_gallery {
  scroll-margin-top: 70px;
}

/* 旧サイトはこの2セクションの手前にアンカー用 div.sub_title があった
   (mt-70+h99=+29px。mb32は次h2のmt89.6にcollapseされるため正味29px) */
#school_accomo,
#school_course {
  padding-top: 29px;
}

#content {
  margin: 0 auto;
}

.l-article {
  max-width: 1200px;
  padding-left: 0px;
  padding-right: 0px;
  margin-left: auto;
  margin-right: auto;
}

.c-postTitle__date {
  display: none;
}

.p-articleHead {
  position: relative;
}

.c-postTitle {
  align-items: center;
  padding: 5px 20px;
  display: flex;
  flex-direction: row;
  background: #3567BF;
  color: #fff;
  box-shadow: 7px 7px 0px 0 #FFF84B;
  border-radius: 10px;
}

.download_area {
  width: 300px;
  display: flex;
  justify-content: end;
}

img.head_highlight {
  position: absolute;
  left: 0px;
  top: -18px;
  width: 72px;
}

.l-mainContent {
  margin-top: 50px;
}

.c-postTitle__ttl {
  font-size: 54px;
  font-family: 'Caveat';
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wp-block-separator:not(.is-style-wide):not(.is-style-dots) {
  width: 100%;
  max-width: 100%;
  margin: 10px 0px;
}

/* SWELL チェックリスト(✓をborderで描画 — 旧サイト実測値で再現) */
ul.is-style-sme-list-check {
  list-style-type: none;
  padding-left: 24px;
}

.is-style-sme-list-check li {
  position: relative;
  margin-bottom: 4px;
}

.is-style-sme-list-check li::before {
  content: "";
  position: absolute;
  left: -19px;
  top: 8px;
  width: 8px;
  height: 6px;
  border-left: 2px solid #3567bf;
  border-bottom: 2px solid #3567bf;
  transform: rotate(-45deg);
}

/* Thumbnail area badge */
.school_thumb {
  position: relative;
  margin: 0;
}

p.school_area {
  position: absolute;
  bottom: 0;
  right: 0;
  background: #fff84b;
  padding: 12px;
  font-weight: 700;
  color: #3567bf;
}

@media (min-width: 600px) {
  .c-postTitle__ttl .title_text > span {
    font-size: 24px;
    margin-left: 50px;
  }
}

.p-articleHead.thumb_good {
  display: flex;
}

.thumb_good .p-articleThumb {
  padding-left: 47px;
  position: relative;
}

div#school_good_point {
  width: 40%;
  padding-left: 47px;
  padding-right: 47px;
  margin: 2em 0;
}

.school_keywords li {
  display: inline-block;
  background: #F4F4F4;
  color: #3567BF;
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 20px;
  margin: 5px;
}

.sammary {
  border: #3567BF;
  border-style: solid;
  border-radius: 10px;
  padding: 2px;
  display: flex;
  flex-direction: column;
  padding: 10px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  font-family: "游ゴシック体", YuGothic, "游ゴシック", "Yu Gothic", Meiryo, system-ui, sans-serif;
  color: #3567BF;
}

.sammary .upper {
  display: flex;
  align-items: center;
  padding-top: 18px;
  padding-right: 18px;
  padding-left: 5px;
  padding-bottom: 10px;
}

.sammary hr {
  height: 2px;
  background-color: #3567BF;
  border: none;
  color: #3567BF;
}

svg.icon-thumbs-up {
  flex-shrink: 0;
  padding: 5px;
  color: #3567BF;
  margin-right: 10px;
}

.lower {
  margin: 10px 10px 0px;
}

.score {
  margin-top: 24px;
  border: #f4f4f4;
  background-color: #f4f4f4;
  border-style: solid;
  border-radius: 10px;
  padding: 10px;
}

.score .row {
  display: flex;
}

.point {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 5px;
}

.score .caption {
  width: 100px;
  color: #3567bf;
  font-size: 14px;
  font-weight: 800;
}

.score .desc {
  width: 40px;
  margin-left: 9px;
  margin-top: 3px;
}

.score .small {
  font-size: 9px;
  font-weight: 600;
  z-index: 10;
}

.point:before {
  content: "●";
  color: #d5d5d5;
  font-size: 20px;
  margin-right: -2px;
  margin-left: -2px;
  line-height: 1.0;
}

.point.red:before {
  content: "●";
  color: red;
  font-size: 20px;
  margin-right: -2px;
  margin-left: -2px;
  line-height: 1.0;
}

.score .border {
  width: 1.5em;
  padding-top: 8px;
}

.score .border hr {
  height: 4px;
  background-color: #d5d5d5;
  border: none;
  color: #d5d5d5;
}

ul.school_keywords {
  margin-top: 20px;
  margin-bottom: 20px;
}

/* In-page nav: 基本スタイルは後方の「School nav menu」ブロックに統合 */

.school_info_box {
  display: flex;
  margin: 0 68px;
}

.school_info_box .head_image {
  padding: 10px;
  width: 120px;
}

.school_info_box .head_image img {
  width: 100%;
}

.school_content {
  padding: 10px;
  width: 100%;
}

/* 旧はh4相当の小見出し(fs19.2 / 左ボーダー2px青 / mb28.8 / 装飾なし) */
.school_content h3 {
  font-size: 19.2px;
  line-height: 1.4;
  margin: 0 0 28.8px;
  padding: 0 0 0 16px;
  border-left: 2px solid #3567BF;
  border-bottom: none;
  background: none;
}

.school_content h3::before,
.school_content h3::after {
  content: none;
}

/* Course accordion: native <details>/<summary>
   旧SWELLアコーディオン実寸: 青バー56px(pad10+lh36)・バー間隔47px */
details.course-item {
  margin-bottom: 47px;
}

summary.course-title {
  background-color: #3567BF;
  border-radius: 10px;
  color: #fff;
  font-size: 20px;
  line-height: 36px;
  padding: 10px 20px;
  margin-bottom: 0;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  list-style: none;
}

summary.course-title::-webkit-details-marker {
  display: none;
}

summary.course-title .course-name {
  margin: 0;
  padding: 0;
  font-size: inherit;
  line-height: inherit; /* h3既定のlhを打ち消しバー高さを旧と一致させる */
  font-weight: 700;
  color: inherit;
  background: none;
  border: none;
}

summary.course-title .course-name::before,
summary.course-title .course-name::after {
  content: none;
}

.course-toggle-icon::before {
  content: "\25BC"; /* ▼ */
  font-size: 24px;
  line-height: 1; /* バー高さ56pxを崩さない */
}

details[open] > summary .course-toggle-icon::before {
  content: "\25B2"; /* ▲ */
}

.course-body {
  padding: 15px 10px 20px;
}

.post_content table {
  border: 1px #e8e8e8 solid;
}

/* Phase 2: migrated static tables (replaces TablePress default.css + td.column-*) */
.school-table {
  border-collapse: collapse;
  border-spacing: 0;
  margin: 0 auto 1rem;
  width: 100%;
  table-layout: auto;
}

.school-table th,
.school-table td {
  padding: 15px 20px;
  text-align: left;
  vertical-align: top;
  border: none;
}

/* セル内の空行(旧: <br><br>)は wpautop で段落化されるため、
   段落間マージンを旧の空行1行分(1.6em)に合わせる */
.school-table td p {
  margin: 0 0 1.6em;
}

.school-table td p:last-child {
  margin-bottom: 0;
}

.school-table tbody tr + tr th,
.school-table tbody tr + tr td {
  border-top: 1px solid #ddd;
}

.school-table th[scope="row"] {
  background: #f7f7f7;
  color: #3567BF;
  font-weight: bold;
  width: 25%;
}

.school-table thead th {
  background: #d9edf7;
  font-weight: 700;
  vertical-align: middle;
}

.school-table tbody tr:hover td {
  background-color: #f3f3f3;
}

.wp-block-group {
  margin-top: 40px;
}

/* WPコア columns ブロック相当。
   本文は do_blocks 済みの静的HTMLのためコアの columns CSS が enqueue されず、
   カラムが内容幅に縮んでいた(旧: flex-grow:1 で均等50%、YouTube 572px幅)。 */
.post_content .wp-block-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

@media (min-width: 782px) {
  .post_content .wp-block-columns > .wp-block-column {
    flex-basis: 0;
    flex-grow: 1;
    min-width: 0;
  }
}

@media (max-width: 781px) {
  .post_content .wp-block-columns > .wp-block-column {
    flex-basis: 100%;
  }
}

/* School nav menu — 旧4項目タブ型テーブルナビの実寸再現:
   画面全幅の青帯+両端に空セル分の余白(旧79px/1280px≒6.2%)+項目幅は文字量比例+CSS sticky */
.school-nav {
  background: #3567BF;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  margin-top: 30px;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.school-nav ul {
  display: flex;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0 6.2%; /* 旧テーブル両端の空セル */
}

.school-nav li {
  margin: 0;
  flex: 1 1 auto; /* 旧 table-layout auto: セル幅は文字量比例 */
  border-right: 1px solid rgba(255, 255, 255, .6);
}

.school-nav li:first-child {
  border-left: 1px solid rgba(255, 255, 255, .6);
}

.school-nav a {
  color: #fff;
  text-decoration: none;
  padding: 11px 8px; /* 旧セル高44px */
  display: block;
  text-align: center;
  font-size: 16px;
  line-height: 1.375;
  font-weight: 600;
  transition: background-color 0.2s;
}

.school-nav a:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* ナビ直後の本文マージン(旧実測: 青帯下端→本文80px。旧のナビdivはtable下に余白30を含む) */
.school-nav + .post_content {
  margin-top: 80px;
}

/* LINE CTA (from blog_parts 16220) */
.line-cta {
  background: #06C755;
  text-align: center;
  padding: 15px 20px;
}

.line-cta a {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
}

/* Sidebar hide on school page */
#sidebar {
  display: none;
}

.description_for_table {
  font-size: 10px;
  color: #4F92AD;
}

.cv_area {
  position: relative;
  display: flex;
  justify-content: center;
  height: 100px;
}

.cv_area .button {
  width: 300px;
}

.cv_area .badge {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 111px;
}

p.gallery_subtitle,
figcaption.gallery_subtitle {
  padding-left: 10px;
  margin: 0 0 32px; /* 旧実測: サブタイトル(A棟 等)の下に32px */
}

figure.school-gallery-group {
  margin: 0 0 1.5em;
}

/* Phase 2: theme-native gallery (FooGallery fg-default 実寸再現:
   flex + gap 10px / サムネ 320x200 / round-small 5px / shadow-small) */
ul.school-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center; /* fg-center (旧サイト多数派) */
  list-style: none;
  margin: 10px 0 0;
  padding: 0 10px;
}

ul.school-gallery.fg-left {
  justify-content: flex-start;
}

ul.school-gallery li {
  margin: 0;
  width: 320px;
}

ul.school-gallery a {
  display: block;
  position: relative;
  line-height: 0;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 1px 4px 0 rgba(0, 0, 0, .5);
}

ul.school-gallery a::after {
  /* fg-shadow-inset-small */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 5px;
  box-shadow: inset 0 1px 4px 0 rgba(0, 0, 0, .3);
  pointer-events: none;
}

ul.school-gallery img {
  width: 320px;
  height: 200px;
  object-fit: cover;
  display: block;
}

.fg-default.fg-center {
  text-align: initial;
}

/* 投稿フッターのカテゴリ・タグ(旧SWELL p-articleFoot 再現) */
.p-articleFoot {
  border-top: 1px dashed #e2e2e2;
  margin: 2em 0 0;
  padding-top: 2em;
}

.p-articleMetas {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
  gap: .625em;
  padding: 0 1px;
}

.p-articleMetas__termList {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: .5em;
}

.p-articleMetas__termList::before {
  content: "";
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  background: center / contain no-repeat;
}

.c-categoryList::before {
  background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%233567BF"%3E%3Cpath d="M10 4l2 2h8a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h6z"/%3E%3C/svg%3E');
}

.c-tagList::before {
  background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23888"%3E%3Cpath d="M21.4 11.6l-9-9A2 2 0 0 0 11 2H4a2 2 0 0 0-2 2v7c0 .5.2 1 .6 1.4l9 9a2 2 0 0 0 2.8 0l7-7a2 2 0 0 0 0-2.8zM6.5 8A1.5 1.5 0 1 1 8 6.5 1.5 1.5 0 0 1 6.5 8z"/%3E%3C/svg%3E');
}

.c-categoryList__link,
.c-tagList__link {
  border-radius: 1px;
  display: block;
  line-height: 1;
  padding: 4px .5em;
  text-decoration: none;
}

.c-categoryList__link {
  background-color: #3567BF;
  color: #fff;
}

.c-categoryList__link:hover {
  opacity: .8;
  color: #fff;
}

.c-tagList__link {
  background: #f7f7f7;
  color: #333;
}

.c-tagList__link:hover {
  opacity: .8;
  color: #333;
}

/* Other info section */
.other_info {
  margin: 30px 0;
}

/* Table wrap for mobile scroll */
.table-wrap {
  overflow-x: auto;
}

/* CTA section */
.value {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 40px 0;
}

.value__bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

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

.value__container {
  text-align: center;
  padding: 80px 20px 70px;
}

.value__ttl {
  font-size: 28px;
  color: #333;
  margin-bottom: 20px;
}

.value__ttl strong {
  color: #3567BF;
  font-size: 36px;
}

.value__button {
  display: inline-block;
  background: #FFF84B;
  color: #3567BF;
  padding: 15px 40px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 18px;
  text-decoration: none;
  transition: opacity 0.2s;
}

.value__button:hover {
  opacity: 0.8;
}

/* Responsive */
@media (max-width: 901px) {
  .l-mainContent {
    margin-top: 0px;
  }

  .post_content h2 {
    margin: 10px;
  }

  .article_contents {
    margin: 15px;
    padding-top: 10px;
    padding-bottom: 40px;
  }

  .c-postTitle {
    align-items: center;
    padding: 5px 20px;
    display: flex;
    flex-direction: row-reverse;
    background: #3567BF;
    color: #fff;
    box-shadow: 0px 7px 0px 0 #fff84b;
    border-radius: 0px;
  }

  .p-articleHead.c-postTitle {
    display: flex;
    flex-direction: column;
    padding: 0.2em 1.5em 1.5em 1.5em;
  }

  .title_text {
    display: flex;
    flex-direction: column;
    font-size: 36px;
  }

  .title_text span {
    font-size: 16px;
    font-weight: 400;
  }

  .download_area {
    width: 100%;
  }

  a.download {
    display: flex;
    align-items: center;
    justify-content: end;
  }

  button.common_button {
    border-radius: 30px;
    background-color: yellow;
    color: #3567BF;
    padding: 5px 20px;
    font-size: 14px;
    font-weight: 700;
  }

  .thumb_good .p-articleThumb {
    width: initial;
    padding-left: initial;
  }

  .p-articleHead.thumb_good {
    display: flex;
    flex-direction: column;
  }

  div#school_good_point {
    width: 100%;
    padding-left: 20px;
    padding-right: 20px;
    margin: 0.5em 0;
  }

  .school_info_box {
    display: flex;
    margin: 0;
    flex-direction: column;
    align-items: center;
  }

  .table-wrap {
    overflow-x: scroll;
    margin: 0 10px;
  }

  .tablepress,
  .school-table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
  }

  .course-body {
    overflow-x: scroll;
  }

  .course_info {
    overflow-x: scroll;
  }

  .post_content td, .post_content th {
    white-space: nowrap;
  }

  details.course-item {
    margin: 0 3% 23px; /* 旧SP実測: バー下端→次バー23px(旧はitem内余白15+gap8) */
  }

  .other_info {
    margin: 30px;
  }

  .post_content h3::before {
    width: 90%;
    margin-left: 0.8em;
    margin-right: 0.8em;
  }

  .fg-default.fg-gutter-10 {
    padding-left: 0px;
  }

  .fg-default.fg-gutter-10 .fg-item {
    margin-right: initial;
  }

  .foogallery .fg-item.fg-loaded {
    display: flex;
    justify-content: center;
  }

  .cv_area .badge {
    width: 40px;
  }

  p.gallery_subtitle,
  figcaption.gallery_subtitle {
    padding: 0 5%;
  }

  ul.school-gallery {
    padding: 0 5%;
  }

  /* fg-m-col2: モバイル2列 */
  ul.school-gallery li {
    width: calc(50% - 5px);
  }

  ul.school-gallery img {
    width: 100%;
    height: auto;
    aspect-ratio: 320 / 200;
  }

  .fg-default.fg-m-col2.fg-gutter-10 .fg-item {
    margin-bottom: 10px !important;
  }

  /* School nav mobile: 旧SPは4項目1行(両端の空セルなし) */
  .school-nav ul {
    flex-wrap: nowrap;
    justify-content: center;
    padding: 0;
  }

  .school-nav a {
    padding: 11px 4px;
    font-size: 13px;
    white-space: nowrap;
  }
}

/* Cell background */
.swl-cell-bg {
  width: initial;
}

td.has-text-align-center {
  cursor: pointer;
}

.galcenter {
  text-align: center;
  margin: auto;
}

/* Common button */
button.common_button {
  border-radius: 30px;
  background-color: #FFF84B;
  color: #3567BF;
  padding: 8px 24px;
  font-size: 14px;
  font-weight: 700;
  border: none;
  cursor: pointer;
}

/* SWL marker highlight decoration */
span.swl-marker {
  position: relative;
}

span.swl-marker::before {
  content: '';
  display: inline-block;
  width: 50px;
  height: 50px;
  background-image: url(../images/head_highlight.png);
  background-size: contain;
  vertical-align: middle;
  background-repeat: no-repeat;
  position: absolute;
  left: -20px;
  top: -15px;
  -webkit-transform: rotate(-16deg);
  transform: rotate(-16deg);
}

/* LINE CTA title highlight */
span#line_cta_title strong {
  position: relative;
  font-size: 56px;
}

span#line_cta_title strong::before {
  content: '';
  display: inline-block;
  width: 100px;
  height: 100px;
  background-image: url(../images/head_highlight.png);
  background-size: contain;
  vertical-align: middle;
  background-repeat: no-repeat;
  position: absolute;
  left: -40px !important;
  top: -65px;
  -webkit-transform: rotate(-16deg);
  transform: rotate(-16deg);
}

span#line_cta_title::before {
  content: none;
}

span.line_cta_desc::before {
  content: none;
}

/* wp-block-cover font */
.wp-block-cover {
  font-family: "游ゴシック体", YuGothic, "游ゴシック", "Yu Gothic", Meiryo, system-ui, sans-serif;
}

/* ============================================================
   緑背景 LINE 割引CTA(旧 blog_parts 16220 の再現・実測値)
   ============================================================ */
.school-line-cta.wp-block-cover {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 430px;
  padding: 32px;
  overflow: hidden;
  margin: 0 0 32px; /* 旧実測: 上0・下32px */
}

.school-line-cta .wp-block-cover__image-background {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.school-line-cta .wp-block-cover__inner-container {
  position: relative;
  z-index: 1;
  color: #fff;
  text-align: center;
  width: 100%;
}

.school-line-cta p {
  margin: 0 0 1em;
}

.school-line-cta .u-mb-0 {
  margin-bottom: 0 !important; /* 旧: タイトルPは mb0(u-mb-ctrl u-mb-0) */
}

.school-line-cta .wp-block-cover__inner-container > p:last-child {
  margin-bottom: 0; /* 旧実測: 末尾の注意書きは mb0 */
}

.school-line-cta .has-large-font-size {
  font-size: 20px;
}

.swl-fz.u-fz-l { font-size: 20px; } /* 旧実測20px */
.swl-fz.u-fz-xl { font-size: 89.6px; }
.swl-fz.u-fz-xs { font-size: 12px; line-height: 1.5; }

/* 黄色マーカー(下から22%に黄色) */
.swl-marker.mark_yellow {
  background-image: linear-gradient(rgba(0, 0, 0, 0) 78%, #FFF84B 0%);
}

/* CTAタイトルのマーカーのみ拡大(旧実測: fs20 lh1.8 pad4px、行高161px)。
   本文中のマーカー(line_cta_desc)は本文サイズのまま */
#line_cta_title.swl-marker {
  font-size: 20px;
  line-height: 1.8;
  padding: 4px;
}

/* 白抜き丸ボタン(is-style-btn_normal 実測)。旧: div margin 0 0 32px / link lh1.5 h78 */
.school-line-cta .swell-block-button {
  margin: 0 0 32px;
}

.school-line-cta .swell-block-button__link {
  display: inline-block;
  background-color: #3567BF;
  color: #fff;
  font-weight: 700;
  line-height: 1.5;
  padding: 12px 24px;
  border-radius: 80px;
  min-width: 40%;
  text-align: center;
  text-decoration: none;
  transition: box-shadow .25s;
}

.school-line-cta .swell-block-button__link:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, .1), 0 12px 24px -12px rgba(0, 0, 0, .2);
}

@media (max-width: 700px) {
  .school-line-cta.wp-block-cover { min-height: 360px; padding: 24px 14px; }
  .swl-fz.u-fz-xl { font-size: 56px; }
  .swl-fz.u-fz-l { font-size: 20px; }
}

/* フィリピン留学診断 CTA のスタイルは一覧ページでも使うため main.css へ移動 */

/* ============================================================
   関連する学校(旧 p-relatedPosts -type-card の実寸再現:
   4件・4列・サムネ16:9+校名14px boldのみ。日付は旧サイトも非表示)
   ============================================================ */
.school-related {
  max-width: 1280px; /* 内寸1200(旧カード288px×4+gap16×3) */
  margin: 96px auto 53px; /* 旧 l-articleBottom__section margin-top 6em / 下は旧実測53px */
  padding: 0 40px;
}

.school-related__title {
  /* 旧 c-secTitle: 20px+左に青縦線 */
  font-size: 20px;
  color: var(--color_text, #333);
  margin: 0 0 1.5em;
  padding-left: 14px;
  position: relative;
  line-height: 1.6;
}

.school-related__title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 1.2em;
  background: #3567BF;
}

.school-related__list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.school-related__link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.school-related__link:hover {
  opacity: .75;
}

.school-related__thumb {
  margin: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.school-related__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.school-related__name {
  padding-top: 1em;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .school-related {
    padding: 0 20px;
  }

  .school-related__list {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

/* 旧SWELL SP: 本文4vw(15px@375)・infoボックス小見出し4.2vw(15.75px@375) */
@media (max-width: 600px) {
  #main_content .post_content {
    font-size: 4vw;
  }

  .school_content h3 {
    font-size: 4.2vw;
    margin-bottom: 1.5em;
  }
}

/* ============================================================
   YouTube facade(クリックで初めてiframeを生成)
   ============================================================ */
.yt-facade {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 0;
  border: none;
  background: #000;
  cursor: pointer;
  overflow: hidden;
  /* 最大幅を絞ったぶん本文の左端に寄ってしまうため中央へ。角丸は本文カードの丸みに合わせる */
  margin-inline: auto;
  border-radius: 16px;
}

.yt-facade img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: .9;
}

.yt-facade__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 68px;
  height: 48px;
  background: rgba(23, 23, 23, .8);
  border-radius: 12px;
}

.yt-facade__play::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-40%, -50%);
  border-style: solid;
  border-width: 11px 0 11px 19px;
  border-color: transparent transparent transparent #fff;
}

.yt-facade:hover .yt-facade__play {
  background: #f00;
}

.yt-facade iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* WPコア embed 相当: aspect-ratio付き wrapper 内では ::before(padding-top:56.25%)が
   高さを決め、中身は absolute fill(コアはiframe用。facade化したbuttonにも適用)。
   元iframe由来の max-width も wrapper 内では無効(wrapperが幅を決める) */
.wp-has-aspect-ratio .wp-block-embed__wrapper .yt-facade,
.wp-has-aspect-ratio .wp-block-embed__wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none !important;
  aspect-ratio: auto;
}

/* 中の facade は wrapper いっぱいに広がる作りなので、幅を絞るならこの外枠で行う。
   本文幅(804px)いっぱいだとサムネの粗さが目立つため、少し小さくして中央に置く
   (2026-08-23 あきら指示)。 */
.wp-block-embed.wp-has-aspect-ratio {
  max-width: 620px;
  margin-inline: auto;
}
