/*
Theme Name: ColorMag Child
Template: colormag
*/

/* カテゴリータグの大きさを調整 */
.cm-post-categories a,
.mzb-banner-posts .mzb-post-categories a,
.mzb-featured-posts .mzb-post-categories a,
.mzb-post-list .mzb-post-categories a,
.mzb-post-meta .mzb-post-categories a{
  display: inline-block;
  padding: 3px 6px;
  background-color: #207daf;
  color: #fff;
  font-size: 11px;
  border-radius: 2px;
  line-height: 1.4;
  text-decoration: none;
}

/* フッターの要素を2行にして、中央寄せにする */
.cm-footer-col {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* カテゴリーごとのページで1件目だけ大きくなるのを防ぐ */
.cm-posts.cm-layout-2-style-1 .post:first-child,
.cm-posts.cm-layout-2-style-1 .page:first-child {
  grid-column: auto;
}

/* 元画像のサイズに関係なく同じ大きさで表示 */
.cm-featured-image a {
  display: block;
  aspect-ratio: 10 / 7;
  overflow: hidden;
}

.cm-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* アカウント画面のボタンを非表示 */
.um-col-alt .um-left #um_account_submit_general {
	display: none;
}

/* 検索結果の画像サイズと並びを調整 */
.article-container {
	display: grid;
	grid-template-columns: repeat(var(--grid-column, 1), 1fr);	--grid-column: 2;
	gap: 20px;
}

.status-publish {
	width: 100% !important;
}

/* 検索画面のサイドバーのサイズを調整 */
/* メイン */
.search .cm-row.cm-right-sidebar > #cm-primary {
	width: 100%;
}
.search .cm-row.cm-right-sidebar > #cm-secondary {
	width: 100%;
}

@media screen and (min-width: 992px) {
  .search .cm-row.cm-right-sidebar > #cm-primary {
	  width: 70%;
	  padding-right: 1.875em;
  }
/* サイドバー */
  .search .cm-row.cm-right-sidebar > #cm-secondary {
	  width: 30%;
	  display: block;
	  visibility: visible;
	  opacity: 1;
  }
}
@media screen and (max-width: 768px) {
  .article-container {
    --grid-column: 1;
    grid-template-columns: 1fr;
  }

  .search .cm-row.cm-right-sidebar > #cm-secondary {
    margin-top: 20px;
  }
}

/* 検索の枠線の調整 */
.search-form-top input.s,
.cm-no-results input.s {
	border: 1px solid #E4E4E7;
}

.search-form-top input.s:focus,
.cm-no-results input.s:focus {
	border: 1px solid #207daf;
	padding: 12px;
}

/* お問い合わせフォームの枠線・背景色の調整 */
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 input[type="url"],
.wpcf7 textarea {
  border: 1px solid #E4E4E7;
  background-color: #FCFCFC;
}

.wpcf7 input[type="text"]:focus,
.wpcf7 input[type="email"]:focus,
.wpcf7 input[type="tel"]:focus,
.wpcf7 input[type="url"]:focus,
.wpcf7 textarea:focus {
  border: 1px solid #207daf;
  background-color: #FCFCFC;
  outline: none;
}

/* 検索タイトルの余白を調整 */
.search .cm-post-content {
  padding: 20px !important;
}

/* 検索結果画面でサイドバーを表示 */
.cm-no-sidebar .cm-secondary {
    display: block;
}

/* カレンダーアイコンを非表示 */
.cm-icon--calendar-fill {
	display: none;
}

/* CF7ボタンをUMと完全一致させる */
.wpcf7 input[type="submit"],
.wpcf7 .wpcf7-submit {
  display: block;
  padding: 16px 20px !important;
  font-size: 15px;
  font-weight: 400;
  background: #3ba1da;
  color: #fff;
  border: none !important;
  border-radius: 4px !important;
  box-shadow: 0 4px 6px rgba(50,50,93,.11),
              0 1px 3px rgba(0,0,0,.08);
  text-align: center;
  cursor: pointer;
  line-height: 1em;
}

/* hover */
.wpcf7 input[type="submit"]:hover {
  background: #207daf;
}

.wpcf7-textarea {
	box-sizing: border-box;
}

/* フォント */
.menu-item a {
	font-family: "Open Sans";
}

/* スライダーの見出し調整 */
.mzb-post-title a {
	line-height: 1.2;
	overflow: hidden;
	display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* スライダーの横幅調整 */
.mzb-section-8d5351ca .mzb-container .mzb-section-inner {
    --colSpacing: 0 !important;
}

/* スマホ表示の調整 */
@media (max-width: 640px) {
    .mzb-posts .mzb-post {
        flex-direction: row;
    }
}

@media (max-width: 640px) {
    .mzb-posts .mzb-post .mzb-featured-image {
        max-width: 120px;
    }
}

.mzb-advertisement .mzb-advertisement-content img {
	width: 100%;
}

@media (max-width: 62em) {
    .cm-footer-builder .cm-footer-nav .cm-footer-menu {
		gap: 16px;
        flex-direction: column;
    }
}

/* スライダーのリンク修正 */
/* スライダー画像のオーバーレイがクリックを妨げるのを防ぐ */
.mzb-slider .swiper .swiper-slide .mzb-featured-image::before {
    pointer-events: none !important;
}

/* タイトルまわりのリンクを無効化 */
.mzb-slider .swiper .swiper-slide .mzb-post-content {
	pointer-events: none !important;
}

/* カテゴリーのリンクだけ有効化 */
.mzb-slider .swiper .swiper-slide .mzb-post-content .mzb-post-meta {
	pointer-events: auto !important;
}