/*
    Theme Name: careritz & Partners 2023 Theme
*/

/* ===== 関連記事ボタン ===== */

.custom-related-post {
  overflow: hidden;
  margin: 1em;
}

.custom-related-post a {
  display: flex;
  align-items: center;
  border: 1px solid #ddd;
  text-decoration: none;
  color: inherit;
  padding: 20px 15px 15px 15px;
  transition: 0.3s;
}

/* 記事本文内の横幅超過要素をモバイルで制御 */
@media screen and (max-width: 780px) {
  .magazine-in img,
  .magazine-in figure img,
  .magazine-in video,
  .magazine-in iframe {
    max-width: 100%;
    height: auto;
  }
  .magazine-in table {
    max-width: 100%;
    display: block;
    overflow-x: auto;
  }
  .magazine-in pre {
    overflow-x: auto;
    white-space: pre-wrap;
    margin-bottom: 20px;
  }
}

@media screen and (max-width: 780px) {
  .custom-related-post a {
    flex-direction: column;
    align-items: stretch;
    /* ページ全体に横幅超過があってもカードはビューポート幅を超えない */
    max-width: calc(100vw - 30px);
    box-sizing: border-box;
  }
  .related-thumb {
    width: 100% !important;
    /* モバイルではサムネイルがカード全体の幅を占める */
  }
}

.related-thumb {
  position: relative;
  flex-shrink: 0;
  width: 150px;
  overflow: visible;
}
.related-thumb img {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 0px !important;
}

.related-cat-label {
  position: absolute;
  top: -11px;
  left: 0;
  background-color: #00834d;
  height: 22px;
  display: inline-block;
  line-height: 22px;
  color: #fff;
  font-weight: bold;
  font-size: 12px;
  padding: 0 10px;
  white-space: nowrap;
}

.related-cat-label::after {
  content: "";
  position: absolute;
  right: -10px;
  top: 0;
  width: 0;
  height: 0;
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
  border-left: 10px solid #00834d;
}

.related-content {
  padding: 10px 16px;
  flex: 1;
  min-width: 0;
}
@media screen and (max-width: 780px) {
  .related-content {
    padding: 10px 0px;
    min-width: 0;
    width: 100%;
  }
}

.related-date {
  display: block;
  font-size: 12px;
  color: #888;
  margin-bottom: 6px;
}

.related-title {
  font-size: 22px;
  font-weight: bold;
  word-break: break-word;
}
@media screen and (max-width: 780px) {
  .related-title {
    width: 100%;
    font-size: 18px;
    word-break: break-word;
    overflow-wrap: break-word;
  }
}

/* ここからは/inc/cta-parts.phpの作業 */
.cr-kaigo-cta-wrapper {
  position: relative;
  width: 100%;
  max-width: 800px;
  margin: 40px auto;
  background-image: url("/cp-bin/wordpress/assets/image/css/magazine/recruit.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  aspect-ratio: 1000 / 480;
  border-radius: 12px;
  overflow: hidden;
  clear: both;
}

.cr-kaigo-cta-buttons {
  position: absolute;
  bottom: 6%;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 3%;
  padding: 0 4%;
  box-sizing: border-box;
}

.cr-cta-btn {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 14px 10px;
  color: #ffffff !important;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.15);
}

.btn-pink {
  background-color: #f48485;
}

.btn-pink:hover {
  background-color: #d64d4e;
  transform: translateY(2px);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.15);
}

.btn-teal {
  background-color: #29aba4;
}

.btn-teal:hover {
  background-color: #197a75;
  transform: translateY(2px);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.15);
}

@media screen and (max-width: 600px) {
  .cr-kaigo-cta-buttons {
    bottom: 4.5%;
  }

  .cr-cta-btn {
    font-size: 2.7vw;
    padding: 2vw 2vw;
  }

  /* .cr-kaigo-cta-buttons {
		flex-direction: column;
		gap: 10px;
		bottom: 4%;
	} */

  /* .cr-cta-btn {
		width: 100%;
		padding: 12px 10px;
		font-size: 1rem;
	} */
}
