:root {
  --sw-block-main: var(--sw-color-main, #0017c1);
  --sw-block-accent: var(--sw-color-accent, #7ec8e1);
  --sw-block-text: var(--sw-color-text, #2f2f2f);
  --sw-block-soft: #f5f4f5;
  --sw-block-border: #d9d9d9;
}

/* JSが止まった場合の表示保険。
   theme.min.css 側の animation-- 系は初期 opacity: 0 のため、
   commons.js が動かないとトップや固定ページの主要要素が透明のままになります。 */
html:not(.sw-animation-ready) .animation--fade-in,
html:not(.sw-animation-ready) .animation--fade-in-up,
html:not(.sw-animation-ready) .animation--fade-in-down,
html:not(.sw-animation-ready) .animation--slide-in-left,
html:not(.sw-animation-ready) .animation--slide-in-right,
html:not(.sw-animation-ready) .animation--zoom-in,
html:not(.sw-animation-ready) .animation--fade-scale-in,
html:not(.sw-animation-ready) .animation--rotate-fade-in {
  opacity: 1 !important;
  transform: none !important;
}

html:not(.sw-animation-ready) .effect--mask::before,
html:not(.sw-animation-ready) .effect--mask::after {
  right: -100% !important;
}

/* 固定ページHeroの表示保険。
   theme.min.css 側の .section-page__hero は z-index:-1 のため、
   画像URLが正しく出ていても白い背景の後ろに潜ることがあります。 */
.section-page__hero {
  z-index: 0;
}

.home-banner-section {
  margin: 0 auto 96px;
  padding: 0 5%;
}

.home-banner-section__container {
  width: min(100%, 1000px);
  margin: 0 auto;
}

.home-banner-section__large-list,
.home-banner-section__small-list {
  display: grid;
  gap: 24px;
}

.home-banner-section__large-list + .home-banner-section__small-list {
  margin-top: 32px;
}

.home-banner-section__large-list {
  grid-template-columns: 1fr;
}

.home-banner-section__small-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.home-banner-section__link {
  display: block;
  overflow: hidden;
  border: 1px solid var(--sw-color-border, #d9d9d9);
  background: var(--sw-color-element-bg-alpha, #fff);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

a.home-banner-section__link:hover {
  opacity: 0.82;
  transform: translateY(-2px);
}

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

.home-banner-section__item--large .home-banner-section__link {
  aspect-ratio: 5 / 1;
}

.home-banner-section__item--small .home-banner-section__link {
  aspect-ratio: 3 / 1;
}

@media screen and (max-width: 767px) {
  .home-banner-section {
    margin-bottom: 72px;
  }

  .home-banner-section__small-list {
    grid-template-columns: 1fr;
  }

  .home-banner-section__item--large .home-banner-section__link,
  .home-banner-section__item--small .home-banner-section__link {
    aspect-ratio: 16 / 6;
  }
}

/* Gutenbergブロックスタイル。
   support.php の register_block_style() で登録した class に対応します。 */
.is-style-sw-heading-line {
  position: relative;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--sw-block-border);
}

.is-style-sw-heading-line::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 72px;
  height: 3px;
  background: var(--sw-block-main);
}

.is-style-sw-heading-accent {
  display: flex;
  align-items: center;
  gap: 14px;
}

.is-style-sw-heading-accent::before {
  content: "";
  flex: 0 0 10px;
  width: 10px;
  height: 1.6em;
  border-radius: 999px;
  background: var(--sw-block-accent);
}

.wp-block-button.is-style-sw-button-fill .wp-block-button__link,
.wp-block-button.is-style-sw-button-outline .wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 28px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.wp-block-button.is-style-sw-button-fill .wp-block-button__link {
  border: 1px solid var(--sw-block-main);
  background: var(--sw-block-main);
  color: #fff;
}

.wp-block-button.is-style-sw-button-fill .wp-block-button__link:hover {
  background: #fff;
  color: var(--sw-block-main);
}

.wp-block-button.is-style-sw-button-outline .wp-block-button__link {
  border: 1px solid var(--sw-block-main);
  background: transparent;
  color: var(--sw-block-main);
}

.wp-block-button.is-style-sw-button-outline .wp-block-button__link:hover {
  background: var(--sw-block-main);
  color: #fff;
}

.is-style-sw-list-check {
  padding-left: 0;
  list-style: none;
}

.is-style-sw-list-check li {
  position: relative;
  padding-left: 1.7em;
  list-style: none;
}

.is-style-sw-list-check li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.68em;
  width: 0.8em;
  height: 0.42em;
  border-left: 2px solid var(--sw-block-main);
  border-bottom: 2px solid var(--sw-block-main);
  transform: rotate(-45deg);
}

.wp-block-quote.is-style-sw-quote {
  padding: 28px 32px;
  border-left: 4px solid var(--sw-block-main);
  border-radius: 16px;
  background: var(--sw-block-soft);
}

.wp-block-group.is-style-sw-box-point,
.wp-block-group.is-style-sw-box-note,
.wp-block-group.is-style-sw-box-alert,
.wp-block-group.is-style-sw-box-reference,
.wp-block-group.is-style-sw-box-summary {
  position: relative;
  padding: 28px 32px;
  border: 1px solid var(--sw-block-border);
  border-radius: 16px;
  background: #fff;
}

.wp-block-group.is-style-sw-box-point {
  border-color: #b8c0f2;
  background: #f5f7ff;
}

.wp-block-group.is-style-sw-box-note {
  border-color: #b7dce8;
  background: #f2fbfe;
}

.wp-block-group.is-style-sw-box-alert {
  border-color: #e1a6a6;
  background: #fff7f7;
}

.wp-block-group.is-style-sw-box-reference {
  border-color: #d8d0b8;
  background: #fffdf4;
}

.wp-block-group.is-style-sw-box-summary {
  border-color: var(--sw-block-text);
  background: var(--sw-block-soft);
}

.wp-block-group.is-style-sw-box-point > :first-child,
.wp-block-group.is-style-sw-box-note > :first-child,
.wp-block-group.is-style-sw-box-alert > :first-child,
.wp-block-group.is-style-sw-box-reference > :first-child,
.wp-block-group.is-style-sw-box-summary > :first-child {
  margin-top: 0;
}

.wp-block-group.is-style-sw-box-point > :last-child,
.wp-block-group.is-style-sw-box-note > :last-child,
.wp-block-group.is-style-sw-box-alert > :last-child,
.wp-block-group.is-style-sw-box-reference > :last-child,
.wp-block-group.is-style-sw-box-summary > :last-child {
  margin-bottom: 0;
}

@media screen and (max-width: 767px) {
  .wp-block-group.is-style-sw-box-point,
  .wp-block-group.is-style-sw-box-note,
  .wp-block-group.is-style-sw-box-alert,
  .wp-block-group.is-style-sw-box-reference,
  .wp-block-group.is-style-sw-box-summary,
  .wp-block-quote.is-style-sw-quote {
    padding: 20px 22px;
    border-radius: 12px;
  }
}

/* PHP/HTMLパターンとGutenbergパターンの共通スタイル。
   SCSS側の本体は assets/css/sass/setting/_patterns.scss です。 */
.sw-pattern-section {
  padding: 96px 0;
}

.sw-pattern-section__inner {
  max-width: 1200px;
  margin-right: auto;
  margin-left: auto;
  padding-right: 24px;
  padding-left: 24px;
}

.sw-pattern-section__header {
  max-width: 760px;
  margin-bottom: 40px;
}

.sw-pattern-section__title {
  font-size: 40px;
  line-height: 1.35;
  font-weight: 600;
}

.sw-pattern-section__lead {
  margin-top: 16px;
  line-height: 2;
}

.sw-pattern-section__grid {
  gap: 48px;
  align-items: center;
}

.sw-pattern-section__media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--sw-block-soft);
}

.sw-pattern-section__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sw-pattern-section__body {
  line-height: 2;
}

@media screen and (max-width: 767px) {
  .sw-pattern-section {
    padding: 56px 0;
  }

  .sw-pattern-section__title {
    font-size: 28px;
  }

  .sw-pattern-section__grid {
    gap: 28px;
  }
}
