/* ----------------------------------
   基本設定（全デバイス共通）
---------------------------------- */
* {
    /* サイズ計算を簡単にします */
    box-sizing: border-box; 
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, "Hiragino Kaku Gothic ProN", "ヒラギノ角ゴ ProN W3", "メイリオ", "ＭＳ Ｐゴシック", sans-serif;
    line-height: 1.7;
    background-color: #FFF;
    color: #333;
}

img {
    /* 画像が親要素をはみ出さないようにします */
    max-width: 100%;
    height: auto;
    border-radius: 5px; /* 元のCSSにあった角丸を適用 */
}

a {
    color: #002E73; /* 元のCSSの色を参考にしました */
}

hr {
    margin: 2rem 0;
    border: 0;
    border-top: 1px solid #CCC;
}

/* サイト全体のラッパー */
.wrapper {
    max-width: 960px; /* PCでの最大幅 */
    margin: 0 auto;
    padding: 0 1rem; /* スマホ用の左右余白 */
    overflow: hidden; /* float解除の代わり */
}

/* ----------------------------------
   ヘッダー
---------------------------------- */
header {
    padding: 1rem 0;
    text-align: center; /* ロゴを中央に */
    position: relative; /* ハンバーガーボタンの配置基準 */
}

header h1 {
    font-size: 1rem; /* h1のデフォルトスタイルをリセット */
    text-align: center; /* ロゴ画像を中央に配置 */
    
    /* ▼▼▼ ロゴがボタン領域にかぶらないよう、左右に余白を確保 ▼▼▼ */
    /* ボタン(40px) + ボタンのleft(1rem) = 約 56px。余裕をもって60px確保 */
    padding-left: 60px;
    padding-right: 60px;
    /* ▲▲▲ 変更点 ▲▲▲ */
}

/* ハンバーガーメニュー (モバイルで表示) */
.hamburger-menu {
    display: block; /* モバイルでは表示 */
    
    /* "左側" に絶対配置 */
    position: absolute; 
    left: 1rem; /* 左端からの位置 */
    top: 50%;
    transform: translateY(-50%); /* 上下中央揃え */
    
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 100; /* メニューより手前に表示 */
}

.hamburger-menu span {
    display: block;
    width: 30px;
    height: 3px;
    background-color: #333; /* 線の色 */
    margin: 6px auto;
    transition: transform 0.3s, opacity 0.3s;
}

/* ハンバーガーメニュー 'X' のアニメーション (JSで .menu-open が付いた時) */
.hamburger-menu.menu-open span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}
.hamburger-menu.menu-open span:nth-child(2) {
    opacity: 0;
}
.hamburger-menu.menu-open span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* ハンバーガーメニュー 'X' のアニメーション (JSで .menu-open が付いた時) */
.hamburger-menu.menu-open span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}
.hamburger-menu.menu-open span:nth-child(2) {
    opacity: 0;
}
.hamburger-menu.menu-open span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}


/* ----------------------------------
   ナビゲーション
---------------------------------- */
/* モバイルではデフォルトで非表示に変更 */
nav#global {
    display: none; 
    width: 100%;
    position: relative;
    z-index: 99;
    padding-top: 1rem; /* ヘッダーとの隙間 */
}

/* JSで .menu-open が付いたら表示 */
nav#global.menu-open {
    display: block;
}

nav#global ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    /* スマホでは縦並び */
    flex-direction: column; 
    gap: 0.5rem; /* リンク間の隙間 */
}

nav#global ul li a {
    display: block;
    text-decoration: none;
    padding: 0.75rem;
    background-color: #f4f4f4;
    border-radius: 5px;
    text-align: center;
    font-weight: bold;
    transition: background-color 0.2s;
}

nav#global ul li a:hover {
    background-color: #e0e0e0;
}

/* ----------------------------------
   メインコンテンツ
---------------------------------- */
main {
    padding: 1rem 0;
}
/* ...（中略）... */
.top-image {
    width: 100%; /* メイン画像は常に横幅いっぱいに */
    margin-bottom: 2rem;
}

.content-section {
    padding: 1rem 0;
}

.content-section h2 {
    font-size: 1.5rem;
    color: #002E73;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #002E73;
    margin-bottom: 1rem;
}

.content-section p {
    margin-bottom: 1rem;
}

.highlight {
    color: #ff0000; /* 募集の赤文字 */
    font-weight: bold;
}

/* メディア（野球）レイアウト */
.media-layout {
    display: flex;
    /* スマホでは縦並び */
    flex-direction: column; 
    gap: 1rem;
}
.media-images {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Gマークレイアウト */
.g-mark-layout {
    display: flex;
    /* スマホでは縦並び */
    flex-direction: column; 
    gap: 1rem;
    align-items: center; /* スマホではGマークを中央に */
}

.g-mark-layout img {
    /* 元のCSSに合わせてサイズ指定 */
    width: 90px; 
    height: 98px;
    flex-shrink: 0; /* 縮まないようにする */
}

/* ----------------------------------
   フッター
---------------------------------- */
footer {
    padding: 2rem 1rem;
    margin-top: 1rem;
    text-align: center;
    font-size: 0.875rem;
    border-top: 1px solid #CCC;
}


/* ----------------------------------
   PC用スタイル (768px以上)
---------------------------------- */
@media (min-width: 768px) {
    .wrapper {
        padding: 0 2rem; /* PC用の左右余白 */
    }

    header {
        justify-content: center; /* ロゴを中央に */
        text-align: center; /* PCでも中央揃えを維持 */
    }

    /* ▼▼▼ PCでは h1 の padding をリセット ▼▼▼ */
    header h1 {
        padding-left: 0;
        padding-right: 0;
    }
    /* ▲▲▲ 変更点 ▲▲▲ */

    /* PCではハンバーガーボタンを非表示 */
    .hamburger-menu {
        display: none;
    }

    /* PCではナビゲーションを常に表示し、スタイルをリセット */
    nav#global {
        display: block !important; /* JSの状態に関わらず常に表示 */
        position: static;
        padding-top: 0;
    }

    /* ナビゲーションを横並びに */
    nav#global ul {
        flex-direction: row;
        justify-content: space-between;
    }
    
    nav#global ul li {
        flex: 1; /* 各項目を均等幅に */
    }
    
    /* メディア（野球）レイアウトを横並びに */
    .media-layout {
        flex-direction: row; /* 横並び */
    }
    .media-images {
        flex: 0 0 320px; /* 画像エリアの幅を固定 (元の画像幅 300px + α) */
        flex-direction: column;
    }
    .media-text {
        flex: 1; /* 残りの幅をテキストエリアが取る */
    }

    /* Gマークレイアウトを横並びに */
    .g-mark-layout {
        flex-direction: row; /* 横並び */
        align-items: flex-start; /* 上揃え */
        text-align: left;
    }
}