/* ----------------------------------------
RENT LIST：賃貸物件を探すパーツ
---------------------------------------- */

/* タイトル余白の調整 */
.rent-list h2 {
    --space-max: 60;
}

/* 賃貸カードグリッド */
.rent-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(50px, 3.75vw, 54px) clamp(20px, 3.75vw, 54px);
    --space-min: 18;
    --space-max: 90;
    margin-bottom: var(--space);
}

/* コンテナクエリ用の設定 */
.rent-card {
    container-type: inline-size;
    container-name: rent-card;
}

.rent-card__link {
    display: block;
}

/* 賃貸カード画像 */
.rent-card__img {
    width: 100%;
    height: 100%;
    aspect-ratio: 400 / 240;
    overflow: hidden;
}

.rent-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.6s ease;
}

/* 賃貸カードHOVERで画像が拡大 */
@media (hover: hover) and (pointer: fine) {
    .rent-card__link:hover img {
        scale: 1.05;
        transition: all 0.6s ease;
    }
}

/* 賃貸カードタイトル */
.rent-card__title {
    font-size: 24px;
    font-weight: var(--wght-bold);
    margin-bottom: 9px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* NEWのラベル */
.rent-card__title span {
    display: inline-block;
    background: var(--color-main);
    color: #fff;
    padding: 0.5em 1em 0.6em;
    border-radius: 999px;
    --font-min: 18;
    --font-max: 20;
    font-size: var(--font-size);
    font-weight: var(--wght-black);
    line-height: 0.8;
}

/* 賃貸カード詳細 */
.rent-card__details {
    margin: 0;
    padding: 8px 12px 12px 0;
}

.rent-card__detail-item {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.4em;
    margin-bottom: 0.5em;
}

.rent-card__detail-item dt {
    font-size: 16px;
    font-weight: var(--wght-light);
}

.rent-card__detail-item dd {
    margin: 0;
    font-size: 18px;
    font-weight: var(--wght-bold);
    line-height: 1;
}

.rent-card__detail-item small {
    font-size: 16px;
    font-weight: var(--wght-bold);
}

.rent-card__detail-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 12px;
}

/* 専有面積・間取り・賃料の縦並びの余白 */
.rent-card__detail-row .rent-card__detail-item {
    gap: 0.8em;
    margin-bottom: 0;
}

.rent-card__detail-row .rent-card__detail-item:first-child,
.rent-card__detail-row .rent-card__detail-item:nth-child(2) {
    width: 25%;
}

.rent-card__detail-row .rent-card__detail-item:first-child dd {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 6px;
}

.rent-card__detail-row .rent-card__detail-item:last-child {
    width: 40%;
}

/* 賃料のサイズ */
dd.value-price {
    font-size: 36px;
    font-family: var(--fontFamily-en);
    font-weight: var(--wght-medium);
    line-height: 0.7;
    align-self: flex-end;
}

/* もっと見るボタンの位置調整（インナーサイズの関係） */
.rent-list .more-wrap {
    margin-right: clamp(0px, 9.5vw, 140px);
}

/* 賃貸物件を探すページはボタンの変更あり ········ */
.rent-list__btn {
    max-width: 547px;
    margin-inline: auto;
}

/* コンテナクエリ：400px以下でフォントサイズのみ可変 */
@container rent-card (width < 400px) {
    .rent-card__title {
        font-size: clamp(13px, 5cqw, 24px);
    }

    .rent-card__title span {
        padding: 0.4em 0.8em;
        font-weight: var(--wght-bold);
        font-size: clamp(14px, 5cqw, 20px)
    }

    .rent-card__detail-item dt {
        font-size: clamp(11px, 4cqw, 16px);
    }

    .rent-card__detail-item dd {
        font-size: clamp(13px, 5.2cqw, 18px);
    }

    .rent-card__detail-item small {
        font-size: clamp(12px, 4cqw, 16px);
    }

    .rent-card__detail-row .rent-card__detail-item:last-child dd {
        font-size: clamp(20px, 9.5cqw, 36px);
    }
}

/* レスポンシブ対応 */
@media (width < 1000px) {
    .rent-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (width < 800px) {
    .rent-list__inner::before {
        content: none;
    }

    .rent-list h2 {
        margin-inline: 11px;
        --space-min: 27;
    }

    .rent-card__title {
        margin-inline: 11px;
        margin-bottom: 16px;
    }

    .rent-card__info {
        margin-inline: 11px;
    }
}

@media (width < 600px) {
    .rent-cards {
        grid-template-columns: repeat(1, 1fr);
    }

    .rent-card__details {
        margin: 0;
        padding: 8px 0 0px;
    }
}