/*
Theme Name: オーサワホームWPテーマ
Author: NEXT RESERVATION
Version: 1.0
*/

img {
    width: 100%;
    display: block;
}

body {
    background-color: #F9F8F5;
}

.wp-main {
    max-width: 1100px;
    margin: 160px auto 32px;
}

.wp-main > .thumbnail {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: cover;
}

.wp-main .thumbnail {
    max-width: 1100px;
}

.wp-main .header {
    color: white;
    background-color: #524B40;
    padding: 1rem;
    margin: 2rem 0 0;
}

.wp-main .header h1 {
    margin: 0;
    font-size: 24px;
    line-height: 1.5;
}

.wp-main .header .time {
    text-align: right;
}

.wp-main .header .time div {
    display: inline-block;
}

.wp-main .body {
    padding: 0 8px;
}

.wp-main .body h2 {
    border-left: solid 16px #524B40;
    font-size: 24px;
    font-size: clamp(24px, 6.5vw, 32px);
    padding: 16px;
}

.wp-main .body h3 {
    font-size: 18px;
    font-size: clamp(18px, 5vw, 24px);
    display: flex;
    gap: 10px;
    align-items: center;
}

.wp-main .body h4 {
    font-size: clamp(16px, 5vw, 20px);
}

.wp-main .body h3::before {
    content: '';
    display: block;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #524B40;
}

.wp-main .body p {
    max-width: 640px;
    margin: 4rem auto 3rem;
}

.wp-main .body > img {
    max-width: 640px;
    height: auto;
    margin: 1rem auto;
}
.wp-main .wp-block-gallery {
    margin: 0;
}

.wp-main .wp-block-gallery .wp-block-image {
    margin: 16px auto;
}

.wp-main .wp-block-gallery .wp-block-image {
    margin: 16px auto;
}

.wp-main .body .wp-block-table {
    margin: 32px 0;
}

.wp-main .body .wp-block-table table {
    width: 100%;
    table-layout: auto;
}

.wp-main .body .wp-block-table table tbody {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
}

.wp-main .body .wp-block-table table tr {
    background-color: white;
    padding: 16px;
    display: block;
}

.wp-main .body .wp-block-table table tr td {
    display: block;
}

.wp-main .body .wp-block-table table tr td:nth-child(1) {
    color: #004C18;
    font-weight: bold;
}

.wp-main .body .wp-block-table table tr td:nth-child(2) {
    margin-top: 10px;
}

@media screen and (min-width: 768px) {
    .wp-main .body .wp-block-table table tbody {
        width: 100%;
        border-spacing: 0 10px;
    }

    .wp-main .body .wp-block-table table tr {
        display: flex;
    }

    .wp-main .body .wp-block-table table tr td:nth-child(1) {
        width: 30%;
        text-align: center;
    }

    .wp-main .body .wp-block-table table tr td:nth-child(2) {
        margin-top: 0;
        width: 70%;
    }
}

.wp-main.single-event .event-img {
    position: relative;
}

.wp-main.single-event .event-img dl {
    position: absolute;
    left: 5%;
    bottom: 30px;
    margin: 0;
    display: flex;
    align-items: center;
}

.wp-main.single-event .event-img dl dt {
    color: white;
    background-color: #524B40;
    padding: 6px 32px;
}

.wp-main.single-event .event-img dl dd {
    color: black;
    background-color: rgba(255, 255, 255, 0.7);
    font-weight: bold;
    padding: 6px 32px;
    margin: 0;
}

.wp-main.single-event .event-img .thumbnail {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: cover;
}

/**
 * イベント情報のCSS
 */
.list-main {
    box-sizing: border-box;
}
.list-main h1 {
    text-shadow: 0 0 20px black;
    font-size: clamp(1.5em, 5vw, 2em);
    color: white;
    background: linear-gradient(to right, #554A3A, #462E08);
    padding: 20px 8px;
    width: calc(100% - 38px);
    margin: 128px auto 0;
    text-align: center;
}

@media (min-width:800px) {
    .list-main h1 {
        margin: 200px auto 0;
    }	
}

.list-main .list {
    max-width: 1100px;
    margin: 0 auto 40px;
    display: flex;
    gap: 10px;
    row-gap: 50px;
    justify-content: start;
    flex-wrap: wrap;
    padding: 0 16px;
}

@media screen and (min-width: 1116px) {
    .list-main .list {
        padding: 0;
    }
}

.list-main .list .item {
    flex: 0 0 100%;
}

@media screen and (min-width: 600px) {
    .list-main .list .item {
        flex: 0 0 calc((100% - 50px) / 2); /* gap 1つ分 */
        display: flex;
        flex-flow: column;
    }
}

@media screen and (min-width: 1024px) {
    .list-main .list .item {
        flex: 0 0 calc((100% - 80px) / 3); /* 3列 = gap 2つ分を引く */
    }
}


.list-main .list .item .title {
    color: black;
    min-height: 64px;
}

.list-main .list .item img {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
}

.list-main .list .item .event-info {
    margin: 16px 0;
    color: #004C18;
}

.list-main .pager .pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    color: #524B40;
    font-weight: bold;
}

.list-main .pager .pagination .pre {
    margin-right: 32px;
}

.list-main .pager .pagination .next {
    margin-left: 32px;
}

.list-main .pager a {
    color: #004C18;
    text-decoration: none;
}

/**
* 施工事例のCSS
*/

.case-category {
    --category-color: #ffafaf;
}
.newbuild {
    --category-color: #74d856;
}
.reform {
    --category-color: #ffc24e;
}
.renovation {
    --category-color: #00ddf6;
}

/* カテゴリー */

.case-main .category {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2em 10px;
    display: flex;
    flex-flow: row wrap;
    gap: 8px;
}

.case-main .category li {
    width: fit-content;
    padding: 0px 10px;
    background-color: var(--category-color);
    border-radius: 4px;
    text-align: center;
    border: 1px solid var(--category-color);
    transition: background-color 0.3s ease;
}

.case-main .category li:nth-child(1) {
    background-color: #fff;
    border: 1px solid #462E08;
}

.case-main .category li:nth-child(1) a {
    color: #462E08;
}

.case-main .category li:hover {
    background-color: #FFF;
    transition: background-color 0.3s ease;
}

.case-main .category li a {
    text-decoration: none;
    color: #000000;
    font-family: 'Noto Sans';
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0;
}

/* 記事表示 */
.case-main .list {
    padding: 0;
}

.case-main .list .list-cont-wr {
    padding: 10px 10px;
}

.case-main .list .item {
    text-decoration: none;
    color: #000000;
}

.case-main .list .item .list-img-wr {
    position: relative;
    overflow: hidden;
}

.case-main .list .item img {
    transition: opacity 0.5s ease, transform 1s ease;
}

.case-main .list .item:hover img {
    opacity: 0.7;
    transform: scale(1.1);
    transition: opacity 0.5s ease, transform 1s ease;
}

.case-main .list .item .list-img-wr span {
    width: 150px;
    padding: 2px 5px 2px 30px;
    background-color: var(--category-color);
    clip-path: polygon(20% 0%, 100% 0%, 100% 100%, 0% 100%);
    text-align: center;
    font-family: 'Noto Sans';
    font-weight: 700;
    display: flex;
    flex-flow: row nowrap;
    justify-content: center;
    align-items: center;
    gap: 12px;
    position: absolute;
    right: -1px;
    bottom: -1px;
}

.case-main .list .item .list-img-wr span::after {
    content: '';
    display: block;
    width: 8px;
    height: 10px;
    background-image: url(triangle.svg);
    background-repeat: no-repeat;
    background-size: cover;
}

.case-main .list .item .title {
    color: #524B40;
    font-size: 24px;
    margin: 16px 0 24px;
    font-weight: 600;
    letter-spacing: 2px;
}

.list-main .list .item .house-name {
    font-size: 18px;
    color: #989898;
    margin: 0;
}

.case-main .btn-1 {
    color: rgba(82, 75, 64);
    background-color: #fff;
    border: 1px solid #524B40;
}

.case-main .btn-1::after {
    background-image: url(w-arrow-brown.svg);
}

@media (min-width:600px) {
    .case-main .list .item {
        padding: 0 10px;
    }
}
/**
 * 施工事例の個別ページのCSS
 */

.single-case {
    margin: 110px auto 0;
    background-color: #F9F8F5;
}
@media (min-width:800px) {
    .single-case {
        margin: 130px auto 0;
    }	
}
@media (min-width: 980px) {
    .single-case {
        margin: 96px auto 0;
    }
}
.single-case img {
    margin: 0 auto;
    object-fit: cover;
    aspect-ratio: 16 / 9;
}

 /*---- fv ---- */

.single-case .header {
    margin: -28px 0 0 12px;
    padding: 20px 20px 12px 8px;
    position: relative;
    z-index: 10;
}
.single-case .header h1 {
    font-size: 22px;
    line-height: 1.8;
    letter-spacing: 3px;
}
.single-case .house_name {
    margin: 4px 0 0 0;
    padding: 0;
    text-align: right;
}

@media (min-width:500px) {
    .single-case .header {
        margin: -80px 0 50px 30px;
        padding: 50px 60px 50px 80px;
        position: relative;
        z-index: 10;
    }
    .single-case .house_name {
        margin: 12px 0 0 0;
        padding: 0;
        text-align: right;
    }
}
/*---- body ---- */

.single-case .body {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 20px;
}

.single-case .body h2 {
    font-size: 20px;
    max-width: 640px;
    margin: 2em auto 32px;
    border-bottom: solid 1px #524B40;
    border-left: none;
    padding: 16px 0;
}

.single-case .body h3::before {
    display: none;
}

.single-case h3 {
    max-width: 640px;
    margin: 2em auto 0;	
}
/*---- body ---- */

.single-case .body p {
    margin: 1rem auto 1rem;
}

.single-case p {
    padding: 0;
    font-family: 'Zen Kaku Gothic Antique';
}

.single-case .wp-block-image {
    width: 100%;
    margin: 32px auto;
}

.single-case .wp-element-caption {
    text-align: left;
    font-size: 14px;
}

.single-case .wp-block-columns {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
    margin: 1em 0;
}

@media (min-width:500px) {
    .single-case .wp-block-columns {
        flex-direction: row;
        gap: 16px;
        max-width: 640px;
        margin: 2em auto;
    }
    .single-case .wp-element-caption {
        text-align: center;
    }
}

/*---- パターン ---- */

.single-case .planner {
    margin: 0;
}

.single-case .planner .wp-element-caption {
    line-height: 20px;
    margin: 8px auto;
}

.single-case .planner img {
    border-radius: 50%;
    aspect-ratio: 1 / 1;
    max-width: 250px;
}

.single-case .body .planner-name {
    text-align: center;
    margin: 0;
    line-height: 20px;
}

@media (min-width:444px) {
    .single-case .planner {
        align-items: center;
        flex-direction: row;
    }
}

.single-case .planner .planner-img {
    width: 200px;
}

.single-case .planner #planner-img img {
    aspect-ratio: 1 / 1;
}

/**
* 中古住宅
*/
.used_house{
    margin: 140px auto 32px;
}

.used_house .header .info {
    display: flex;
    flex-flow: row;
    justify-content: end;
    gap: 16px;
}

.used_house .header .info .category {
    border: 1px solid #fff;
    padding: 2px 6px;
    background-color: #524B40;
}

/**
 * カスタムギャラリーのCSS
 */

.custom-gallery {
    text-align: center;
    max-width: 600px;
    margin: auto;
}

.custom-gallery .gallery-main {
    position: relative;
}

.custom-gallery .gallery-main .large-image {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    max-height: 400px;
    object-fit: contain;
}

.custom-gallery .gallery-main .nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 24px;
    padding: 10px;
    cursor: pointer;
}

.custom-gallery .gallery-main .prevBtn {
    left: 10px;
}

.custom-gallery .gallery-main .nextBtn {
    right: 10px;
}

.custom-gallery .gallery-thumbnails {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
    display: flex;
    flex-flow: row wrap;
    justify-content: flex-start;
}

.custom-gallery .gallery-thumbnails .thumbnail {
    width: 80px;
    height: 80px;
    margin: 0;
    object-fit: cover;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.custom-gallery .gallery-thumbnails .thumbnail.active {
    opacity: 1;
    border: 2px solid #0073aa;
}


.btn-2 {
    background-color: #524B40;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-decoration: none;
    max-width: 300px;
    border-radius: 999px;
    border: solid 1px #524B40;
    padding: 16px 42px;
    margin: 0 auto;
}

.btn-2::after {
    display: block;
    content: '';
    width: 24px;
    aspect-ratio: 94 / 38;
    background-image: url(w-arrow.svg);
    background-size: contain;
    background-repeat: no-repeat;
}
