@charset "UTF-8";

/* =========================================================
  1. 基本リセット & 共通設定
========================================================= */
* {
    margin: 0;
    padding: 0;
    list-style: none;
    text-decoration: none;
    box-sizing: border-box; /* 幅計算を正確にする */
}

body {
    background: #000 url(../img/common/bg2020.jpg) top center no-repeat fixed;
    background-size: cover;
    font-family: "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif;
}

img {
    border: 0;
    max-width: 100%; /* 全ての画像をレスポンシブ化 */
    height: auto;
    vertical-align: bottom;
}

a:hover {
    text-decoration: underline;
}

/* =========================================================
  2. レイアウト構造
========================================================= */
#main-contents {
    width: 100%;
    max-width: 980px; /* PC最大幅 */
    margin: 0 auto;
    background-color: #edede6; /* 背景のベージュ色 */
}

#sub-contents {
    padding: 40px 20px 0 20px;
}

.page-title {
    margin-bottom: 0;
    text-align: center;
}

/* 白背景のメインエリア */
#history {
    background-color: #fff;
    padding: 50px 0 30px 0;
}

/* =========================================================
  3. HISTORY コンテンツ (Flexboxレイアウト)
========================================================= */
.history-container {
    display: flex;
    max-width: 816px;
    margin: 0 auto;
    justify-content: space-between;
}

/* 左側：年号メニュー */
.history-nav {
    width: 100px;
    flex-shrink: 0;
}

.previous-menu li a {
    display: block;
    padding-bottom: 10px;
}

/* 右側：メイン内容 */
.history-content {
    flex-grow: 1;
    margin-left: 30px;
}

/* 写真グリッド */
.photo-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    margin-bottom: 20px;
    justify-content: center;
}

.photo-grid img {
    width: calc(25% - 2px); /* 4枚並び */
}

/* 詳細エリア (ロゴ/アーティスト/ポスター) */
.detail-area {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 20px;
}

.detail-left {
    flex: 1;
    text-align: center;
}

.detail-right {
    flex: 1;
    text-align: center;
}

/* アーティストリストの装飾 (Screenshot Aを再現) */
.previous-date {
    margin: 10px 0;
    padding: 5px;
    font-size: 13px;
    font-weight: bold;
    color: #666;
    border-top: 1px solid #666;
    border-bottom: 1px solid #666;
}

.artist-list p {
    font-size: 14px;
    line-height: 1.8;
    color: #00AAFD; /* 旧デザインの青色 */
    font-weight: bold;
    margin-bottom: 15px;
}

.artist-list a {
    font-size: 12px;
    color: #333;
    text-decoration: underline;
    line-height: 1.6;
}

/* =========================================================
  4. フッター
========================================================= */
#footer {
    width: 100%;
    max-width: 980px;
    margin: 0 auto;
    text-align: center;
    background: #72cbdc; /* 水色の帯 */
    padding: 10px 0;
}

.footer-info-img {
    max-width: 920px;
    width: 95%;
    margin: 0 auto;
}

#copyright {
    background-color: #edede6;
    padding: 15px 0;
    font-size: 11px;
    color: #333;
    line-height: 1.6;
}

/* =========================================================
  5. モバイル対応 (レスポンシブ) - 768px以下
========================================================= */
@media screen and (max-width: 768px) {
    #sub-contents {
        padding: 20px 10px 0 10px;
    }

    /* 【1】<h1>画像を左側でトリミング（object-fit使用） */
    .page-title {
        display: block !important;
        width: 100% !important;
        height: 80px !important; /* スマホでの高さ */
        overflow: hidden !important;
        margin: 0 !important;
    }

    .page-title img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important; /* 枠いっぱいに広げる */
        object-position: left center !important; /* ★画像の左端を表示 */
    }

    /* 【2】年代選択メニューをコンテンツの下（フッター上）へ移動 */
    .history-container {
        display: flex !important;
        flex-direction: column-reverse !important; /* ★順序を入れ替える */
    }

    .history-nav {
        width: 100% !important;
        margin: 30px 0 !important;
    }

    .previous-menu {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 8px !important;
    }

    /* 【3】フッター画像のトリミング（object-fit使用） */
    #footer {
        width: 100% !important;
        height: auto !important; /* 高さを内容に任せる */
        background: #72cbdc !important; /* 水色の背景 */
        padding: 0 !important;
        text-align: center !important;
    }

    /* フッター内の画像単体をトリミングする設定 */
    .footer-info-img {
        display: block !important;
        width: 100% !important;
        height: 30px !important; /* ★ここでトリミングしたい高さを指定 */
        object-fit: cover !important;
        object-position: center center !important; /* ★画像の中央（電話番号）を表示 */
    }

    /* コピーライト部分（画像の下に配置） */
    #copyright {
        display: block !important;
        background-color: #edede6 !important;
        padding: 15px 0 !important;
        width: 100% !important;
    }

    /* その他スマホ調整 */
    /* articleブロックをFlexコンテナにして、子要素の順序を制御できるようにする */
    .history-content {
        margin-left: 0 !important;
        display: flex !important;
        flex-direction: column !important; /* 縦並び */
    }
    .detail-area {
        flex-direction: column !important;
        align-items: center !important;
    }
    .photo-grid img {
        width: calc(50% - 2px) !important;
    }
	
	/* 1. まず写真グリッドや詳細エリアに基本順序をつける */
    .photo-grid {
        order: 2 !important; /* 写真を2番目以降に */
    }

    .detail-area {
        order: 1 !important; /* 詳細エリアを1番目に（この中のロゴを操作します） */
        display: flex !important;
        flex-direction: column !important;
    }

    /* 2. detail-areaの中でのロゴの順序（HTML構造上はdetail-leftの中ですが、
       スマホではdetail-area全体が縦に並ぶため、detail-leftが先頭に来ます） */
    .detail-left {
        display: flex !important;
        flex-direction: column !important;
        order: 1 !important;
    }

    /* ロゴ自体のスタイル調整 */
    .event-logo {
        order: -1 !important; /* detail-leftの中で最優先で上に持ってくる */
        margin-bottom: 20px !important;
        max-width: 80% !important; /* スマホで大きすぎないように */
        align-self: center !important;
    }

    /* 開催日やアーティストリストはロゴの下へ */
    .previous-date { order: 2 !important; }
    .artist-list { order: 3 !important; }
}