@charset "UTF-8";

/* ============================================================ 
   投稿・固定ページ コンテンツエリア装飾 (post-box)
   ============================================================ */

.post-box {
  /* 基本フォント設定は theme.json が担当 */
  word-break: break-all;

  /* ------------------------------------------------------------ */
  /* 共通リンク設定  */
  /* ------------------------------------------------------------ */
  a:not(.wp-block-button__link) {
    color: var(--wp--preset--color--color-center);
    text-decoration: underline;
    transition: opacity 0.3s ease;

    &:hover {
      opacity: 0.7;
      text-decoration: none;
    }
  }

  .post-box .wp-block-button__link:active,
  .post-box .wp-block-button__link:focus,
  .post-box .wp-block-button__link:hover,
  .post-box .wp-block-button__link:visited,
  .post-box .is-style-fill .wp-block-button__link:hover,
  .post-box .is-style-fill .wp-block-button__link.has-background:hover {
    /* color: #fff; */
    box-shadow: none;
  }

  a[href$=".pdf"],
  a[href$=".doc"],
  a[href$=".docx"],
  a[href$=".xls"],
  a[href$=".xlsx"] {
    position: relative;
    padding-right: 2.1rem;
  }

  a[href$=".pdf"]:after,
  a[href$=".doc"]:after,
  a[href$=".docx"]:after,
  a[href$=".xls"]:after,
  a[href$=".xlsx"]:after {
    display: inline-block;
    font-family: "icomoon";
    color: var(--theme-color);
    font-style: normal;
    font-variant: normal;
    font-weight: 400;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    font-size: 1.9rem;
  }

  a[href$=".pdf"]:after {
    content: "\f1c1";
  }
  a[href$=".doc"]:after,
  a[href$=".docx"]:after,
  a[href$=".xls"]:after,
  a[href$=".xlsx"]:after {
    content: "\f15c";
  }

  .wp-block-image a[href$=".pdf"],
  .wp-block-image a[href$=".doc"],
  .wp-block-image a[href$=".docx"],
  .wp-block-image a[href$=".xls"],
  .wp-block-image a[href$=".xlsx"],
  .wp-block-media-text__media a[href$=".pdf"],
  .wp-block-media-text__media a[href$=".doc"],
  .wp-block-media-text__media a[href$=".docx"],
  .wp-block-media-text__media a[href$=".xls"],
  .wp-block-media-text__media a[href$=".xlsx"] {
    padding-right: 0;
  }
  .wp-block-image a[href$=".pdf"]:after,
  .wp-block-image a[href$=".doc"]:after,
  .wp-block-image a[href$=".docx"]:after,
  .wp-block-image a[href$=".xls"]:after,
  .wp-block-image a[href$=".xlsx"]:after,
  .wp-block-media-text__media a[href$=".pdf"]:after,
  .wp-block-media-text__media a[href$=".doc"]:after,
  .wp-block-media-text__media a[href$=".docx"]:after,
  .wp-block-media-text__media a[href$=".xls"]:after,
  .wp-block-media-text__media a[href$=".xlsx"]:after {
    display: none;
  }

  /*
 * _editor
 */
  .post-box {
    margin-bottom: 4em;
  }

  .page .post-box > *:first-child:not(section) {
    margin-top: clamp(4rem, 2.184rem + 5.674vw, 8rem);
  }
  .page .post-box > *:last-child:not(section) {
    margin-bottom: clamp(4rem, 2.184rem + 5.674vw, 8rem);
  }
  .page .post-box > section.wp-block-group {
    padding-block: clamp(4rem, 2.184rem + 5.674vw, 8rem);
  }

  .post-box > * {
    width: calc(100% - clamp(1.6rem, 0.511rem + 3.404vw, 4rem) * 2);
    max-width: 960px;
    margin-inline: auto;
  }
  .post-box .alignfull {
    width: 100%;
    max-width: 100%;
  }
  .post-box .alignwide {
    max-width: 1120px;
  }
  .post-box .alignwide > * {
    max-width: 100%;
  }
  .post-box .align {
    max-width: 960px;
  }
  .post-box .aligncenter {
    text-align: center;
  }
  .post-box .alignleft.wp-block-image {
    float: left;
    margin-right: 1em;
    margin-top: 0;
  }
  .post-box .alignright.wp-block-image {
    float: right;
    margin-left: 1em;
    margin-top: 0;
  }
  .post-box .has-font-en-font-family strong {
    font-weight: 600;
  }

  .page .post-box > .alignleft.wp-block-image {
    width: auto;
    margin-left: clamp(1.6rem, 0.511rem + 3.404vw, 4rem);
  }
  @media screen and (min-width: 1048px) {
    .page .post-box > .alignleft.wp-block-image {
      margin-left: calc((100% - 960px) / 2);
    }
  }
  .page .post-box > .alignright.wp-block-image {
    width: auto;
    margin-right: clamp(1.6rem, 0.511rem + 3.404vw, 4rem);
  }
  @media screen and (min-width: 1048px) {
    .page .post-box > .alignright.wp-block-image {
      margin-right: calc((100% - 960px) / 2);
    }
  }

  /* editor-styleと共通ここから */
  /* ------------------------------------------------------------ */
  .post-box {
    /*
  * group
  */
    /*
      * color
      */
    /*
      * heading,typo
      */
    /*
  * list
  */
    /*
      * table
      */
    /*
      * button
      */
    /*
      * media
      */
    /*
      * column
      */
    /*
  * separator
  */
    /* editor-styleに適用しないスタイル */
    /* ------------------------------------------------------------ */
    /* 追加CSS */
    /* ------------------------------------------------------------ */
  }
  .post-box .has-background,
  .post-box .has-border-color {
    padding: 2em 1.5em;
  }
  @media screen and (min-width: 768px) {
    .post-box .has-background,
    .post-box .has-border-color {
      padding: 2em 2.25em;
    }
  }
  .post-box .has-background > *:last-child,
  .post-box .has-border-color > *:last-child {
    margin-bottom: 0;
  }
  .post-box .has-background:not(.alignfull) > *,
  .post-box .has-border-color:not(.alignfull) > * {
    max-width: 100%;
  }
  .post-box .alignfull.has-background {
    padding-inline: clamp(1.6rem, 0.511rem + 3.404vw, 4rem);
    margin: 0;
  }
  .post-box #none,
  .post-box .none {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
  }
  .post-box h1,
  .post-box h2,
  .post-box h3,
  .post-box h4,
  .post-box h5,
  .post-box h6 {
    margin-top: 1.5em;
    font-weight: 700;
  }

  /* ------------------------------------------------------------ */
  /* 見出し装飾 (Heading)  */
  /* ------------------------------------------------------------ */
  h2 {
    font-size: 2.2em;
    line-height: 1.3;
    margin-bottom: 20px;
  }

  h3 {
    font-size: 3rem;
    line-height: 1.4;
    margin-bottom: 3rem;
    position: relative;
    padding-left: 1em;
  }
  h3::before {
    position: absolute;
    content: "";
    width: 20px;
    height: 20px;
    border: 5px solid var(--theme-color);
    border-radius: 10px;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
  }
  h4 {
    font-size: 2.6rem;
    line-height: 1.4;
    margin-bottom: 2.8rem;
    position: relative;
    padding-left: 1.2em;
  }
  h4::before {
    position: absolute;
    content: "";
    width: 20px;
    height: 5px;
    background: var(--theme-color);
    left: 0;
    top: 50%;
    transform: translateY(-50%);
  }
  h5 {
    font-size: 2.3rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    color: var(--theme-color);
  }
  h6 {
    font-size: 1.25em;
    line-height: 1.5;
    margin-bottom: 20px;
  }

  /* ------------------------------------------------------------ */
  /* ブロック別装飾  */
  /* ------------------------------------------------------------ */

  /* Table (テーブル) */
  .wp-block-table {
    margin-bottom: 2em;

    table {
      border-collapse: collapse;
      width: 100%;
    }

    th,
    td {
      padding: 1em;
      border: 1px solid #ddd;
      text-align: left;
    }

    th {
      background-color: var(--wp--preset--color--color-center);
      color: #fff;
      font-weight: bold;
    }

    /* スマホ時：テーブルの横スクロール対応 */
    @media screen and (max-width: 767px) {
      display: block;
      overflow-x: auto;
      white-space: nowrap;
      -webkit-overflow-scrolling: touch;
    }
  }

  /* Image & Gallery (画像) */
  figure {
    margin-bottom: 2em;

    figcaption {
      font-size: 0.85em;
      color: #666;
      text-align: center;
      margin-top: 0.5em;
    }
  }

  .wp-block-image img {
    border-radius: 8px;
    height: auto;
  }

  /* Quote (引用) */
  .wp-block-quote {
    position: relative;
    padding: 1.5em 2em;
    background: #f9f9f9;
    border-left: 5px solid var(--wp--preset--color--color-center);
    margin-bottom: 2em;

    p {
      font-style: italic;
      line-height: 1.6;
      margin-bottom: 0;
    }
  }

  /* List (リスト) */
  ul:not(.wp-block-gallery),
  ol {
    margin-bottom: 2em;
    padding-left: 1.5em;

    li {
      margin-bottom: 0.5em;
    }
  }

  /* Columns (カラム) */
  .wp-block-columns {
    margin-bottom: 2.5em;

    @media screen and (max-width: 781px) {
      gap: 1.5em;
    }
  }

  /* ------------------------------------------------------------ */
  /* 施設別テーマカラーの反映 (Bodyクラス連動)  */
  /* ------------------------------------------------------------ */
  /* 各施設ページでは、変数を上書きして色を自動で切り替える */
}

/* Bodyクラスに基づいた施設色の定義 */
body.theme-kakeyu {
  --theme-color: var(--wp--preset--color--color-kakeyu);
}
body.theme-houden {
  --theme-color: var(--wp--preset--color--color-houden);
}
body.theme-izumino {
  --theme-color: var(--wp--preset--color--color-izumino);
}
body.theme-home-care {
  --theme-color: var(--wp--preset--color--color-home-care);
}

/* 施設色の適用を反映させるセレクタ */
[class*="theme-"] .post-box {
  a:not(.wp-block-button__link) {
    color: var(--theme-color);
  }
  h2 {
    border-left-color: var(--theme-color);
  }
  h3 {
    border-bottom-color: var(--theme-color);
  }
  h4::before {
    background-color: var(--theme-color);
  }
  .wp-block-table th {
    background-color: var(--theme-color);
  }
  .wp-block-quote {
    border-left-color: var(--theme-color);
  }
}

.post-box p {
  margin-bottom: 1.5em;
  line-height: 1.8;
}
.post-box mark {
  font-style: normal;
}
.post-box mark.has-inline-color {
  padding: 0.1em;
}
.post-box sub {
  font-size: 0.8em;
}
.post-box .wp-block-pullquote {
  padding: 3% 4%;
  font-size: 1.1em;
  border: none;
  background: #ccc;
  font-weight: 700;
}
.post-box .wp-block-list {
  margin-block: 0.5em 1.5em;
  padding: 0;
}
.post-box ul.wp-block-list > li {
  padding-left: 1.4em;
  list-style: none;
  position: relative;
}
.post-box ul.wp-block-list > li::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  background-color: var(--theme-color);
  border-radius: 100vmax;
  position: absolute;
  top: 0.5em;
  left: 0.25em;
}
.post-box ol.wp-block-list {
  list-style: decimal;
  padding-left: 2em;
}
.post-box ol.wp-block-list > li::marker {
  font-size: 1em;
  font-family: var(--font-mixed);
  font-weight: 700;
  color: var(--theme-color);
}
.post-box .wp-block-list li {
  margin-bottom: 1em;
}
.post-box .wp-block-list li .wp-block-list {
  margin-block: 0.5em 0;
}
.post-box .wp-block-list li .wp-block-list li {
  margin-bottom: 0.5em;
}
.post-box .wp-block-list li ol.wp-block-list > li {
  list-style: decimal-leading-zero;
}
.post-box .wp-block-table {
  overflow-x: auto;
  position: relative;
  margin-block: 1em 1.5em;
  /* ---- スクロール表示 ----*/
  /* ---- //スクロール表示 ----*/
}
@media screen and (min-width: 768px) {
  .post-box .wp-block-table {
    overflow-x: hidden;
  }
}
.post-box .wp-block-table.is-too-wide {
  overflow-x: scroll;
}
.post-box .wp-block-table.is-too-wide::before {
  content: "⇄ Scroll";
  display: block;
  margin-bottom: 0.5em;
  font-size: 0.8em;
  color: var(--theme-color);
  font-weight: 700;
  text-rendering: auto;
  -webkit-font-smoothing: antialiased;
  left: 0;
}
@media screen and (min-width: 768px) {
  .post-box .wp-block-table.is-too-wide::before {
    display: none;
  }
}
.post-box .wp-block-table.is-too-wide table {
  border-top: 1px solid currentColor;
}
.post-box .wp-block-table td,
.post-box .wp-block-table th {
  min-width: 100px;
}
@media screen and (min-width: 768px) {
  .post-box .wp-block-table td,
  .post-box .wp-block-table th {
    min-width: inherit;
  }
}
.post-box .wp-block-table table {
  border-collapse: collapse;
  width: 100%;
  margin-bottom: 0.5em;
}
.post-box .wp-block-table thead {
  border-bottom: 1px solid #ccc;
}
.post-box .wp-block-table tfoot {
  border-top: 1px solid #ccc;
}
.post-box .wp-block-table td,
.post-box .wp-block-table th {
  vertical-align: middle;
  padding: 0.5em;
  border: none;
  border: 1px solid #ccc;
}
@media screen and (min-width: 1025px) {
  .post-box .wp-block-table td,
  .post-box .wp-block-table th {
    font-size: 15px;
    padding: 1em 0.75em;
  }
}
.post-box .wp-block-table th {
  background-color: var(--theme-color);
  color: #fff;
  font-weight: 700;
  word-break: keep-all;
}
.post-box .wp-block-table td {
  background-color: #fff;
}
.post-box .wp-block-table.is-style-stripes {
  border-bottom: none;
}
.post-box .wp-block-table.is-style-stripes th,
.post-box .wp-block-table.is-style-stripes td {
  color: inherit;
  background-color: inherit;
  border-inline: none;
  border-top: none;
  border-bottom: 1px solid #ccc;
}
.post-box .wp-block-table.is-style-stripes tbody tr:nth-child(odd) {
  background-color: var(--sub-color);
}
.post-box .wp-block-table.is-style-th_default td:first-child {
  font-weight: 700;
  color: #fff;
  background-color: var(--theme-color);
  word-break: keep-all;
}
.post-box .wp-block-table.is-style-th_stripe th,
.post-box .wp-block-table.is-style-th_stripe td {
  color: inherit;
  background-color: inherit;
  border-inline: none;
  border-block: none;
}
.post-box .wp-block-table.is-style-th_stripe tbody th,
.post-box .wp-block-table.is-style-th_stripe tbody td {
  border-bottom: 1px solid #ccc;
}
.post-box .wp-block-table.is-style-th_stripe tbody th,
.post-box .wp-block-table.is-style-th_stripe tbody td:first-child {
  font-weight: 700;
  border-color: var(--theme-color);
  word-break: keep-all;
}
.post-box .wp-block-table .figcaption {
  color: #333333;
  border: none;
  font-size: 14px;
  text-align: left;
}
.post-box a:not(:has(img)):not(.wp-block-button__link) {
  text-decoration: underline;
  text-underline-offset: 0.15em;
  text-decoration-thickness: 1px;
  -webkit-text-decoration-color: currentColor;
  text-decoration-color: currentColor;
  position: relative;
  color: var(--theme-color);
}
.post-box .wp-block-buttons {
  gap: 1em;
  margin-block: 3em;
}
.post-box .wp-block-buttons .wp-block-button {
  max-width: 100%;
  min-width: 150px;
  @media screen and (min-width: 1025px) {
    min-width: 200px;
  }
}
.post-box .wp-block-buttons .wp-block-button__link {
  display: inline-block;
  font-weight: 700;
  line-height: 1.5;
  padding: 0.8em 2em;
  border-radius: 100vmax;
  position: relative;
  text-align: center;
  text-decoration: none !important;
  -webkit-transition: all 0.2s linear;
  transition: all 0.2s linear;
  font-size: 1.6rem;
}
.post-box .wp-block-buttons .wp-block-button__link:not([href]),
.post-box .wp-block-buttons .wp-block-button__link[href=""] {
  pointer-events: none !important;
  background-color: #ccc !important;
  text-decoration: none !important;
  opacity: 0.7 !important;
  color: #fff !important;
}
.post-box .wp-block-buttons .wp-block-button__link:not([href])::after,
.post-box .wp-block-buttons .wp-block-button__link[href=""]::after {
  content: none;
}
.post-box .wp-block-buttons .wp-block-button__link:not([href])::before,
.post-box .wp-block-buttons .wp-block-button__link[href=""]::before {
  content: "※準備中※";
  margin-right: 1em;
}
@media screen and (min-width: 1025px) {
  .post-box .wp-block-buttons .wp-block-button__link:hover {
    opacity: 1;
    -webkit-box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
  }
}
.post-box
  .wp-block-buttons
  > .wp-block-button.is-style-outline
  .wp-block-button__link {
  color: var(--theme-color);
  background-color: var(--theme-color)-light;
  border: 1px solid currentColor;
}
.post-box
  .wp-block-buttons
  > .wp-block-button:not(.is-style-outline)
  .wp-block-button__link {
  background-color: var(--theme-color);
  color: #fff;
  border-color: currentColor;
}

/* ボタン全体のスタイル */
.post-box .is-style-full-wide-arrow {
  width: 100%;
}
.post-box .is-style-full-wide-arrow .wp-block-button__link,
.post-box a.btn-full {
  display: flex;
  align-items: center;
  justify-content: space-between; /* テキストと矢印を両端に */
  width: 100%;
  padding: 25px 30px; /* 上下左右の余白は調整してください */
  background-color: var(--theme-color)-light !important;
  color: var(--theme-color) !important; /* 濃紺の文字色 */
  border-radius: 20px;
  text-decoration: none;
  font-weight: bold;
  font-size: 20px;
  position: relative;
  border: none;
}
/* ホバーエフェクト */
.post-box .is-style-full-wide-arrow .wp-block-button__link:hover,
.post-box a.btn-full:hover {
  opacity: 0.8;
}
/* 右側の丸囲み矢印 */
.post-box .is-style-full-wide-arrow .wp-block-button__link::after,
.post-box a.btn-full::after {
  content: "→"; /* または icomoon のコード */
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid #7cb382; /* 緑色の境界線 */
  border-radius: 50%;
  color: #7cb382; /* 矢印の色 */
  font-size: 18px;
  background-color: transparent;
  flex-shrink: 0; /* 矢印が潰れないように固定 */
}

.post-box .wp-block-image {
  height: auto;
  position: relative;
  margin-block: 1em;
}
.post-box .wp-block-image figure,
.post-box .wp-block-image picture {
  margin: 0;
  position: relative;
}
.post-box .wp-block-image figure.size-medium,
.post-box .wp-block-image figure.alignleft,
.post-box .wp-block-image figure.alignright,
.post-box .wp-block-image picture.size-medium,
.post-box .wp-block-image picture.alignleft,
.post-box .wp-block-image picture.alignright {
  max-width: 50%;
}
.post-box .wp-block-image figure.alignright,
.post-box .wp-block-image picture.alignright {
  margin-left: 1em;
  text-align: right;
}
.post-box .wp-block-image figure.alignleft,
.post-box .wp-block-image picture.alignleft {
  margin-right: 1em;
  text-align: left;
}
.post-box .wp-block-image figure.aligncenter,
.post-box .wp-block-image picture.aligncenter {
  text-align: center;
}
.post-box .wp-block-image.size-large img {
  width: 100%;
}
.post-box .wp-block-image figcaption {
  margin-top: 0.5em;
  font-size: 1.4rem;
}
.post-box .wp-block-image.is-style-rounded img {
  border-radius: 2vmax;
}
.post-box .wp-block-image img {
  width: auto;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}
.post-box .wp-block-embed {
  margin-bottom: 1em;
}
.post-box .wp-block-embed.is-type-video {
  aspect-ratio: 16/9;
}
.post-box .wp-block-embed iframe {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
  object-fit: cover;
}
.post-box .wp-block-embed__wrapper {
  width: 100%;
  height: 100%;
}
.post-box iframe {
  display: block;
}
.post-box iframe[src*="youtube.com/embed/"] {
  height: auto;
  aspect-ratio: 16/9;
}
.post-box iframe[src*="google.com/maps/"] {
  height: auto;
  aspect-ratio: 4/3;
}
@media screen and (min-width: 768px) {
  .post-box iframe[src*="google.com/maps/"] {
    aspect-ratio: 960/540;
  }
}
.post-box .wp-block-columns {
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-flex-wrap: wrap;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
  gap: clamp(2.4rem, 1.527rem + 2.727vw, 4.8rem);
  margin-top: clamp(2rem, 1.092rem + 2.837vw, 4rem);
  margin-bottom: clamp(3rem, 1.638rem + 4.255vw, 6rem);
}
.post-box .wp-block-separator {
  border: none;
  background-color: var(--theme-color);
  margin-block: clamp(2rem, 1.092rem + 2.837vw, 4rem);
  padding: 0;
  height: 1px;
}
.post-box .wp-block-separator.is-style-wide {
  width: 100%;
  height: 2px;
}
.post-box .wp-block-page-list,
.post-box .wp-block-page-list ul {
  list-style: disc;
}
.post-box .wp-block-page-list li,
.post-box .wp-block-page-list ul li {
  margin-bottom: 0.25em;
}
.post-box .wp-block-page-list {
  padding-left: 1.5em;
}

/* innerの子要素の時 */
/* ------------------------------------------------------------ */
.inner .post-box > * {
  width: inherit;
  margin-inline: auto;
}

.post-box .wp-block-preformatted {
  /* white-space: unset; */
  margin: 0 auto 1em;
  padding: 1.5em;
  border: 1px solid var(--theme-color);
}



/* Flexible Table Block: スクロール・列固定の干渉を解除 */
.post-box .wp-block-flexible-table-block-table table {
  width: auto !important;
  max-width: none !important;
  min-width: 100%;
}

.post-box .wp-block-flexible-table-block-table.is-scroll-on-mobile {
  overflow-x: auto !important;
}

/* min-widthのリセット */
.post-box .wp-block-flexible-table-block-table td,
.post-box .wp-block-flexible-table-block-table th {
  min-width: unset;
  white-space: nowrap; /* テキストを折り返さない */
}
@media screen and (max-width: 768px) {
  .post-box .wp-block-flexible-table-block-table td,
  .post-box .wp-block-flexible-table-block-table th {
    font-size: 0.85em;
  }
}

.post-box .wp-block-flexible-table-block-table.is-scroll-on-pc .sticky-top,
.post-box .wp-block-flexible-table-block-table.is-scroll-on-mobile .sticky-top {
    position: sticky;
    z-index: 100 !important;
} 