/* 霊園・お墓一覧表示用CSS - shortcode-cemetery-post.css */

.cemetery-list-container {
    min-height: 60vh;
}

.cemetery-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* スライダーコンテナ */
.cemetery-slider-container {
    margin-bottom: 50px;
    position: relative;
}

.cemetery-swiper {
    padding: 0 50px 80px 50px;
    overflow: visible;
}

.swiper-slide {
    height: auto;
    display: flex;
    align-items: stretch;
}

.swiper-slide .cemetery-card {
    height: 650px; /* 高さを少し増加 */
}

/* ナビゲーションボタンのカスタマイズ */
.cemetery-swiper .swiper-button-next,
.cemetery-swiper .swiper-button-prev {
    background: #007cba;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-top: -20px;
    color: white;
    font-size: 16px;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0, 124, 186, 0.3);
    transition: all 0.3s ease;
    /* 中央寄せは親要素側で行う */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ▼▼ ここがポイント：必ず swiper-icons を使う＆余計な指定を入れない ▼▼ */
.cemetery-swiper .swiper-button-next::after,
.cemetery-swiper .swiper-button-prev::after {
    font-family: 'swiper-icons' !important; /* 他のグローバル指定に勝つ */
    font-size: 16px;
    font-weight: normal;
    line-height: 1;
    text-transform: none;
    letter-spacing: 0;
    /* ストレッチの原因になるので以下は使わない
       display:flex; width; height; align-items; justify-content;
    */
}
/* ▲▲ ここまで必須修正 ▲▲ */

.cemetery-swiper .swiper-button-next:hover,
.cemetery-swiper .swiper-button-prev:hover {
    background: #005a87;
    transform: scale(1.1);
}

/* ページネーションのカスタマイズ */
.cemetery-swiper .swiper-pagination {
    bottom: 10px;
    position: relative;
    margin-top: 20px;
}

.cemetery-swiper .swiper-pagination-bullet {
    background: #007cba;
    opacity: 0.5;
    width: 12px;
    height: 12px;
    margin: 0 4px;
}

.cemetery-swiper .swiper-pagination-bullet-active {
    opacity: 1;
    background: #007cba;
}

/* カードスタイル */
.cemetery-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 650px; /* 高さを少し増加 */
    border: 1px solid #f0f0f0;
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
}

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

/* カード画像 */
.cemetery-card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    flex-shrink: 0;
}

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

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

.cemetery-no-image {
    height: 100%;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 1rem;
    font-weight: 500;
}

/* カードコンテンツ */
.cemetery-card-content {
    padding: 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
}

.cemetery-card-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cemetery-card-title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.4;
    height: 70px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.cemetery-card-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.cemetery-card-title a:hover {
    color: #007cba;
}

/* 参考価格のスタイル */
.cemetery-card-prices {
    margin-bottom: 8px;
}

.cemetery-price-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 0;
    font-size: 0.85rem;
    line-height: 1.4;
}

.cemetery-price-item:not(:last-child) {
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 4px;
    padding-bottom: 6px;
}

.cemetery-price-grave {
    color: #495057;
    font-weight: 600;
    margin-right: 8px;
}

.cemetery-price-amount {
    color: #cc7a00;
    font-weight: 700;
    font-size: 1.2rem;
}

.cemetery-price-suffix {
    color: #6c757d;
    font-weight: 500;
    font-size: 0.8rem;
    margin-left: 2px;
}

.cemetery-card-address {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 8px;
    display: flex;
    align-items: flex-start;
    line-height: 1.5;
    overflow: hidden;
}

.cemetery-address-icon {
    margin-right: 6px;
    font-size: 0.8rem;
    flex-shrink: 0;
    margin-top: 2px;
}

/* 特徴要素タグ */
.cemetery-card-features {
    margin-bottom: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    overflow: hidden;
    align-items: flex-start;
    align-content: flex-start;
}

.cemetery-feature-tag {
    background: #e3f2fd;
    color: #1565c0;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid #bbdefb;
    white-space: nowrap;
}

/* タクソノミータグ */
.cemetery-card-taxonomies {
    margin-bottom: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    overflow: hidden;
    align-items: flex-start;
    align-content: flex-start;
}

.cemetery-taxonomy-tag {
    background: #e8f5e8;
    color: #2e7d32;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid #c8e6c9;
    white-space: nowrap;
}

/* カードフッター */
.cemetery-card-footer {
    padding-top: 10px;
    text-align: center;
    flex-shrink: 0;
    height: 75px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cemetery-detail-btn {
    display: inline-block;
    background: #007cba;
    color: white;
    padding: 10px 24px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: 120px;
}

.cemetery-detail-btn:hover {
    background: #005a87;
    color: white;
    text-decoration: none;
    transform: scale(1.05);
}

/* 投稿が見つからない場合 */
.cemetery-no-posts {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.cemetery-no-posts p {
    font-size: 1.1rem;
    color: #666;
    margin: 0;
}

/* ページネーション */
.cemetery-pagination-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 50px;
}

.cemetery-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.cemetery-pagination a,
.cemetery-pagination span {
    display: inline-block;
    padding: 10px 15px;
    margin: 0;
    background: white;
    color: #007cba;
    text-decoration: none;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 40px;
    text-align: center;
}

.cemetery-pagination a:hover,
.cemetery-pagination .current {
    background: #007cba;
    color: white;
    text-decoration: none;
    border-color: #007cba;
}

.cemetery-pagination .dots {
    border: none;
    background: transparent;
    color: #999;
    cursor: default;
}

.cemetery-pagination .dots:hover {
    background: transparent;
    color: #999;
    border: none;
}

/* タブレット版 (768px以下) */
@media (max-width: 768px) {
    .cemetery-swiper {
        padding: 0 30px 80px 30px;
    }
    
    .cemetery-swiper .swiper-button-next,
    .cemetery-swiper .swiper-button-prev {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .cemetery-card {
        max-width: 320px;
        height: 610px; /* 高さを調整 */
    }
    
    .swiper-slide .cemetery-card {
        height: 610px; /* スワイパー内のカード高さも調整 */
    }
    
    .cemetery-card-content {
        padding: 15px;
    }
    
    .cemetery-card-title {
        height: 65px;
        font-size: 1.1rem;
        margin: 0;
    }
    
    .cemetery-card-prices {
        margin-bottom: 10px;
        padding: 6px 8px;
    }
    
    .cemetery-price-item {
        font-size: 0.8rem;
    }
    
    .cemetery-card-address {
        font-size: 0.85rem;
        margin-bottom: 12px;
    }
    
    .cemetery-card-features,
    .cemetery-card-taxonomies {
        gap: 5px;
        margin-bottom: 12px;
    }
    
    .cemetery-card-footer {
        height: 70px;
        padding-top: 8px;
    }
    
    .cemetery-feature-tag,
    .cemetery-taxonomy-tag {
        font-size: 0.7rem;
        padding: 3px 6px;
    }
    
    .cemetery-detail-btn {
        padding: 8px 20px;
        font-size: 0.8rem;
        min-width: 100px;
    }
}

/* スマートフォン版 (480px以下) */
@media (max-width: 480px) {
    .swiper-slide .cemetery-card { 
        height: auto; /* 620px を打ち消す */
    }
    
    .cemetery-card {
        height: auto; /* 固定高を解除 */
        min-height: 540px; /* 最小高を設定 */
    }
    
    .cemetery-card-footer {
        margin-top: 8px;
        height: auto;
        padding-top: 8px;
    }
    
    .cemetery-container {
        padding: 0 15px;
    }
    
    .cemetery-swiper {
        padding: 0 40px 80px 40px;
    }
    
    .cemetery-swiper .swiper-button-next,
    .cemetery-swiper .swiper-button-prev {
        width: 32px;
        height: 32px;
        margin-top: -16px;
        /* 親で中央寄せするのでOK */
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* ▼ SP時の矢印は親32pxに合わせて行高だけ指定（伸びない） */
    .cemetery-swiper .swiper-button-next::after,
    .cemetery-swiper .swiper-button-prev::after {
        font-family: 'swiper-icons' !important;
        font-size: 18px;
        line-height: 1; /* 余白のブレを防ぐ */
    }
    
    .cemetery-swiper .swiper-button-next { right: 5px; }
    .cemetery-swiper .swiper-button-prev { left: 5px; }
    
    .cemetery-card {
        max-width: 280px;
    }
    
    .cemetery-card-image {
        height: 170px;
    }
    
    .cemetery-card-content {
        padding: 12px;
        height: auto;
    }
    
    .cemetery-card-main {
        gap: 2px;
    }
    
    .cemetery-card-title {
        height: auto;
        font-size: 1.1rem;
        margin: 0;
    }
    
    .cemetery-card-prices {
        margin-bottom: 8px;
        padding: 6px 8px;
    }
    
    .cemetery-price-item {
        font-size: 0.75rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }
    
    .cemetery-price-grave {
        margin-right: 0;
        font-size: 0.7rem;
    }
    
    .cemetery-card-address {
        font-size: 0.85rem;
        margin-bottom: 6px;
    }
    
    .cemetery-card-features {
        margin-bottom: 6px;
        gap: 3px;
    }
    
    .cemetery-card-taxonomies {
        margin-bottom: 12px;
        gap: 3px;
    }
    
    .cemetery-feature-tag,
    .cemetery-taxonomy-tag {
        font-size: 0.7rem;
        padding: 3px 6px;
    }
    
    .cemetery-detail-btn {
        padding: 8px 20px;
        font-size: 0.8rem;
        min-width: 100px;
    }
    
    .cemetery-pagination a,
    .cemetery-pagination span {
        padding: 8px 12px;
        font-size: 0.85rem;
        min-width: 35px;
    }
}

/* 超小型デバイス (320px以下) */
@media (max-width: 320px) {
    .cemetery-container {
        padding: 0 10px;
    }
    
    .cemetery-swiper {
        padding: 0 15px 50px 15px;
    }
    
    .cemetery-card {
        max-width: 260px;
    }
    
    .cemetery-card-content {
        padding: 12px;
    }
    
    .cemetery-card-title {
        font-size: 1rem;
    }
    
    .cemetery-card-prices {
        padding: 5px 6px;
    }
    
    .cemetery-price-item {
        font-size: 0.7rem;
    }
    
    .cemetery-price-amount {
        font-size: 1.2rem;
    }
    
    .cemetery-card-address {
        font-size: 0.8rem;
    }
    
    .cemetery-feature-tag,
    .cemetery-taxonomy-tag {
        font-size: 0.65rem;
        padding: 2px 5px;
    }
    
    .cemetery-detail-btn {
        padding: 6px 16px;
        font-size: 0.75rem;
        min-width: 90px;
    }
}