@charset "UTF-8";

/* ==========================================
   0. アーカイブページ専用：ヘッダーと演奏風景の隙間解消
========================================== */
.main-img {
    margin-top: 169px !important;
}

@media (max-width: 960px) {
    .main-visual {
        padding-top: 0 !important;
        margin-top: 70px !important;
    }
    .main-img {
        margin-top: 0 !important;
    }
}

/* ==========================================
   1. PC表示の場合
========================================== */
.archive-main {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px 80px;
}

.archive-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 30px;
    background-color: rgba(20, 16, 15, 0.6);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.archive-table th {
    background: linear-gradient(135deg, #4a1111 0%, #2d0808 100%);
    color: #d99b26 !important;
    font-weight: bold;
    padding: 16px 20px;
    text-align:center;
    font-size: 1.05rem;
    border-bottom: 2px solid #d99b26;
    letter-spacing: 0.05em;
}

.archive-table td {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #f5f5f5;
    font-size: 0.85rem;
    line-height: 1.7;
    vertical-align: top;
}

.archive-table tbody tr {
    transition: background-color 0.2s ease;
}

.archive-table tbody tr:hover {
    background-color: rgba(217, 155, 38, 0.05);
}

.archive-table th:nth-child(1),
.archive-table td:nth-child(1) {
    width: 25%;
    font-weight: bold;
    color: #e0e0e0;
}

.archive-table th:nth-child(2),
.archive-table td:nth-child(2) {
    width: 55%;
}

.archive-table th:nth-child(3),
.archive-table td:nth-child(3) {
    width: 20%;
    text-align: center;
}

.past-flyer {
    width: 100%;
    max-width: 100px;
    height: auto;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    transition: transform 0.2s ease, border-color 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    display: block;
    margin: 0 auto;
}

.past-flyer:hover {
    transform: scale(1.05);
    border-color: #d99b26;
}

/* 列の個別設定 */
.archive-table td:nth-child(1) {
    text-align: center;
}




/* ==========================================
   2. スマホ表示の場合（レスポンシブ：768px以下）
========================================== */
@media (max-width: 768px) {
    /* テーブルをブロック化して縦配列（カード形式）に変換 */
    .archive-table, 
    .archive-table thead, 
    .archive-table tbody, 
    .archive-table th, 
    .archive-table td, 
    .archive-table tr {
        display: block;
    }

    /* 元のPC用ヘッダー（th）を非表示 */
    .archive-table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    /* 演奏会1回ごとの外枠（カード） */
    .archive-table tbody tr {
        margin-bottom: 35px;
        border: 1px solid rgba(217, 155, 38, 0.3);
        border-radius: 8px;
        background-color: rgba(20, 16, 15, 0.85);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
        padding: 0px 0;
    }

    .archive-table tbody tr:hover {
        background-color: rgba(20, 16, 15, 0.85);
    }

    /* 各セルの基本設定（上下のゆとりを持たせる） */
    .archive-table td {
        border: none;
        width: 100% !important;
        box-sizing: border-box;
        padding: 40px 15px 15px 15px !important; /* 上部に項目名を置くための余白 */
        position: relative;
    }

    /* 疑似要素で「項目名」を共通デザインとして作成 */
    .archive-table td::before {
        position: absolute;
        top: 5px;
        left: 15px; /* ★項目名は左寄せ */
        color: #d99b26; /* ゴールド */
        font-weight: bold;
        font-size: 0.85rem;
        letter-spacing: 0.05em;
        border-bottom: 1px solid rgba(217, 155, 38, 0.2);
        padding-bottom: 2px;
        width: calc(100% - 30px); /* 左右の余白を引いた幅いっぱいに線を引く */
        text-align: left; /* ★項目名は左寄せ */
    }

    /* 各セルに応じた項目名（ラベル）の中身を設定 */
    .archive-table td:nth-child(1)::before {
        content: "【日時/会場】";
    }
    
    .archive-table td:nth-child(2)::before {
        content: "【曲目/出演】";
    }
    
    .archive-table td:nth-child(3)::before {
        content: "【チラシ】";
    }

    /* ------------------------------------------
       各項目の個別配置ルール（ご指定通りに配置）
    ------------------------------------------ */
    
    /* ① 日時/会場：中央配置 */
    .archive-table td:nth-child(1) {
        text-align: center !important;
        font-size: 0.75rem;
        padding-top: 45px !important;
        background-color: rgba(74, 17, 17, 0.2); /* ほんのり背景色を変えて区切りをわかりやすく */
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);

    }

    /* ② 曲目/出演：左寄せ */
    .archive-table td:nth-child(2) {
        text-align: left !important;
        font-size: 0.75rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    /* ③ チラシ：中央配置・小さめサムネイル・枠線にかからない配慮 */
    .archive-table td:nth-child(3) {
        text-align: center !important;
        padding-top: 45px !important;
        padding-bottom: 20px !important;
    }
    
    .past-flyer {
        display: block;
        margin: 0 auto; /* ★中央に配置 */
        width: 75px !important; /* ★サムネイルは小さくて良い */
        max-width: 75px !important;
        height: auto;
        border: 1px solid rgba(255, 255, 255, 0.3);
        box-shadow: 0 3px 8px rgba(0,0,0,0.5);
    }
}

/* ==========================================
   3. 自作Lightbox（モーダルポップアップ）用スタイル
========================================== */
#custom-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9); /* 背景を暗く */
    z-index: 9999; /* 一番手前に表示 */
    display: flex;
    justify-content: center;
    align-items: center;
    
    /* 【フェードインのための設定】初期状態は透明にしてクリック不可にする */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease; /* 0.3秒かけてふわっと変化 */
}

/* JSで「.is-active」クラスが付与されたら表示する */
#custom-lightbox.is-active {
    opacity: 1;
    pointer-events: auto;
}

#custom-lightbox-content {
    position: relative;
    width: auto;
    max-width: 90%;
    max-height: 90%;
    text-align: center;
    display: inline-block; /* 画像のサイズにぴったり合わせる */
    
    /* 画像も少し縮小した状態から元の大きさにふわっと変化させる */
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

/* アクティブ時は画像も元の大きさに戻る */
#custom-lightbox.is-active #custom-lightbox-content {
    transform: scale(1);
}

#custom-lightbox-img {
    max-width: 100%;
    max-height: calc(100vh - 60px); /* 上下に少し余白を持たせる */
    object-fit: contain;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    display: block; /* 下部の謎の隙間を消す */
}

/* 【修正】閉じるボタン（×）を画像の内側（右上）に配置 */
#custom-lightbox-close {
    position: absolute;
    top: 10px;           /* 画像の内側上部からの距離 */
    right: 10px;         /* 【ここを修正】画像の内側右側からの距離（右上） */
    color: white;
    font-size: 35px;     /* クリックしやすいよう少し大きめに */
    line-height: 1;
    cursor: pointer;
    font-weight: bold;
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.8); /* 背景が白いチラシでも視認できるように影をつける */
    z-index: 10000;      /* 画像より手前に */
    transition: transform 0.2s ease, color 0.2s ease;
}

#custom-lightbox-close:hover {
    color: #d99b26;      /* ホバー時はABオケのゴールドに */
    transform: scale(1.1);
}

/* スマホ表示の時は画像を画面いっぱいに広く見せる調整 */
@media (max-width: 768px) {
    #custom-lightbox-img {
        max-width: 95%;
        max-height: calc(100vh - 80px);
    }
    #custom-lightbox-content {
        max-width: 95%;
    }
    /* スマホでも右上に綺麗に収まるよう微調整 */
    #custom-lightbox-close {
        top: 8px;
        right: 18px;
        font-size: 32px;
    }
}