/* ===================================
   イベント一覧ページ（アーカイブ）のスタイル
   archive-events.php 用
   
   セクション構成:
   1. ページヘッダー
   2. セクション見出し
   3. イベントカードグリッド
   4. カード内部（サムネイル・バッジ・本文・フッター）
   5. 過去イベントの減衰表示
   6. 募金百貨店バッジ
   7. ページネーション
   8. 空状態
   9. レスポンシブ対応
   =================================== */


/* -----------------------------------
   1. ページヘッダー
   ----------------------------------- */
.event-archive {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1rem 3rem;
}

.archive-header {
    text-align: center;
    padding: 2.5rem 1rem 2rem;
    margin-bottom: 2rem;
}

.archive-title {
    font-size: 2rem;
    color: #2c3e50;
    margin: 0 0 0.75rem 0;
    line-height: 1.3;
}

.archive-description {
    font-size: 0.95rem;
    color: #6c757d;
    line-height: 1.7;
    margin: 0;
}


/* -----------------------------------
   2. セクション見出し
   ----------------------------------- */
.archive-section {
    margin-bottom: 3rem;
}

.section-heading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.4rem;
    color: #2c3e50;
    margin: 0 0 1.5rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid #8b4513;
}

.heading-icon {
    font-size: 1.3rem;
    line-height: 1;
}


/* -----------------------------------
   3. イベントカードグリッド
   ----------------------------------- */
.event-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}


/* -----------------------------------
   4. カード
   ----------------------------------- */
.event-card {
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.event-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

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

.event-card__link:hover {
    text-decoration: none;
    color: inherit;
}

/* サムネイル */
.event-card__thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f0ebe4;
}

.event-card__thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.event-card:hover .event-card__thumbnail img {
    transform: scale(1.05);
}

.event-card__no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f0eb 0%, #e8dfd6 100%);
    color: #bbb;
    font-size: 0.85rem;
}

/* イベント種別バッジ（サムネイル左上に重ねる） */
.event-card__badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.3rem 0.85rem;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.4;
    background-color: #e9ecef;
    color: #495057;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

/*
 * イベント種別ごとのバッジカラー
 * single-events.php / event-detail.css と同一のスラッグ・色を使用
 */
.event-card__badge.event-type-at-full {
    background-color: #5c3317;
    color: #ffffff;
}

.event-card__badge.event-type-at-mini {
    background-color: #d4a373;
    color: #ffffff;
}

.event-card__badge.event-type-sweets-buffet {
    background-color: #e91e8c;
    color: #ffffff;
}

.event-card__badge.event-type-okashi-buffet {
    background-color: #ff69b4;
    color: #ffffff;
}

.event-card__badge.event-type-corporate {
    background-color: #2e7d32;
    color: #ffffff;
}

.event-card__badge.event-type-special {
    background-color: #6a1b9a;
    color: #ffffff;
}

.event-card__badge.event-type-default {
    background-color: #e9ecef;
    color: #495057;
}

/* 募集状況ラベル（サムネイル右上に重ねる） */
.event-card__status {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.25rem 0.7rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.4;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(4px);
}

.event-card__status.status-open {
    color: #ffffff;
    background: #28a745;
}

.event-card__status.status-full {
    color: #ffffff;
    background: #dc3545;
}

.event-card__status.status-upcoming {
    color: #ffffff;
    background: #ff8f00;
}

.event-card__status.status-closed {
    color: #ffffff;
    background: #6c757d;
}

.event-card__status.status-past {
    color: #ffffff;
    background: #9e9e9e;
}

/* カード本文 */
.event-card__body {
    flex: 1;
    padding: 1.25rem 1.25rem 0.75rem;
}

/* 開催日 */
.event-card__date {
    font-size: 0.85rem;
    font-weight: 700;
    color: #8b4513;
    margin: 0 0 0.5rem 0;
    letter-spacing: 0.02em;
}

/* タイトル */
.event-card__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 0.75rem 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* メタ情報（時間・会場・価格） */
.event-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1rem;
    margin-bottom: 0.5rem;
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.825rem;
    color: #6c757d;
    line-height: 1.5;
}

.meta-icon {
    font-size: 0.8rem;
    line-height: 1;
}

.meta-price {
    font-weight: 700;
    color: #8b4513;
}


/* -----------------------------------
   5. 過去イベントの減衰表示
   ----------------------------------- */
.archive-past .section-heading {
    border-bottom-color: #adb5bd;
    color: #6c757d;
}

.event-card--past {
    opacity: 0.75;
}

.event-card--past:hover {
    opacity: 1;
}

.event-card--past .event-card__thumbnail::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.1);
    pointer-events: none;
}


/* -----------------------------------
   6. 募金百貨店バッジ
   ----------------------------------- */
.event-card__bokin {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #b71c1c;
    background: #fff5f5;
    border: 1px solid #ffcdd2;
    border-radius: 4px;
    padding: 0.2rem 0.5rem;
    margin-top: 0.25rem;
    line-height: 1.5;
}


/* -----------------------------------
   7. カードフッター（CTA）
   ----------------------------------- */
.event-card__footer {
    padding: 0.75rem 1.25rem 1.25rem;
}

.event-card__cta {
    display: block;
    text-align: center;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    transition: background 0.2s ease;
}

.cta-open {
    background: linear-gradient(135deg, #8b4513 0%, #d4a373 100%);
    color: #ffffff;
}

.event-card:hover .cta-open {
    background: linear-gradient(135deg, #6d3410 0%, #c49363 100%);
}

.cta-upcoming {
    background: #fff3e0;
    color: #e65100;
    border: 1px solid #ffcc80;
}

.cta-detail {
    background: #f8f9fa;
    color: #6c757d;
}

.event-card:hover .cta-detail {
    background: #e9ecef;
    color: #495057;
}


/* -----------------------------------
   8. ページネーション
   ----------------------------------- */
.archive-pagination {
    text-align: center;
    margin: 3rem 0 1rem;
    padding-top: 2rem;
    border-top: 1px solid #e9ecef;
}

.archive-pagination .page-numbers {
    display: inline-block;
    padding: 0.5rem 0.9rem;
    margin: 0 0.2rem;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #6c757d;
    text-decoration: none;
    transition: all 0.2s ease;
}

.archive-pagination .page-numbers:hover {
    background: #f0ebe4;
    color: #8b4513;
}

.archive-pagination .page-numbers.current {
    background: #8b4513;
    color: #ffffff;
    font-weight: 700;
}

.archive-pagination .prev,
.archive-pagination .next {
    font-weight: 600;
    color: #8b4513;
}


/* -----------------------------------
   9. 空状態（イベントなし）
   ----------------------------------- */
.archive-empty {
    text-align: center;
    padding: 4rem 2rem;
    color: #6c757d;
    line-height: 1.8;
}


/* -----------------------------------
   10. パンくずリスト
       event-detail.css と同一の設計。
       一覧ページでも同じ .event-breadcrumb クラスを
       使用するため、このファイルにも記載しています。
   ----------------------------------- */
.event-breadcrumb {
    padding: 0.75rem 1.5rem;
    margin-bottom: 0;
}

.event-breadcrumb .breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.82rem;
    color: #6c757d;
}

.event-breadcrumb .breadcrumb-item {
    display: flex;
    align-items: center;
}

.event-breadcrumb .breadcrumb-link {
    color: #8b4513;
    text-decoration: none;
    transition: color 0.2s ease;
}

.event-breadcrumb .breadcrumb-link:hover {
    color: #5c3317;
    text-decoration: underline;
}

.event-breadcrumb .breadcrumb-separator {
    color: #e0d5c9;
    font-size: 0.9rem;
    user-select: none;
}

.event-breadcrumb .breadcrumb-current {
    color: #6c757d;
    font-weight: 600;
    max-width: 240px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Cocoon のパンくずが出力される場合の上書き調整 */
.event-breadcrumb .breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
    font-size: 0.82rem;
}


/* -----------------------------------
   11. レスポンシブ対応
   ----------------------------------- */
@media (max-width: 768px) {
    .archive-title {
        font-size: 1.5rem;
    }

    .event-card-grid {
        grid-template-columns: 1fr;
    }

    .section-heading {
        font-size: 1.2rem;
    }

    .event-card__body {
        padding: 1rem 1rem 0.5rem;
    }

    .event-card__footer {
        padding: 0.5rem 1rem 1rem;
    }
}

/* 2カラム固定のブレークポイント（タブレット横向き以上） */
@media (min-width: 769px) and (max-width: 1024px) {
    .event-card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}