.container {
    max-width: 1030px;
    margin: 0 auto;
    background-color: #fff;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

/* アクセントカラーを定義 */
:root {
    --accent-color: #36663A;
}
.breadcrumbs {
  font-size: 12px;
  padding: 20px 40px;
  color: #8B8B8B;
  background: #ffffff;
  overflow: hidden;
}
#plansch .page_header {
  position: relative;
  padding: 42px 0;
}
#plansch .page_header .title .ja {
  color: #121212;
}
#plansch #index .page_header {
  padding: 0;
}

#plansch #index .page_header::before {
  content: "";
  display: block;
  height: 16vw;
}

@media screen and (max-width: 767px) {
  #plansch #index .page_header:before {
    height: 35vw;
  }
}

#plansch #index .page_header .text {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
    text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

#plansch #index .page_header .title {
  padding-bottom: 20px;
}

#plansch #index .page_header .title .en {
  width: 129px;
  margin: 0 auto 10px;
}

@media screen and (max-width: 767px) {
  #plansch #index .page_header .title .en {
    width: 92px;
  }
}
.cmn_section_title.center {
  text-align: center;
}

/* 検索エリア共通のスタイル */
.filter-section, .search-section {
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 20px;
    overflow: hidden;
}

/* ヘッダー共通のスタイル（帯のデザイン） */
.filter-section-header {
    padding: 5px 15px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* PC向けスタイル */
@media (min-width: 769px) {
    .search-and-filter-container {
        display: flex;
        flex-direction: column; /* キーワード検索と条件絞込みを縦に並べる */
        gap: 20px;
    }

    /* プラン条件絞込みエリア */
    .filter-section-header {
        background-color: var(--accent-color);
        color: white;
        cursor: default;
    }
    .filter-section-header .filter-expand-icon {
        display: none; /* PCではアイコンを非表示 */
    }
    .filter-section-content {
        padding: 15px;
        transition: none;
        max-height: none;
        display: block !important; /* JavaScriptの非表示設定を上書き */
    }

}

/* スマホ向けスタイル */
@media (max-width: 768px) {
    .search-and-filter-container {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .filter-section, .search-section {
        width: 100%;
        margin-bottom: 10px;
        border: none;
    }

    /* プラン条件絞込みエリアの帯（モーダル表示用） */
    .filter-section-header {
        background-color: var(--accent-color);
        color: white;
        cursor: pointer;
        padding: 20px;
        font-size: 18px;
        border-radius: 50px;
    }
    .filter-section-header .filter-expand-icon {
        display: none; /* スマホではアイコンを非表示にする */
    }
    .filter-section-content {
        display: none; /* スマホではコンテンツを常に非表示にし、モーダルで表示 */
    }

    .search-section .search-expand-icon {
        display: inline-block;
    }


    /* モーダル内のレイアウト調整 */
    #filter-modal .filter-group-container {
        flex-direction: column;
    }
    
    #filter-modal .filter-group-col-right {
        flex-direction: row; /* 間口と奥行を横並びにする */
        flex-wrap: wrap;
    }
    
    #filter-modal .filter-group-row .filter-group {
        width: 100%;
    }
    
}

/* その他の共通スタイル */
.filter-group-container {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}
.filter-group-col-left, .filter-group-col-right {
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex: 1;
}
.filter-group-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}
.filter-group-row .filter-group {
    flex: 1 1 calc(50% - 7.5px);
}
.filter-group {
    margin-bottom: 15px;
}
.filter-label {
    font-weight: bold;
    margin-bottom: 5px;
    padding: 5px 0;
    border-left: none;
    background-color: transparent;
}
.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}
.button-group .filter-button {
    padding: 4px 15px;
    border: 1px solid #ccc;
    background-color: #f8f8f8;
    cursor: pointer;
    border-radius: 20px;
    transition: all 0.2s;
}
.button-group .filter-button.active {
    background-color: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}
.select-wrapper select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
}
.keyword-input {
    flex-grow: 1;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
}
.search-button {
    padding: 6px 15px;
    background-color: #666;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    white-space: nowrap;
}

/* プラン一覧とプランカードのスタイル */
.plan-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
.plan-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.plan-image-top-right {
    grid-area: 1 / 2 / 2 / 3;
}
.plan-image-bottom-left {
    grid-area: 2 / 1 / 3 / 2;
}
.plan-image-bottom-right {
    grid-area: 2 / 2 / 3 / 3;
}
.plan-info-top-left {
    grid-area: 1 / 1 / 2 / 2;
    padding: 15px;
}
.plan-card img {
    max-width: 90%;
    height: auto;
    display: block;
    margin: 3% auto;
    max-height: 250px;
    width: auto;
    object-fit: contain;
}
.plan-code {
    font-weight: bold;
    color: #555;
    margin-bottom: 5px;
}
.plan-info p {
    margin: 0 0 5px 0;
    color: #666;
    font-size: 0.9em;
}
.detail-button {
    display: inline-block;
    padding: 5px 35px;
    background-color: var(--accent-color);
    color: white;
    text-decoration: none;
    border-radius: 20px;
    margin-top: 15px;
    font-size: 0.9em;
    border: 1px solid var(--accent-color);

}
.detail-button:hover ,.more-button:hover {
    background-color: #fff;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
}
.more-button {
    grid-column: 1 / -1;
    display: block;
    width: 300px;
    margin: 20px auto;
    padding: 10px;
    text-align: center;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    border: 1px solid var(--accent-color);
}
/* モーダルのスタイル */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}
.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 95%;
    border-radius: 8px;
}
.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}
.close-button:hover, .close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

@media (min-width: 769px) {
    .filter-section, .search-section {
        flex-grow: 1;
    }
}
/* PC向けスタイル */
@media (min-width: 769px) {
    /* PCではキーワード検索と絞り込みを横並びにする */
    .search-and-filter-container {
        display: flex;
        flex-direction: row;
        gap: 20px;
        align-items: flex-start;
    }
    /* キーワード検索部分のスタイルを修正 */
    .search-section {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 5px 15px;
        background-color: #efefef;
    }

    .search-section .search-header {
        display: flex; /* PCでもヘッダーを表示 */
        align-items: center;
        gap: 10px;
        flex-grow: 0;
        white-space: nowrap;
        padding: 0;
    }
    
    .search-section .search-label {
        font-weight: bold;
    }

    .search-section .search-content {
        display: flex;
        align-items: center;
        gap: 10px;
        flex-grow: 1;
        padding: 0;
    }
    
    .search-section .search-expand-icon {
        display: none; /* PCではアイコンを非表示にする */
    }

    .search-section .keyword-input {
        flex-grow: 1; /* 入力フィールドが利用可能なスペースを埋めるようにする */
    }
}
/* スマートフォン向けスタイル - アコーディオン機能の追加 */
@media (max-width: 768px) {
    .search-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        cursor: pointer;
        padding: 5px 15px;
  background-color: #efefef;
    }

    .search-content {
        display: none;
        padding: 5px;
        border-top: 1px solid #ddd;
    }

    /* アコーディオンが開いたときのスタイル */
    .search-content.active {
        display: block;
    }

    .search-expand-icon {
        transition: transform 0.3s ease;
    }

    /* アコーディオンが開いたときのアイコンの回転 */
    .search-header.active .search-expand-icon {
        transform: rotate(45deg);
    }
}

.keyword-input {
    width: 100%;
    box-sizing: border-box;
}
/* 検索ボタンのアイコンとテキストのスタイル */
.search-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

/* スマートフォン表示時のキーワード検索のレイアウトを一行にする */
@media (max-width: 768px) {
    .search-content {
        display: flex;
        align-items: center;
        gap: 10px;
    }
    .keyword-input {
        flex-grow: 1;
    }
    .search-button {
        flex-shrink: 0;
    }
}
/* モーダルのフッターのスタイル */
.modal-footer {
    display: none; /* デフォルトで非表示 */
    padding: 15px;
    border-top: 1px solid #ddd;
    text-align: center;
}

/* 絞り込みボタンのスタイル */
.filter-apply-button {
    padding: 10px 20px;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    width: 100%;
}

/* スマートフォン表示時のみフッターを表示 */
@media (max-width: 768px) {
    .modal-footer {
        display: block;
    }
}
/* プラン一覧の各スペックのスタイル */
.plan-info p {
    margin: 0;
    color: #191919;
    font-size: 0.9em;
}

.plan-info .plan-spec {
    background-color: #666; /* 濃いグレーの背景色 */
    color: white; /* 白い文字色 */
    padding: 2px 8px; /* パディングを調整して高さを揃える */
    border-radius: 3px;
    display: inline-block; /* インラインブロックにして高さを制御 */
    font-size: 0.8em; /* フォントサイズを小さくする */
    margin-right: 8px;
}
/* 拡大画像のコンテナスタイル */
.enlarged-image {
    position: fixed; /* 画面に対して固定 */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* 中央揃え */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    cursor: grab;
}

.enlarged-image img {
    max-width: 90vw;
    max-height: 90vh;
    display: block;
}

.enlarged-image .close-button {
    position: absolute;
    top: -15px;
    right: -15px;
    background-color: #333;
    color: #fff;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    text-align: center;
    line-height: 30px;
    font-size: 20px;
    cursor: pointer;
    z-index: 2001;
}

.enlarged-image .close-button:hover {
    background-color: #555;
}
/* スマートフォン表示の強制調整 (768px以下) */
@media (max-width: 768px) {
    .plan-list {
        display: block !important;
    }
    .plan-list .plan-item {
        flex: 1 1 100% !important;
        max-width: 100% !important;
    margin: 0 !important;
    }
        .plan-card {
        margin-bottom: 20px;
    }
        .plan-info-top-left {
        padding-top: 5px; /* 上の余白を少なくする */
        padding-bottom: 5px; /* 下の余白を少なくする */
    }

    /* 全体的な文字サイズを小さくする */
    .plan-info-top-left  {
        font-size: 0.8em; /* 元の文字サイズの80%に設定 */
    }

    /* plan-specを非表示にする */
    .plan-info-top-left .plan-spec {
        display: none;
    }
}
/* ソート表示エリアのスタイル */
.sort-options {
    display: flex;
    justify-content: flex-end; /* 右端に配置 */
    align-items: center;
    gap: 10px; /* アイテム間の余白 */
    margin-bottom: 20px;
}

.sort-options span {
    font-size: 14px;
    font-weight: bold;
    color: #333;
}

.sort-options .sort-link {
    text-decoration: none;
    color: #999;
    font-size: 14px;
}

.sort-options .sort-link.active {
    color: var(--accent-color); /* アクティブなリンクの色 */
}
/* PC表示でソートリンクを右上に配置 */
@media (min-width: 769px) {
    .plan-list-header {
        display: flex;
        justify-content: flex-end; /* 右端に配置 */
        align-items: center;
        margin-bottom: 20px;
    }

    .sort-options {
        display: flex;
        gap: 10px;
        align-items: center;
    }
}

/* プラン一覧のレイアウト調整 */
@media (min-width: 769px) {
    .plan-list-container { /* 新しいコンテナクラスを想定 */
        display: flex;
        flex-wrap: wrap;
        position: relative;
    }
}

/* スマートフォンでの表示を調整 */
@media (max-width: 768px) {
    .sort-options {
        justify-content: center; /* 中央に配置 */
    }
}


/* ヘッダーセクション */
.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
}

.detail-title h3 {
    margin: 0;
    font-size: 1.5em;
}

.detail-title p {
    margin: 5px 0 0;
    color: #666;
}

.print-button {
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

/* 画像セクション */
.detail-images img {
    max-height: 650px;
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 50px;
    border: 1px solid #ddd;
}

/* 詳細項目セクション */
.detail-info {
    padding: 20px 0;
}

.detail-info h4 {
    margin-top: 0;
    font-size: 1.2em;
    border-bottom: 2px solid #ccc;
    padding-bottom: 5px;
    margin-bottom: 10px;
}

.detail-info ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.detail-info li {
    margin-bottom: 10px;
    font-size: 1em;
}

/* 固定フッターボタン */
.fixed-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #fff;
    padding: 15px;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-around;
    z-index: 1000;
}

.button {
    padding: 10px 20px;
    text-align: center;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    max-width: 600px;
}
@media (max-width: 768px) {
    .button {
        padding: 10px 15px;
    }
}

.button-request {
    background-color: var(--accent-color);
    color: white;
    width: 60%;
}

.button-back {
    background-color: #ccc;
    color: #333;
    width: 30%;
}
/* ページ全体の最大幅を700pxに設定 */
.detail-container {
    max-width: 700px;
    margin: 76px auto 100px ;
}

/* プラン概要のスタイルをテーブルのように変更 */
.detail-info ul {
    list-style: none;
    padding: 0;
    margin: 0;
    border-top: 1px solid #ddd;
}

.detail-info li {
    display: flex;
    border-bottom: 1px solid #ddd;
}

.detail-info li::before {
    content: attr(data-label);
    flex-basis: 25%; /* 項目の幅を調整 */
    padding: 10px;
    background-color: #f8f8f8;
    font-weight: bold;
    color: #333;
}

.detail-info li span {
    flex-grow: 1;
    padding: 10px;
    color: #666;
}

/* 固定フッターボタンのスタイル */
.fixed-footer {
    background-color: rgba(0, 0, 0, 0.4); /* 黒の透過色 */
}

.button-back {
    background-color: #666;
    color: #fff;
    border: 1px solid #666;
}

footer.plandetail {
  padding: 0px 0 76px 0;
}

@media print {
    /* ヘッダー、フッター、印刷ボタンを非表示にする */
    header,
    footer, .fixed-footer,
    .print-button {
        display: none !important;
    }
    /* ページのコンテンツ幅を調整し、印刷範囲に収める */
    body {
        padding-bottom: 0 !important; /* フッターの余白を消す */
        margin: 0;
        zoom: 0.65; /* ページの縮小率を75%に設定。必要に応じて調整 */
    }

    /* 印刷時のコンテナのスタイル */
    .container {
        max-width: 100% !important;
        width: auto !important;
        padding: 0 !important;
        box-shadow: none !important;
    }
    .detail-container { margin: 0 ; }

    /* 画像がページからはみ出ないように調整 */
    .detail-images img {
        width: auto !important;
        height: auto !important;
        margin-bottom: 0;
    }

    /* ページサイズをA4に設定 */
    @page {
        size: A4;
        margin: 0.5cm; /* 必要に応じて調整 */
    }
}