@charset "utf-8";

/* ============================================================
  CTAバナー専用CSS
  ・記事中盤/記事末尾（.cta_banner）：画像バナー
  ・画面下固定（.cta_banner-fixed）：テキスト＋ボタン
  ※ /column/common/include/cta_banner.html とセットで使用
  ※ 配色は bnr_seminar.png 準拠
     緑: #5fbc89 / オレンジ: #e9853c / 背景: #f0f2f6 / 文字: #595959
============================================================ */

/* ------------------------------
  記事中盤・記事末尾バナー
------------------------------ */
.cta_banner {
  margin: 4rem 0;
  text-align: center;
}

.cta_banner a {
  display: inline-block;
  transition: opacity .3s;

  &:hover {
    opacity: .8;
  }
}

.cta_banner img {
  max-width: 100%;
  height: auto;
  vertical-align: bottom;
}

/* ------------------------------
  画面下固定バナー（テキスト＋ボタン）
------------------------------ */
.cta_banner-fixed {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 9999;
  width: min(360px, calc(100% - 32px));
  padding: 1.6rem 2rem 2rem;
  background: #f0f2f6;
  border-top: 4px solid #5fbc89;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .25);
  text-align: center;

  &.is-hidden {
    display: none;
  }
}

.cta_banner-fixed--catch {
  font-size: 1.4rem;
  font-weight: 700;
  color: #5fbc89;
  line-height: 1.4;
  margin-bottom: .4rem;
}

.cta_banner-fixed--title {
  font-size: 1.8rem;
  font-weight: 700;
  color: #595959;
  line-height: 1.5;
  margin-bottom: 1.2rem;
  /* 改行は <wbr> の位置だけ（収まらない場合のみ任意位置で折る） */
  word-break: keep-all;
  overflow-wrap: anywhere;

  span {
    color: #e9853c;
  }
}

.cta_banner-fixed--btn {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 260px;
  height: 44px;
  margin: 0 auto;
  padding: 0 3rem 0 2rem;
  background: #e9853c;
  border-radius: 100px;
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  text-decoration: none;
  position: relative;
  transition: opacity .3s;

  &::after {
    content: '';
    width: 8px;
    height: 8px;
    border-top: solid 2px #fff;
    border-right: solid 2px #fff;
    transform: rotate(45deg);
    position: absolute;
    top: 0;
    right: 16px;
    bottom: 0;
    margin: auto;
  }

  &:hover {
    opacity: .8;
  }
}

/* 閉じるボタン */
.cta_banner-fixed--close {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: #595959;
  cursor: pointer;

  &::before,
  &::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 14px;
    height: 2px;
    background: #fff;
  }

  &::before {
    transform: translate(-50%, -50%) rotate(45deg);
  }

  &::after {
    transform: translate(-50%, -50%) rotate(-45deg);
  }

  &:hover {
    opacity: .8;
  }
}

/* SP */
@media screen and (max-width: 767px) {
  .cta_banner {
    margin: 3rem 0;
  }

  .cta_banner-fixed {
    right: 0;
    bottom: 0;
    left: 0;
    margin: 0 auto;
    width: 100%;
    padding: 1.2rem 1.6rem 1.6rem;
    border-radius: 0;
  }

  .cta_banner-fixed--title {
    font-size: 1.6rem;
    margin-bottom: 1rem;
  }

  .cta_banner-fixed--close {
    top: -32px;
    right: 8px;
  }
}
