@charset "utf-8";

.header-kv {
    margin-bottom: 30px;
}

.case {
    background-color: #f2f0ec;
}

.h2-ttl {
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--redbrown);
    font-size: 18px;
}

.p-txt {
    max-width: 1100px;
    margin: 14px auto;
    padding: 0 16px;
    font-size: 17px;
    line-height: 1.7em;
}

@media screen and (max-width: 768px) {
    .header-kv {
        margin-bottom: 0;
    }

    .p-txt {
        padding: 0 10px;
        font-size: 13px;
    }

    .h2-ttl {
        font-size: 14px;
    }
}

/* ========================================
   お悩みから探す
======================================== */

.filter fieldset:first-child {
    margin-bottom: 10px;
}

.filter fieldset:first-child>span {
    display: block;
    padding-bottom: 10px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--redbrown);
    color: var(--redbrown);
    font-size: 28px;
    font-weight: 400;
}

.filter fieldset:first-child input[type='checkbox'] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.filter fieldset:first-child label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    padding: 0 14px;
    margin: 0 8px 10px 0;
    border: 1px solid var(--redbrown);
    border-radius: 22px;
    background: transparent;
    color: var(--redbrown);
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    transition: 0.2s ease;
}

.filter fieldset:first-child label:hover {
    background: #f1e5df;
}

.filter fieldset:first-child input[type='checkbox']:checked+label {
    background: var(--redbrown);
    border-color: var(--redbrown);
    color: #fff;
}

@media screen and (max-width: 768px) {
    .filter fieldset:first-child {
        margin-bottom: 6px;
    }

    .filter fieldset:first-child label {
        height: 24px;
        padding: 0 8px;
        margin: 0 4px 8px 0;
        font-size: 11px;
    }
}

/* ---------- 症例一覧 ---------- */

.topicsSec {
    margin: 26px 0;
}

#caseFilterResults {
    max-width: 1100px;
    margin: 0 auto;
    box-sizing: border-box;
}

#caseFilterResults .postList {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

#caseFilterResults .postItem {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 0;
    padding: 23px 40px;
    box-sizing: border-box;

    background: #fff;
    border-radius: 8px;

    overflow: hidden;
}

#caseFilterResults .postItem .heading {
    margin: 0;
    padding: 0;
}

#caseFilterResults .caseImage {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 460px;
    height: 280px;
    margin: 0 auto 10px;
    padding: 0;
}

#caseFilterResults .caseImage img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

@media screen and (max-width: 767px) {
    .topicsSec {
        margin: 20px 0;
    }

    #caseFilterResults .caseImage {
        display: block;
        width: 100%;
        max-width: none;
        height: auto;
        margin: 0 auto 14px;
    }

    #caseFilterResults .caseImage img {
        display: block;
        width: 100%;
        height: auto;
        max-width: 100%;
        max-height: none;
        object-fit: initial;
    }
}

#caseFilterResults .postItem .ttl {
    margin: 0 0 10px;
    padding: 0;
    border: 0;
    color: var(--black);
    font-size: 15px;
    font-weight: 400;
    line-height: 1.6;
    letter-spacing: 0.03em;
}

#caseFilterResults .caseTerms {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 12px;
    padding: 0;
}

#caseFilterResults .caseTerms span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 22px;
    padding: 2px 13px;
    box-sizing: border-box;
    border: 1px solid var(--redbrown);
    border-radius: 999px;
    background: #fff;
    color: var(--redbrown);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: 0.03em;
}

#caseFilterResults .postCont {
    padding: 0;
    color: var(--black);
    font-size: 12px;
    line-height: 1.8;
}

#caseFilterResults .postCont>p {
    margin: 0 0 12px;
}

#caseFilterResults .caseMetaTable {
    width: 100%;
    margin: 0;
    padding: 13px;
    box-sizing: border-box;
    background: #faf7f1;
    border-radius: 3px;
}

#caseFilterResults .caseMetaTable table {
    width: 100%;
    margin: 0;
    border: 0;
    border-collapse: collapse;
    border-spacing: 0;
}

#caseFilterResults .caseMetaTable tr,
#caseFilterResults .caseMetaTable th,
#caseFilterResults .caseMetaTable td {
    border: 0;
    background: transparent;
}

#caseFilterResults .caseMetaTable th,
#caseFilterResults .caseMetaTable td {
    padding: 2px 0;
    vertical-align: top;
    color: var(--black);
    font-size: 13px;
    font-weight: 300;
    line-height: 1.7;
    text-align: left;
}

#caseFilterResults .caseMetaTable th {
    width: 72px;
    padding-right: 10px;
    font-weight: 400;
    white-space: nowrap;
}

/* ---------- ページャー ---------- */
#caseFilterResults #pager {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 36px auto 0;
}

#caseFilterResults #pager .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    box-sizing: border-box;
    border: 1px solid var(--redbrown);
    color: var(--redbrown);
    font-size: 13px;
    text-decoration: none;
}

#caseFilterResults #pager .page-numbers.current {
    background: var(--redbrown);
    color: #fff;
}

@media screen and (max-width: 767px) {
    #caseFilterResults .postList {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    #caseFilterResults .postItem {
        padding: 12px;
        border-radius: 7px;
    }

    #caseFilterResults .caseImage {
        margin-bottom: 10px;
    }

    #caseFilterResults .postItem .ttl {
        margin-bottom: 8px;
        font-size: 13px;
    }

    #caseFilterResults .caseTerms {
        gap: 5px;
        margin-bottom: 10px;
    }

    #caseFilterResults .caseTerms span {
        min-height: 21px;
        padding: 2px 11px;
        font-size: 10px;
    }

    #caseFilterResults .caseMetaTable {
        padding: 10px;
    }

    #caseFilterResults .caseMetaTable th,
    #caseFilterResults .caseMetaTable td {
        font-size: 10px;
    }

    #caseFilterResults .caseMetaTable th {
        width: 40px;
    }

    #caseFilterResults #pager {
        margin: 20px auto 0;
    }
}

/* ========================================
   フィルター
======================================== */
.filter {
    max-width: 1100px;
    margin: 14px auto;
    padding: 0 10px;
}

.filter * {
    box-sizing: border-box;
}

.filter fieldset {
    border: 0;
    margin: 0 0 20px;
    padding: 0;
}

.filter fieldset>span {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
}

.filter label {
    display: inline-block;
    margin: 0 12px 8px 4px;
    cursor: pointer;
}

.treatment-dropdown {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.treatment-dropdown__all {
    display: flex;
    align-items: center;
    padding: 0;
    width: 100%;
    justify-content: flex-end;
}

.treatment-dropdown__all .case_treatment_option {
    border: solid 1px #656363;
    border-radius: 4px;
    height: 24px;
}

.treatment-dropdown__all .case_treatment_option label {
    padding: 0;
    margin: 0;
    line-height: 30px;
    font-size: 11px;
    color: #656363;
    display: flex;
    align-items: center;
}

.treatment-dropdown__all .case_treatment_option label::before {
    content: '\e5d5';
    font-family: 'Material Icons';
    margin-right: 2px;
}

.treatment-dropdown__item {
    position: relative;
    min-width: 140px;
}

.treatment-dropdown__trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    min-height: 34px;
    padding: 0;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fff;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.treatment-dropdown__trigger::after {
    content: '';
    width: 5px;
    height: 5px;
    border-right: 2px solid var(--redbrown);
    border-bottom: 2px solid var(--redbrown);
    transform: rotate(45deg);
    transition: transform 0.2s;
    flex-shrink: 0;
    margin-top: -4px;
    margin-right: 12px;
}

.treatment-dropdown__item.is-open .treatment-dropdown__trigger::after,
.treatment-dropdown__item:hover:not(.is-locked) .treatment-dropdown__trigger::after {
    transform: rotate(-135deg);
    margin-top: 4px;
}

.treatment-dropdown__item.has-selection .treatment-dropdown__trigger {
    border-color: var(--redbrown);
    font-weight: 700;
}

.treatment-dropdown__trigger-label {
    display: flex;
    align-items: center;
    width: 28%;
    height: 32px;
    padding: 0 7px;
    line-height: 40px;
    color: var(--redbrown);
    background: #ded0c9;
    border-radius: 5px 0 0 5px;
    font-size: 11px;
    font-weight: 400;
}

.treatment-dropdown__panel {
    position: absolute;
    top: 100%;
    left: 28%;
    display: block;
    padding: 0;
    width: 72%;
}

.treatment-dropdown__option {
    display: none;
    margin: 0;
    padding: 0;
    height: 32px;
}

.case_treatment_option {
    display: flex;
    align-items: center;
    height: 32px;
    padding: 0 8px;
    background: transparent;
}

@media (hover: hover) and (pointer: fine) {
    .case_treatment_option:hover {
        background: #fafafa;
    }
}

.case_treatment_option label {
    flex: 1 1 auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    font-family: 'Noto Sans JP', sans-serif;
    color: var(--black);
    font-weight: 400;
    font-size: 11px;
}

input[type='radio'] {
    display: none;
}

/* ホバー解除後も、選択中の項目だけ表示 */
.treatment-dropdown__panel:has(input:checked) {
    top: 1px;
}

.treatment-dropdown__option:has(input:checked) {
    display: block;
    font-weight: 700;
}

/* ホバー / 開いているときは全選択肢をドロップダウン表示（選択直後の is-locked 中は除外） */
.treatment-dropdown__item:hover:not(.is-locked) .treatment-dropdown__panel,
.treatment-dropdown__item.is-open .treatment-dropdown__panel {
    z-index: 20;
    padding: 0;
    border: 1px solid #ccc;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding-bottom: 12px;
}

.treatment-dropdown__item:hover:not(.is-locked) .treatment-dropdown__panel:has(input:checked) {
    top: 100%;
}

.treatment-dropdown__item:hover:not(.is-locked) .treatment-dropdown__option,
.treatment-dropdown__item.is-open .treatment-dropdown__option {
    display: block;
    font-weight: inherit;
}

.treatment-dropdown__item:hover:not(.is-locked) .treatment-dropdown__option:has(input:checked),
.treatment-dropdown__item.is-open .treatment-dropdown__option:has(input:checked) {
    font-weight: 700;
    background: #f7f3f0;
}

/* 選択直後: ホバー中でも閉じた状態（選択項目のみ）にする */
.treatment-dropdown__item.is-locked .treatment-dropdown__panel:has(input:checked) {
    top: 1px;
    border: 0;
    box-shadow: none;
    background: transparent;
}

.treatment-dropdown__item.is-locked .treatment-dropdown__option {
    display: none;
}

.treatment-dropdown__item.is-locked .treatment-dropdown__option:has(input:checked) {
    display: block;
    font-weight: 700;
    background: transparent;
}

.treatment-dropdown__item.is-locked .case_treatment_option {
    background: transparent;
}

.treatment-dropdown__option label {
    display: block;
    margin: 0;
    padding: 0;
    cursor: pointer;
}

.treatment-dropdown__orphan {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 0;
    min-height: 40px;
}

#caseFilterResults.is-loading {
    opacity: 0.5;
    pointer-events: none;
    transition: opacity 0.2s;
}

.noPost {
    text-align: center;
    padding: 40px 16px;
}

@media (hover: none) {
    .treatment-dropdown__item:hover .treatment-dropdown__panel {
        border: 0;
        box-shadow: none;
        padding: 0;
        margin-top: 0;
    }

    .treatment-dropdown__item:hover .treatment-dropdown__option {
        display: none;
    }

    .treatment-dropdown__item:hover .treatment-dropdown__option:has(input:checked) {
        display: block;
        font-weight: 700;
        background: transparent;
    }

    .treatment-dropdown__item.is-open .treatment-dropdown__panel {
        position: absolute;
        top: 0;
        left: 30%;
        z-index: 20;
        margin-top: -1px;
        padding: 0;
        border: 1px solid #ccc;
        background: #fff;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    }

    .treatment-dropdown__item.is-open .treatment-dropdown__option {
        display: block;
    }
}

@media (min-width: 768px) {
    .filter {
        padding: 0 16px;
        margin: 24px auto;
    }

    .treatment-dropdown {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .treatment-dropdown__item {
        width: calc(50% - 6px);
    }

    .treatment-dropdown__trigger-label {
        width: 30%;
        height: 40px;
        font-size: 15px;
    }

    .treatment-dropdown__panel {
        width: 70%;
        left: 30%;
    }

    .case_treatment_option {
        padding: 0 12px;
        height: 40px;
    }

    .case_treatment_option label {
        font-size: 15px;
    }

    .treatment-dropdown__all .case_treatment_option {
        height: 30px;
    }

    .treatment-dropdown__all .case_treatment_option label {
        font-size: 15px;
    }
}

/* reservation　カウンセリング予約
---------------------------------------------- */
.reservation {
    max-width: 654px;
    margin: 40px auto 80px;
    padding: 40px;
    border: 1px solid var(--pinkbrown);
    background-color: var(--white);
}

.reservation .text {
    padding-bottom: 17px;
    font-size: 24px;
    text-align: center;
    line-height: 1.3em;
}

.reservation .reservation-btn-area {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 18px;
    width: 100%;
}

.reservation .reservation-btn {
    padding: 10px;
    color: var(--white);
    font-size: 24px;
    text-align: center;
}

.reservation .tel {
    background-color: var(--beige);
}

.reservation .web {
    background-color: var(--pinkbrown);
}

@media screen and (max-width: 768px) {
    .reservation {
        padding: 14px;
        margin: 30px 10px;
    }

    .reservation .reservation-btn-area {
        display: block;
    }

    .reservation .text {
        padding-bottom: 10px;
        font-size: 15px;
        line-height: 20px;
    }

    .reservation .reservation-btn {
        font-size: 18px;
    }

    .reservation .reservation-btn-area .tel {
        margin-bottom: 12px;
    }
}