/* =======================================================================
   after-school Page Styles
======================================================================= */

/* スムーススクロール */
html {
  scroll-behavior: smooth;
}

#after-school {
  .headline {
    border-bottom: 1px solid var(--wp--preset--color--custom-purple);
    font-size: clamp(1.25rem, 0.966rem + 1.21vw, 1.875rem);
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    width: 100%;

    &.headline--type-b {
      border-bottom: 1px solid #6260a8;
    }
  }

  .page-title-section__container {
    width: 100%;
  }

  .page-title-section {
    p {
      max-width: 620px;
    }
  }
}

.after-school_box,
.after-school_box_center {
  display: flex;
  flex-wrap: nowrap;
}

.after-school_column {
  flex-direction: column;
}

.after-school_box_between {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
}

/* 中央揃え */
.after-school_box_center {
  justify-content: center;
}

.after-school_align_start {
  display: flex;
  align-items: start;
}

.after-school_align_end {
  display: flex;
  align-items: end;
}

/* リスト */
.after-school_list {
  text-indent: -1em;
  padding-left: 1em;
}

.after-school_list::first-letter {
  color: var(--wp--preset--color--custom-purple);
}

/* 見出し */
.after-school_title {
  position: relative;
  display: inline-block;
  width: 100%;
}

.after-school_title:before,
.after-school_title:after {
  content: "";
  position: absolute;
  top: 50%;
  display: inline-block;
  width: 35%;
  height: 1px;
  background-color: var(--wp--preset--color--custom-purple);
}

.after-school_title:before {
  left: 0;
}
.after-school_title:after {
  right: 0;
}

.width-100 {
  width: 100%;
}

/*市別事業所*/
.after-school_group-city > div {
  scroll-margin-top: 80px;
}

.after-school_group-city img {
  width: 100%;
  min-height: 200px;
  object-fit: none;
  object-position: center;
}

.after-school_card_text {
  display: flex;
  flex-direction: column;
  flex-grow: 1 !important;
}

.after-school_card_button {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2%;

  .wp-block-file {
    box-sizing: border-box;
    margin: 0.5rem 0 !important;
    a {
      background: #fff;
      border: 1px solid var(--wp--preset--color--custom-charcoal-gray);
      box-sizing: border-box;
      color: var(--wp--preset--color--custom-charcoal-gray);
      display: flex;
      justify-content: center;
      align-items: center;
      font-size: 1em;
      text-align: center;
      transition: all 0.3s ease;
      width: 100%;
      &:hover {
        opacity: 0.3;
      }
      span {
        display: block;
        margin-left: 0.5em;
      }
    }
  }
  a {
    text-decoration: none !important;
  }
}

/* 各ボタン設定 */
.after-school_button-city,
.after-school_button-link,
.after-school_button-pdf {
  transition: all 0.3s ease;

  a {
    text-decoration: none !important;
    transition: background-color 0.3s ease, opacity 0.3s ease;
  }
}

.after-school_button-city:hover,
.after-school_button-link:hover,
.after-school_button-pdf:hover {
  opacity: 0.3;
}

.after-school_button-link {
  width: 75%;
}

.after-school_button-pdf {
  a {
    background: none;
    box-sizing: border-box;
    border: 1px solid var(--wp--preset--color--custom-charcoal-gray);
    color: var(--wp--preset--color--custom-charcoal-gray);
    text-align: center;
    font-size: 0.9rem;
    width: 100%;
  }
}

/* =======================================================================
   Media Query
======================================================================= */
@media (min-width: 769px) {
  #after-school {
    .headline {
      padding-left: 3rem;
      padding-right: 3rem;
      width: fit-content;
    }
  }
}

/* スマホ */
@media (max-width: 768px) {
  /* 幅 */
  .width-50-sp {
    width: 50% !important;
  }
  /* リスト */
  .after-school_list + .after-school_list {
    padding-top: 0.5rem;
  }

  .after-school_group-activity {
    padding: 0 2rem;
  }

  .after-school_title:before,
  .after-school_title:after {
    width: 25%;
  }

  /* 事業所一覧ボタン */
  .after-school_group-office {
    justify-content: center !important;
  }

  /*市別事業所*/
  .after-school_group-city img {
    object-fit: cover;
  }

  .after-school_card_button {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px;

    a {
      margin: 0 !important;
    }
  }

  .after-school_button-city {
    width: 32%;
  }

  .after-school_button-link {
    width: 100%;
  }

  .after-school_card_button {
    display: grid;
    grid-template-columns: repeat(2, 2fr);
    gap: 2%;
  }
}
