/* リセットCSS */
/* --- Root Variables & Reset --- */
:root {
    --color-primary: #1e4584; /* 深緑 */
    --color-accent: #A08C69; /* 茶色/ベージュ */
    --color-text: #333333;
    --color-ackground: #F8F8F8;
    --color-light: #ffffff;
    --max-content-width: 1000px;
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: sans-serif;
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

/* 0. 新しいサイトヘッダー */
.site-header {
    width: 100%;
    /* hero-sectionの上に重ねるために、z-indexを設定し、hero-sectionのpaddingと揃える */
    padding: 10px 20px 10px; 
    z-index: 10; /* 他の要素より手前に表示 */
    /* position: absolute; hero-sectionの上に重ねて表示 */
    top: 0;
    left: 0;
    background-color: rgb(255, 255, 255);
    /* 💡 追加: Flexboxで子要素を横並びにする */
    display: flex;
    /* 💡 追加: 垂直方向の中央揃え */
    align-items: center;
}

.header-logo-left {
    display: block;
    max-width: 40px; /* PCでの最大の幅 */
    height: auto;
    margin-left: 1%; /* App.jsxのロゴを左寄せにする場合は、このプロパティを調整 */
    /* 💡 修正箇所: 右側にスペースを追加 */
    margin-right: 20px; /* 例: 20pxのスペースを確保 */
}

/* 1. トップ画像セクション (画面いっぱいのヒーロー) */
.hero-section {
    /* height: 90vh; */
    /* 画面高の85%を使用（PCなど）*/
    height: 100vh; 
    /* どんなに画面が短くなっても、最低550pxの高さを保証 */
    min-height: 550px;
    background-image: url('https://pub-4c29999257664a42849ba4a8ae6e59d6.r2.dev/football/top_img.webp');
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    position: relative;
    z-index: 1;
    
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: -1;
}

.hero-content h1 {
    font-size: 3em;
    margin-bottom: 10px;
}

/* 4. トップ左上キャプションの絶対配置 */
.caption-text {
    position: absolute;
    left: 5%; 
    top: 20px; 
    color: white;
    font-size: 1.1em;
    z-index: 2;
    max-width: 1200px;
    padding: 0 20px;
}

.caption-logo {
    position: absolute;
    left: 3%; 
    top: 20px; 
    z-index: 2;
    max-width: 100px;
    padding: 0 20px;
}

.caption-logo-center {
    position: center;
    left: 3%; 
    top: 20px; 
    z-index: 2;
    max-width: 600px;
    padding: 0 20px;
}

/* 2. ギャラリーセクション (タイル状) */
.gallery-section {
    padding: 40px 0;
    background-color: #f4f4f4;
    text-align: center;
}

.gallery-section h2 {
    margin-bottom: 30px;
    font-size: 2em;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.gallery-item {
    display: block;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    height: 200px;
}

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

.gallery-item:hover img {
    transform: scale(1.05);
}

/* 3. モーダル（ポップアップ） */
.modal-window {
    visibility: hidden;
    opacity: 0;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transition: opacity 0.3s;
    z-index: 1000;
}

/* .modal-window:target {
    visibility: visible;
    opacity: 1;
} */

.modal-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    cursor: pointer;
}

.modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    position: absolute;
    top: 50%;
    left: 50%; 
    transform: translate(-50%, -50%);
    width: 85%;
    /* max-width: none; */
    max-width: 900px; /* 例えば、最大幅を設定 */
    max-height: 95vh;
    overflow-y: auto; 
    padding-bottom: 30px; 
}

.modal-content img {
    max-width: 100%;
    max-height: 90vh;
    height: auto;
    display: block;
    margin: 0 auto 15px;
    border-radius: 5px;
}

/* 閉じるボタン */
.modal-close-button {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 2em;
    text-decoration: none;
    color: #333;
    line-height: 1;
    z-index: 100;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: rgb(82, 82, 82);
}

/* モーダル前後移動ボタン */
.modal-nav-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 3em;
    text-decoration: none;
    color: rgba(82, 82, 82, 0.7);
    background: rgba(255, 255, 255, 0.3);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 101;
    line-height: 1;
}

.modal-nav-button:hover {
    background: rgba(255, 255, 255, 0.5);
    color: rgb(50, 50, 50);
}

.modal-prev-button {
    left: 10px;
}

.modal-next-button {
    right: 10px;
}

.site-footer {
    background-color: #888888;
    padding: 20px 0;
    text-align: center; 
}

.site-footer p {
    color: #ffffff;
    margin: 0;
    font-size: 0.9em;
}

.site-message {
    background-color: #bcbcbc;
    padding: 20px 0;
    text-align: center; 
}

.site-message p {
    color: #000000;
    margin: 0;
    font-size: 0.9em;
}

/* ページネーションのスタイル */
.pagination-controls {
    text-align: center;
    padding: 30px 0 10px;
}

.pagination-wrapper {
    display: inline-flex;
    gap: 10px;
    margin-top: 20px;
}

.pagination-button {
    display: block;
    padding: 8px 12px;
    border: 1px solid #ccc;
    text-decoration: none;
    color: #333;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.pagination-ellipsis {
    /* ボタンと同じ垂直方向の中央揃えを維持 */
    padding: 8px 0px; 
    color: #666;
    display: flex; 
    align-items: center;
    justify-content: center;
    font-weight: bold;
    user-select: none; /* テキスト選択不可 */
    /* ボタンの幅と並ぶように適度な幅を設定 */
    width: 30px; 
}

.pagination-button:hover:not(.active):not(.disabled) {
    background-color: #e0e0e0;
}

.pagination-button.active {
    background-color: #333;
    color: white;
    border-color: #333;
    font-weight: bold;
    cursor: default;
}

.pagination-button.disabled {
    color: #aaa;
    background-color: #f9f9f9;
    cursor: not-allowed;
    pointer-events: none;
}

/* style.css (仮定) */
.center-table {
  /* テーブルの幅をコンテンツに合わせるか、固定/パーセントで設定 */
  width: fit-content; 
  /* 左右のマージンを自動調整して中央寄せ */
  margin-left: auto;
  margin-right: auto;
  /* 念のため、親要素として少しマージンを確保 */
  padding: 20px;
}

/* style.css に追記 */
.game-data-table {
    border-collapse: collapse; /* 罫線を重ねる */
    width: 100%; /* 親要素の幅いっぱいに広げる */
    max-width: 400px; /* テーブルの最大幅を設定 */
    font-size: 0.9em;
}

.game-data-table th, .game-data-table td {
    border: 1px solid #ccc;
    padding: 6px 10px;
    text-align: center;
}

/* .game-data-table th {
    background-color: #f4f4f4;
} */
/* --- Buttons --- */
.button {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 5px;
    font-weight: bold;
    margin-top: 20px;
    transition: background-color 0.3s, opacity 0.3s;
    font-size: 1.1rem;
    text-transform: uppercase;
}

.primary-button {
    background-color: var(--color-primary);
    color: var(--color-light);
    border: 1px solid var(--color-light);
}

.primary-button:hover {
    background-color: #436bac;
    border-color: #436bac;
    text-decoration: none;
    border: 1px solid var(--color-light);
}

a {
    /* リンクの下線を無効にする */
    text-decoration: none;
}

/* モバイル対応 (例えば、画面幅が600px以下の場合) */
@media (max-width: 900px) {
    .hero-section {
        /* heightを無効にし、コンテンツとパディングで高さを決める */
        height: auto; 
        /* モバイルでも最低限の縦幅を確保 */
        min-height: 50vh; 
        /* 上下に大きめのパディングを設けて、上下のスペースを確保 */
        padding: 80px 0; 
    }

    .modal-content {
        width: 95%; /* モバイルでは横幅を広く取る */
        max-width: none;
    }
    
    .modal-nav-button {
        font-size: 2em; /* ボタンを少し小さく */
        width: 40px;
        height: 40px;
    }

    .caption-logo {
        max-width: 80px; /* PCでの100pxから60pxに縮小 */
        left: 5%; /* 3% から 5% に調整して内側に寄せる */
    }

    .caption-logo-center {
        max-width: 300px; /* PCでの100pxから60pxに縮小 */
        left: 5%; /* 3% から 5% に調整して内側に寄せる */
    }
    
/* h1のサイズを3emから2em程度に大幅に縮小 */
    .hero-content h1 {
        font-size: 2em; /* 既存の3emから縮小 */
        line-height: 1.2; /* 行間を調整して詰まりすぎないように */
    }
    
    /* h2のサイズも縮小 */
    .hero-content h2 {
        font-size: 1.1em;
    }
    
    /* pタグのサイズも必要に応じて調整 */
    .hero-content p {
        font-size: 0.85em;
    }
}