@charset "UTF-8";
/*
    Template: swell
    Theme Name: SWELL CHILD
    Theme URI: https://swell-theme.com/
    Description: SWELLの子テーマ
    Version: 1.0.0
    Author: LOOS WEB STUDIO
    Author URI: https://loos-web-studio.com/

    License: GNU General Public License
    License URI: http://www.gnu.org/licenses/gpl.html
*/

.single-works .post_content h3{
    color: #008AD2;
    position: relative;
    padding-top: 40px;
    font-size: 28px;
    margin-bottom: 40px;
}

@media screen and (max-width: 768px) {
    .single-works .post_content h3{
        padding-top: 24px;
        font-size: 20px;
        margin-bottom: 24px;
    }
}

.single-works .post_content h3::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	height: 3px; /* 下線の太さ */
	width: 100%; /* コンテンツ幅 */
	background: linear-gradient(
		to right,
		#008AD2 0px,
		#008AD2 50px,
		#54A280 50px,
		#54A280 100px,
		#E5E5E5 100px,
		#E5E5E5 1080px
	);
}

.works_cate_wrap a{
    padding: .5em 1em !important;
}

.works_cate_wrap a::before{
    display: none !important;
}

/* 施工実績ギャラリー（画像6個表示） */
.p-works-gallery {
  margin: 40px 0;
  padding: 0;
}

.p-works-gallery__container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  justify-items: center;
}

.p-works-gallery__item {
  width: 100%;
  max-width: 350px;
}

.p-works-gallery__image {
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  aspect-ratio: 4 / 3;
  width: 100%;
}

.p-works-gallery__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}


/* タブレット向けレスポンシブ（768px以下） */
@media screen and (max-width: 768px) {
  .p-works-gallery {
    margin: 30px 0;
  }
  
  .p-works-gallery__container {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
  
  .p-works-gallery__item {
    max-width: 300px;
  }
}

/* スマートフォン向けレスポンシブ（600px以下） */
@media screen and (max-width: 600px) {
  .p-works-gallery {
    margin: 20px 0;
  }
  
  .p-works-gallery__container {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .p-works-gallery__item {
    max-width: 350px;
  }
  
}

/* 画像数が少ない場合の調整 */
/* 1個の場合 */
.p-works-gallery__container:has(.p-works-gallery__item:first-child:nth-last-child(1)) {
  grid-template-columns: 1fr;
  justify-items: center;
}

.p-works-gallery__container:has(.p-works-gallery__item:first-child:nth-last-child(1)) .p-works-gallery__item {
  max-width: 500px;
}

/* 2個の場合 */
.p-works-gallery__container:has(.p-works-gallery__item:first-child:nth-last-child(2)) {
  grid-template-columns: repeat(2, 1fr);
}

.p-works-gallery__container:has(.p-works-gallery__item:first-child:nth-last-child(2)) .p-works-gallery__item {
  max-width: 400px;
}

/* 4個の場合 */
.p-works-gallery__container:has(.p-works-gallery__item:first-child:nth-last-child(4)) {
  grid-template-columns: repeat(2, 1fr);
}

/* 5個の場合 */
.p-works-gallery__container:has(.p-works-gallery__item:first-child:nth-last-child(5)) {
  grid-template-columns: repeat(3, 1fr);
}

.p-blogParts{
    margin-top: 50px;
}

.p-blogParts .swell-block-fullWide{
    margin-bottom: 0;
}

.c-postTitle__ttl{
    margin-bottom: 20px;
}


/* ページネーション調整 */
.post_content .c-pagination .page-numbers.current{
    margin: 6px !important;
}

.post_content .c-pagination .page-numbers:last-child{
    margin: 6px !important;
}

.l-container .c-pagination .navigation.pagination .nav-links{
    display: flex;
}


/* 施工実績FV */
/* カスタム投稿タイプ「works」のアーカイブページ用 */

.archive .c-pageTitle__subTitle{
    display: none;
}

.post-type-archive-works .l-content .l-mainContent .l-mainContent__inner .c-pageTitle .c-pageTitle__inner{
    display: none !important;
}

.post-type-archive-works .l-content .l-mainContent .l-mainContent__inner .c-pageTitle{
    border-bottom: none !important;
}

/* .custom-works-mv {
    background: var(--works-mv-pc);
    background-position: bottom right;
    background-repeat: no-repeat;
    background-size: cover;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: left;
    position: absolute;
    top: -20px;
    left: 0;
    right: 0;
    z-index: 1;
} */

/* ヘッダーがある場合の調整 */
#body_wrap.post-type-archive-works .l-header__inner {
    position: relative;
    z-index: 1000;
    background-color: #fff;
    border-radius: 8px;
}

body.post-type-archive-works #content {
    margin-top: 400px; /* MVの高さ分 */
}

.l-topTitleArea__body {
    color: #fff;
    position: relative;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, .1);
    width: 100%;
    z-index: 3;
}

h1.c-pageTitle {
    font-size: 38px;
    font-weight: bold;
    letter-spacing: 0.05em;
    color: #fff;
}

@media screen and (max-width: 959px) {
    /* .custom-works-mv {
        background: var(--works-mv-sp);
        min-height: 300px;
    } */
    
    body.post-type-archive-works #content {
        margin-top: 400px;
    }
    
    .custom-works-mv__title {
        font-size: 24px;
    }
}

.tax-works_category .l-content .l-mainContent__inner .c-pageTitle{
    color: #333;
}

