/* ===================================
   Cemetery Archive Page Styles
   =================================== */

/* コンテナ */
.cemetery-archive-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px 60px;
}

/* ===================================
   ページヘッダー
   =================================== */
.archive-header {
    text-align: center;
    margin-bottom: 40px;
}

.archive-page-title {
    font-size: 2em;
    font-weight: bold;
    color: #333;
    margin: 0 0 10px;
    position: relative;
    display: inline-block;
    padding-bottom: 16px;
}

.archive-page-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #009f2d 0%, #528900 100%);
    border-radius: 2px;
}

.archive-page-subtitle {
    color: #333;
    font-weight: bold;
    font-size: 1.4rem;
    margin: 14px 0 0;
}

/* ===================================
   タクソノミー選択タブ
   =================================== */
.cemetery-type-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 36px;
}

.type-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 28px 20px;
    border: 3px solid transparent;
    border-radius: 14px;
    text-align: center;
    text-decoration: none;
    font-weight: 900;
    line-height: 1.5;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    cursor: pointer;
}

/* 樹木葬タブ：薄い緑 */
.tab-jumokusou {
    background-color: #d8f0b0;
    border-color: #a0cc55;
    color: #3a6200;
}

.tab-jumokusou:hover {
    background-color: #d6edba;
    border-color: #528900;
    color: #2a4a00;
    text-decoration: none;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(82, 137, 0, 0.15);
}

.tab-jumokusou.is-active {
    background: linear-gradient(135deg, #528900 0%, #009f2d 100%);
    border-color: #528900;
    color: #fff;
    box-shadow: 0 6px 20px rgba(82, 137, 0, 0.3);
    transform: translateY(-2px);
}

.tab-jumokusou.is-active:hover {
    background: linear-gradient(135deg, #3d6600 0%, #007d23 100%);
    color: #fff;
}

/* それ以外タブ：薄い水色 */
.tab-other {
    background-color: #dff1fa;
    border-color: #8ecfeb;
    color: #1a5f7a;
}

.tab-other:hover {
    background-color: #c8e8f7;
    border-color: #2d8db5;
    color: #114a60;
    text-decoration: none;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(45, 141, 181, 0.15);
}

.tab-other.is-active {
    background: linear-gradient(135deg, #1a7fa0 0%, #2db5e0 100%);
    border-color: #1a7fa0;
    color: #fff;
    box-shadow: 0 6px 20px rgba(26, 127, 160, 0.3);
    transform: translateY(-2px);
}

.tab-other.is-active:hover {
    background: linear-gradient(135deg, #12607a 0%, #1a90b8 100%);
    color: #fff;
}

.tab-icon {
    display: block;
    line-height: 1;
}

.tab-icon svg {
    display: block;
}

.tab-label {
    display: block;
    font-size: 2.4em;
}

.tab-label small {
    font-weight: normal;
    opacity: 0.85;
}

.tab-label-sub {
    font-weight: normal;
}

/* ===================================
   結果件数表示
   =================================== */
.archive-results-info {
    margin-bottom: 24px;
}

.results-count {
    color: #666;
    text-align: right;
    margin: 0;
}

/* ===================================
   投稿カードグリッド
   =================================== */
.cemetery-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-bottom: 48px;
}

/* ===================================
   投稿カード
   =================================== */
.cemetery-card {
    border-radius: 12px;
    overflow: hidden;
    background-color: #fff;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e8e8e8;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.cemetery-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.card-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

/* カード画像 */
.card-image-wrap {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background-color: #f0f0f0;
    flex-shrink: 0;
}

.card-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
    display: block;
}

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

.card-no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    background-color: #f5f5f5;
}

/* タクソノミーバッジ */
.card-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.card-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: bold;
    line-height: 1.4;
}

.badge-jumokusou {
    background-color: #528900;
    color: #fff;
}

.badge-eitai {
    background-color: #2d6a8f;
    color: #fff;
}

.badge-noukotudou {
    background-color: #7a5c9e;
    color: #fff;
}

.badge-region {
    background-color: rgba(0, 0, 0, 0.45);
    color: #fff;
}

.badge-sold-out {
    background-color: rgba(180, 0, 0, 0.85);
    color: #fff;
    font-weight: bold;
}

/* カード本文 */
.card-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px;
    flex: 1;
}

.card-title {
    font-size: 1.25em;
    font-weight: bold;
    color: #222;
    line-height: 1.4;
    margin: 0;
}

.card-address {
    display: flex;
    align-items: flex-start;
    gap: 4px;
    color: #666;
    margin: 0;
    line-height: 1.5;
}

.icon-pin {
    flex-shrink: 0;
    margin-top: 2px;
}

/* 特徴タグ */
.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.card-tag {
    display: inline-block;
    background-color: #eef6df;
    color: #3d6600;
    border: 1px solid #c5e09a;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: bold;
    line-height: 1.6;
}

/* CTAボタン */
.card-cta {
    margin-top: auto;
    padding: 10px 0;
    text-align: center;
    background: linear-gradient(90deg, #528900 0%, #009f2d 100%);
    color: #fff;
    font-weight: bold;
    border-radius: 6px;
    transition: opacity 0.2s ease;
}

.cemetery-card:hover .card-cta {
    opacity: 0.88;
}

/* ===================================
   タブ未選択時のガイドメッセージ
   =================================== */
.no-selection-message {
    text-align: center;
    padding: 50px 20px;
    color: #888;
    border: 2px dashed #d4e8be;
    border-radius: 12px;
    background-color: #fafff5;
}

/* ===================================
   投稿なしメッセージ
   =================================== */
.no-posts-message {
    text-align: center;
    padding: 60px 20px;
    color: #777;
}

/* ===================================
   ページネーション
   =================================== */
.archive-pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.archive-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    border-radius: 6px;
    border: 1px solid #d4e8be;
    background-color: #fff;
    color: #528900;
    text-decoration: none;
    transition: all 0.2s ease;
}

.archive-pagination .page-numbers:hover {
    background-color: #f2f9ea;
    border-color: #528900;
}

.archive-pagination .page-numbers.current {
    background: linear-gradient(90deg, #528900 0%, #009f2d 100%);
    border-color: #528900;
    color: #fff;
    font-weight: bold;
}

/* ===================================
   レスポンシブ対応 (タブレット)
   =================================== */
@media (max-width: 960px) {
    .cemetery-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .type-tab {
        padding: 22px 16px;
        font-size: 0.95em;
    }
}

/* ===================================
   レスポンシブ対応 (スマートフォン)
   =================================== */
@media (max-width: 600px) {
    .cemetery-archive-container {
        padding: 24px 14px 40px;
    }

    .archive-header {
        margin-bottom: 28px;
    }

    .cemetery-type-tabs {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-bottom: 28px;
    }

    .type-tab {
        flex-direction: row;
        padding: 16px 20px;
        gap: 14px;
        border-radius: 10px;
        text-align: left;
        justify-content: flex-start;
    }

    .tab-icon svg {
        width: 30px;
        height: 30px;
    }

    .tab-label {
        font-size: 1.7em;
    }

    .cemetery-cards-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .card-inner {
        flex-direction: row;
    }

    .card-image-wrap {
        width: 120px;
        height: auto;
        flex-shrink: 0;
        border-radius: 0;
    }

    .card-body {
        padding: 12px;
        gap: 6px;
    }

    .card-cta {
        padding: 6px 0;
    }

    .results-count {
        text-align: left;
    }
}
