.sgb-block-say-text__content {
    min-height: 0 !important;
    height: auto !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}

.sgb-block-say-text__content p {
    margin: 0 !important;
}


/* カード内のリンクを青くせず、元の文字色（黒や指定色）に合わせる設定 */
.clickable-card a {
  color: inherit !important;
  text-decoration: none !important;
}


 /* カード全体をクリック可能にする設定 */
.clickable-card {
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* ホバー時に少し浮き上がらせる視覚効果（お好みで） */
.clickable-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

/* リンクの判定をカード全体（親要素）の端まで広げる魔法の記述 */
.clickable-card a::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1; /* カード全体をリンクの膜で覆います */
}

/* スマホ表示時：コース説明文の左右余白を一括確保 */
@media screen and (max-width: 768px) {
  /* w_course自体、およびその中の段落に左右余白を設定 */
  .w_course,
  .w_course p {
    padding-left: 16px !important;
    padding-right: 16px !important;
    box-sizing: border-box !important;
    width: 100% !important;
  }
}

/* スマホ表示時：画像と緑枠ブロック（grid_logo）の横幅を広げる */
@media screen and (max-width: 768px) {
  .grid.grid_logo {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
  }

  /* 枠内の画像および緑枠ボックスを親要素の幅いっぱいに拡大 */
  .grid.grid_logo img,
  .grid.grid_logo > * {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
}

/* スマホ表示時：コース欄の緑枠(.border)の左右内側余白だけを詰める */
@media screen and (max-width: 768px) {
  .grid.grid_logo .border {
    padding-left: 12px !important;  /* 左右の余白（お好みで 8px〜16px で調整） */
    padding-right: 12px !important;
  }
}

/* コース内の料金表の上に一括で余白をつける */
.w_course table {
  margin-top: 32px !important; /* お好みで 24px〜40px に調整 */
}

/* 学校一覧ハブ：学校カード全体をリンクにする（パソコン・スマホ共通。2026-11-18） */
.post-type-archive-school .entry-content .wp-block-columns:has(> .wp-block-column > .wp-block-image) > .wp-block-column {
  position: relative;
}
.post-type-archive-school .entry-content .wp-block-columns:has(> .wp-block-column > .wp-block-image) > .wp-block-column .wp-block-image {
  position: static !important;
}
.post-type-archive-school .entry-content .wp-block-columns:has(> .wp-block-column > .wp-block-image) > .wp-block-column .wp-block-image a {
  transform: none !important;
}
.post-type-archive-school .entry-content .wp-block-columns:has(> .wp-block-column > .wp-block-image) > .wp-block-column .wp-block-image a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}
@media (hover: hover) {
  .post-type-archive-school .entry-content .wp-block-columns:has(> .wp-block-column > .wp-block-image) > .wp-block-column {
    transition: transform 0.2s;
  }
  .post-type-archive-school .entry-content .wp-block-columns:has(> .wp-block-column > .wp-block-image) > .wp-block-column:hover {
    transform: translateY(-3px);
  }
}

/* 学校一覧ハブ：スマホで学校カードを2列に（2026-11-18） */
@media screen and (max-width: 781px) {
  .post-type-archive-school .entry-content .wp-block-columns:has(> .wp-block-column > .wp-block-image) {
    flex-wrap: nowrap !important;
    gap: 10px !important;
    padding: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 14px !important;
    max-width: 100% !important;
  }
  .post-type-archive-school .entry-content .wp-block-columns:has(> .wp-block-column > .wp-block-image) > .wp-block-column {
    flex-basis: 0 !important;
    flex-grow: 1;
    min-width: 0;
    font-size: 12px;
    padding: 0 6px 10px !important;
    overflow: hidden;
  }
  .post-type-archive-school .entry-content .wp-block-columns:has(> .wp-block-column > .wp-block-image) > .wp-block-column > * {
    margin-top: 6px !important;
    margin-bottom: 6px !important;
  }
  .post-type-archive-school .entry-content .wp-block-columns:has(> .wp-block-column > .wp-block-image) .wp-block-image {
    margin: 0 -6px 6px !important;
    width: calc(100% + 12px) !important;
    max-width: none !important;
  }
  .post-type-archive-school .entry-content .wp-block-columns:has(> .wp-block-column > .wp-block-image) .wp-block-image a {
    display: block;
  }
  .post-type-archive-school .entry-content .wp-block-columns:has(> .wp-block-column > .wp-block-image) .wp-block-image img {
    width: 100% !important;
    height: auto !important;
  }
  .post-type-archive-school .entry-content .wp-block-columns:has(> .wp-block-column > .wp-block-image) .sgb-heading__inner {
    font-size: 15px !important;
  }
  .post-type-archive-school .entry-content .wp-block-columns:has(> .wp-block-column > .wp-block-image) .sgb-heading__inner,
  .post-type-archive-school .entry-content .wp-block-columns:has(> .wp-block-column > .wp-block-image) .sgb-heading__text {
    word-break: normal !important;
    overflow-wrap: anywhere;
  }
  .post-type-archive-school .entry-content .wp-block-columns:has(> .wp-block-column > .wp-block-image) p:has(> [class*="inline-rate-star"]) {
    display: flex !important;
    justify-content: center;
    align-items: center;
    gap: 2px;
    font-size: 0 !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
  }
  .post-type-archive-school .entry-content .wp-block-columns:has(> .wp-block-column > .wp-block-image) [class*="inline-rate-star"] {
    display: block;
    font-size: 12px !important;
    line-height: 1.4 !important;
  }
  .post-type-archive-school .entry-content .wp-block-columns:has(> .wp-block-column > .wp-block-image) p:not(:has(> [class*="inline-rate-star"])) {
    font-size: 11px !important;
    line-height: 1.6 !important;
    letter-spacing: 0.02em !important;
  }
  /* 記事側でカードの段に付けているマイナスの余白を、2列のときは打ち消す（重なり防止） */
  .post-type-archive-school .entry-content [id^="sgb-css-id-"]:has(> .wp-block-columns > .wp-block-column > .wp-block-image) {
    margin-bottom: 0 !important;
  }
}

/* 学校一覧ハブ：「おすすめの留学エリア」のカードをスマホで2列に（2026-11-18） */
@media screen and (max-width: 781px) {
  .post-type-archive-school .entry-content .sgb-full-bg__content:has(> .wp-block-columns > .wp-block-column .wp-block-sgb-hero) {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .post-type-archive-school .entry-content .sgb-full-bg__content:has(> .wp-block-columns > .wp-block-column .wp-block-sgb-hero) > .wp-block-columns {
    display: contents !important;
  }
  .post-type-archive-school .entry-content .sgb-full-bg__content:has(> .wp-block-columns > .wp-block-column .wp-block-sgb-hero) > .wp-block-columns > .wp-block-column {
    min-width: 0;
    margin: 0 !important;
    flex-basis: auto !important;
  }
  .post-type-archive-school .entry-content .sgb-full-bg__content:has(> .wp-block-columns > .wp-block-column .wp-block-sgb-hero) .header-image {
    min-height: 0 !important;
    height: 100%;
    border-radius: 8px;
  }
  .post-type-archive-school .entry-content .sgb-full-bg__content:has(> .wp-block-columns > .wp-block-column .wp-block-sgb-hero) .header-image__text {
    padding: 22px 8px !important;
  }
  .post-type-archive-school .entry-content .sgb-full-bg__content:has(> .wp-block-columns > .wp-block-column .wp-block-sgb-hero) .header-image__headline {
    font-size: 19px !important;
    margin: 0 0 6px !important;
    line-height: 1.3 !important;
  }
  .post-type-archive-school .entry-content .sgb-full-bg__content:has(> .wp-block-columns > .wp-block-column .wp-block-sgb-hero) .header-image__descr {
    font-size: 10.5px !important;
    line-height: 1.5 !important;
    margin: 0 0 8px !important;
  }
  .post-type-archive-school .entry-content .sgb-full-bg__content:has(> .wp-block-columns > .wp-block-column .wp-block-sgb-hero) .header-image__btn .btn {
    font-size: 12px !important;
    padding: 4px 12px !important;
  }
  .post-type-archive-school .entry-content .sgb-full-bg__content:has(> .wp-block-columns > .wp-block-column .wp-block-sgb-hero) .header-image__btn p {
    margin: 0 !important;
  }
}

/* 学校一覧ハブ：列の多い表をスマホで横スクロールに（学校名の列は固定。2026-11-18） */
@media screen and (max-width: 781px) {
  .post-type-archive-school .entry-content .wp-block-table:has(th:nth-child(5), td:nth-child(5)) {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .post-type-archive-school .entry-content .wp-block-table:has(th:nth-child(5), td:nth-child(5))::before {
    content: "← 横にスクロールできます →";
    display: block;
    position: sticky;
    left: 0;
    font-size: 11px;
    color: #999;
    text-align: right;
    margin-bottom: 4px;
  }
  .post-type-archive-school .entry-content .wp-block-table:has(th:nth-child(5), td:nth-child(5)) table {
    width: max-content !important;
    min-width: 100%;
    font-size: 12px !important;
    margin: 0 !important;
  }
  .post-type-archive-school .entry-content .wp-block-table:has(th:nth-child(5), td:nth-child(5)) th,
  .post-type-archive-school .entry-content .wp-block-table:has(th:nth-child(5), td:nth-child(5)) td {
    white-space: nowrap !important;
    padding: 8px 10px !important;
    word-break: normal !important;
    font-size: 12px !important;
    line-height: 1.5 !important;
  }
  .post-type-archive-school .entry-content .wp-block-table:has(th:nth-child(5), td:nth-child(5)) th:first-child,
  .post-type-archive-school .entry-content .wp-block-table:has(th:nth-child(5), td:nth-child(5)) td:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    background-color: #f7f8fa;
    box-shadow: 2px 0 0 #e0e0e0;
  }
}

/* 学校一覧ハブ：PCで見出しの小さい行を上に浮かせ、パンくずが隠れないようにする（2026-11-18） */
@media screen and (min-width: 768px) {
  .post-type-archive-school #under_mv .under_main_ttl .ja > span {
    position: absolute;
    left: 0;
    bottom: 100%;
    white-space: nowrap;
  }
}

/* 学校一覧ハブ：スマホでは「絞り込み検索」を出さない（絞り込み結果のページには出す。2026-11-18） */
@media screen and (max-width: 767px) {
  .post-type-archive-school #two_column:has(> #left > #inner-content) > #right {
    display: none !important;
  }
}

/* 学校一覧ハブ：アイキャッチ（PCは元の大きさで中央・スマホは枠の角丸に沿わせる。2026-11-19） */
.post-type-archive-school #entry.cb-hub-has-eyecatch {
  padding-top: 40px;
}
.post-type-archive-school .cb-hub-eyecatch {
  margin: 0 auto 32px;
  padding: 0 40px;
  line-height: 0;
  text-align: center;
}
.post-type-archive-school .cb-hub-eyecatch img {
  display: inline-block;
  width: 100%;
  max-width: 680px;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(61, 38, 19, 0.12);
}
@media screen and (max-width: 767px) {
  .post-type-archive-school #entry.cb-hub-has-eyecatch {
    padding-top: 0;
    border-radius: 12px 12px 0 0;
  }
  .post-type-archive-school .cb-hub-eyecatch {
    padding: 0;
    margin-bottom: 24px;
  }
  .post-type-archive-school .cb-hub-eyecatch img {
    max-width: none;
    border-radius: 12px 12px 0 0;
    box-shadow: none;
  }
}

/* 絞り込み検索のアイコンを「じょうご」に（一覧・詳細 共通。2026-11-19） */
#search_widget_ttl i.fa-rectangle-list::before {
  content: "\f0b0";
}

/* 学校詳細ページ：絞り込みを小さく、PCでも最初は閉じた帯にする（2026-11-19） */
.single-school #right .org_widget .w_check_list {
  padding: 0 4px 14px;
  margin-bottom: 14px;
  font-size: 13px;
}
.single-school #right .org_widget .w_check_list ul {
  gap: 6px 8px;
}
.single-school #right .org_widget .widget_sub_ttl {
  font-size: 14px;
  height: 20px;
  margin-bottom: 10px;
  padding-left: 14px;
}
.single-school #right .org_widget .w_check_list .w_check_box span {
  padding-left: 24px;
}
.single-school #right .org_widget .w_check_list .w_check_box span::before,
.single-school #right .org_widget .w_check_list .w_check_box span::after {
  width: 17px;
  height: 17px;
}
.single-school #right .org_widget .w_check_list .w_check_box span::before {
  font-size: 13px;
  line-height: 17px;
}
@media screen and (min-width: 768px) {
  .single-school #right .org_widget #search_widget_ttl {
    position: relative;
    cursor: pointer;
    margin-bottom: 0;
  }
  .single-school #right .org_widget #search_widget_ttl::before,
  .single-school #right .org_widget #search_widget_ttl::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 18px;
    width: 14px;
    height: 2px;
    background: #fff;
    transition: opacity 0.2s;
  }
  .single-school #right .org_widget #search_widget_ttl::after {
    transform: rotate(90deg);
  }
  .single-school #right .org_widget #search_widget_ttl.on::after {
    opacity: 0;
  }
  .single-school #right .org_widget .sp_acd {
    display: none !important;
    padding-top: 16px;
  }
  .single-school #right .org_widget #search_widget_ttl.on + .sp_acd {
    display: block !important;
  }
}