/*
Theme Name: kasai-ortho2025 Child
Template: kasai-ortho2025
Version: 1.0
*/

/* =====================================
   共通レイアウト
===================================== */

#main .inner {
    max-width: 1000px;
    margin: 0 auto 100px;
}

.main_block {
    overflow: visible;
}

/* =====================================
   パンくず
===================================== */

.breadcrumb {
    margin: 20px 0 40px;
}

.breadcrumb .bc_list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 8px;
    font-size: 14px;
}

.breadcrumb .bc_list li:last-child::after {
    content: "";
}

/* =====================================
   検索フォーム
===================================== */

.cases-search {
    background: #f4f7f8;
    padding: 50px;
    border-radius: 30px;
    margin-bottom: 80px;
}

.search-row {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
}

.search-item {
    width: 240px;
    text-align: left;
}

.search-item label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.search-item select {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ccc;
}

.search-submit {
    text-align: center;
}

.search-submit button {
    background: #3a8f86;
    color: #fff;
    padding: 12px 40px;
    border: none;
    border-radius: 30px;
    font-size: 16px;
    cursor: pointer;
}

/* =====================================
   archive 症例カード
===================================== */

.cases-list {
    margin-top: 60px;
}

/* 外枠（丸の基準） */
.case-card {
    position: relative;
    margin-bottom: 100px;
    overflow: visible;
}

/* 内側（背景とpadding担当） */
.case-card-inner {
    background: #efeade;
    padding: 60px;
    border-radius: 40px;
}

/* 丸CASE */
.case-number {
    position: absolute;
    top: -35px;
    left: -35px;
    z-index: 20;
}

.case-number span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: #E497A2;
    color: #ffffff;
    font-weight: bold;
    font-size: 16px;
}

/* 2カラム */
.case-flex {
    justify-content: space-between;
    gap: 40px;
}

/* タイトル */
.case-title {
    font-size: 26px;
    color: #83775D;
    margin-bottom: 10px;
    line-height: 1.4;
}

.case-age-sex {
    font-weight: bold;
    margin-bottom: 20px;
}

/* メタ情報 */
.meta-row {
    display: flex;
    padding: 14px 0;
    border-bottom: 1px solid #ffffff;
}

.meta-label {
    width: 160px;
    font-weight: bold;
}

.meta-value {
    flex: 1;
}

/* 画像 */
.image-inner {
    background: #ffffff;
    padding: 20px;
    margin-bottom: 20px;
}

.image-inner img {
    width: 100%;
    height: auto;
    display: block;
}

/* 詳細ボタン */
.detail-link {
    display: inline-block;
    margin-top: 30px;
    padding: 14px 40px;
    background: #E497A2;
    color: #ffffff !important;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: 0.3s ease;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.detail-link:hover {
    background: #d98392;
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.12);
}

/* =====================================
   single 詳細ページ
===================================== */

.case-detail-wrap {
    padding: 80px 0;
}

.case-detail {
    position: relative;
    background: #efeade;
    padding: 100px;
    border-radius: 40px;
    max-width: 1000px;
    margin: 0 auto;
}

/* =====================================
   レスポンシブ
===================================== */

@media (max-width: 900px) {

    .case-flex {
        flex-direction: column;
    }

    .case-left,
    .case-right {
        width: 100%;
    }

    .search-row {
        flex-direction: column;
        align-items: center;
    }

    .search-item {
        width: 100%;
        max-width: 300px;
    }

    .case-card-inner {
        padding: 40px 25px;
    }

    .case-detail {
        padding: 60px 30px;
    }

    .case-number {
        top: -25px;
        left: -25px;
    }

    .case-number span {
        width: 90px;
        height: 90px;
        font-size: 14px;
    }
}

/* ===============================
   single タイトル
================================ */

.case-detail .case-title {
    font-size: 32px;
    color: #83775D;
    font-weight: 600;
    margin-bottom: 10px;
}

.case-detail .case-treatment-box {
    background: #ffffff;
    padding: 20px 25px;
    border-radius: 20px;
    margin: 25px 0 40px;
}
.case-detail .meta-row {
    display: flex;
    align-items: flex-start;
    padding: 16px 0;
    border-bottom: 1px solid #ffffff;
}

.case-detail .meta-label {
    width: 160px;
    font-weight: 600;
}

.case-detail .meta-value {
    flex: 1;
}
.case-detail .meta-row {
    border-bottom: 1px solid #ffffff;
}
.case-detail {
    background: #efeade;
    padding: 100px;
    border-radius: 40px;
    position: relative;
}

/* single 画像余白 */
.case-detail .case-image {
    background: #ffffff;
    padding: 30px;
    border-radius: 20px;
    margin-top: 10px;
    margin-bottom: 10px;
}

.case-detail .case-image img {
    display: block;
    width: 100%;
    height: auto;
}

/* 動画を写真と同じ横幅にする */
.case-video {
    width: 100%;
    margin-top: 40px;
}

.case-video iframe {
    width: 100% !important;
    height: auto;
    aspect-ratio: 16 / 9;
    display: block;
}
/* ケース全体を基準にする */
.case-detail {
    position: relative;
}

/* 丸バッジ */
.case-badge {
    position: absolute;
    top: -40px;
    left: -40px;

    width: 110px;
    height: 110px;

    background: #E497A2;
    color: #fff;

    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;

    font-weight: 600;
    font-size: 16px;
    letter-spacing: 1px;
}

.archive .case-title {
    padding-top: 50px;
}


/* ===== 右側（画像・動画）を幅いっぱいに ===== */

.archive .case-image {
    width: 100%;
}

/* ===== 画像が縦長になるのを防ぐ ===== */

.archive .case-right img {
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
    display: block;
}

/* ===== 動画をカラム内に固定 ===== */

.archive .case-video {
    width: 100%;
    max-width: 100%;
}

.archive .case-video iframe {
    width: 100% !important;
    max-width: 100% !important;
    height: auto;
    aspect-ratio: 16 / 9;
    display: block;
}

.archive .case-right .image-inner {
    background: #ffffff;
    padding: 20px;
    margin-bottom: 20px;
    box-sizing: border-box;
}

.archive .case-right img {
    width: 100%;
    height: auto;
    display: block;
}

.archive .case-header {
    grid-column: 1 / -1;
    width: 100%;
}

.archive .case-footer {
    grid-column: 1 / -1;
    text-align: center;
    margin-top: 50px;
}

.case-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;

    padding: 20px 70px;
    font-size: 18px;
    font-weight: 600;

    background: #E497A2;
    color: #fff;
    border-radius: 999px;
    text-decoration: none;

    transition: 0.3s;
}

.case-button:hover {
    opacity: 0.85;
    transform: translateY(-2px);
}

.archive .case-button:hover {
    opacity: 0.85;
    transform: translateY(-2px);
}

.archive .case-button .arrow {
    font-size: 20px;
}

.archive .case-video iframe {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
}
.archive .case-right {
    width: 100%;
    box-sizing: border-box;
}

.archive .case-right > div {
    width: 100%;
    box-sizing: border-box;
}

.case-card-inner {
    box-sizing: border-box;
}

.archive .case-right img {
    width: 100%;
    height: auto;
}

.archive .case-card-inner {
    padding-left: 60px;
    padding-right: 60px;
    box-sizing: border-box;
}

.archive .case-right {
    padding-left: 0;
    padding-right: 0;
}

.archive .case-item {
    display: grid;
    grid-template-columns: 3fr 2fr;
    column-gap: 30px;
    align-items: start;
}

.archive .case-header,
.archive .case-footer {
    grid-column: 1 / -1;
}

.archive .case-left {
    grid-column: 1;
}

.archive .case-right {
    grid-column: 2;
}

.archive .case-card {
    position: relative;
}

/* Before / After 共通デザイン */
.single .case-before {
    margin-top: 40px;
}

.archive .case-before,
.archive .case-after {
    background: #ffffff;
    padding: 20px;
    border-radius: 10px;
    box-sizing: border-box;
}

/* Before の下余白 */
.archive .case-before {
    margin-bottom: 5px;
}

/* 画像をフィット */
.archive .case-before img,
.archive .case-after img {
    width: 100%;
    height: auto;
    display: block;
}
.archive .case-treatment-box {
    background: #ffffff;
    padding: 20px 25px;
    border-radius: 20px;
    margin-bottom: 30px;
}

/* Before / After タイトル */
.ba-title {
    font-size: 20px;
    font-weight: 600;
    color: #E497A2;
    margin-bottom: 10px;
}

/* 矢印 */
.ba-arrow {
    text-align: center;
    margin: 0;
}

.ba-arrow i {
    font-size: 40px;
    color: #E497A2;
}

/* ---------- ページネーション ---------- */
.pagination-wrap .page-numbers {
    display: inline-block;
    padding: 14px 35px;
    margin: 5px;
    border-radius: 50px;
    background: #E497A2;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
}

.pagination-wrap .page-numbers:hover {
    opacity: 0.85;
}

.pagination-wrap .current {
    background: #83775D;
}

.pagination-wrap {
    text-align: center;
    margin: 50px 0;
}

.pagination-inner a {
    display: inline-block;
    padding: 14px 32px;
    margin: 8px;
    border-radius: 50px;
    background: #E497A2;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: 0.3s;
}

.pagination-inner a:hover {
    opacity: 0.85;
}

/* ================================
   📱 スマホ最適化（archive + single）
================================ */

@media (max-width: 768px) {

/* ---------- 共通調整 ---------- */

.case-title {
    font-size: 18px;
    line-height: 1.4;
}

.case-detail .case-title {
    padding-top: 50px;
}

.case-age-sex {
    font-size: 13px;
}

.meta-row {
    flex-direction: column;
    padding: 8px 0;
}

.meta-label {
    width: 100%;
    font-size: 13px;
    margin-bottom: 3px;
}

.meta-value {
    font-size: 14px;
}

.archive .case-treatment-box,
.case-detail .case-treatment-box {
  font-size: 14px;
}

/* ---------- CASE丸 ---------- */

.case-number {
    left: 15px;
    top: -25px;
}

.case-number span {
    width: 75px;
    height: 75px;
    font-size: 13px;
}

/* ---------- archive 1カラム化 ---------- */

.archive .case-item {
    display: block;
}

.archive .case-left,
.archive .case-right {
    width: 100%;
}

.archive .case-right {
    margin-top: 25px;
}

.archive .case-card-inner,
.case-detail {
    padding: 30px;
}

.archive .case-footer {
    margin-top: 25px;
}

/* ---------- Before / After ---------- */

.case-right img,
.case-detail .case-image img {
    padding: 15px;
    border-radius: 10px;
}

.ba-title {
    font-size: 13px;
}

.ba-arrow {
    margin: 3px 0;
}

.ba-arrow i {
    font-size: 22px;
}

/* ---------- ボタン（archive + single） ---------- */

.case-button {
    width: 100%;
    display: block;
    text-align: center;
    padding: 14px 0;
    font-size: 14px;
    white-space: nowrap;
}

/* ---------- 検索フォーム ---------- */

.cases-search {
    padding: 30px;
    border-radius: 20px;
}

.cases-search label,
.cases-search select,
.cases-search button {
    font-size: 13px;
}

/* ---------- カード間余白 ---------- */

.case-card {
    margin-bottom: 50px;
}

/* ---- single 全体に左右余白 ---- */

.case-detail-wrap {
    width: 90%;
    margin: 0 auto;
  }
  
/* ---- CASE丸（single用） ---- */

.case-badge {
    top: -25px;
    left: 15px;

    width: 80px;
    height: 80px;

    font-size: 13px;
}

/* ---- Before/After ボックス余白 ---- */

.case-detail .case-image {
    padding: 20px;
    border-radius: 15px;
    margin-top: 0px;
    margin-bottom: 0;
}

.case-detail .case-image.case-before {
    margin-top: 25px;
}

/* ---- タイトル下余白調整 ---- */

.case-detail .case-title {
    margin-top: 10px;
    font-size: 20px;
}

/* ---- メタ情報余白を軽く ---- */

.case-detail .meta-row {
    padding: 8px 0;
}

/* ---- single動画余白 ---- */

.case-video {
    margin-top: 25px;
}

/* パンくずを折り返し可能にする */
.breadcrumb .bc_list {
    flex-wrap: wrap;
    white-space: normal;
    overflow: visible;
    gap: 6px;
}

/* 各パンくずの文字を折り返し可能に */
.breadcrumb .bc_list li {
    font-size: 12px;
    word-break: break-word;
}

/* ================================
   📱 スマホ：ページネーション調整
================================ */

.pagination-wrap {
    margin: 40px 0;
}

.pagination-wrap .page-numbers {
    padding: 12px 24px;
    font-size: 14px;
    border-radius: 50px;
}

.pagination-wrap .page-numbers.next,
.pagination-wrap .page-numbers.prev {
    display: inline-block;
    padding: 14px 28px;
    font-size: 14px;
    white-space: nowrap;
}

}

/* single 下部ボタン */
.case-back-wrap{
    text-align: center;
    margin: 0px auto 60px;
    max-width: 1000px;
}

/* archiveと同じ見た目を強制 */
.case-back-wrap .case-button{
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

/* =========================
   single タグ表示
========================= */

.case-tags{
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.case-tag{
    display: inline-block;
    padding: 7px 18px;
    border-radius: 999px;
    border: 2px solid #E497A2;
    color: #E497A2;
    font-weight: 600;
    font-size: 14px;
    background: #fff;
}

/* タグ下の区切り線 */
.case-tags{
    margin-top: 20px;
    padding-bottom: 40px;          /* ボーダー上の余白 */
    border-bottom: 1px solid rgb(80, 78, 75);
    margin-bottom: 35px;           /* ボーダー下の余白 */
}

/* archive レイアウト崩れ防止 */

.archive .case-item {
    align-items: start;   /* ← 上揃え固定 */
}

.archive .case-right {
    align-self: start;    /* ← 右側を上基準に固定 */
}

.archive .case-left {
    align-self: start;    /* ← 左も上基準 */
}