/* フォント設定 */
body, h1, h2, h3, h4, h5, h6, p, a, span, small {
    font-family: 'Arial', 'Helvetica', sans-serif;
}

/* ハンバーガーメニュー */


/* トップのメインイメージコンテナ */
#top-image-container {
    position: relative;
    width: 100%;
    height: 50vh;
    overflow: hidden;
    margin: 0 0 40px 0;
}

#image_main {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/80周年誌_写真/ブニゾムの思い出.jpeg');
    background-size: cover;
    background-position: center 25%;
    background-repeat: no-repeat;
}

.header-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    width: 100%;
    height: 100%;
    padding: 0 20px;
    box-sizing: border-box;
    background-color: transparent;
}

.header-overlay h2 {
    font-size: 3em;
    margin-bottom: 10px;
    font-weight: normal;
}

.header-overlay small {
    font-size: 1.5em;
    font-weight: normal;
}


/* レスポンシブデザイン用 */
@media screen and (max-width: 768px) {
    #anniversary-banner {
        height: 40vh; /* モバイルでは少し小さく */
    }

    .banner-content h3 {
        font-size: 1.2em;
    }

    .banner-content h2 {
        font-size: 2em;
    }
}

/* 記事セクションのスタイル */
.article-section {
    padding: 0;
    width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: center;
}

/* 記事コンテナの基本スタイル */
.article-container {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 30px;
    margin: 0 auto;
    width: calc(100% - 2px);
    max-width: 1920px;
    box-sizing: border-box;
}

/* 記事アイテムの基本スタイル */
.article-item {
    background: white;
    border: 1px solid #000;
    border-radius: 0;
    overflow: hidden;
    transition: transform 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

.article-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.article-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.article-content {
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
}

.article-header {
    font-size: 1.2em;
    margin-bottom: 10px;
    font-weight: bold;
    min-height: 2.9em;
}

.article-title {
    color: #000;
    font-weight: bold;
}

.article-author {
    font-size: 0.9em;
    color: #000;
    margin-bottom: 10px;
}

.article-source {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 10px;
}

.article-excerpt {
    font-size: 0.9em;
    color: #333;
    line-height: 1.6;
    margin-bottom: 15px;
}

/* read-moreボタンの統一スタイル */
.read-more-button {
    /* ベーススタイル */
    display: inline-block !important;
    padding: 8px 16px !important;
    margin-top: 15px !important;
    width: 120px !important; /* 固定幅を設定 */
    height: 36px !important; /* 固定高さを設定 */
    
    /* 見た目 */
    background-color: #000080 !important;
    color: white !important;
    font-size: 0.9em !important;
    font-weight: bold !important;
    border-radius: 4px !important;
    border: none !important;
    
    /* その他 */
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    text-align: center !important;
}

/* ホバー時 */
.read-more-button:hover {
    background-color: #000066 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
}

/* アクティブ時 */
.read-more-button:active {
    transform: translateY(0) !important;
}

/* スマートフォン向けの調整 */
@media screen and (max-width: 768px) {
    .read-more-button {
        padding: 6px 12px;
        font-size: 0.85em;
    }
}

/* レスポンシブデザイン */
@media screen and (max-width: 1024px) {
    .article-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 768px) {
    .article-container {
        grid-template-columns: 1fr;
        padding: 0 15px;
        gap: 20px;
    }

    .article-item.wide {
        grid-column: span 1;
        flex-direction: column;
        padding: 20px;
        gap: 20px;
    }

    .article-item.wide .article-image {
        width: 100%;
        height: 250px;
    }

    .article-item.wide .article-content {
        width: 100%;
        padding: 0;
    }

    .article-item.medium {
        grid-column: span 1;
        flex-direction: column;
        padding: 20px;
        gap: 20px;
    }

    .article-item.medium .article-image {
        width: 100%;
        height: 250px;
    }

    .article-item.medium .article-content {
        width: 100%;
        padding: 0;
    }

    .article-item.image-only.large {
        grid-column: span 1;
        height: 250px;
    }

    .header-overlay h2 {
        font-size: 2em;
    }

    .anniversary-image-container .header-overlay {
        width: 90%;
        padding: 10px 20px;
    }

    .anniversary-image-container .header-overlay h2 {
        font-size: 2em;
    }

    .anniversary-image-container .header-overlay .anniversary {
        font-size: 1.8em;
    }

    .prev-btn {
        left: 10px;
    }

    .next-btn {
        right: 10px;
    }

    .close-btn {
        right: 10px;
    }

    .modal-content {
        width: 95%;
    }

    .modal-image {
        max-width: 95%;
    }

    .random-articles-header {
        width: calc(100% - 30px);
        padding: 20px;
    }

    .random-articles-section .random-articles-container {
        padding: 0 15px;
    }

    .read-more {
        padding: 6px 12px;
        font-size: 0.85em;
    }
}

/* タブレット用の調整 */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    .article-container {
        grid-template-columns: repeat(2, 1fr);
        padding: 0 20px;
    }

    .article-item.wide {
        grid-column: span 2;
    }

    .article-item.medium {
        grid-column: span 2;
    }

    .article-item.image-only.large {
        grid-column: span 2;
    }
}

/* 3つ分の幅を持つ記事コンテナ用のスタイル */
.article-item.wide {
    grid-column: span 3;
    display: flex;
    gap: 40px;
    padding: 40px;
    align-items: flex-start;
    width: 100%;
    box-sizing: border-box;
}

.article-item.wide .article-image {
    width: 50%;
    height: 400px;
    object-fit: cover;
}

.article-item.wide .article-content {
    width: 50%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 0;
}

.article-item.wide .article-header {
    font-size: 1.6em;
    margin-top: 0;
    min-height: 2.4em;
}

.article-item.wide .article-excerpt {
    font-size: 0.9em;
}

.article-item.wide .article-title {
    display: block;
    margin-top: 5px;
}

/* 2つ分の幅を持つ記事コンテナ用のスタイル */
.article-item.medium {
    grid-column: span 2;
    display: flex;
    gap: 30px;
    padding: 30px;
}

.article-item.medium .article-image {
    width: 50%;
    height: 300px;
    object-fit: cover;
}

.article-item.medium .article-content {
    width: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.article-item.medium .article-header {
    font-size: 1.5em;
    min-height: 2.5em;
}

.article-item.medium .article-excerpt {
    font-size: 1em;
}

/* 1カラム分のイメージコンテナ用のスタイル */
.article-item.image-only {
    grid-column: span 1;
    padding: 0;
    display: block;
}

.article-item.image-only .article-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* コンテンツを非表示にする */
.article-item.image-only .article-content {
    display: none;
}

/* 2カラム分のイメージコンテナ用のスタイル */
.article-item.image-only.medium {
    grid-column: span 2;
    padding: 0;
    display: block;
    height: 500px;
}

.article-item.image-only.medium .article-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ランダム記事セクションのスタイル */
.random-articles-section {
    padding: 30px 0;
    background-color: #000080;
    margin: 20px 0 0 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.random-articles-header {
    text-align: center;
    margin: 30px 0 40px 0;
    width: calc(100% - 80px);
    max-width: calc(3000px - 80px);
    padding: 40px;
    box-sizing: border-box;
    background-color: rgba(245, 245, 245, 0.9);
    color: #000;
    border-radius: 10px;
}

.random-articles-header p {
    margin: 10px 0;
    font-size: 1em;
    line-height: 1.6;
}

.random-articles-header h2 {
    color: #000;
    margin-bottom: 20px;
}

.random-articles-section .random-articles-container {
    width: 100%;
    max-width: 3000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    padding: 0 40px 30px 40px;
    box-sizing: border-box;
}

.random-articles-section .article-item {
    background-color: white;
}

.random-articles-section .article-item.wide {
    grid-column: 1 / -1;
    gap: 20px;
    padding: 20px;
}

@media screen and (max-width: 1024px) {
    .random-articles-section .random-articles-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 768px) {
    .random-articles-section .random-articles-container {
        grid-template-columns: 1fr;
        padding: 0 20px;
    }
}

.article-title .zadankai {
    display: block;
    margin-bottom: 5px;  /* 【座談会】と本題の間の余白 */
}

.article-title .main-title {
    display: block;
}

/* モーダルウィンドウの基本スタイル */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1004;
}

.modal-content {
    position: relative;
    width: 100%;
    height: 100vh;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    scroll-behavior: smooth;
}

.modal-image-container {
    width: 100% !important;
    height: calc(100vh - 100px) !important;
    overflow: hidden !important;
    position: relative !important;
    background-color: #000 !important;
    scroll-behavior: smooth;
}

.modal-image {
    max-width: 90% !important;
    max-height: 90% !important;
    object-fit: contain !important;
    transition: opacity 0.3s ease-out !important;
}

/* 拡大時のスタイル */
.modal-image.zoomed {
    position: absolute !important;
    max-width: none !important;
    max-height: none !important;
    transform-origin: top right !important;
}

.scroll-area {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    height: 100% !important;
}

/* スクロールバーのスタイリング */
.modal-image-container::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

.modal-image-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

.modal-image-container::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    border: 2px solid rgba(0, 0, 0, 0.2);
}

.modal-image-container::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.4);
}

.modal-image.zoomed {
    cursor: default;
}

/* 閉じるボタン */
.close-btn {
    position: fixed;
    top: 5px;
    right: 5px;
    background: none;
    border: none;
    color: white;
    font-size: 36px;
    cursor: pointer;
    z-index: 1005;
}

/* コントロールパネル全体のレイアウト */
.page-controls {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 12px 15px;
    box-sizing: border-box;
    z-index: 10004;
}

/* ページ番号 */
.page-number {
    color: white;
    margin: 0 10px;
    font-size: 18px;
}

/* すべてのボタン共通スタイル */
.prev-btn, .next-btn, .zoom-btn {
    background-color: rgba(255, 255, 255, 0.8);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #333;
    transition: all 0.2s ease;
    padding: 0;
}

/* ボタンのホバー効果 */
.prev-btn:hover, .next-btn:hover, .zoom-btn:hover {
    background-color: rgba(255, 255, 255, 1);
    transform: scale(1.05);
}

/* ボタンのアクティブ効果 */
.prev-btn:active, .next-btn:active, .zoom-btn:active {
    transform: scale(0.95);
}

/* 矢印ボタンの特別なスタイル */
.prev-btn, .next-btn {
    font-family: "Arial", sans-serif;
    font-weight: bold;
}

/* コントロールパネルのレイアウト */
.page-controls {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 12px 15px;
    box-sizing: border-box;
    z-index: 10004;
}

.page-number {
    color: white;
    margin: 0 10px;
}

.zoom-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.zoom-btn {
    background-color: rgba(255, 255, 255, 0.8);
    border: none;
    width: 25px;
    height: 25px;
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #000;
}

.zoom-btn:hover {
    background-color: rgba(255, 255, 255, 1);
}

/* 既存の.page-numberと.zoom-controlsのスタイルは削除または上書き */

/* 個別の高さ調整用のスタイル */
.article-item.image-only.medium.custom-height-1 {
    height: 750px; /* 任意の高さに調整 */
}

.article-title .date {
    display: block;
    margin-top: 5px;
}

.article-category {
    font-size: 0.9em;
    color: #000080; /* 紺色 */
    margin-bottom: 10px;
    font-weight: bold;
}

/* 3カラム分の幅を持つイメージのみのコンテナ用のスタイル */
.article-item.image-only.large {
    grid-column: span 3;
    padding: 0;
    display: block;
    height: 500px;
}

.article-item.image-only.large .article-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 60%;
}

/* カスタム高さ用のクラス */
.article-item.image-only.large.custom-height-2 {
    height: 700px;
}

.article-item.image-only.large.custom-height-2 .article-image {
    object-position: center 70%;
}

/* 別の高さのバリエーション */
.article-item.image-only.large.custom-height-3 {
    height: 900px;
}

.article-item.image-only.large.custom-height-4 {
    height: 1000px;
}



#main-image-section {
    width: 100%;
    position: relative;
    margin: 30px 0 0 0;
    padding: 0;
    height: auto;
}

#main-image-section .main-image-container {
    position: relative;
    width: 100%;
    height: 100%;
}


#main-image-section .header-overlay {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    text-align: center;
    width: 100%;
    padding: 20px 0;
    box-sizing: border-box;
    
}

#main-image-section .header-overlay h2 {
    font-size: 2.5em;
    margin: 0;
    font-weight: bold;
    letter-spacing: 0.2em;
    color: #000 ;
    padding: 10px 0;
    display: block;
}

/* 100周年用のイメージコンテナ */
.anniversary-image-container {
    position: relative;
    width: 100%;
    height: 40vh;
    background-image: url('../images/100周年誌_写真/100周年誌_表紙.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: 1px solid #000;
    box-sizing: border-box;
}

.anniversary-image-container .header-overlay {
    position: absolute;
    top: 60%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: auto;
    padding: 10px 40px;
    z-index: 1;
    background: none;
    height: 18vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.anniversary-image-container .header-overlay h2,
.anniversary-image-container .header-overlay .anniversary,
.anniversary-image-container .header-overlay .subtitle {
    background: none;
}

.anniversary-image-container .header-overlay h2 {
    color: #FF4500;
    letter-spacing: 0.1em;
    margin: 0;
    font-size: 3em;
    font-weight: bold;
    line-height: 1;
}

.anniversary-image-container .header-overlay .anniversary {
    color: #FF4500;
    letter-spacing: 0.1em;
    margin: 0;
    font-size: 2.5em;
    font-weight: bold;
    line-height: 1;
}

.anniversary-image-container .header-overlay .subtitle {
    color: #000;
    letter-spacing: 0.05em;
    margin: 0;
    font-size: 1.4em;
    margin-top: 5px;
}

/* mainタグとその中のセクションの余白を制御 */
main {
    margin-top: 30px;
    margin-bottom: 40px;
}

.article-section {
    margin: 0;
    padding: 0;
}

/* footerの余白とスタイリング */
footer {
    margin-top: 40px;
    padding: 15px 0;
    background-color: #000080;
}

footer p {
    color: white;
    text-align: center;
    margin: 0;
    padding: 0;
}

/* レスポンシブ対応 */
@media screen and (max-width: 768px) {
    main {
        margin-bottom: 30px;
    }

    footer {
        margin-top: 30px;
        padding: 12px 0;
    }
}

/* 80周年用のイメージコンテナ */
#anniversary-80 {
    width: 100%;
    position: relative;
    margin: 30px 0 0 0;
    padding: 0;
    height: auto;
    overflow: hidden;
    box-sizing: border-box;
}

#anniversary-80 .anniversary-image-container {
    position: relative;
    width: 100%;
    height: 40vh;
    background: none;
    border: 1px solid #000;
    box-sizing: border-box;
    overflow: hidden;
}

#anniversary-80 .background-image {
    background-image: url('../images/80周年誌_写真/80周年_表紙_1.jpeg');
    background-size: cover;
    background-position: center;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    transition: transform 0.3s ease;
}

#anniversary-80 .header-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 70%;
    max-width: 900px;
    padding: 20px 30px;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.9);
    z-index: 2;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    max-height: 80vh;
}

#anniversary-80 .header-overlay h2 {
    font-size: clamp(2.5em, 6vw, 4em);
    margin: 0;
    font-weight: 900;
    letter-spacing: 0.1em;
    color: #FF4500;
    padding: 0;
    text-align: center;
    line-height: 1.1;
    width: 100%;
    word-break: keep-all;
    overflow-wrap: break-word;
}

#anniversary-80 .header-overlay .anniversary {
    color: #000080;
    letter-spacing: 0.1em;
    margin: 10px 0 0 0;
    font-size: clamp(0.9em, 2.5vw, 1.1em);
    font-weight: bold;
    line-height: 1.3;
    text-align: center;
    width: 100%;
}

/* スマートフォン向けの調整 */
@media screen and (max-width: 768px) {
    #anniversary-80 .header-overlay {
        width: 80%;
        padding: 15px 20px;
        min-height: 150px;
        max-height: 70vh;
    }
}

/* さらに小さい画面向けの調整 */
@media screen and (max-width: 480px) {
    #anniversary-80 .header-overlay {
        width: 85%;
        padding: 12px 15px;
        min-height: 120px;
    }
}

/* 横向きのスマートフォン向けの調整 */
@media screen and (max-width: 896px) and (orientation: landscape) {
    #anniversary-80 .anniversary-image-container {
        height: 50vh;
    }
}

/* シャッフルボタンのスタイル */
.shuffle-button {
    margin-top: 20px;
    padding: 12px 24px;
    background-color: #000080;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 20px auto;
    transition: all 0.3s ease;
}

.shuffle-button:hover {
    background-color: #000066;
    transform: translateY(-2px);
}

/* シャッフルアイコンのアニメーション */
@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.shuffle-icon.rotating {
    animation: rotate 0.5s ease-in-out;
}

/* ランダム記事コンテナのトランジション */
.random-articles-container {
    transition: opacity 0.5s ease;
}

/* document-archive.htmlのmain-image-sectionに限定 */
.document-archive #main-image-section {
    width: 100%;
    position: relative;
    margin: 30px 0 0 0;
    padding: 0;
    height: auto;
}

.document-archive #main-image-section .header-overlay {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    text-align: center;
    width: 100%;
    padding: 20px 0;
    box-sizing: border-box;
    background-color: transparent;
    color: #000;
}

/* スマートフォン向けのレイアウト調整 */
@media screen and (max-width: 768px) {
    /* 既存のスタイルに追加 */
    
    /* 3カラム記事のレイアウト調整 */
    .article-item {
        grid-column: span 1 !important; /* すべての記事を1カラムに強制 */
    }

    /* 画像のみの記事の高さ調整 */
    .article-item.image-only,
    .article-item.image-only.medium,
    .article-item.image-only.large {
        height: 250px !important;
    }

    .article-item.image-only .article-image,
    .article-item.image-only.medium .article-image,
    .article-item.image-only.large .article-image {
        height: 100%;
        object-position: center;
    }

    /* カスタム高さクラスの調整 */
    .article-item.image-only.medium.custom-height-1,
    .article-item.image-only.large.custom-height-2,
    .article-item.image-only.large.custom-height-3,
    .article-item.image-only.large.custom-height-4 {
        height: 250px !important;
    }

    /* 記事内容のスペーシング調整 */
    .article-content {
        padding: 15px;
    }

    .article-header {
        font-size: 1.1em;
        min-height: 0;
    }

    .article-excerpt {
        margin-bottom: 10px;
    }

    /* ランダム記事セクションの調整 */
    .random-articles-section .article-item {
        grid-column: span 1 !important;
    }

    /* 記事間のギャップ調整 */
    .article-container {
        gap: 20px;
        margin: 0 0 30px 0;
    }

    /* アニバーサリーセクションの調整 */
    #anniversary-80 .header-overlay {
        top: 10%;
        left: 0;
        width: auto;
        max-width: 90%;
        padding: 0;
    }

    #anniversary-80 .header-overlay h2 {
        font-size: 2em;
        padding: 0;
    }

    #anniversary-80 .header-overlay .anniversary {
        font-size: 1.2em;
        margin-top: 5px;
    }

    /* 背景画像の位置調整 */
    #anniversary-80 .background-image {
        background-position: center center;
    }
}

/* さらに小さい画面用の調整 */
@media screen and (max-width: 480px) {
    #anniversary-80 .header-overlay h2 {
        font-size: 1.5em;
        padding: 5px 0;
    }

    #anniversary-80 .header-overlay .anniversary {
        font-size: 1em;
    }
}

/* タブレット向けのレイアウト調整 */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    /* 既存のスタイルに追加 */
    
    .article-item.image-only.medium.custom-height-1,
    .article-item.image-only.large.custom-height-2 {
        height: 400px;
    }

    .article-item.wide .article-image {
        height: 300px;
    }
}

/* レスポンシブ対応の調整 */
@media screen and (max-width: 768px) {
    .article-item.wide {
        padding: 20px;
        flex-direction: column;
    }

    .article-item.wide .article-image,
    .article-item.wide .article-content {
        width: 100%;
    }
}

/* main-image-sectionの定義を削除し、新しいarchive-main-sectionを追加 */
#archive-main-section {
    width: 100%;
    position: relative;
    margin: 30px auto 0;
    padding: 0;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#archive-main-section .anniversary-image-container {
    width: calc(100% - 2px);
    max-width: 1920px;
    height: 40vh;
    background-image: url('../images/100周年誌_写真/100周年誌_表紙.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: 1px solid #000;
    box-sizing: border-box;
    position: relative;
}

#archive-main-section .header-overlay {
    position: absolute;
    top: 60%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 90%;
    max-width: 800px;
    padding: 10px 20px;
    background: none;
    box-sizing: border-box;
}

#archive-main-section .header-overlay h2 {
    color: #FF4500;
    font-size: clamp(1.5em, 5vw, 3em);
    font-weight: bold;
    margin: 0;
    line-height: 1.2;
    text-shadow: 1px 1px 3px rgba(255, 255, 255, 0.8);
    word-break: keep-all;
    overflow-wrap: break-word;
}

#archive-main-section .header-overlay .anniversary {
    color: #FF4500;
    font-size: clamp(1.2em, 4vw, 2.5em);
    font-weight: bold;
    margin: 5px 0;
    text-shadow: 1px 1px 3px rgba(255, 255, 255, 0.8);
}

#archive-main-section .header-overlay .subtitle {
    color: #000;
    font-size: clamp(0.9em, 3vw, 1.4em);
    margin: 5px 0 0 0;
    text-shadow: 1px 1px 3px rgba(255, 255, 255, 0.8);
}

/* スマートフォン向けのメディアクエリ */
@media screen and (max-width: 768px) {
    #archive-main-section .anniversary-image-container {
        height: 30vh;
    }

    #archive-main-section .header-overlay {
        width: 95%;
        padding: 10px;
        top: 50%;
    }
}

/* さらに小さい画面向けの調整 */
@media screen and (max-width: 480px) {
    #archive-main-section .anniversary-image-container {
        height: 25vh;
    }

    #archive-main-section .header-overlay {
        width: 95%;
        padding: 8px;
    }
}

/* 横向きのスマートフォン向けの調整 */
@media screen and (max-width: 896px) and (orientation: landscape) {
    #archive-main-section .anniversary-image-container {
        height: 50vh;
    }

    #archive-main-section .header-overlay {
        top: 50%;
    }
}

/* 以下、既存のスタイルを継承 */

/* スマートフォン向けの調整 */
@media screen and (max-width: 768px) {
    .modal-image-container {
        touch-action: pan-y pinch-zoom; /* スクロールとピンチズームを許可 */
    }
    
    /* ボタンを非表示にするオプション */
    .prev-btn, .next-btn {
        display: none; /* スワイプ操作がメインの場合は矢印ボタンを非表示に */
    }
}

/* 既存のグリッドレイアウト定義を更新 */
.article-container {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)); /* minmax(0, 1fr)を使用して均等な幅を確保 */
    gap: 30px;
    margin: 0 auto;
    width: calc(100% - 2px); /* 背景画像のボーダーを考慮 */
    max-width: 1920px; /* 最大幅を設定 */
    box-sizing: border-box;
}

/* メインセクションのスタイル */
#archive-main-section {
    width: 100%;
    position: relative;
    margin: 30px 0 0 0;
    padding: 0;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* アニバーサリーイメージコンテナ */
.anniversary-image-container {
    width: calc(100% - 2px); /* ボーダーの幅を考慮 */
    max-width: 1920px;
    height: 40vh;
    background-image: url('../images/100周年誌_写真/100周年誌_表紙.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: 1px solid #000;
    box-sizing: border-box;
}

/* タブレットサイズのメディアクエリ */
@media screen and (min-width: 769px) and (max-width: 1200px) {
    .article-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 25px;
    }

    /* wide記事の調整 */
    .article-item.wide {
        grid-column: span 2;
        display: flex;
        flex-direction: row;
        padding: 30px;
        gap: 30px;
    }

    .article-item.wide .article-image {
        width: 50%;
        height: 350px;
        object-fit: cover;
    }

    .article-item.wide .article-content {
        width: 50%;
        padding: 0;
    }

    /* medium記事の調整 */
    .article-item.medium {
        grid-column: span 2;
        display: flex;
        flex-direction: row;
        padding: 25px;
        gap: 25px;
    }

    .article-item.medium .article-image {
        width: 50%;
        height: 300px;
    }

    .article-item.medium .article-content {
        width: 50%;
        padding: 0;
    }

    /* image-only記事の調整 */
    .article-item.image-only.large {
        grid-column: span 2;
        height: 400px;
    }

    .article-item.image-only.medium {
        grid-column: span 1;
        height: 300px;
    }
}

/* スマートフォンサイズのメディアクエリ */
@media screen and (max-width: 768px) {
    /* 記事セクションの余白を完全に削除 */
    .article-section {
        padding: 0;
        margin: 0;
        width: 100%;
    }

    /* 記事コンテナの調整 */
    .article-container {
        grid-template-columns: 1fr;
        gap: 10px;
        width: 100%;
        margin: 0;
        padding: 0;
        max-width: none;
    }

    /* 記事アイテムの調整 */
    .article-item,
    .article-item.wide,
    .article-item.medium {
        grid-column: span 1;
        flex-direction: column;
        width: 100%;
        margin: 0;
        padding: 15px;
        gap: 15px;
        border: 1px solid #000;
        box-sizing: border-box;
    }

    /* 記事コンテンツの調整 */
    .article-content {
        width: 100%;
        padding: 15px;
        box-sizing: border-box;
        margin: 0;
    }

    /* wide記事の特別な調整 */
    .article-item.wide .article-content {
        padding: 20px;
    }

    /* 画像の調整 */
    .article-item .article-image,
    .article-item.wide .article-image,
    .article-item.medium .article-image {
        width: 100%;
        height: 200px;
        margin: 0;
        padding: 0;
    }

    /* コンテンツ内の余白調整 */
    .article-header {
        margin-bottom: 10px;
        font-size: 1.2em;
    }

    .article-author {
        margin-bottom: 8px;
    }

    .article-source {
        margin-bottom: 8px;
    }

    .article-excerpt {
        margin-bottom: 15px;
        line-height: 1.6;
    }

    .read-more {
        margin-top: 15px;
        display: inline-block;
    }

    /* image-onlyの記事の調整 */
    .article-item.image-only,
    .article-item.image-only.large,
    .article-item.image-only.medium {
        height: 200px;
        padding: 0;
        margin: 0;
        width: 100%;
    }
}

/* その他の既存のスタイルは維持 */

/* read-moreボタンの共通スタイル - 詳細度を上げて確実に適用されるようにする */
.article-item button.read-more,
.article-item.wide button.read-more,
.article-item.medium button.read-more,
.article-item .read-more,
.article-item.wide .read-more,
.article-item.medium .read-more {
    /* ベーススタイル */
    display: inline-block !important;
    padding: 8px 16px !important;
    margin-top: 15px !important;
    
    /* サイズ設定 */
    width: auto !important;
    height: auto !important;
    min-width: unset !important;
    max-width: unset !important;
    min-height: 0 !important;
    max-height: unset !important;
    
    /* 見た目 */
    background-color: #000080 !important;
    color: white !important;
    font-size: 0.9em !important;
    font-weight: bold !important;
    border-radius: 4px !important;
    border: none !important;
    
    /* テキスト設定 */
    text-decoration: none !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    line-height: normal !important;
    
    /* その他 */
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-sizing: border-box !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

/* ホバー時のスタイル */
.article-item button.read-more:hover,
.article-item.wide button.read-more:hover,
.article-item.medium button.read-more:hover,
.article-item .read-more:hover,
.article-item.wide .read-more:hover,
.article-item.medium .read-more:hover {
    background-color: #000066 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
}

/* アクティブ時のスタイル */
.article-item button.read-more:active,
.article-item.wide button.read-more:active,
.article-item.medium button.read-more:active,
.article-item .read-more:active,
.article-item.wide .read-more:active,
.article-item.medium .read-more:active {
    transform: translateY(0) !important;
}

/* スマートフォン向けの調整 */
@media screen and (max-width: 768px) {
    .article-item button.read-more,
    .article-item.wide button.read-more,
    .article-item.medium button.read-more,
    .article-item .read-more,
    .article-item.wide .read-more,
    .article-item.medium .read-more {
        padding: 6px 12px !important;
        font-size: 0.85em !important;
    }
}

/* スマートフォン向けのレイアウト調整 */
@media screen and (max-width: 768px) {
    /* image-onlyの記事の調整 */
    .article-item.image-only {
        height: 600px !important; /* 縦幅を大きく設定 */
        padding: 0;
        margin: 0;
        width: 100%;
        overflow: hidden;
    }

    .article-item.image-only .article-image {
        width: 100%;
        height: 100%;
        object-fit: cover; /* 画像をカバーモードで表示 */
        object-position: center;
    }

    /* カスタム高さクラスの調整 */
    .article-item.image-only.medium.custom-height-1,
    .article-item.image-only.large.custom-height-2 {
        height: 600px !important; /* 同じ高さを適用 */
    }
}

/* さらに小さい画面向けの調整 */
@media screen and (max-width: 480px) {
    .article-item.image-only,
    .article-item.image-only.medium.custom-height-1,
    .article-item.image-only.large.custom-height-2 {
        height: 500px !important; /* より小さい画面でも十分な高さを確保 */
    }
}

/* 80周年用のイメージコンテナのスマートフォン向け調整 */
@media screen and (max-width: 768px) {
    #anniversary-80 {
        margin: 20px 0 0 0;
    }

    #anniversary-80 .anniversary-image-container {
        height: 30vh;
    }

    #anniversary-80 .header-overlay {
        width: 85%;
        padding: 15px;
        top: 50%; /* 中央配置を維持 */
        left: 50%;
        transform: translate(-50%, -50%);
        /* 背景の透明度を上げて視認性を確保 */
        background: rgba(255, 255, 255, 0.9);
        /* はみ出し防止のための調整 */
        max-height: 80%;
        overflow: auto;
        /* 最小サイズを設定して潰れすぎを防ぐ */
        min-height: 60px;
    }

    #anniversary-80 .header-overlay h2 {
        font-size: clamp(2em, 7vw, 3.5em); /* フォントサイズをさらに大きく */
        letter-spacing: 0.05em;
        margin-bottom: 8px; /* 余白を少し増やす */
        line-height: 1.1; /* 行間を少し詰める */
    }

    #anniversary-80 .header-overlay .anniversary {
        font-size: clamp(0.8em, 2.2vw, 1em); /* 下のテキストは以前より少し小さく */
        margin-top: 8px;
    }
}

/* さらに小さい画面向けの調整 */
@media screen and (max-width: 480px) {
    #anniversary-80 {
        margin: 15px 0 0 0;
    }

    #anniversary-80 .anniversary-image-container {
        height: 25vh;
    }

    #anniversary-80 .header-overlay {
        width: 90%;
        padding: 10px;
        /* より小さい画面での位置調整 */
        max-height: 75%;
    }

    #anniversary-80 .header-overlay h2 {
        font-size: clamp(3em, 9vw, 4.5em); /* 小さい画面でも大きなサイズを維持 */
    }

    #anniversary-80 .header-overlay .anniversary {
        font-size: clamp(0.9em, 2.5vw, 1.2em);
    }
}

.panzoom-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
}

.modal-image-container {
    width: 100% !important;
    height: calc(100vh - 100px) !important;
    overflow: hidden !important;
    position: relative !important;
    background-color: #000 !important;
    scroll-behavior: smooth;
}

.modal-image {
    max-width: 90% !important;
    max-height: 90% !important;
    object-fit: contain !important;
    transition: opacity 0.3s ease-out !important;
}

/* モーダル内でのスワイプを防止 */
.modal {
    touch-action: none;
}

.modal-image-container {
    touch-action: none;
}

.panzoom-container {
    touch-action: none;
}

/* スワイプ防止のためのスタイル */
.modal, 
.modal-image-container, 
.panzoom-container {
    touch-action: none !important;
    /* iOS Safariでのスクロールバウンスを防止する代替方法 */
    position: fixed !important;
    -webkit-user-select: none !important;
    user-select: none !important;
}

/* トップのメインイメージコンテナのヘッダーオーバーレイ調整 */
#top-image-container .header-overlay h2 {
    font-weight: 900; /* 太文字に設定 */
    margin-bottom: 10px;
}

#top-image-container .header-overlay small {
    color: white; /* 白色に戻す */
    font-size: 1.5em;
    font-weight: normal;
}

