/* custom01.css - お墓検索機能のスタイル */
.cemetery-search-section {
    max-width: 1200px;
    padding: 40px 20px;
}

.section-title {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin: 0;
    padding-left: 10px;
    border-left: 4px solid #4F7942;
}

/* タブボタンのスタイル */
.cemetery-tabs {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.tab-buttons {
    display: flex;
    background: #f5f5f5;
}

.tab-button {
    flex: 1;
    padding: 15px 20px;
    border: none;
    background: #e8e8e8;
    color: #666;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.tab-button.active {
    background: #4F7942;
    color: white;
    border-bottom-color: #4F7942;
}

.tab-button:hover:not(.active) {
    background: #d5d5d5;
    color: #333;
}

/* タブコンテンツのスタイル */
.tab-content {
    display: none;
    background: white;
    padding: 30px;
}

.tab-content.active {
    display: block;
}

/* グリッドレイアウト */
.cemetery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 0;
}

/* カードのスタイル */
.cemetery-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: #fff;
    overflow: hidden;
    margin-bottom: 20px;
    border: 1px solid #F0EDE5;
    border-top: 5px solid #4F7942;
    padding-top: 10px;
    height: 100%;
    position: relative;
    padding-bottom: 6rem; /* ボタン + 特徴要素分のスペースを確保 */
}

.cemetery-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.cemetery-catch{
    text-align: center;
    padding: 0% !important;
    margin-bottom: 1rem !important;
}

.post_content h3{
    font-size: 1.5rem;
}

.post_content h3:before{
    display: none;
}

.cemetery-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.cemetery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.cemetery-card:hover .cemetery-image img {
    transform: scale(1.05);
}

.cemetery-info {
    padding: 0 20px;
}

.cemetery-catch {
    font-size: 13px;
    color: #555;
    line-height: 1.4;
    font-weight: 500;
}

.cemetery-address {
    font-size: 14px;
    color: #666;
    text-align: center;
    margin: 0 0 1rem;
    line-height: 1.4;
}

/* 画像なしの場合のスタイル */
.no-image {
    width: 100%;
    height: 100%;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
}

/* 長竜寺のラベル表示 */
.cemetery-card {
    position: relative;
}


/* 料金情報のスタイル */
.price-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0 8px;
    list-style: none;
    padding: 0 1rem;
}

.price-item {
    font-size: 0.9em;
    display: flex;
    justify-content: space-evenly;
    align-items: baseline;
}

.price-label {
    font-size: 14px;
    color: #333;
    font-weight: bold;
}

.price-value {
    font-size: 1.6rem;
    font-weight: bold;
    color: #B65C2E;
}

.price-unit {
    font-size: 12px;
    font-weight: bold;
    color: #333;
}

/* 特徴タグのスタイル */
.cemetery-features {
    position: absolute;
    bottom: 5rem; /* 4rem → 5remに変更 */
    left: 20px;
    right: 20px;
    width: calc(100% - 40px);
    margin-bottom: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.feature-tag {
    display: inline-block;
    padding: 5px;
    background: #F0EDE5;
    color: #333;
    font-size: 0.65rem;
    border-radius: 3px;
    border: none;
    font-weight: normal;
    line-height: 1.2;
}

/* 詳細ボタンのスタイル */
.detail-button {
    position: absolute;
    bottom: 1rem;
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background: #4F7942;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    text-align: center;
    transition: background-color 0.3s ease;
    margin: 0 1rem 1rem;
    box-shadow: 0 4px 0 #24371e;
    width: -webkit-fill-available;
}

.detail-button:hover {
    background: #5a7542;
    text-decoration: none;
    color: white;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .cemetery-search-section {
        padding: 15px 10px;
    }
    
    .section-title {
        font-size: 18px;
        padding-left: 8px;
        border-left-width: 3px;
    }
    
    .tab-buttons {
        display: flex;
        flex-direction: row;
    }
    
    .tab-button {
        padding: 10px 15px;
        font-size: 13px;
    }
    
    .tab-content {
        padding: 0;
        border: 1px solid #ccc; /* SP版のみ枠線を追加 */
    }
    
    .cemetery-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .cemetery-card {
        margin-bottom: 0;
        padding-bottom: 1rem;
        border-top: none;
        flex-direction: column;
        height: auto;
    }
    
    .cemetery-info {
        padding: 0 12px;
        flex: 1;
    }
    
    .cemetery-catch {
        font-size: 16px;
        font-weight: bold;
        margin-bottom: 0.5rem !important;
        text-align: left;
    }
    
    .cemetery-address {
        text-align: left;
        margin-bottom: 0.5rem;
        font-size: 13px;
    }
    
    /* 画像と料金情報を横並びにする */
    .image-price-container {
        display: flex;
        gap: 15px;
        margin-bottom: 0.5rem;
        align-items: center;
    }
    
    .cemetery-image {
        height: 120px;
        width: 120px;
        min-width: 120px;
        margin-bottom: 0;
        border-radius: 4px;
    }
    
    .price-info {
        padding: 0;
        margin-bottom: 0;
        flex: 1;
        display: grid;
        grid-template-columns: 1fr;
        gap: 5px;
        align-self: center;
    }
    
    .price-item {
        justify-content: space-between;
        gap: 10px;
    }
    
    .price-value {
        font-size: 1.6rem;
    }
    
    .cemetery-features {
        position: static;
        bottom: auto;
        left: auto;
        right: auto;
        width: auto;
        gap: 5px;
    }
    
    .feature-tag {
        font-size: 11px;
        padding: 3px 6px;
    }
    
    .detail-button {
        position: static;
        bottom: auto;
        left: auto;
        right: auto;
        margin-top: 0.5rem;
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .cemetery-name {
        font-size: 16px;
    }
}